summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/onevpl/0001-Update-headers-to-oneAPI-spec-v2.3-e170992.patch
blob: 030b395c45ba6cabd644a306c77715b78fb18c3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
From bb2f6199088879568e31f91f6d9b7aa737c5aa04 Mon Sep 17 00:00:00 2001
From: Jon Recker <jon.recker@intel.com>
Date: Wed, 9 Jun 2021 10:39:10 +0800
Subject: [PATCH] Update headers to oneAPI-spec v2.3 (e170992)

Upstream-Status: Submitted
---
 api/vpl/mfx.h           |  25 ++++++++
 api/vpl/mfxcommon.h     |   9 ++-
 api/vpl/mfxdefs.h       |  86 ++++++++++++-------------
 api/vpl/mfxdispatcher.h |   4 +-
 api/vpl/mfximplcaps.h   |   4 +-
 api/vpl/mfxsession.h    |  11 +++-
 api/vpl/mfxstructures.h | 137 ++++++++++++++++++++++------------------
 api/vpl/mfxvideo++.h    |  76 ++++++++++++++++++++++
 8 files changed, 238 insertions(+), 114 deletions(-)
 create mode 100644 api/vpl/mfx.h

diff --git a/api/vpl/mfx.h b/api/vpl/mfx.h
new file mode 100644
index 0000000..32fc50b
--- /dev/null
+++ b/api/vpl/mfx.h
@@ -0,0 +1,25 @@
+/*############################################################################
+  # Copyright (C) 2021 Intel Corporation
+  #
+  # SPDX-License-Identifier: MIT
+  ############################################################################*/
+
+#ifndef __MFX_H__
+#define __MFX_H__
+
+#include "mfxdefs.h"
+#include "mfxcommon.h"
+#include "mfxstructures.h"
+#include "mfxdispatcher.h"
+#include "mfximplcaps.h"
+#include "mfxsession.h"
+#include "mfxvideo.h"
+#include "mfxadapter.h"
+
+#include "mfxbrc.h"
+#include "mfxmvc.h"
+#include "mfxpcp.h"
+#include "mfxvp8.h"
+#include "mfxjpeg.h"
+
+#endif /* __MFXDEFS_H__ */
diff --git a/api/vpl/mfxcommon.h b/api/vpl/mfxcommon.h
index 90a2f3d..9884aa4 100644
--- a/api/vpl/mfxcommon.h
+++ b/api/vpl/mfxcommon.h
@@ -172,7 +172,7 @@ typedef struct {
 } mfxExtThreadsParam;
 MFX_PACK_END()
 
