Skip to content

Commit a575fbf

Browse files
oneVPL 2.2 API version release (#291)
1 parent 3fbac1b commit a575fbf

40 files changed

+1505
-355
lines changed

oneapi-doc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"version": "1.0-rev-2",
3-
"vpl_version": "2.1.0",
3+
"vpl_version": "2.2.0",
44
"art_version": "0.5-rev-1"
55
}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ sphinxcontrib-spelling
2020
sphinxcontrib-svg2pdfconverter
2121
graphviz
2222
lxml
23+
sphinxcontrib.plantuml

source/conf/common_conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
sys.path.insert(
1818
0, abspath(join(repo_root, 'source', 'elements', 'oneDAL')) # noqa: F821
1919
)
20+
sys.path.insert(
21+
0, abspath(join(repo_root, 'source', 'elements', 'oneVPL')) # noqa: F821
22+
)
2023

2124
extensions = [
2225
'notfound.extension',
@@ -34,7 +37,9 @@
3437
'sphinxcontrib.inkscapeconverter',
3538
'sphinx-prompt',
3639
'sphinx_substitution_extensions',
40+
'sphinxcontrib.plantuml',
3741
'breathe',
42+
# 'vplapi',
3843
'dalapi', # oneDAL API generator
3944
]
4045

source/elements/oneVPL/include/onevpl/mfxvp9.h

Lines changed: 0 additions & 40 deletions
This file was deleted.

source/elements/oneVPL/include/onevpl/mfxadapter.h renamed to source/elements/oneVPL/include/vpl/mfxadapter.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ extern "C"
2929
@p input_info or adapters pointer is NULL. \n
3030
MFX_ERR_NOT_FOUND No suitable adapters found. \n
3131
MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.
32+
33+
@since This function is available since API version 1.31.
3234
*/
3335
mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersInfo* adapters);
3436

@@ -45,6 +47,8 @@ mfxStatus MFX_CDECL MFXQueryAdapters(mfxComponentInfo* input_info, mfxAdaptersIn
4547
MFX_ERR_NULL_PTR bitstream or @p adapters pointer is NULL. \n
4648
MFX_ERR_NOT_FOUND No suitable adapters found. \n
4749
MFX_WRN_OUT_OF_RANGE Not enough memory to report back entire list of adapters. In this case as many adapters as possible will be returned.
50+
51+
@since This function is available since API version 1.31.
4852
*/
4953
mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec_id, mfxAdaptersInfo* adapters);
5054

