summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch')
-rw-r--r--recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch741
1 files changed, 0 insertions, 741 deletions
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch b/recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch
deleted file mode 100644
index 030b395c..00000000
--- a/recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch
+++ /dev/null
@@ -1,741 +0,0 @@
1From bb2f6199088879568e31f91f6d9b7aa737c5aa04 Mon Sep 17 00:00:00 2001
2From: Jon Recker <jon.recker@intel.com>
3Date: Wed, 9 Jun 2021 10:39:10 +0800
4Subject: [PATCH] Update headers to oneAPI-spec v2.3 (e170992)
5
6Upstream-Status: Submitted
7---
8 api/vpl/mfx.h | 25 ++++++++
9 api/vpl/mfxcommon.h | 9 ++-
10 api/vpl/mfxdefs.h | 86 ++++++++++++-------------
11 api/vpl/mfxdispatcher.h | 4 +-
12 api/vpl/mfximplcaps.h | 4 +-
13 api/vpl/mfxsession.h | 11 +++-
14 api/vpl/mfxstructures.h | 137 ++++++++++++++++++++++------------------
15 api/vpl/mfxvideo++.h | 76 ++++++++++++++++++++++
16 8 files changed, 238 insertions(+), 114 deletions(-)
17 create mode 100644 api/vpl/mfx.h
18
19diff --git a/api/vpl/mfx.h b/api/vpl/mfx.h
20new file mode 100644
21index 0000000..32fc50b
22--- /dev/null
23+++ b/api/vpl/mfx.h
24@@ -0,0 +1,25 @@
25+/*############################################################################
26+ # Copyright (C) 2021 Intel Corporation
27+ #
28+ # SPDX-License-Identifier: MIT
29+ ############################################################################*/
30+
31+#ifndef __MFX_H__
32+#define __MFX_H__
33+
34+#include "mfxdefs.h"
35+#include "mfxcommon.h"
36+#include "mfxstructures.h"
37+#include "mfxdispatcher.h"
38+#include "mfximplcaps.h"
39+#include "mfxsession.h"
40+#include "mfxvideo.h"
41+#include "mfxadapter.h"
42+
43+#include "mfxbrc.h"
44+#include "mfxmvc.h"
45+#include "mfxpcp.h"
46+#include "mfxvp8.h"
47+#include "mfxjpeg.h"
48+
49+#endif /* __MFXDEFS_H__ */
50diff --git a/api/vpl/mfxcommon.h b/api/vpl/mfxcommon.h
51index 90a2f3d..9884aa4 100644
52--- a/api/vpl/mfxcommon.h
53+++ b/api/vpl/mfxcommon.h
54@@ -172,7 +172,7 @@ typedef struct {
55 } mfxExtThreadsParam;
56 MFX_PACK_END()
57
58-/*! The PlatformCodeName enumerator itemizes microarchitecture code names for the Legacy mode.
59+/*! The PlatformCodeName enumerator itemizes product code names for platforms.
60 For details about Intel code names, see ark.intel.com. */
61 enum {
62 MFX_PLATFORM_UNKNOWN = 0, /*!< Unknown platform. */
63@@ -192,6 +192,10 @@ enum {
64 MFX_PLATFORM_JASPERLAKE = 32, /*!< Code name Jasper Lake. */
65 MFX_PLATFORM_ELKHARTLAKE = 33, /*!< Code name Elkhart Lake. */
66 MFX_PLATFORM_TIGERLAKE = 40, /*!< Code name Tiger Lake. */
67+ MFX_PLATFORM_ROCKETLAKE = 42, /*!< Code name Rocket Lake. */
68+ MFX_PLATFORM_ALDERLAKE_S = 43, /*!< Code name Alder Lake S. */
69+ MFX_PLATFORM_ALDERLAKE_P = 44, /*!< Code name Alder Lake P. */
70+ MFX_PLATFORM_ARCTICSOUND_P = 45, /*!< Code name Arctic Sound P. */
71 MFX_PLATFORM_KEEMBAY = 50, /*!< Code name Keem Bay. */
72 };
73
74@@ -370,7 +374,6 @@ typedef enum {
75 MFX_ACCEL_MODE_VIA_HDDLUNITE = 0x0500, /*!< Hardware acceleration goes through the HDDL* Unite*. */
76 } mfxAccelerationMode;
77
78-
79 #define MFX_ACCELERATIONMODESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)
80
81 MFX_PACK_BEGIN_STRUCT_W_PTR()
82@@ -438,7 +441,7 @@ typedef struct {
83 mfxU16 reserved[3]; /*!< Reserved for future use. */
84 mfxU16 NumExtParam; /*!< The number of extra configuration structures attached to this structure. */
85 mfxExtBuffer **ExtParam; /*!< Points to an array of pointers to the extra configuration structures; see the ExtendedBufferID enumerator for a list of extended configurations. */
86- mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents the same filed from mfxImplDescription. */
87+ mfxU32 VendorImplID; /*!< Vendor specific number with given implementation ID. Represents the same field from mfxImplDescription. */
88 mfxU32 reserved2[3]; /*!< Reserved for future use. */
89 } mfxInitializationParam;
90 MFX_PACK_END()
91diff --git a/api/vpl/mfxdefs.h b/api/vpl/mfxdefs.h
92index 14cece0..dfd9f98 100644
93--- a/api/vpl/mfxdefs.h
94+++ b/api/vpl/mfxdefs.h
95@@ -8,7 +8,7 @@
96 #define __MFXDEFS_H__
97
98 #define MFX_VERSION_MAJOR 2
99-#define MFX_VERSION_MINOR 2
100+#define MFX_VERSION_MINOR 3
101
102 // MFX_VERSION - version of API that 'assumed' by build may be provided externally
103 // if it omitted then latest stable API derived from Major.Minor is assumed
104@@ -27,7 +27,7 @@
105 /*! The corresponding version of the Intel(r) Media SDK legacy API that is used as a basis
106 for the current API. */
107
108-#define MFX_LEGACY_VERSION 1034
109+#define MFX_LEGACY_VERSION 1035
110
111
112 #ifdef __cplusplus
113@@ -90,47 +90,47 @@ extern "C"
114 #endif
115
116 #ifndef MFX_DEPRECATED_OFF
117- #if defined(__cplusplus) && __cplusplus >= 201402L
118- #define MFX_DEPRECATED [[deprecated]]
119- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]]
120- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
121- #elif defined(__clang__)
122- #define MFX_DEPRECATED __attribute__((deprecated))
123- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
124- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
125- #elif defined(__INTEL_COMPILER)
126- #if (defined(_WIN32) || defined(_WIN64))
127- #define MFX_DEPRECATED __declspec(deprecated)
128- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
129- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
130- #elif defined(__linux__)
131- #define MFX_DEPRECATED __attribute__((deprecated))
132- #if defined(__cplusplus)
133- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
134- #else
135- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
136- #endif
137- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
138- #endif
139- #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation
140- #define MFX_DEPRECATED __declspec(deprecated)
141- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
142- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
143- #elif defined(__GNUC__)
144- #define MFX_DEPRECATED __attribute__((deprecated))
145- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
146- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
147- #else
148- #define MFX_DEPRECATED
149- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
150- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
151- #endif
152-#else
153- #define MFX_DEPRECATED
154- #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
155- #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
156-#endif
157-
158+ #if defined(__cplusplus) && __cplusplus >= 201402L
159+ #define MFX_DEPRECATED [[deprecated]]
160+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]]
161+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
162+ #elif defined(__clang__)
163+ #define MFX_DEPRECATED __attribute__((deprecated))
164+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
165+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
166+ #elif defined(__INTEL_COMPILER)
167+ #if (defined(_WIN32) || defined(_WIN64))
168+ #define MFX_DEPRECATED __declspec(deprecated)
169+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
170+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
171+ #elif defined(__linux__)
172+ #define MFX_DEPRECATED __attribute__((deprecated))
173+ #if defined(__cplusplus)
174+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
175+ #else
176+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
177+ #endif
178+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
179+ #endif
180+ #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation
181+ #define MFX_DEPRECATED __declspec(deprecated)
182+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
183+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
184+ #elif defined(__GNUC__)
185+ #define MFX_DEPRECATED __attribute__((deprecated))
186+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
187+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
188+ #else
189+ #define MFX_DEPRECATED
190+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
191+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
192+ #endif
193+ #else
194+ #define MFX_DEPRECATED
195+ #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
196+ #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
197+ #endif
198+
199 typedef unsigned char mfxU8; /*!< Unsigned integer, 8 bit type. */
200 typedef char mfxI8; /*!< Signed integer, 8 bit type. */
201 typedef short mfxI16; /*!< Signed integer, 16 bit type. */
202diff --git a/api/vpl/mfxdispatcher.h b/api/vpl/mfxdispatcher.h
203index 8db716b..86ecea3 100644
204--- a/api/vpl/mfxdispatcher.h
205+++ b/api/vpl/mfxdispatcher.h
206@@ -1,5 +1,5 @@
207 /*############################################################################
208- # Copyright (C) Intel Corporation
209+ # Copyright (C) 2020 Intel Corporation
210 #
211 # SPDX-License-Identifier: MIT
212 ############################################################################*/
213@@ -193,7 +193,7 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
214
215 /*!
216 @brief
217- Destroys handle allocated by the MFXQueryImplsCapabilities function.
218+ Destroys handle allocated by the MFXEnumImplementations function.
219
220 @param[in] loader Loader handle.
221 @param[in] hdl Handle to destroy. Can be equal to NULL.
222diff --git a/api/vpl/mfximplcaps.h b/api/vpl/mfximplcaps.h
223index 16851d0..514a1c4 100644
224--- a/api/vpl/mfximplcaps.h
225+++ b/api/vpl/mfximplcaps.h
226@@ -1,5 +1,5 @@
227 /*############################################################################
228- # Copyright (C) Intel Corporation
229+ # Copyright (C) 2020 Intel Corporation
230 #
231 # SPDX-License-Identifier: MIT
232 ############################################################################*/
233@@ -33,7 +33,7 @@ mfxHDL* MFX_CDECL MFXQueryImplsDescription(mfxImplCapsDeliveryFormat format, mfx
234
235 /*!
236 @brief
237- Destroys the handle allocated by the MFXQueryImplsCapabilities function.
238+ Destroys the handle allocated by the MFXQueryImplsDescription function.
239 Implementation must remember which handles are released. Once the last handle is released, this function must release memory
240 allocated for the array of handles.
241
242diff --git a/api/vpl/mfxsession.h b/api/vpl/mfxsession.h
243index e9c7127..7e2493a 100644
244--- a/api/vpl/mfxsession.h
245+++ b/api/vpl/mfxsession.h
246@@ -49,6 +49,9 @@ typedef struct _mfxSession *mfxSession;
247 MFX_ERR_UNSUPPORTED The function cannot find the desired legacy Intel(r) Media SDK implementation or version.
248
249 @since This function is available since API version 1.0.
250+
251+ @deprecated Deprecated in API version 2.3. Use MFXLoad and MFXCreateSession to initialize the session.
252+ Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
253 */
254 MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session);
255
256@@ -56,8 +59,7 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
257 @brief
258 Creates and initializes a session in the legacy mode for compatibility with Intel(r) Media SDK applications.
259 This function is deprecated starting from API version 2.0, applications must use MFXLoad with mfxCreateSession
260- to select the implementation and initialize the session.
261-
262+ to select the implementation and initialize the session.
263
264 Call this function before calling any other API functions.
265 If the desired implementation specified by ``par`` is MFX_IMPL_AUTO, the function will search for
266@@ -72,7 +74,7 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
267 For example, if an application uses only H.264 decoding as described in API v1.0, the application should initialize the library with API v1.0. This ensures backward compatibility.
268
269 The argument ``par.ExternalThreads`` specifies threading mode. Value 0 means that the implementation should create and
270- handle work threads internally (this is essentially the equivalent of the regular MFXInit). I
271+ handle work threads internally (this is essentially the equivalent of the regular MFXInit).
272
273 @param[in] par mfxInitParam structure that indicates the desired implementation, minimum library version and desired threading mode.
274 @param[out] session Pointer to the session handle.
275@@ -82,6 +84,9 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
276 MFX_ERR_UNSUPPORTED The function cannot find the desired implementation or version.
277
278 @since This function is available since API version 1.14.
279+
280+ @deprecated Deprecated in API version 2.3. Use MFXLoad and MFXCreateSession to initialize the session.
281+ Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
282 */
283 MFX_DEPRECATED mfxStatus MFX_CDECL MFXInitEx(mfxInitParam par, mfxSession *session);
284
285diff --git a/api/vpl/mfxstructures.h b/api/vpl/mfxstructures.h
286index f285979..94d8d25 100644
287--- a/api/vpl/mfxstructures.h
288+++ b/api/vpl/mfxstructures.h
289@@ -40,13 +40,13 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
290 /*! Specifies properties of video frames. See also "Configuration Parameter Constraints" chapter. */
291 typedef struct {
292 mfxU32 reserved[4]; /*!< Reserved for future use. */
293- /*! The unique ID of each VPP channel set by application. It's required that during Init/Reset application fills ChannelId for
294- each mfxVideoChannelParam provided by the application and the SDK sets it back to the correspondent
295- mfxSurfaceArray::mfxFrameSurface1 to distinguish different channels. It's expected that surfaces for some channels might be
296- returned with some delay so application has to use mfxFrameInfo::ChannelId to distinguish what returned surface belongs to
297- what VPP channel. Decoder's initialization parameters are always sent through channel with mfxFrameInfo::ChannelId equals to
298+ /*! The unique ID of each VPP channel set by application. It's required that during Init/Reset application fills ChannelId for
299+ each mfxVideoChannelParam provided by the application and the SDK sets it back to the correspondent
300+ mfxSurfaceArray::mfxFrameSurface1 to distinguish different channels. It's expected that surfaces for some channels might be
301+ returned with some delay so application has to use mfxFrameInfo::ChannelId to distinguish what returned surface belongs to
302+ what VPP channel. Decoder's initialization parameters are always sent through channel with mfxFrameInfo::ChannelId equals to
303 zero. It's allowed to skip setting of decoder's parameters for simplified decoding procedure */
304- mfxU16 ChannelId;
305+ mfxU16 ChannelId;
306 /*! Number of bits used to represent luma samples.
307 @note Not all codecs and implementations support this value. Use the Query API function to check if this feature is supported. */
308 mfxU16 BitDepthLuma;
309@@ -552,22 +552,22 @@ typedef struct mfxFrameSurfaceInterface {
310 MFX_ERR_UNKNOWN Any internal error.
311 */
312 mfxStatus (MFX_CDECL *Synchronize)(mfxFrameSurface1* surface, mfxU32 wait);
313-
314+
315 /*! @brief
316- The library calls the function after complete of associated video operation
317- notifying the application that frame surface is ready.
318-
319- @attention This is callback function and intended to be called by
320- the library only.
321-
322- It is expected that the function is low-intrusive designed otherwise it may
323- impact performance.
324+ The library calls the function after complete of associated video operation
325+ notifying the application that frame surface is ready.
326+
327+ @attention This is callback function and intended to be called by
328+ the library only.
329+
330+ It is expected that the function is low-intrusive designed otherwise it may
331+ impact performance.
332
333 @param[in] sts The status of completed operation.
334
335 */
336 void (MFX_CDECL *OnComplete)(mfxStatus sts);
337-
338+
339 mfxHDL reserved2[3];
340 } mfxFrameSurfaceInterface;
341 MFX_PACK_END()
342@@ -719,22 +719,22 @@ typedef struct {
343 return MFX_ERR_REALLOC_SURFACE. See the CodingOptionValue enumerator for values of this option. Use the Query API
344 function to check if this feature is supported. */
345 mfxU16 EnableReallocRequest;
346- /*! Special parameter for AV1 decoder. Indicates presence/absence of film grain parameters in bitstream.
347- Also controls decoding behavior for streams with film grain parameters. MFXVideoDECODE_DecodeHeader returns nonzero FilmGrain
348+ /*! Special parameter for AV1 decoder. Indicates presence/absence of film grain parameters in bitstream.
349+ Also controls decoding behavior for streams with film grain parameters. MFXVideoDECODE_DecodeHeader returns nonzero FilmGrain
350 for streams with film grain parameters and zero for streams w/o them. Decoding with film grain requires additional output surfaces.
351 If FilmGrain` is non-zero then MFXVideoDECODE_QueryIOSurf will request more surfaces in case of external allocated video memory at decoder output.
352 FilmGrain is passed to MFXVideoDECODE_Init function to control decoding operation for AV1 streams with film grain parameters.
353- If FilmGrain is nonzero decoding of each frame require two output surfaces (one for reconstructed frame and one for output frame with film grain applied).
354+ If FilmGrain is nonzero decoding of each frame require two output surfaces (one for reconstructed frame and one for output frame with film grain applied).
355 The decoder returns MFX_ERR_MORE_SURFACE from MFXVideoDECODE_DecodeFrameAsync if it has insufficient output surfaces to decode frame.
356- Application can forcibly disable the feature passing zero value of `FilmGrain` to `MFXVideoDECODE_Init`.
357- In this case the decoder will output reconstructed frames w/o film grain applied.
358+ Application can forcibly disable the feature passing zero value of `FilmGrain` to `MFXVideoDECODE_Init`.
359+ In this case the decoder will output reconstructed frames w/o film grain applied.
360 Application can retrieve film grain parameters for a frame by attaching extended buffer mfxExtAV1FilmGrainParam to mfxFrameSurface1.
361 If stream has no film grain parameters `FilmGrain` passed to `MFXVideoDECODE_Init` is ignored by the decoder. */
362 mfxU16 FilmGrain;
363 /*! If not zero, it forces SDK to attempt to decode bitstream even if a decoder may not support all features associated with given CodecLevel. Decoder may produce visual artifacts. Only AVC decoder supports this field. */
364 mfxU16 IgnoreLevelConstrain;
365 /*! This flag is used to disable output of main decoding channel. When it's ON SkipOutput = MFX_CODINGOPTION_ON decoder outputs only video processed channels. For pure decode this flag should be always disabled. */
366- mfxU16 SkipOutput;
367+ mfxU16 SkipOutput;
368 mfxU16 reserved2[4];
369 };
370 struct { /* JPEG Decoding Options */
371@@ -898,7 +898,7 @@ enum {
372 MFX_LEVEL_AVC_6 =60,
373 MFX_LEVEL_AVC_61 =61,
374 MFX_LEVEL_AVC_62 =62,
375- /*! @} */
376+ /*! @} */
377
378 /*! @{ */
379 /* MPEG2 Profiles. */
380@@ -1484,8 +1484,7 @@ typedef struct {
381 mfxU16 WinBRCSize;
382
383 /*! When rate control method is MFX_RATECONTROL_QVBR, this parameter specifies quality factor.
384-Values are in the 1 to 51 range,
385- where 1 corresponds to the best quality.
386+ Values are in the 1 to 51 range, where 1 corresponds to the best quality.
387 */
388 mfxU16 QVBRQuality;
389 /*!
390@@ -1678,6 +1677,7 @@ Values are in the 1 to 51 range,
391 This parameter is valid only during initialization.
392 */
393 mfxU16 AdaptiveCQM;
394+
395 mfxU16 reserved[162];
396 } mfxExtCodingOption3;
397 MFX_PACK_END()
398@@ -2024,13 +2024,16 @@ enum {
399 See the mfxExtInCrops structure for details.
400 */
401 MFX_EXTBUFF_CROPS = MFX_MAKEFOURCC('C', 'R', 'O', 'P'),
402-
403+
404 /*!
405 See the mfxExtAV1FilmGrainParam structure for more details.
406 */
407- MFX_EXTBUFF_AV1_FILM_GRAIN_PARAM = MFX_MAKEFOURCC('A','1','F','G')
408+ MFX_EXTBUFF_AV1_FILM_GRAIN_PARAM = MFX_MAKEFOURCC('A','1','F','G'),
409
410-
411+ /*!
412+ See the mfxExtHyperModeParam structure for more details.
413+ */
414+ MFX_EXTBUFF_HYPER_MODE_PARAM = MFX_MAKEFOURCC('H', 'Y', 'P', 'M')
415 };
416
417 /* VPP Conf: Do not use certain algorithms */
418@@ -2488,10 +2491,10 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
419 Each filter may be included in the pipeline in one of two different ways:
420
421 @li Adding a filter ID to this structure. In this method,
422- the default filter parameters are used.
423-
424+ the default filter parameters are used.
425+
426 @li Attaching a filter configuration structure directly to the mfxVideoParam structure.
427- In this method, adding filter ID to the mfxExtVPPDoUse structure is optional.
428+ In this method, adding filter ID to the mfxExtVPPDoUse structure is optional.
429
430 See Table “Configurable VPP filters” for complete list of
431 configurable filters, their IDs, and configuration structures.
432@@ -2590,7 +2593,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
433
434 On some platforms this filter is not supported. To query its support, the application should use the same approach that it uses
435 to configure VPP filters: adding the filter ID to the mfxExtVPPDoUse structure or by attaching the mfxExtVPPImageStab structure
436- directly to the mfxVideoParam structure and calling the MFXVideoVPP_Query function.
437+ directly to the mfxVideoParam structure and calling the MFXVideoVPP_Query function.
438
439 If this filter is supported, the function returns a MFX_ERR_NONE
440 status and copies the content of the input structure to the output structure. If the filter is not supported, the function returns MFX_WRN_FILTER_SKIPPED, removes the
441@@ -2617,14 +2620,14 @@ enum {
442
443 MFX_PACK_BEGIN_USUAL_STRUCT()
444 /*!
445- Configures the HDR SEI message.
446+ Configures the HDR SEI message.
447
448 If the application attaches this structure to the mfxEncodeCtrl structure
449- at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
450+ at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
451
452 If the application attaches this
453 structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on InsertPayloadToggle.
454-
455+
456 Field semantics are defined in ITU-T* H.265 Annex D.
457 */
458 typedef struct {
459@@ -2633,10 +2636,10 @@ typedef struct {
460
461 mfxU16 InsertPayloadToggle; /*!< InsertHDRPayload enumerator value. */
462 mfxU16 DisplayPrimariesX[3]; /*!< Color primaries for a video source in increments of 0.00002. Consist of RGB x coordinates and
463- define how to convert colors from RGB color space to CIE XYZ color space. Fields range is
464+ define how to convert colors from RGB color space to CIE XYZ color space. Fields range is
465 0 to 50000. */
466 mfxU16 DisplayPrimariesY[3]; /*!< Color primaries for a video source in increments of 0.00002. Consists of RGB y coordinates and
467- defines how to convert colors from RGB color space to CIE XYZ color space. Field range is
468+ defines how to convert colors from RGB color space to CIE XYZ color space. Field range is
469 0 to 50000. */
470 mfxU16 WhitePointX; /*!< White point X coordinate. */
471 mfxU16 WhitePointY; /*!< White point Y coordinate. */
472@@ -2649,14 +2652,14 @@ MFX_PACK_END()
473
474 MFX_PACK_BEGIN_USUAL_STRUCT()
475 /*!
476- Configures the HDR SEI message.
477+ Configures the HDR SEI message.
478
479 If the application attaches this structure to the mfxEncodeCtrl
480- structure at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
481+ structure at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
482
483 If the application
484 attaches this structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on
485- InsertPayloadToggle.
486+ InsertPayloadToggle.
487
488 Field semantics are defined in ITU-T* H.265 Annex D.
489 */
490@@ -3659,12 +3662,8 @@ enum {
491 MFX_SCALING_MODE_DEFAULT = 0, /*!< Default scaling mode. The library selects the most appropriate scaling method. */
492 MFX_SCALING_MODE_LOWPOWER = 1, /*!< Low power scaling mode which is applicable for library implementations.
493 The exact scaling algorithm is defined by the library. */
494- MFX_SCALING_MODE_QUALITY = 2, /*!< The best quality scaling mode. */
495-
496-
497+ MFX_SCALING_MODE_QUALITY = 2, /*!< The best quality scaling mode. */
498 MFX_SCALING_MODE_VENDOR = 1000, /*!< The enumeration to separate common scaling controls above and vendor specific. */
499-
500-
501 MFX_SCALING_MODE_INTEL_GEN_COMPUTE = MFX_SCALING_MODE_VENDOR + 1, /*! The mode to run scaling operation on Execution Units (EUs). */
502 MFX_SCALING_MODE_INTEL_GEN_VDBOX = MFX_SCALING_MODE_VENDOR + 2, /*! The special optimization mode where scaling operation running on SFC (Scaler & Format Converter) is coupled with VDBOX (also known as Multi-Format Codec fixed-function engine). This mode is applicable for DECODE_VPP domain functions. */
503 MFX_SCALING_MODE_INTEL_GEN_VEBOX = MFX_SCALING_MODE_VENDOR + 3 /*! The special optimization mode where scaling operation running on SFC is coupled with VEBOX (HW video processing pipe). */
504@@ -4040,14 +4039,14 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
505 */
506 typedef struct {
507 mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_VPP_MCTF. */
508- mfxU16 FilterStrength; /*!< Value in range of 0 to 20 (inclusive) to indicate the filter strength of MCTF.
509+ mfxU16 FilterStrength; /*!< Value in range of 0 to 20 (inclusive) to indicate the filter strength of MCTF.
510
511 The strength of the MCTF process controls the degree of possible change of pixel values eligible for MCTF - the greater the strength value, the larger the change. It is a dimensionless quantity - values in the range of 1 to 20 inclusively imply strength; value 0 stands for AUTO mode and is
512 valid during initialization or reset only
513
514 If an invalid value is given, it is fixed to the default value of 0.
515 If the field value is in the range of 1 to 20 inclusive, MCTF operates in fixed-strength mode with the given strength of MCTF process.
516-
517+
518 At runtime, values of 0 and greater than 20 are ignored. */
519 mfxU16 reserved[27];
520 } mfxExtVppMctf;
521@@ -4160,7 +4159,7 @@ typedef struct {
522 } mfxExtDeviceAffinityMask;
523 MFX_PACK_END()
524
525-/*! The FilmGrainFlags enumerator itemizes flags in AV1 film grain parameters.
526+/*! The FilmGrainFlags enumerator itemizes flags in AV1 film grain parameters.
527 The flags are equivalent to respective syntax elements from film_grain_params() section of uncompressed header. */
528 enum {
529 MFX_FILM_GRAIN_NO = 0, /*!< Film grain isn't added to this frame. */
530@@ -4196,7 +4195,7 @@ typedef struct {
531 mfxAV1FilmGrainPoint PointCb[10]; /*!< The array of points for Cb component. */
532 mfxAV1FilmGrainPoint PointCr[10]; /*!< The array of points for Cr component. */
533
534- mfxU8 GrainScalingMinus8; /*!< The shift – 8 applied to the values of the chroma component. The grain_scaling_minus_8 can take values of 0..3 and
535+ mfxU8 GrainScalingMinus8; /*!< The shift – 8 applied to the values of the chroma component. The grain_scaling_minus_8 can take values of 0..3 and
536 determines the range and quantization step of the standard deviation of film grain.*/
537 mfxU8 ArCoeffLag; /*!< The number of auto-regressive coefficients for luma and chroma.*/
538
539@@ -4204,8 +4203,8 @@ typedef struct {
540 mfxU8 ArCoeffsCbPlus128[25]; /*!< Auto-regressive coefficients used for the Cb plane. */
541 mfxU8 ArCoeffsCrPlus128[25]; /*!< The number of points for the piece-wise linear scaling function of the Cr component.*/
542
543- mfxU8 ArCoeffShiftMinus6; /*!< The range of the auto-regressive coefficients.
544- Values of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
545+ mfxU8 ArCoeffShiftMinus6; /*!< The range of the auto-regressive coefficients.
546+ Values of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
547 [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.*/
548 mfxU8 GrainScaleShift; /*!< Downscaling factor of the grain synthesis process for the Gaussian random numbers .*/
549
550@@ -4229,8 +4228,8 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
551 typedef struct mfxSurfaceArray
552 {
553 mfxHDL Context; /*!< The context of the memory interface. User should not touch (change, set, null) this pointer. */
554- mfxStructVersion Version; /*!< The version of the structure. */
555- mfxU16 reserved[3];
556+ mfxStructVersion Version; /*!< The version of the structure. */
557+ mfxU16 reserved[3];
558 /*! @brief
559 Increments the internal reference counter of the surface. The surface is not destroyed until the surface is released using the (*Release) function. (*AddRef) should be used each time a new link to the surface is created (for example, copy structure) for proper surface management.
560
561@@ -4242,11 +4241,11 @@ typedef struct mfxSurfaceArray
562 MFX_ERR_INVALID_HANDLE If mfxSurfaceArray->Context is invalid (for example NULL). \n
563 MFX_ERR_UNKNOWN Any internal error.
564
565- */
566- mfxStatus (*AddRef)(struct mfxSurfaceArray* surface_array);
567+ */
568+ mfxStatus (*AddRef)(struct mfxSurfaceArray* surface_array);
569 /*! @brief
570- Decrements the internal reference counter of the surface. (*Release) should be called after using the (*AddRef) function to add a
571- surface or when allocation logic requires it.
572+ Decrements the internal reference counter of the surface. (*Release) should be called after using the (*AddRef) function to add a
573+ surface or when allocation logic requires it.
574
575 @param[in] surface_array Valid mfxSurfaceArray.
576
577@@ -4257,7 +4256,7 @@ typedef struct mfxSurfaceArray
578 MFX_ERR_UNDEFINED_BEHAVIOR If Reference Counter of surface is zero before call. \n
579 MFX_ERR_UNKNOWN Any internal error.
580 */
581- mfxStatus (*Release)(struct mfxSurfaceArray* surface_array);
582+ mfxStatus (*Release)(struct mfxSurfaceArray* surface_array);
583
584 /*! @brief
585 Returns current reference counter of mfxSurfaceArray structure.
586@@ -4270,10 +4269,10 @@ typedef struct mfxSurfaceArray
587 MFX_ERR_NULL_PTR If surface or counter is NULL. \n
588 MFX_ERR_INVALID_HANDLE If mfxSurfaceArray->Context is invalid (for example NULL). \n
589 MFX_ERR_UNKNOWN Any internal error.
590- */
591+ */
592 mfxStatus (*GetRefCounter)(struct mfxSurfaceArray* surface_array, mfxU32* counter);
593
594- mfxFrameSurface1** Surfaces; /*!< The array of pointers to mfxFrameSurface1. mfxFrameSurface1 surfaces are allocated by the same
595+ mfxFrameSurface1** Surfaces; /*!< The array of pointers to mfxFrameSurface1. mfxFrameSurface1 surfaces are allocated by the same
596 agent who allocates mfxSurfaceArray. */
597 mfxU32 NumSurfaces; /*!<The size of array of pointers to mfxFrameSurface1. */
598 mfxU32 reserved1;
599@@ -4299,7 +4298,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
600 mfxU16 Top; /*!< Y coordinate of region of top-left corner of rectangle. */
601 mfxU16 Right; /*!< X coordinate of region of bottom-right corner of rectangle. */
602 mfxU16 Bottom; /*!< Y coordinate of region of bottom-right corner of rectangle. */
603- } mfxRect;
604+ } mfxRect;
605 MFX_PACK_END()
606
607 MFX_PACK_BEGIN_USUAL_STRUCT()
608@@ -4313,6 +4312,22 @@ typedef struct {
609 }mfxExtInCrops;
610 MFX_PACK_END()
611
612+/*! The mfxHyperMode enumerator describes HyperMode implementation behavior. */
613+typedef enum {
614+ MFX_HYPERMODE_OFF = 0x0, /*!< Don't use HyperMode implementation. */
615+ MFX_HYPERMODE_ON = 0x1, /*!< Enable HyperMode implementation and return error if some issue on initialization. */
616+ MFX_HYPERMODE_ADAPTIVE = 0x2, /*!< Enable HyperMode implementation and switch to single fallback if some issue on initialization. */
617+} mfxHyperMode;
618+
619+MFX_PACK_BEGIN_USUAL_STRUCT()
620+/*! The structure is used for HyperMode initialization. */
621+typedef struct {
622+ mfxExtBuffer Header; /*!< Extension buffer header. BufferId must be equal to MFX_EXTBUFF_HYPER_MODE_PARAM. */
623+ mfxHyperMode Mode; /*!< HyperMode implementation behavior. */
624+ mfxU16 reserved[19];
625+} mfxExtHyperModeParam;
626+MFX_PACK_END()
627+
628 #ifdef __cplusplus
629 } // extern "C"
630 #endif
631diff --git a/api/vpl/mfxvideo++.h b/api/vpl/mfxvideo++.h
632index 1b10390..c05cd50 100644
633--- a/api/vpl/mfxvideo++.h
634+++ b/api/vpl/mfxvideo++.h
635@@ -71,6 +71,19 @@ public:
636 return MFXVideoCORE_SyncOperation(m_session, syncp, wait);
637 }
638
639+ virtual mfxStatus GetSurfaceForEncode(mfxFrameSurface1** output_surf) {
640+ return MFXMemory_GetSurfaceForEncode(m_session, output_surf);
641+ }
642+ virtual mfxStatus GetSurfaceForDecode(mfxFrameSurface1** output_surf) {
643+ return MFXMemory_GetSurfaceForDecode(m_session, output_surf);
644+ }
645+ virtual mfxStatus GetSurfaceForVPP (mfxFrameSurface1** output_surf) {
646+ return MFXMemory_GetSurfaceForVPP (m_session, output_surf);
647+ }
648+ virtual mfxStatus GetSurfaceForVPPOut(mfxFrameSurface1** output_surf) {
649+ return MFXMemory_GetSurfaceForVPPOut(m_session, output_surf);
650+ }
651+
652 virtual operator mfxSession(void) {
653 return m_session;
654 }
655@@ -121,6 +134,10 @@ public:
656 return MFXVideoENCODE_EncodeFrameAsync(m_session, ctrl, surface, bs, syncp);
657 }
658
659+ virtual mfxStatus GetSurface(mfxFrameSurface1** output_surf) {
660+ return MFXMemory_GetSurfaceForEncode(m_session, output_surf);
661+ }
662+
663 protected:
664 mfxSession m_session; // (mfxSession) handle to the owning session
665 };
666@@ -173,6 +190,10 @@ public:
667 return MFXVideoDECODE_DecodeFrameAsync(m_session, bs, surface_work, surface_out, syncp);
668 }
669
670+ virtual mfxStatus GetSurface(mfxFrameSurface1** output_surf) {
671+ return MFXMemory_GetSurfaceForDecode(m_session, output_surf);
672+ }
673+
674 protected:
675 mfxSession m_session; // (mfxSession) handle to the owning session
676 };
677@@ -215,6 +236,61 @@ public:
678 return MFXVideoVPP_RunFrameVPPAsync(m_session, in, out, aux, syncp);
679 }
680
681+ virtual mfxStatus GetSurfaceIn(mfxFrameSurface1** output_surf) {
682+ return MFXMemory_GetSurfaceForVPP(m_session, output_surf);
683+ }
684+ virtual mfxStatus GetSurfaceOut(mfxFrameSurface1** output_surf) {
685+ return MFXMemory_GetSurfaceForVPPOut(m_session, output_surf);
686+ }
687+
688+ virtual mfxStatus ProcessFrameAsync(mfxFrameSurface1 *in, mfxFrameSurface1 **out) {
689+ return MFXVideoVPP_ProcessFrameAsync(m_session, in, out);
690+ }
691+
692+protected:
693+ mfxSession m_session; // (mfxSession) handle to the owning session
694+};
695+
696+class MFXVideoDECODE_VPP
697+{
698+public:
699+ explicit MFXVideoDECODE_VPP(mfxSession session) { m_session = session; }
700+ virtual ~MFXVideoDECODE_VPP(void) {
701+ Close();
702+ }
703+
704+ virtual mfxStatus Init(mfxVideoParam* decode_par, mfxVideoChannelParam** vpp_par_array, mfxU32 num_channel_par) {
705+ return MFXVideoDECODE_VPP_Init(m_session, decode_par, vpp_par_array, num_channel_par);
706+ }
707+ virtual mfxStatus Reset(mfxVideoParam* decode_par, mfxVideoChannelParam** vpp_par_array, mfxU32 num_channel_par) {
708+ return MFXVideoDECODE_VPP_Reset(m_session, decode_par, vpp_par_array, num_channel_par);
709+ }
710+ virtual mfxStatus GetChannelParam(mfxVideoChannelParam *par, mfxU32 channel_id) {
711+ return MFXVideoDECODE_VPP_GetChannelParam(m_session, par, channel_id);
712+ }
713+ virtual mfxStatus DecodeFrameAsync(mfxBitstream *bs, mfxU32* skip_channels, mfxU32 num_skip_channels, mfxSurfaceArray **surf_array_out) {
714+ return MFXVideoDECODE_VPP_DecodeFrameAsync(m_session, bs, skip_channels, num_skip_channels, surf_array_out);
715+ }
716+
717+ virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxVideoParam *par) {
718+ return MFXVideoDECODE_VPP_DecodeHeader(m_session, bs, par);
719+ }
720+ virtual mfxStatus Close(void) {
721+ return MFXVideoDECODE_VPP_Close(m_session);
722+ }
723+ virtual mfxStatus GetVideoParam(mfxVideoParam *par) {
724+ return MFXVideoDECODE_VPP_GetVideoParam(m_session, par);
725+ }
726+ virtual mfxStatus GetDecodeStat(mfxDecodeStat *stat) {
727+ return MFXVideoDECODE_VPP_GetDecodeStat(m_session, stat);
728+ }
729+ virtual mfxStatus GetPayload(mfxU64 *ts, mfxPayload *payload) {
730+ return MFXVideoDECODE_VPP_GetPayload(m_session, ts, payload);
731+ }
732+ virtual mfxStatus SetSkipMode(mfxSkipMode mode) {
733+ return MFXVideoDECODE_VPP_SetSkipMode(m_session, mode);
734+ }
735+
736 protected:
737 mfxSession m_session; // (mfxSession) handle to the owning session
738 };
739--
7402.31.1
741