-/*! The PlatformCodeName enumerator itemizes microarchitecture code names for the Legacy mode. 
+/*! The PlatformCodeName enumerator itemizes product code names for platforms. 
     For details about Intel code names, see ark.intel.com. */
 enum {
     MFX_PLATFORM_UNKNOWN        = 0,  /*!< Unknown platform. */
@@ -192,6 +192,10 @@ enum {
     MFX_PLATFORM_JASPERLAKE     = 32, /*!< Code name Jasper Lake. */
     MFX_PLATFORM_ELKHARTLAKE    = 33, /*!< Code name Elkhart Lake. */
     MFX_PLATFORM_TIGERLAKE      = 40, /*!< Code name Tiger Lake. */
+    MFX_PLATFORM_ROCKETLAKE     = 42, /*!< Code name Rocket Lake. */
+    MFX_PLATFORM_ALDERLAKE_S    = 43, /*!< Code name Alder Lake S. */
+    MFX_PLATFORM_ALDERLAKE_P    = 44, /*!< Code name Alder Lake P. */
+    MFX_PLATFORM_ARCTICSOUND_P  = 45, /*!< Code name Arctic Sound P. */
     MFX_PLATFORM_KEEMBAY        = 50, /*!< Code name Keem Bay. */
 };
 
@@ -370,7 +374,6 @@ typedef enum {
     MFX_ACCEL_MODE_VIA_HDDLUNITE    = 0x0500,  /*!< Hardware acceleration goes through the HDDL* Unite*. */
 } mfxAccelerationMode;
 
-
 #define MFX_ACCELERATIONMODESCRIPTION_VERSION MFX_STRUCT_VERSION(1, 0)
 
 MFX_PACK_BEGIN_STRUCT_W_PTR()
@@ -438,7 +441,7 @@ typedef struct {
     mfxU16  reserved[3];                     /*!< Reserved for future use. */
     mfxU16  NumExtParam;                     /*!< The number of extra configuration structures attached to this structure. */
     mfxExtBuffer **ExtParam;                 /*!< Points to an array of pointers to the extra configuration structures; see the ExtendedBufferID enumerator for a list of extended configurations. */
-    mfxU32                 VendorImplID;     /*!< Vendor specific number with given implementation ID. Represents the same filed from mfxImplDescription. */
+    mfxU32      VendorImplID;                /*!< Vendor specific number with given implementation ID. Represents the same field from mfxImplDescription. */
     mfxU32      reserved2[3];                /*!< Reserved for future use. */
 } mfxInitializationParam;
 MFX_PACK_END()
diff --git a/api/vpl/mfxdefs.h b/api/vpl/mfxdefs.h
index 14cece0..dfd9f98 100644
--- a/api/vpl/mfxdefs.h
+++ b/api/vpl/mfxdefs.h
@@ -8,7 +8,7 @@
 #define __MFXDEFS_H__
 
 #define MFX_VERSION_MAJOR 2
-#define MFX_VERSION_MINOR 2
+#define MFX_VERSION_MINOR 3
 
 // MFX_VERSION - version of API that 'assumed' by build may be provided externally
 // if it omitted then latest stable API derived from Major.Minor is assumed
@@ -27,7 +27,7 @@
 /*! The corresponding version of the Intel(r) Media SDK legacy API that is used as a basis
    for the current API. */
 
-#define MFX_LEGACY_VERSION 1034
+#define MFX_LEGACY_VERSION 1035
 
 
 #ifdef __cplusplus
@@ -90,47 +90,47 @@ extern "C"
 #endif
 
 #ifndef MFX_DEPRECATED_OFF
-  #if defined(__cplusplus) && __cplusplus >= 201402L
-    #define MFX_DEPRECATED [[deprecated]]
-    #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]]
-    #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-  #elif defined(__clang__)
-    #define MFX_DEPRECATED __attribute__((deprecated))
-    #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
-    #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-  #elif defined(__INTEL_COMPILER)
-    #if (defined(_WIN32) || defined(_WIN64))
-      #define MFX_DEPRECATED __declspec(deprecated)
-      #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
-      #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
-    #elif defined(__linux__)
-      #define MFX_DEPRECATED __attribute__((deprecated))
-      #if defined(__cplusplus)
-        #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
-      #else
-        #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
-      #endif
-      #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-    #endif
-  #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation
-    #define MFX_DEPRECATED __declspec(deprecated)
-    #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
-    #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
-  #elif defined(__GNUC__)
-    #define MFX_DEPRECATED __attribute__((deprecated))
-    #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
-    #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-  #else
-    #define MFX_DEPRECATED
-    #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
-    #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-  #endif
-#else
-  #define MFX_DEPRECATED
-  #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
-  #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
-#endif
-    
+   #if defined(__cplusplus) && __cplusplus >= 201402L
+     #define MFX_DEPRECATED [[deprecated]]
+     #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg [[deprecated]]
+     #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+   #elif defined(__clang__)
+     #define MFX_DEPRECATED __attribute__((deprecated))
+     #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
+     #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+   #elif defined(__INTEL_COMPILER)
+     #if (defined(_WIN32) || defined(_WIN64))
+       #define MFX_DEPRECATED __declspec(deprecated)
+       #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
+       #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
+     #elif defined(__linux__)
+       #define MFX_DEPRECATED __attribute__((deprecated))
+       #if defined(__cplusplus)
+         #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
+       #else
+         #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
+       #endif
+       #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+     #endif
+   #elif defined(_MSC_VER) && _MSC_VER > 1200 // VS 6 doesn't support deprecation
+     #define MFX_DEPRECATED __declspec(deprecated)
+     #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
+     #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg) __pragma(deprecated(arg))
+   #elif defined(__GNUC__)
+     #define MFX_DEPRECATED __attribute__((deprecated))
+     #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg __attribute__((deprecated))
+     #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+   #else
+     #define MFX_DEPRECATED
+     #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
+     #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+   #endif
+ #else
+   #define MFX_DEPRECATED
+   #define MFX_DEPRECATED_ENUM_FIELD_INSIDE(arg) arg
+   #define MFX_DEPRECATED_ENUM_FIELD_OUTSIDE(arg)
+ #endif
+ 
 typedef unsigned char       mfxU8;         /*!< Unsigned integer, 8 bit type. */
 typedef char                mfxI8;         /*!< Signed integer, 8 bit type. */
 typedef short               mfxI16;        /*!< Signed integer, 16 bit type. */
diff --git a/api/vpl/mfxdispatcher.h b/api/vpl/mfxdispatcher.h
index 8db716b..86ecea3 100644
--- a/api/vpl/mfxdispatcher.h
+++ b/api/vpl/mfxdispatcher.h
@@ -1,5 +1,5 @@
 /*############################################################################
-  # Copyright (C) Intel Corporation
+  # Copyright (C) 2020 Intel Corporation
   #
   # SPDX-License-Identifier: MIT
   ############################################################################*/
@@ -193,7 +193,7 @@ mfxStatus MFX_CDECL MFXCreateSession(mfxLoader loader, mfxU32 i, mfxSession* ses
 
 /*!
    @brief
-      Destroys handle allocated by the MFXQueryImplsCapabilities function.
+      Destroys handle allocated by the MFXEnumImplementations function.
 
    @param[in] loader   Loader handle.
    @param[in] hdl      Handle to destroy. Can be equal to NULL.
diff --git a/api/vpl/mfximplcaps.h b/api/vpl/mfximplcaps.h
index 16851d0..514a1c4 100644
--- a/api/vpl/mfximplcaps.h
+++ b/api/vpl/mfximplcaps.h
@@ -1,5 +1,5 @@
 /*############################################################################
-  # Copyright (C) Intel Corporation
+  # Copyright (C) 2020 Intel Corporation
   #
   # SPDX-License-Identifier: MIT
   ############################################################################*/
@@ -33,7 +33,7 @@ mfxHDL* MFX_CDECL MFXQueryImplsDescription(mfxImplCapsDeliveryFormat format, mfx
 
 /*!
    @brief
-      Destroys the handle allocated by the MFXQueryImplsCapabilities function.
+      Destroys the handle allocated by the MFXQueryImplsDescription function.
       Implementation must remember which handles are released. Once the last handle is released, this function must release memory
       allocated for the array of handles.
 
diff --git a/api/vpl/mfxsession.h b/api/vpl/mfxsession.h
index e9c7127..7e2493a 100644
--- a/api/vpl/mfxsession.h
+++ b/api/vpl/mfxsession.h
@@ -49,6 +49,9 @@ typedef struct _mfxSession *mfxSession;
       MFX_ERR_UNSUPPORTED The function cannot find the desired legacy Intel(r) Media SDK implementation or version.
    
    @since This function is available since API version 1.0.
+
+   @deprecated Deprecated in API version 2.3. Use MFXLoad and MFXCreateSession to initialize the session.
+               Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
 */
 MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session);
 
@@ -56,8 +59,7 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
    @brief
       Creates and initializes a session in the legacy mode for compatibility with Intel(r) Media SDK applications. 
       This function is deprecated starting from API version 2.0, applications must use MFXLoad with mfxCreateSession 
-      to select the implementation and initialize the session. 
- 
+      to select the implementation and initialize the session.
 
       Call this function before calling any other API functions.
       If the desired implementation specified by ``par`` is MFX_IMPL_AUTO, the function will search for
@@ -72,7 +74,7 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
       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.
 
       The argument ``par.ExternalThreads`` specifies threading mode. Value 0 means that the implementation should create and
-      handle work threads internally (this is essentially the equivalent of the regular MFXInit). I
+      handle work threads internally (this is essentially the equivalent of the regular MFXInit).
 
    @param[in]  par     mfxInitParam structure that indicates the desired implementation, minimum library version and desired threading mode.
    @param[out] session Pointer to the session handle.
@@ -82,6 +84,9 @@ MFX_DEPRECATED mfxStatus MFX_CDECL MFXInit(mfxIMPL impl, mfxVersion *ver, mfxSes
       MFX_ERR_UNSUPPORTED The function cannot find the desired implementation or version.
 
    @since This function is available since API version 1.14.
+
+   @deprecated Deprecated in API version 2.3. Use MFXLoad and MFXCreateSession to initialize the session.
+               Use MFX_DEPRECATED_OFF macro to turn off the deprecation message visualization.
 */
 MFX_DEPRECATED mfxStatus MFX_CDECL MFXInitEx(mfxInitParam par, mfxSession *session);
 
diff --git a/api/vpl/mfxstructures.h b/api/vpl/mfxstructures.h
index f285979..94d8d25 100644
--- a/api/vpl/mfxstructures.h
+++ b/api/vpl/mfxstructures.h
@@ -40,13 +40,13 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
 /*! Specifies properties of video frames. See also "Configuration Parameter Constraints" chapter. */
 typedef struct {
     mfxU32  reserved[4]; /*!< Reserved for future use. */
-    /*! The unique ID of each VPP channel set by application. It's required that during Init/Reset application fills ChannelId for 
-        each mfxVideoChannelParam provided by the application and the SDK sets it back to the correspondent 
-        mfxSurfaceArray::mfxFrameSurface1 to distinguish different channels. It's expected that surfaces for some channels might be 
-        returned with some delay so application has to use mfxFrameInfo::ChannelId to distinguish what returned surface belongs to 
-        what VPP channel. Decoder's initialization parameters are always sent through channel with mfxFrameInfo::ChannelId equals to 
+    /*! The unique ID of each VPP channel set by application. It's required that during Init/Reset application fills ChannelId for
+        each mfxVideoChannelParam provided by the application and the SDK sets it back to the correspondent
+        mfxSurfaceArray::mfxFrameSurface1 to distinguish different channels. It's expected that surfaces for some channels might be
+        returned with some delay so application has to use mfxFrameInfo::ChannelId to distinguish what returned surface belongs to
+        what VPP channel. Decoder's initialization parameters are always sent through channel with mfxFrameInfo::ChannelId equals to
         zero. It's allowed to skip setting of decoder's parameters for simplified decoding procedure */
-    mfxU16  ChannelId; 
+    mfxU16  ChannelId;
     /*! Number of bits used to represent luma samples.
         @note Not all codecs and implementations support this value. Use the Query API function to check if this feature is supported. */
     mfxU16  BitDepthLuma;
@@ -552,22 +552,22 @@ typedef struct mfxFrameSurfaceInterface {
      MFX_ERR_UNKNOWN            Any internal error.
     */
     mfxStatus           (MFX_CDECL *Synchronize)(mfxFrameSurface1* surface, mfxU32 wait);
-    
+
     /*! @brief
-    The library calls the function after complete of associated video operation 
-    notifying the application that frame surface is ready. 
-    
-    @attention This is callback function and intended to be called by 
-               the library only. 
-    
-    It is expected that the function is low-intrusive designed otherwise it may 
-    impact performance. 
+    The library calls the function after complete of associated video operation
+    notifying the application that frame surface is ready.
+
+    @attention This is callback function and intended to be called by
+               the library only.
+
+    It is expected that the function is low-intrusive designed otherwise it may
+    impact performance.
 
     @param[in] sts  The status of completed operation.
 
     */
     void               (MFX_CDECL *OnComplete)(mfxStatus sts);
-    
+
     mfxHDL              reserved2[3];
 } mfxFrameSurfaceInterface;
 MFX_PACK_END()
@@ -719,22 +719,22 @@ typedef struct {
                 return MFX_ERR_REALLOC_SURFACE. See the CodingOptionValue enumerator for values of this option. Use the Query API
                 function to check if this feature is supported. */
             mfxU16  EnableReallocRequest;
-            /*! Special parameter for AV1 decoder. Indicates presence/absence of film grain parameters in bitstream. 
-                Also controls decoding behavior for streams with film grain parameters. MFXVideoDECODE_DecodeHeader returns nonzero FilmGrain 
+            /*! Special parameter for AV1 decoder. Indicates presence/absence of film grain parameters in bitstream.
+                Also controls decoding behavior for streams with film grain parameters. MFXVideoDECODE_DecodeHeader returns nonzero FilmGrain
                 for streams with film grain parameters and zero for streams w/o them. Decoding with film grain requires additional output surfaces.
                 If FilmGrain` is non-zero then MFXVideoDECODE_QueryIOSurf will request more surfaces in case of external allocated video memory at decoder output.
                 FilmGrain is passed to MFXVideoDECODE_Init function to control decoding operation for AV1 streams with film grain parameters.
-                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). 
+                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).
                 The decoder returns MFX_ERR_MORE_SURFACE from MFXVideoDECODE_DecodeFrameAsync if it has insufficient output surfaces to decode frame.
-                Application can forcibly disable the feature passing zero value of `FilmGrain` to `MFXVideoDECODE_Init`. 
-                In this case the decoder will output reconstructed frames w/o film grain applied. 
+                Application can forcibly disable the feature passing zero value of `FilmGrain` to `MFXVideoDECODE_Init`.
+                In this case the decoder will output reconstructed frames w/o film grain applied.
                 Application can retrieve film grain parameters for a frame by attaching extended buffer mfxExtAV1FilmGrainParam to mfxFrameSurface1.
                 If stream has no film grain parameters `FilmGrain` passed to `MFXVideoDECODE_Init` is ignored by the decoder. */
             mfxU16  FilmGrain;
             /*! 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. */
             mfxU16  IgnoreLevelConstrain;
             /*! 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. */
-            mfxU16  SkipOutput; 
+            mfxU16  SkipOutput;
             mfxU16  reserved2[4];
         };
         struct {   /* JPEG Decoding Options */
@@ -898,7 +898,7 @@ enum {
     MFX_LEVEL_AVC_6                         =60,
     MFX_LEVEL_AVC_61                        =61,
     MFX_LEVEL_AVC_62                        =62,
-        /*! @} */
+    /*! @} */
 
     /*! @{ */
     /* MPEG2 Profiles. */
@@ -1484,8 +1484,7 @@ typedef struct {
     mfxU16      WinBRCSize;
 
     /*! When rate control method is MFX_RATECONTROL_QVBR, this parameter specifies quality factor.
-Values are in the 1 to 51 range, 
-        where 1 corresponds to the best quality.
+        Values are in the 1 to 51 range, where 1 corresponds to the best quality.
     */
     mfxU16      QVBRQuality;
     /*!
@@ -1678,6 +1677,7 @@ Values are in the 1 to 51 range,
        This parameter is valid only during initialization.
     */
     mfxU16      AdaptiveCQM;
+
     mfxU16      reserved[162];
 } mfxExtCodingOption3;
 MFX_PACK_END()
@@ -2024,13 +2024,16 @@ enum {
        See the mfxExtInCrops structure for details.
     */
     MFX_EXTBUFF_CROPS = MFX_MAKEFOURCC('C', 'R', 'O', 'P'),
-    
+
     /*!
        See the mfxExtAV1FilmGrainParam structure for more details.
     */
-    MFX_EXTBUFF_AV1_FILM_GRAIN_PARAM = MFX_MAKEFOURCC('A','1','F','G')
+    MFX_EXTBUFF_AV1_FILM_GRAIN_PARAM = MFX_MAKEFOURCC('A','1','F','G'),
 
-    
+    /*!
+       See the mfxExtHyperModeParam structure for more details.
+    */
+    MFX_EXTBUFF_HYPER_MODE_PARAM = MFX_MAKEFOURCC('H', 'Y', 'P', 'M')
 };
 
 /* VPP Conf: Do not use certain algorithms  */
@@ -2488,10 +2491,10 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
    Each filter may be included in the pipeline in one of two different ways:
 
    @li Adding a filter ID to this structure. In this method,
-   the default filter parameters are used. 
-   
+   the default filter parameters are used.
+
    @li Attaching a filter configuration structure directly to the mfxVideoParam structure.
-   In this method, adding filter ID to the mfxExtVPPDoUse structure is optional. 
+   In this method, adding filter ID to the mfxExtVPPDoUse structure is optional.
 
    See Table “Configurable VPP filters” for complete list of
    configurable filters, their IDs, and configuration structures.
@@ -2590,7 +2593,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
 
    On some platforms this filter is not supported. To query its support, the application should use the same approach that it uses
    to configure VPP filters: adding the filter ID to the mfxExtVPPDoUse structure or by attaching the mfxExtVPPImageStab structure
-   directly to the mfxVideoParam structure and calling the MFXVideoVPP_Query function. 
+   directly to the mfxVideoParam structure and calling the MFXVideoVPP_Query function.
 
    If this filter is supported, the function returns a MFX_ERR_NONE
    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
@@ -2617,14 +2620,14 @@ enum {
 
 MFX_PACK_BEGIN_USUAL_STRUCT()
 /*!
-   Configures the HDR SEI message. 
+   Configures the HDR SEI message.
 
    If the application attaches this structure to the mfxEncodeCtrl structure
-   at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. 
+   at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
 
    If the application attaches this
    structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on InsertPayloadToggle.
-   
+
    Field semantics are defined in ITU-T* H.265 Annex D.
 */
 typedef struct {
@@ -2633,10 +2636,10 @@ typedef struct {
 
     mfxU16 InsertPayloadToggle;  /*!< InsertHDRPayload enumerator value. */
     mfxU16 DisplayPrimariesX[3]; /*!< Color primaries for a video source in increments of 0.00002. Consist of RGB x coordinates and
-                                       define how to convert colors from RGB color space to CIE XYZ color space. Fields range is 
+                                       define how to convert colors from RGB color space to CIE XYZ color space. Fields range is
                                        0 to 50000. */
     mfxU16 DisplayPrimariesY[3]; /*!< Color primaries for a video source in increments of 0.00002. Consists of RGB y coordinates and
-                                       defines how to convert colors from RGB color space to CIE XYZ color space. Field range is 
+                                       defines how to convert colors from RGB color space to CIE XYZ color space. Field range is
                                        0 to 50000. */
     mfxU16 WhitePointX;          /*!< White point X coordinate. */
     mfxU16 WhitePointY;          /*!< White point Y coordinate. */
@@ -2649,14 +2652,14 @@ MFX_PACK_END()
 
 MFX_PACK_BEGIN_USUAL_STRUCT()
 /*!
-   Configures the HDR SEI message. 
+   Configures the HDR SEI message.
 
    If the application attaches this structure to the mfxEncodeCtrl
-   structure at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle. 
+   structure at runtime, the encoder inserts the HDR SEI message for the current frame and ignores InsertPayloadToggle.
 
    If the application
    attaches this structure to the mfxVideoParam structure during initialization or reset, the encoder inserts the HDR SEI message based on
-   InsertPayloadToggle. 
+   InsertPayloadToggle.
 
    Field semantics are defined in ITU-T* H.265 Annex D.
 */
@@ -3659,12 +3662,8 @@ enum {
     MFX_SCALING_MODE_DEFAULT    = 0, /*!< Default scaling mode. The library selects the most appropriate scaling method. */
     MFX_SCALING_MODE_LOWPOWER   = 1, /*!< Low power scaling mode which is applicable for library implementations.
                                          The exact scaling algorithm is defined by the library. */
-    MFX_SCALING_MODE_QUALITY    = 2,  /*!< The best quality scaling mode. */
-        
-    
+    MFX_SCALING_MODE_QUALITY    = 2, /*!< The best quality scaling mode. */
     MFX_SCALING_MODE_VENDOR = 1000, /*!< The enumeration to separate common scaling controls above and vendor specific. */ 
-    
-
     MFX_SCALING_MODE_INTEL_GEN_COMPUTE  = MFX_SCALING_MODE_VENDOR + 1, /*! The mode to run scaling operation on Execution Units (EUs). */
     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. */ 
     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). */ 
@@ -4040,14 +4039,14 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
 */
 typedef struct {
     mfxExtBuffer Header;         /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_VPP_MCTF. */
-    mfxU16       FilterStrength; /*!< Value in range of 0 to 20 (inclusive) to indicate the filter strength of MCTF. 
+    mfxU16       FilterStrength; /*!< Value in range of 0 to 20 (inclusive) to indicate the filter strength of MCTF.
 
                                     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
                                       valid during initialization or reset only
 
                                     If an invalid value is given, it is fixed to the default value of 0.
                                       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.
-                                      
+
                                       At runtime, values of 0 and greater than 20 are ignored. */
     mfxU16       reserved[27];
 } mfxExtVppMctf;
@@ -4160,7 +4159,7 @@ typedef struct {
 } mfxExtDeviceAffinityMask;
 MFX_PACK_END()
 
-/*! The FilmGrainFlags enumerator itemizes flags in AV1 film grain parameters. 
+/*! The FilmGrainFlags enumerator itemizes flags in AV1 film grain parameters.
     The flags are equivalent to respective syntax elements from film_grain_params() section of uncompressed header. */
 enum {
     MFX_FILM_GRAIN_NO                       =       0, /*!< Film grain isn't added to this frame. */
@@ -4196,7 +4195,7 @@ typedef struct {
     mfxAV1FilmGrainPoint PointCb[10]; /*!< The array of points for Cb component. */
     mfxAV1FilmGrainPoint PointCr[10]; /*!< The array of points for Cr component. */
 
-    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 
+    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
                                    determines the range and quantization step of the standard deviation of film grain.*/
     mfxU8 ArCoeffLag;         /*!< The number of auto-regressive coefficients for luma and chroma.*/
 
@@ -4204,8 +4203,8 @@ typedef struct {
     mfxU8 ArCoeffsCbPlus128[25]; /*!< Auto-regressive coefficients used for the Cb plane. */
     mfxU8 ArCoeffsCrPlus128[25]; /*!< The number of points for the piece-wise linear scaling function of the Cr component.*/
 
-    mfxU8 ArCoeffShiftMinus6;  /*!< The range of the auto-regressive coefficients. 
-                                    Values of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of 
+    mfxU8 ArCoeffShiftMinus6;  /*!< The range of the auto-regressive coefficients.
+                                    Values of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of
                                     [-2, 2), [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.*/
     mfxU8 GrainScaleShift;     /*!< Downscaling factor of the grain synthesis process for the Gaussian random numbers .*/
 
@@ -4229,8 +4228,8 @@ MFX_PACK_BEGIN_STRUCT_W_PTR()
 typedef struct mfxSurfaceArray
 {
     mfxHDL              Context; /*!< The context of the memory interface. User should not touch (change, set, null) this pointer. */
-    mfxStructVersion    Version; /*!< The version of the structure. */                                        
-    mfxU16 reserved[3];  
+    mfxStructVersion    Version; /*!< The version of the structure. */
+    mfxU16 reserved[3];
     /*! @brief
     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.
 
@@ -4242,11 +4241,11 @@ typedef struct mfxSurfaceArray
      MFX_ERR_INVALID_HANDLE    If mfxSurfaceArray->Context is invalid (for example NULL). \n
      MFX_ERR_UNKNOWN           Any internal error.
 
-    */                                                  
-    mfxStatus (*AddRef)(struct mfxSurfaceArray*  surface_array);   
+    */
+    mfxStatus (*AddRef)(struct mfxSurfaceArray*  surface_array);
     /*! @brief
-    Decrements the internal reference counter of the surface. (*Release) should be called after using the (*AddRef) function to add a 
-    surface or when allocation logic requires it. 
+    Decrements the internal reference counter of the surface. (*Release) should be called after using the (*AddRef) function to add a
+    surface or when allocation logic requires it.
 
     @param[in]  surface_array  Valid mfxSurfaceArray.
 
@@ -4257,7 +4256,7 @@ typedef struct mfxSurfaceArray
      MFX_ERR_UNDEFINED_BEHAVIOR If Reference Counter of surface is zero before call. \n
      MFX_ERR_UNKNOWN            Any internal error.
     */
-    mfxStatus (*Release)(struct mfxSurfaceArray*  surface_array);  
+    mfxStatus (*Release)(struct mfxSurfaceArray*  surface_array);
 
     /*! @brief
     Returns current reference counter of mfxSurfaceArray structure.
@@ -4270,10 +4269,10 @@ typedef struct mfxSurfaceArray
      MFX_ERR_NULL_PTR           If surface or counter is NULL. \n
      MFX_ERR_INVALID_HANDLE     If mfxSurfaceArray->Context is invalid (for example NULL). \n
      MFX_ERR_UNKNOWN            Any internal error.
-    */             
+    */
     mfxStatus (*GetRefCounter)(struct mfxSurfaceArray*  surface_array, mfxU32* counter);
 
-    mfxFrameSurface1** Surfaces; /*!< The array of pointers to mfxFrameSurface1. mfxFrameSurface1 surfaces are allocated by the same 
+    mfxFrameSurface1** Surfaces; /*!< The array of pointers to mfxFrameSurface1. mfxFrameSurface1 surfaces are allocated by the same
     agent who allocates mfxSurfaceArray. */
     mfxU32 NumSurfaces; /*!<The size of array of pointers to mfxFrameSurface1. */
     mfxU32 reserved1;
@@ -4299,7 +4298,7 @@ MFX_PACK_BEGIN_USUAL_STRUCT()
         mfxU16  Top;    /*!< Y coordinate of region of top-left corner of rectangle. */
         mfxU16  Right;  /*!< X coordinate of region of bottom-right corner of rectangle. */
         mfxU16  Bottom; /*!< Y coordinate of region of bottom-right corner of rectangle. */
-    } mfxRect; 
+    } mfxRect;
 MFX_PACK_END()
 
 MFX_PACK_BEGIN_USUAL_STRUCT()
@@ -4313,6 +4312,22 @@ typedef struct {
 }mfxExtInCrops;
 MFX_PACK_END()
 
+/*! The mfxHyperMode enumerator describes HyperMode implementation behavior. */
+typedef enum {
+    MFX_HYPERMODE_OFF = 0x0,        /*!< Don't use HyperMode implementation. */
+    MFX_HYPERMODE_ON = 0x1,         /*!< Enable HyperMode implementation and return error if some issue on initialization. */
+    MFX_HYPERMODE_ADAPTIVE = 0x2,   /*!< Enable HyperMode implementation and switch to single fallback if some issue on initialization. */
+} mfxHyperMode;
+
+MFX_PACK_BEGIN_USUAL_STRUCT()
+/*! The structure is used for HyperMode initialization. */
+typedef struct {
+    mfxExtBuffer    Header; /*!< Extension buffer header. BufferId must be equal to MFX_EXTBUFF_HYPER_MODE_PARAM. */
+    mfxHyperMode    Mode;   /*!< HyperMode implementation behavior. */
+    mfxU16          reserved[19];
+} mfxExtHyperModeParam;
+MFX_PACK_END()
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
diff --git a/api/vpl/mfxvideo++.h b/api/vpl/mfxvideo++.h
index 1b10390..c05cd50 100644
--- a/api/vpl/mfxvideo++.h
+++ b/api/vpl/mfxvideo++.h
@@ -71,6 +71,19 @@ public:
         return MFXVideoCORE_SyncOperation(m_session, syncp, wait);
     }
 
+    virtual mfxStatus GetSurfaceForEncode(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForEncode(m_session, output_surf);
+    }
+    virtual mfxStatus GetSurfaceForDecode(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForDecode(m_session, output_surf);
+    }
+    virtual mfxStatus GetSurfaceForVPP   (mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForVPP   (m_session, output_surf);
+    }
+    virtual mfxStatus GetSurfaceForVPPOut(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForVPPOut(m_session, output_surf);
+    }
+
     virtual operator mfxSession(void) {
         return m_session;
     }
@@ -121,6 +134,10 @@ public:
         return MFXVideoENCODE_EncodeFrameAsync(m_session, ctrl, surface, bs, syncp);
     }
 
+    virtual mfxStatus GetSurface(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForEncode(m_session, output_surf);
+    }
+
 protected:
     mfxSession m_session; // (mfxSession) handle to the owning session
 };
@@ -173,6 +190,10 @@ public:
         return MFXVideoDECODE_DecodeFrameAsync(m_session, bs, surface_work, surface_out, syncp);
     }
 
+    virtual mfxStatus GetSurface(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForDecode(m_session, output_surf);
+    }
+
 protected:
     mfxSession m_session; // (mfxSession) handle to the owning session
 };
@@ -215,6 +236,61 @@ public:
         return MFXVideoVPP_RunFrameVPPAsync(m_session, in, out, aux, syncp);
     }
 
+    virtual mfxStatus GetSurfaceIn(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForVPP(m_session, output_surf);
+    }
+    virtual mfxStatus GetSurfaceOut(mfxFrameSurface1** output_surf) {
+        return MFXMemory_GetSurfaceForVPPOut(m_session, output_surf);
+    }
+
+    virtual mfxStatus ProcessFrameAsync(mfxFrameSurface1 *in, mfxFrameSurface1 **out) {
+        return MFXVideoVPP_ProcessFrameAsync(m_session, in, out);
+    }
+
+protected:
+    mfxSession m_session; // (mfxSession) handle to the owning session
+};
+
+class MFXVideoDECODE_VPP
+{
+public:
+    explicit MFXVideoDECODE_VPP(mfxSession session) { m_session = session; }
+    virtual ~MFXVideoDECODE_VPP(void) {
+        Close();
+    }
+
+    virtual mfxStatus Init(mfxVideoParam* decode_par, mfxVideoChannelParam** vpp_par_array, mfxU32 num_channel_par) {
+        return MFXVideoDECODE_VPP_Init(m_session, decode_par, vpp_par_array, num_channel_par);
+    }
+    virtual mfxStatus Reset(mfxVideoParam* decode_par, mfxVideoChannelParam** vpp_par_array, mfxU32 num_channel_par) {
+        return MFXVideoDECODE_VPP_Reset(m_session, decode_par, vpp_par_array, num_channel_par);
+    }
+    virtual mfxStatus GetChannelParam(mfxVideoChannelParam *par, mfxU32 channel_id) {
+        return MFXVideoDECODE_VPP_GetChannelParam(m_session, par, channel_id);
+    }
+    virtual mfxStatus DecodeFrameAsync(mfxBitstream *bs, mfxU32* skip_channels, mfxU32 num_skip_channels, mfxSurfaceArray **surf_array_out) {
+        return MFXVideoDECODE_VPP_DecodeFrameAsync(m_session, bs, skip_channels, num_skip_channels, surf_array_out);
+    }
+
+    virtual mfxStatus DecodeHeader(mfxBitstream *bs, mfxVideoParam *par) {
+        return MFXVideoDECODE_VPP_DecodeHeader(m_session, bs, par);
+    }
+    virtual mfxStatus Close(void) {
+        return MFXVideoDECODE_VPP_Close(m_session);
+    }
+    virtual mfxStatus GetVideoParam(mfxVideoParam *par) {
+        return MFXVideoDECODE_VPP_GetVideoParam(m_session, par);
+    }
+    virtual mfxStatus GetDecodeStat(mfxDecodeStat *stat) {
+        return MFXVideoDECODE_VPP_GetDecodeStat(m_session, stat);
+    }
+    virtual mfxStatus GetPayload(mfxU64 *ts, mfxPayload *payload) {
+        return MFXVideoDECODE_VPP_GetPayload(m_session, ts, payload);
+    }
+    virtual mfxStatus SetSkipMode(mfxSkipMode mode) {
+        return MFXVideoDECODE_VPP_SetSkipMode(m_session, mode);
+    }
+
 protected:
     mfxSession m_session; // (mfxSession) handle to the owning session
 };
-- 
2.31.1