Skip to content

Commit 682835b

Browse files
authored
[oneVPL] Update to oneVPL Spec v2.7 (#412)
1 parent 5b5466b commit 682835b

20 files changed

+1150
-151
lines changed

oneapi-doc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"version": "1.1-rev-1",
3-
"vpl_version": "2.6.0",
3+
"vpl_version": "2.7.0",
44
"art_version": "1.0-rev-1"
55
}

releases/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,9 @@ New in this release:
358358
* Marked all deprecated fields as MFX_DEPRECATED.
359359
* Introduced priority loading option for custom libraries.
360360
* Clarified AV1 encoder behavior about writing of IVF headers.
361-
* Removed outdated note about loading priority of Intel Media Software
362-
Development Kit
361+
* Removed outdated note about loading priority of |msdk_full_name|.
362+
For loading details see
363+
:ref:`onevpl_coexistense`.
363364
* Spelled out mfxVariant type usage for strings.
364365
* New product names for platforms:
365366

source/conf/common_conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
'sphinxcontrib.plantuml',
4141
'breathe',
4242
'dalapi', # oneDAL API generator
43+
'vplapi',
4344
]
4445

4546
with open(join(repo_root, 'oneapi-doc.json')) as fin: # noqa: F821

source/elements/oneVPL/include/vpl/mfx.h

+4
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@
2424

2525
#include "mfxsurfacepool.h"
2626

27+
#ifdef ONEVPL_EXPERIMENTAL
28+
#include "mfxencodestats.h"
29+
#endif
30+
2731
#endif /* __MFXDEFS_H__ */

source/elements/oneVPL/include/vpl/mfxcommon.h

+85-7
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,70 @@ typedef struct {
2929
} mfxExtBuffer;
3030
MFX_PACK_END()
3131

32+
#ifdef ONEVPL_EXPERIMENTAL
33+
34+
#define MFX_REFINTERFACE_VERSION MFX_STRUCT_VERSION(1, 0)
35+
36+
MFX_PACK_BEGIN_STRUCT_W_PTR()
37+
/*! The structure respresents reference counted interface structure.
38+
The memory is allocated and released by the implementation.
39+
*/
40+
typedef struct mfxRefInterface {
41+
mfxHDL Context; /*!< The context of the container interface. User should not touch (change, set, null) this pointer. */
42+
mfxStructVersion Version; /*!< The version of the structure. */
43+
/*! @brief
44+
Increments the internal reference counter of the container. The container is not destroyed until the container
45+
is released using the mfxRefInterface::Release function.
46+
mfxRefInterface::AddRef should be used each time a new link to the container is created
47+
(for example, copy structure) for proper management.
48+
49+
@param[in] ref_interface Valid interface.
50+
51+
@return
52+
MFX_ERR_NONE If no error. \n
53+
MFX_ERR_NULL_PTR If interface is NULL. \n
54+
MFX_ERR_INVALID_HANDLE If mfxRefInterface->Context is invalid (for example NULL). \n
55+
MFX_ERR_UNKNOWN Any internal error.
56+
57+
*/
58+
mfxStatus (MFX_CDECL *AddRef)(struct mfxRefInterface* ref_interface);
59+
/*! @brief
60+
Decrements the internal reference counter of the container. mfxRefInterface::Release should be called after using the
61+
mfxRefInterface::AddRef function to add a container or when allocation logic requires it.
62+
63+
@param[in] ref_interface Valid interface.
64+
65+
@return
66+
MFX_ERR_NONE If no error. \n
67+
MFX_ERR_NULL_PTR If interface is NULL. \n
68+
MFX_ERR_INVALID_HANDLE If mfxRefInterface->Context is invalid (for example NULL). \n
69+
MFX_ERR_UNDEFINED_BEHAVIOR If Reference Counter of container is zero before call. \n
70+
MFX_ERR_UNKNOWN Any internal error.
71+
*/
72+
mfxStatus (MFX_CDECL *Release)(struct mfxRefInterface* ref_interface);
73+
/*! @brief
74+
Returns current reference counter of mfxRefInterface structure.
75+
76+
@param[in] ref_interface Valid interface.
77+
@param[out] counter Sets counter to the current reference counter value.
78+
79+
@return
80+
MFX_ERR_NONE If no error. \n
81+
MFX_ERR_NULL_PTR If interface or counter is NULL. \n
82+
MFX_ERR_INVALID_HANDLE If mfxRefInterface->Context is invalid (for example NULL). \n
83+
MFX_ERR_UNKNOWN Any internal error.
84+
*/
85+
mfxStatus (MFX_CDECL *GetRefCounter)(struct mfxRefInterface* ref_interface, mfxU32* counter);
86+
mfxHDL reserved[4];
87+
88+
}mfxRefInterface;
89+
MFX_PACK_END()
90+
#endif
91+
3292
/* Library initialization and deinitialization */
3393
/*!
3494
This enumerator itemizes implementation types.
35-
The implementation type is a bit ORed value of the base type and any decorative flags.
95+
The implementation type is a bit OR'ed value of the base type and any decorative flags.
3696
@note This enumerator is for legacy dispatcher compatibility only. The new dispatcher does not use it.
3797
*/
3898
typedef mfxI32 mfxIMPL;
@@ -129,7 +189,8 @@ typedef struct _mfxSyncPoint *mfxSyncPoint;
129189
/*! The GPUCopy enumerator controls usage of GPU accelerated copying between video and system memory in the legacy Intel(r) Media SDK components. */
130190
enum {
131191
MFX_GPUCOPY_DEFAULT = 0, /*!< Use default mode for the legacy Intel(r) Media SDK implementation. */
132-
MFX_GPUCOPY_ON = 1, /*!< Enable GPU accelerated copying. */
192+
MFX_GPUCOPY_ON = 1, /*!< The hint to enable GPU accelerated copying when it is supported by the library.
193+
If the library doesn't support GPU accelerated copy the operation will be made by CPU. */
133194
MFX_GPUCOPY_OFF = 2 /*!< Disable GPU accelerated copying. */
134195
};
135196

