qsv: Update SDK version to v2022.2.4
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / qsv / libmfx / dispatcher / windows / mfx_function_table.cpp
1 /*############################################################################
2   # Copyright (C) Intel Corporation
3   #
4   # SPDX-License-Identifier: MIT
5   ############################################################################*/
6
7 #include "windows/mfx_dispatcher.h"
8
9 //
10 // implement a table with functions names
11 //
12 #ifdef __GNUC__
13     #pragma GCC diagnostic ignored "-Wunused-function"
14 #endif
15
16 #undef FUNCTION
17 #define FUNCTION(return_value, func_name, formal_param_list, actual_param_list) \
18     { #func_name, API_VERSION },
19
20 const FUNCTION_DESCRIPTION APIFunc[eVideoFuncTotal] = {
21     { "MFXInit", { { 0, 1 } } },         { "MFXClose", { { 0, 1 } } },
22     { "MFXQueryIMPL", { { 0, 1 } } },    { "MFXQueryVersion", { { 0, 1 } } },
23
24     { "MFXJoinSession", { { 1, 1 } } },  { "MFXDisjoinSession", { { 1, 1 } } },
25     { "MFXCloneSession", { { 1, 1 } } }, { "MFXSetPriority", { { 1, 1 } } },
26     { "MFXGetPriority", { { 1, 1 } } },
27
28     { "MFXInitEx", { { 14, 1 } } },
29
30 #include "windows/mfx_exposed_functions_list.h"
31 };
32
33 // new functions for API >= 2.0
34 const FUNCTION_DESCRIPTION APIVideoFunc2[eVideoFunc2Total] = {
35     { "MFXQueryImplsDescription", { { 0, 2 } } },
36     { "MFXReleaseImplDescription", { { 0, 2 } } },
37     { "MFXMemory_GetSurfaceForVPP", { { 0, 2 } } },
38     { "MFXMemory_GetSurfaceForEncode", { { 0, 2 } } },
39     { "MFXMemory_GetSurfaceForDecode", { { 0, 2 } } },
40     { "MFXInitialize", { { 0, 2 } } },
41
42     { "MFXMemory_GetSurfaceForVPPOut", { { 1, 2 } } },
43     { "MFXVideoDECODE_VPP_Init", { { 1, 2 } } },
44     { "MFXVideoDECODE_VPP_DecodeFrameAsync", { { 1, 2 } } },
45     { "MFXVideoDECODE_VPP_Reset", { { 1, 2 } } },
46     { "MFXVideoDECODE_VPP_GetChannelParam", { { 1, 2 } } },
47     { "MFXVideoDECODE_VPP_Close", { { 1, 2 } } },
48     { "MFXVideoVPP_ProcessFrameAsync", { { 1, 2 } } },
49 };
50
51 // static section of the file
52 namespace {
53
54 //
55 // declare pseudo-functions.
56 // they are used as default values for call-tables.
57 //
58
59 mfxStatus pseudoMFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session) {
60     // touch unreferenced parameters
61     (void)impl;
62     (void)ver;
63     (void)session;
64
65     return MFX_ERR_UNKNOWN;
66
67 } // mfxStatus pseudoMFXInit(mfxIMPL impl, mfxVersion *ver, mfxSession *session)
68
69 mfxStatus pseudoMFXClose(mfxSession session) {
70     // touch unreferenced parameters
71     (void)session;
72
73     return MFX_ERR_UNKNOWN;
74
75 } // mfxStatus pseudoMFXClose(mfxSession session)
76
77 mfxStatus pseudoMFXJoinSession(mfxSession session, mfxSession child_session) {
78     // touch unreferenced parameters
79     (void)session;
80     (void)child_session;
81
82     return MFX_ERR_UNKNOWN;
83
84 } // mfxStatus pseudoMFXJoinSession(mfxSession session, mfxSession child_session)
85
86 mfxStatus pseudoMFXCloneSession(mfxSession session, mfxSession *clone) {
87     // touch unreferenced parameters
88     (void)session;
89     (void)clone;
90
91     return MFX_ERR_UNKNOWN;
92
93 } // mfxStatus pseudoMFXCloneSession(mfxSession session, mfxSession *clone)
94
95 void SuppressWarnings(...) {
96     // this functions is suppose to suppress warnings.
97     // Actually it does nothing.
98
99 } // void SuppressWarnings(...)
100
101 #undef FUNCTION
102 #define FUNCTION(return_value, func_name, formal_param_list, actual_param_list) \
103     return_value pseudo##func_name formal_param_list {                          \
104         SuppressWarnings actual_param_list;                                     \
105         return MFX_ERR_UNKNOWN;                                                 \
106     }
107
108 #include "windows/mfx_exposed_functions_list.h" // NOLINT(build/include)
109
110 } // namespace