@@ -57,6 +61,8 @@ mfxStatus MFX_CDECL MFXQueryAdaptersDecode(mfxBitstream* bitstream, mfxU32 codec
5761
@return
5862
MFX_ERR_NONE The function completed successfully. \n
5963
MFX_ERR_NULL_PTR num_adapters pointer is NULL.
64+
65+
@since This function is available since API version 1.31.
6066
*/
6167
mfxStatus MFX_CDECL MFXQueryAdaptersNumber(mfxU32* num_adapters);
6268
#ifdef __cplusplus

source/elements/oneVPL/include/onevpl/mfxbrc.h renamed to source/elements/oneVPL/include/vpl/mfxbrc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ enum {
7676
MFX_BRC_PANIC_SMALL_FRAME = 4 /*!< Coded frame is too small, no further recoding possible - required padding to mfxBRCFrameStatus::MinFrameSize. */
7777
};
7878

79-
MFX_PACK_BEGIN_USUAL_STRUCT()
79+
MFX_PACK_BEGIN_STRUCT_W_PTR()
8080
/*!
8181
Specifies instructions for the encoder provided by external BRC after each frame encoding. See the BRCStatus enumerator for details.
8282
*/

source/elements/oneVPL/include/onevpl/mfxcommon.h renamed to source/elements/oneVPL/include/vpl/mfxcommon.h

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,13 @@ enum {
5252
MFX_IMPL_HARDWARE4 = 0x0007, /*!< Hardware accelerated implementation (4th device). */
5353
MFX_IMPL_RUNTIME = 0x0008, /*!< This value cannot be used for session initialization. It may be returned by the MFXQueryIMPL
5454
function to show that the session has been initialized in run-time mode. */
55-
#if (MFX_VERSION >= MFX_VERSION_NEXT)
56-
MFX_IMPL_SINGLE_THREAD= 0x0009,
57-
#endif
5855
MFX_IMPL_VIA_ANY = 0x0100, /*!< Hardware acceleration can go through any supported OS infrastructure. This is the default value. The default value
5956
is used by the legacy Intel(r) Media SDK if none of the MFX_IMPL_VIA_xxx flags are specified by the application. */
6057
MFX_IMPL_VIA_D3D9 = 0x0200, /*!< Hardware acceleration goes through the Microsoft* Direct3D* 9 infrastructure. */
6158
MFX_IMPL_VIA_D3D11 = 0x0300, /*!< Hardware acceleration goes through the Microsoft* Direct3D* 11 infrastructure. */
6259
MFX_IMPL_VIA_VAAPI = 0x0400, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure. */
6360
MFX_IMPL_VIA_HDDLUNITE = 0x0500, /*!< Hardware acceleration goes through the HDDL* Unite*. */
6461

65-
#if (MFX_VERSION >= MFX_VERSION_NEXT)
66-
MFX_IMPL_EXTERNAL_THREADING = 0x10000,
67-
#endif
68-
6962
MFX_IMPL_UNSUPPORTED = 0x0000 /*!< One of the MFXQueryIMPL returns. */
7063
};
7164

@@ -368,9 +361,16 @@ typedef enum {
368361
MFX_ACCEL_MODE_VIA_D3D9 = 0x0200, /*!< Hardware acceleration goes through the Microsoft* Direct3D9* infrastructure. */
369362
MFX_ACCEL_MODE_VIA_D3D11 = 0x0300, /*!< Hardware acceleration goes through the Microsoft* Direct3D11* infrastructure. */
370363
MFX_ACCEL_MODE_VIA_VAAPI = 0x0400, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure. */
364+
MFX_ACCEL_MODE_VIA_VAAPI_DRM_RENDER_NODE = MFX_ACCEL_MODE_VIA_VAAPI, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with DRM RENDER MODE as default acceleration access point. */
365+
MFX_ACCEL_MODE_VIA_VAAPI_DRM_MODESET = 0x0401, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with DRM MODESET as default acceleration access point. */
366+
MFX_ACCEL_MODE_VIA_VAAPI_GLX = 0x0402, /*! Hardware acceleration goes through the Linux* VA-API infrastructure with OpenGL Extension to the X Window System
367+
as default acceleration access point. */
368+
MFX_ACCEL_MODE_VIA_VAAPI_X11 = 0x0403, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with X11 as default acceleration access point. */
369+
MFX_ACCEL_MODE_VIA_VAAPI_WAYLAND = 0x0404, /*!< Hardware acceleration goes through the Linux* VA-API infrastructure with Wayland as default acceleration access point. */
371370
MFX_ACCEL_MODE_VIA_HDDLUNITE = 0x0500, /*!< Hardware acceleration goes through the HDDL* Unite*. */
372371
} mfxAccelerationMode;
373372

373+
374374
#define MFX_ACCELERATIONMODESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)
375375

376376
MFX_PACK_BEGIN_STRUCT_W_PTR()
@@ -393,7 +393,7 @@ typedef struct {
393393
mfxAccelerationMode AccelerationMode; /*!< Default Hardware acceleration stack to use. OS dependent parameter. Use VA for Linux* and DX* for Windows*. */
394394
mfxVersion ApiVersion; /*!< Supported API version. */
395395
mfxChar ImplName[MFX_IMPL_NAME_LEN]; /*!< Null-terminated string with implementation name given by vendor. */
396-
mfxChar License[MFX_STRFIELD_LEN]; /*!< Null-terminated string with license name of the implementation. */
396+
mfxChar License[MFX_STRFIELD_LEN]; /*!< Null-terminated string with comma-separated list of license names of the implementation. */
397397
mfxChar Keywords[MFX_STRFIELD_LEN]; /*!< Null-terminated string with comma-separated list of keywords specific to this implementation that dispatcher can search for. */
398398
mfxU32 VendorID; /*!< Standard vendor ID 0x8086 - Intel. */
399399
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. */
@@ -415,9 +415,19 @@ typedef struct {
415415
} mfxImplDescription;
416416
MFX_PACK_END()
417417

418+
MFX_PACK_BEGIN_STRUCT_W_PTR()
419+
/*! This structure represents the list of names of implemented functions. */
420+
typedef struct {
421+
mfxU16 NumFunctions; /*!< Number of function names in the FunctionsName array. */
422+
mfxChar** FunctionsName; /*!< Array of the null-terminated strings. Each string contains name of the implemented function. */
423+
} mfxImplementedFunctions;
424+
MFX_PACK_END()
425+
426+
418427
/* The mfxImplCapsDeliveryFormat enumerator specifies delivery format of the implementation capability. */
419428
typedef enum {
420-
MFX_IMPLCAPS_IMPLDESCSTRUCTURE = 1 /*!< Deliver capabilities as mfxImplDescription structure. */
429+
MFX_IMPLCAPS_IMPLDESCSTRUCTURE = 1, /*!< Deliver capabilities as mfxImplDescription structure. */
430+
MFX_IMPLCAPS_IMPLEMENTEDFUNCTIONS = 2 /*!< Deliver capabilities as mfxImplementedFunctions structure. */
421431
} mfxImplCapsDeliveryFormat;
422432

423433
MFX_PACK_BEGIN_STRUCT_W_PTR()
@@ -428,7 +438,8 @@ typedef struct {
428438
mfxU16 reserved[3]; /*!< Reserved for future use. */
429439
mfxU16 NumExtParam; /*!< The number of extra configuration structures attached to this structure. */
430440
mfxExtBuffer **ExtParam; /*!< Points to an array of pointers to the extra configuration structures; see the ExtendedBufferID enumerator for a list of extended configurations. */
431-
mfxU32 reserved2[4]; /*!< Reserved for future use. */
441+
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents the same filed from mfxImplDescription. */
442+
mfxU32 reserved2[3]; /*!< Reserved for future use. */
432443
} mfxInitializationParam;
433444
MFX_PACK_END()
434445

source/elements/oneVPL/include/onevpl/mfxdefs.h renamed to source/elements/oneVPL/include/vpl/mfxdefs.h

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,18 @@
88
#define __MFXDEFS_H__
99

1010
#define MFX_VERSION_MAJOR 2
11-
#define MFX_VERSION_MINOR 1
12-
13-
// MFX_VERSION_NEXT is always +1 from last public release
14-
// may be enforced by MFX_VERSION_USE_LATEST define
15-
// if MFX_VERSION_USE_LATEST is defined MFX_VERSION is ignored
16-
17-
#define MFX_VERSION_NEXT (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR + 1)
11+
#define MFX_VERSION_MINOR 2
1812

1913
// MFX_VERSION - version of API that 'assumed' by build may be provided externally
2014
// if it omitted then latest stable API derived from Major.Minor is assumed
2115

2216

2317
#if !defined(MFX_VERSION)
24-
#if defined(MFX_VERSION_USE_LATEST)
25-
#define MFX_VERSION MFX_VERSION_NEXT
26-
#else
2718
#define MFX_VERSION (MFX_VERSION_MAJOR * 1000 + MFX_VERSION_MINOR)
28-
#endif
2919
#else
20+
#undef MFX_VERSION_MAJOR
21+
#define MFX_VERSION_MAJOR ((MFX_VERSION) / 1000)
22+
3023
#undef MFX_VERSION_MINOR
3124
#define MFX_VERSION_MINOR ((MFX_VERSION) % 1000)
3225
#endif
@@ -82,9 +75,6 @@ extern "C"
8275
#error Unknown packing
8376
#endif
8477

85-
#define __INT64 long long
86-
#define __UINT64 unsigned long long
87-
8878
#ifdef _WIN32
8979
#define MFX_CDECL __cdecl
9080
#define MFX_STDCALL __stdcall
@@ -110,8 +100,8 @@ typedef int mfxL32; /*!< Signed integer, 32 bit type. */
110100
#endif
111101
typedef float mfxF32; /*!< Single-precision floating point, 32 bit type. */
112102
typedef double mfxF64; /*!< Double-precision floating point, 64 bit type. */
113-
typedef __UINT64 mfxU64; /*!< Unsigned integer, 64 bit type. */
114-
typedef __INT64 mfxI64; /*!< Signed integer, 64 bit type. */
103+
typedef unsigned long long mfxU64; /*!< Unsigned integer, 64 bit type. */
104+
typedef long long mfxI64; /*!< Signed integer, 64 bit type. */
115105
typedef void* mfxHDL; /*!< Handle type. */
116106
typedef mfxHDL mfxMemId; /*!< Memory ID type. */
117107
typedef void* mfxThreadTask; /*!< Thread task type. */

source/elements/oneVPL/include/onevpl/mfxdispatcher.h renamed to source/elements/oneVPL/include/vpl/mfxdispatcher.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ typedef struct _mfxConfig *mfxConfig;
2424
/*!
2525
@brief Creates the loader.
2626
@return Loader Loader handle or NULL if failed.
27+
28+
@since This function is available since API version 2.0.
2729
*/
2830
mfxLoader MFX_CDECL MFXLoad();
2931

3032
/*!
3133
@brief Destroys the dispatcher.
3234
@param[in] loader Loader handle.
35+
36+
@since This function is available since API version 2.0.
3337
*/
3438
void MFX_CDECL MFXUnload(mfxLoader loader);
3539

@@ -50,6 +54,8 @@ void MFX_CDECL MFXUnload(mfxLoader loader);
5054
@endcode
5155
@param[in] loader Loader handle.
5256
@return Config handle or NULL pointer is failed.
57+
58+
@since This function is available since API version 2.0.
5359
*/
5460
mfxConfig MFX_CDECL MFXCreateConfig(mfxLoader loader);
5561

@@ -128,6 +134,8 @@ mfxConfig MFX_CDECL MFXCreateConfig(mfxLoader loader);
128134
MFX_ERR_NULL_PTR If name is NULL. \n
129135
MFX_ERR_NOT_FOUND If name contains unknown parameter name.
130136
MFX_ERR_UNSUPPORTED If value data type does not equal the parameter with provided name.
137+
138+
@since This function is available since API version 2.0.
131139
*/
132140
mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* name, mfxVariant value);
133141

@@ -144,6 +152,8 @@ mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* na
144152
MFX_ERR_NULL_PTR If idesc is NULL. \n
145153
MFX_ERR_NOT_FOUND Provided index is out of possible range. \n
146154
MFX_ERR_UNSUPPORTED If requested format is not supported.
155+
156+
@since This function is available since API version 2.0.
147157
*/
148158
mfxStatus MFX_CDECL MFXEnumImplementations(mfxLoader loader, mfxU32 i, mfxImplCapsDeliveryFormat format, mfxHDL* idesc);
149159

@@ -176,6 +186,8 @@ mfxStatus MFX_CDECL MFXEnumImplementations(mfxLoader loader, mfxU32 i, mfxImplCa
176186
MFX_ERR_NULL_PTR If loader is NULL. \n
177187
MFX_ERR_NULL_PTR If session is NULL. \n
178188
MFX_ERR_NOT_FOUND Provided index is out of possible range.
189+
190+
@since This function is available since API version 2.0.
179191
*/
180192
mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* session);
181193

@@ -190,6 +202,8 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
190202
MFX_ERR_NONE The function completed successfully. \n
191203
MFX_ERR_NULL_PTR If loader is NULL. \n
192204
MFX_ERR_INVALID_HANDLE Provided hdl handle is not associated with this loader.
205+
206+
@since This function is available since API version 2.0.
193207
*/
194208
mfxStatus MFX_CDECL MFXDispReleaseImplDescription(mfxLoader loader, mfxHDL hdl);
195209

source/elements/oneVPL/include/onevpl/mfxdispatcherprefixedfunctions.h renamed to source/elements/oneVPL/include/vpl/mfxdispatcherprefixedfunctions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
#define MFXVideoDECODE_VPP_DecodeFrameAsync disp_MFXVideoDECODE_VPP_DecodeFrameAsync
143143
#define MFXVideoDECODE_VPP_Reset disp_MFXVideoDECODE_VPP_Reset
144144
#define MFXVideoDECODE_VPP_GetChannelParam disp_MFXVideoDECODE_VPP_GetChannelParam
145+
#define MFXVideoDECODE_VPP_Close disp_MFXVideoDECODE_VPP_Close
145146

146147
#define MFXVideoVPP_ProcessFrameAsync disp_MFXVideoVPP_ProcessFrameAsync
147148

0 commit comments

Comments
 (0)