@@ -141,7 +202,7 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
141202
typedef struct {
142203
mfxIMPL Implementation; /*!< Enumerator that indicates the desired legacy Intel(r) Media SDK implementation. */
143204
mfxVersion Version; /*!< Structure which specifies minimum library version or zero, if not specified. */
144-
mfxU16 ExternalThreads; /*!< Desired threading mode. Value 0 means internal threading, 1 external. */
205+
mfxU16 ExternalThreads; /*!< Desired threading mode. Value 0 means internal threading, 1 - external. */
145206
/*! @internal :unnamed(union) @endinternal */
146207
union {
147208
struct {
@@ -156,7 +217,7 @@ typedef struct {
156217
MFX_PACK_END()
157218

158219
enum {
159-
MFX_EXTBUFF_THREADS_PARAM = MFX_MAKEFOURCC('T','H','D','P') /*!< mfxExtThreadsParam buffer ID */
220+
MFX_EXTBUFF_THREADS_PARAM = MFX_MAKEFOURCC('T','H','D','P') /*!< mfxExtThreadsParam buffer ID. */
160221
};
161222

162223
MFX_PACK_BEGIN_USUAL_STRUCT()
@@ -200,6 +261,7 @@ enum {
200261
MFX_PLATFORM_XEHP_SDV = 45, /*!< Code name XeHP SDV. */
201262
MFX_PLATFORM_DG2 = 46, /*!< Code name DG2. */
202263
MFX_PLATFORM_ATS_M = 46, /*!< Code name ATS-M, same media functionality as DG2. */
264+
MFX_PLATFORM_ALDERLAKE_N = 55, /*!< Code name Alder Lake N. */
203265
MFX_PLATFORM_KEEMBAY = 50, /*!< Code name Keem Bay. */
204266
};
205267

@@ -287,7 +349,12 @@ typedef struct {
287349
mfxU32 CodecID; /*!< Encoder ID in FourCC format. */
288350
mfxU16 MaxcodecLevel; /*!< Maximum supported codec level. See the CodecProfile enumerator for possible values. */
289351
mfxU16 BiDirectionalPrediction; /*!< Indicates B-frames support. */
352+
#ifdef ONEVPL_EXPERIMENTAL
353+
mfxU16 ReportedStats; /*!< Indicates what type of statistics can be reported: block/slice/tile/frame. */
354+
mfxU16 reserved[6]; /*!< Reserved for future use. */
355+
#else
290356
mfxU16 reserved[7]; /*!< Reserved for future use. */
357+
#endif
291358
mfxU16 NumProfiles; /*!< Number of supported profiles. */
292359
/*! This structure represents the codec profile description. */
293360
struct encprofile {
@@ -514,10 +581,21 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
514581
*/
515582
typedef struct {
516583
mfxAccelerationMode AccelerationMode; /*!< Hardware acceleration stack to use. OS dependent parameter. Use VA for Linux*, DX* for Windows* or HDDL. */
584+
#ifdef ONEVPL_EXPERIMENTAL
585+
mfxU16 DeviceCopy; /*!< Enables or disables device's accelerated copying between device and
586+
host. See the GPUCopy enumerator for a list of valid values.
587+
This parameter is the equivalent of mfxInitParam::GPUCopy. */
588+
mfxU16 reserved[2]; /*!< Reserved for future use. */
589+
#else
517590
mfxU16 reserved[3]; /*!< Reserved for future use. */
518-
mfxU16 NumExtParam; /*!< The number of extra configuration structures attached to this structure. */
519-
mfxExtBuffer **ExtParam; /*!< Points to an array of pointers to the extra configuration structures; see the ExtendedBufferID enumerator for a list of extended configurations. */
520-
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents the same field from mfxImplDescription. */
591+
#endif
592+
mfxU16 NumExtParam; /*!< The number of extra configuration structures attached to this
593+
structure. */
594+
mfxExtBuffer **ExtParam; /*!< Points to an array of pointers to the extra configuration structures;
595+
see the ExtendedBufferID enumerator for a list of extended
596+
configurations. */
597+
mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents
598+
the same field from mfxImplDescription. */
521599
mfxU32 reserved2[3]; /*!< Reserved for future use. */
522600
} mfxInitializationParam;
523601
MFX_PACK_END()

source/elements/oneVPL/include/vpl/mfxdefs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define __MFXDEFS_H__
99

1010
#define MFX_VERSION_MAJOR 2
11-
#define MFX_VERSION_MINOR 6
11+
#define MFX_VERSION_MINOR 7
1212

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

0 commit comments

Comments
 (0)