[vlc-commits] [Git][videolan/vlc][master] 2 commits: directx_va: define missing DXVA_xxx GUIDs for the platform SDK and mingw

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Mar 12 10:18:36 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
5319cf9f by Steve Lhomme at 2023-03-12T10:01:41+00:00
directx_va: define missing DXVA_xxx GUIDs for the platform SDK and mingw

Favor the DXVA_xxx variants which are the most common ones. Redirect
missing DXVA_xxx variants to existing alternatives in mingw-w64.

Some GUIDs do not exist in any SDK so we need to define them ourselves.
The we share the redirections with dxva_blocklist.

- - - - -
0f92f19c by Steve Lhomme at 2023-03-12T10:01:41+00:00
avcodec/dxva: use DXVA_NoEncrypt

It is always defined when we use the dxva.h GUIDs.

- - - - -


5 changed files:

- modules/codec/avcodec/d3d11va.c
- modules/codec/avcodec/directx_va.c
- modules/codec/avcodec/directx_va.h
- modules/codec/avcodec/dxva2.c
- modules/codec/avcodec/dxva_blocklist.c


Changes:

=====================================
modules/codec/avcodec/d3d11va.c
=====================================
@@ -70,9 +70,6 @@ vlc_module_begin()
     set_va_callback(Open, 110)
 vlc_module_end()
 
-#include <initguid.h> /* must be last included to not redefine existing GUIDs */
-DEFINE_GUID(DXVA2_NoEncrypt,                        0x1b81bed0, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-
 typedef struct
 {
     d3d11_device_t               *d3d_dev;
@@ -628,7 +625,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
             score = 2;
         else
             continue;
-        if (IsEqualGUID(&cfg->guidConfigBitstreamEncryption, &DXVA2_NoEncrypt))
+        if (IsEqualGUID(&cfg->guidConfigBitstreamEncryption, &DXVA_NoEncrypt))
             score += 16;
 
         if (cfg_score < score) {


=====================================
modules/codec/avcodec/directx_va.c
=====================================
@@ -29,20 +29,25 @@
 
 #include <assert.h>
 
-#include <vlc_common.h>
-#include <vlc_codecs.h>
-#include <vlc_codec.h>
-#if HAVE_LIBAVCODEC_D3D11VA_H
-#include <libavcodec/d3d11va.h>
-#else
-#include <libavcodec/dxva2.h>
+#include <winapifamily.h>
+#if defined(WINAPI_FAMILY)
+# undef WINAPI_FAMILY
 #endif
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+
+#include <initguid.h>
 
-#define COBJMACROS
+#if HAVE_LIBAVCODEC_DXVA2_H
+# include <libavcodec/dxva2.h>
+#elif HAVE_LIBAVCODEC_D3D11VA_H
+# include <libavcodec/d3d11va.h>
+#else
+# error bogus libavcodec DXVA support
+#endif
 
 #include "directx_va.h"
+#include <vlc_codecs.h>
 
-#include "avcodec.h"
 #include "../../packetizer/h264_nal.h"
 #include "../../packetizer/hevc_nal.h"
 
@@ -71,47 +76,100 @@ static const int PROF_VP9_10[]      = { FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN };
 static const int PROF_AV1_MAIN[]    = { FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
 static const int PROF_AV1_HIGH[]    = { FF_PROFILE_AV1_HIGH, FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
 
-#include <winapifamily.h>
-#if defined(WINAPI_FAMILY)
-# undef WINAPI_FAMILY
-#endif
-#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
-
-#include <d3d9.h>
-#include <dxva2api.h>
-
-#include <initguid.h> /* must be last included to not redefine existing GUIDs */
-#include <dxva.h>
-
-/* Codec capabilities GUID, sorted by codec */
+#if defined(__MINGW64_VERSION_MAJOR) // mingw-w64 doesn't have all the standard GUIDs
+
+# if HAVE_LIBAVCODEC_DXVA2_H
+// do nothing, we have redirected DXVA_xxx to DXVA2_xxx
+# elif HAVE_LIBAVCODEC_D3D11VA_H && __MINGW64_VERSION_MAJOR > 11
+// do nothing, we have redirected DXVA_xxx to D3D11_DECODER_PROFILE_xxx
+# else // !HAVE_LIBAVCODEC_DXVA2_H && !HAVE_LIBAVCODEC_D3D11VA_H
+// define missing GUIDs from D3D11-only builds with old mingw-w64
+DEFINE_GUID(DXVA_ModeMPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60);
+DEFINE_GUID(DXVA_ModeMPEG1_VLD,     0x6f3ec719, 0x3735, 0x42cc, 0x80, 0x63, 0x65, 0xcc, 0x3c, 0xb3, 0x66, 0x16);
+DEFINE_GUID(DXVA2_ModeMPEG2_VLD,    0xee27417f, 0x5e28,0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9);
+DEFINE_GUID(DXVA2_ModeMPEG2_IDCT,   0xbf22ad00, 0x03ea,0x4690, 0x80, 0x77, 0x47, 0x33, 0x46, 0x20, 0x9b, 0x7e);
+DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0,0x4563, 0x9e, 0xa4, 0x63, 0xd2, 0xa3, 0xc6, 0xfe, 0x66);
+DEFINE_GUID(DXVA_ModeH264_A,       0x1b81be64, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_B,       0x1b81be65, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_C,       0x1b81be66, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_D,       0x1b81be67, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_E,       0x1b81be68, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_F,       0x1b81be69, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH264_VLD_Stereo_Progressive_NoFGT, 0xd79be8da, 0x0cf1,0x4c81, 0xb8, 0x2a, 0x69, 0xa4, 0xe2, 0x36, 0xf4, 0x3d);
+DEFINE_GUID(DXVA_ModeH264_VLD_Stereo_NoFGT,             0xf9aaccbb, 0xc2b6,0x4cfc, 0x87, 0x79, 0x57, 0x07, 0xb1, 0x76, 0x05, 0x52);
+DEFINE_GUID(DXVA_ModeH264_VLD_Multiview_NoFGT,          0x705b9d82, 0x76cf,0x49d6, 0xb7, 0xe6, 0xac, 0x88, 0x72, 0xdb, 0x01, 0x3c);
+DEFINE_GUID(DXVA_ModeWMV8_A,       0x1b81be80, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeWMV8_B,       0x1b81be81, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeWMV9_A,       0x1b81be90, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeWMV9_B,       0x1b81be91, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeWMV9_C,       0x1b81be94, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeVC1_A,        0x1b81beA0, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeVC1_B,        0x1b81beA1, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeVC1_C,        0x1b81beA2, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeVC1_D,        0x1b81beA3, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeVC1_D2010,    0x1b81bea4, 0xa0c7,0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_Simple,           0xefd64d74, 0xc9e8,0x41d7, 0xa5, 0xe9, 0xe9, 0xb0, 0xe3, 0x9f, 0xa3, 0x19);
+DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_AdvSimple_NoGMC,  0xed418a9f, 0x010d,0x4eda, 0x9a, 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e);
+DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_AdvSimple_GMC,    0xab998b5b, 0x4258,0x44a9, 0x9f, 0xeb, 0x94, 0xe5, 0x97, 0xa6, 0xba, 0xae);
+DEFINE_GUID(DXVA_ModeHEVC_VLD_Main,          0x5b11d51b, 0x2f4c,0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0);
+DEFINE_GUID(DXVA_ModeHEVC_VLD_Main10,        0x107af0e0, 0xef1a,0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13);
+DEFINE_GUID(DXVA_ModeVP8_VLD,                0x90b899ea, 0x3a62,0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
+DEFINE_GUID(DXVA_ModeVP9_VLD_Profile0,       0x463707f8, 0xa1d0,0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
+DEFINE_GUID(DXVA_ModeVP9_VLD_10bit_Profile2, 0xa4c749ef, 0x6ecf,0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7);
+# endif
+
+#  if __MINGW64_VERSION_MAJOR < 8
+DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD,                0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60);
+DEFINE_GUID(DXVA2_ModeMPEG1_VLD,                    0x6f3ec719, 0x3735, 0x42cc, 0x80, 0x63, 0x65, 0xcc, 0x3c, 0xb3, 0x66, 0x16);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_Simple,          0xefd64d74, 0xc9e8, 0x41d7, 0xa5, 0xe9, 0xe9, 0xb0, 0xe3, 0x9f, 0xa3, 0x19);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC, 0xed418a9f, 0x010d, 0x4eda, 0x9a, 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e);
+DEFINE_GUID(DXVA2_ModeMPEG4pt2_VLD_AdvSimple_GMC,   0xab998b5b, 0x4258, 0x44a9, 0x9f, 0xeb, 0x94, 0xe5, 0x97, 0xa6, 0xba, 0xae);
+DEFINE_GUID(DXVA2_ModeVC1_D2010,                    0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); // August 2010 update
+DEFINE_GUID(DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT, 0xd79be8da, 0x0cf1, 0x4c81, 0xb8, 0x2a, 0x69, 0xa4, 0xe2, 0x36, 0xf4, 0x3d);
+DEFINE_GUID(DXVA2_ModeH264_VLD_Stereo_NoFGT,             0xf9aaccbb, 0xc2b6, 0x4cfc, 0x87, 0x79, 0x57, 0x07, 0xb1, 0x76, 0x05, 0x52);
+DEFINE_GUID(DXVA2_ModeH264_VLD_Multiview_NoFGT,          0x705b9d82, 0x76cf, 0x49d6, 0xb7, 0xe6, 0xac, 0x88, 0x72, 0xdb, 0x01, 0x3c);
+DEFINE_GUID(DXVA2_ModeHEVC_VLD_Main,                0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0);
+DEFINE_GUID(DXVA2_ModeHEVC_VLD_Main10,              0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13);
+DEFINE_GUID(DXVA2_ModeVP8_VLD,                      0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
+DEFINE_GUID(DXVA2_ModeVP9_VLD_Profile0,             0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
+DEFINE_GUID(DXVA2_ModeVP9_VLD_10bit_Profile2,       0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7);
+#  endif // __MINGW64_VERSION_MAJOR < 8
+
+// the following GUIDs are never defined in mingw-w64
 DEFINE_GUID(DXVA_ModeMPEG1_A,                       0x1b81be09, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
 DEFINE_GUID(DXVA_ModeMPEG2_A,                       0x1b81be0A, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
 DEFINE_GUID(DXVA_ModeMPEG2_B,                       0x1b81be0B, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
 DEFINE_GUID(DXVA_ModeMPEG2_C,                       0x1b81be0C, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
 DEFINE_GUID(DXVA_ModeMPEG2_D,                       0x1b81be0D, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD,                0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60);
-DEFINE_GUID(DXVA2_ModeMPEG1_VLD,                    0x6f3ec719, 0x3735, 0x42cc, 0x80, 0x63, 0x65, 0xcc, 0x3c, 0xb3, 0x66, 0x16);
 
-DEFINE_GUID(DXVA_ModeH264_VLD_Multiview,            0x9901CCD3, 0xca12, 0x4b7e, 0x86, 0x7a, 0xe2, 0x22, 0x3d, 0x92, 0x55, 0xc3); // MVC
+DEFINE_GUID(DXVA_ModeH261_A,                        0x1b81be01, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH261_B,                        0x1b81be02, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+
+DEFINE_GUID(DXVA_ModeH263_A,                        0x1b81be03, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH263_B,                        0x1b81be04, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH263_C,                        0x1b81be05, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH263_D,                        0x1b81be06, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH263_E,                        0x1b81be07, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+DEFINE_GUID(DXVA_ModeH263_F,                        0x1b81be08, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
+
 DEFINE_GUID(DXVA_ModeH264_VLD_WithFMOASO_NoFGT,     0xd5f04ff9, 0x3418, 0x45d8, 0x95, 0x61, 0x32, 0xa7, 0x6a, 0xae, 0x2d, 0xdd);
+
+#endif // __MINGW64_VERSION_MAJOR
+
+
+/** GUIDs not found in the Platform SDK **/
+DEFINE_GUID(DXVA_ModeH264_VLD_Multiview,            0x9901CCD3, 0xca12, 0x4b7e, 0x86, 0x7a, 0xe2, 0x22, 0x3d, 0x92, 0x55, 0xc3); // MVC
 DEFINE_GUID(DXVADDI_Intel_ModeH264_A,               0x604F8E64, 0x4951, 0x4c54, 0x88, 0xFE, 0xAB, 0xD2, 0x5C, 0x15, 0xB3, 0xD6);
 DEFINE_GUID(DXVADDI_Intel_ModeH264_C,               0x604F8E66, 0x4951, 0x4c54, 0x88, 0xFE, 0xAB, 0xD2, 0x5C, 0x15, 0xB3, 0xD6);
 DEFINE_GUID(DXVA_Intel_H264_NoFGT_ClearVideo,       0x604F8E68, 0x4951, 0x4c54, 0x88, 0xFE, 0xAB, 0xD2, 0x5C, 0x15, 0xB3, 0xD6);
 DEFINE_GUID(DXVA_ModeH264_VLD_NoFGT_Flash,          0x4245F676, 0x2BBC, 0x4166, 0xa0, 0xBB, 0x54, 0xE7, 0xB8, 0x49, 0xC3, 0x80);
 
-DEFINE_GUID(DXVA2_ModeVC1_D2010,                    0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5); // August 2010 update
 DEFINE_GUID(DXVA_Intel_VC1_ClearVideo,              0xBCC5DB6D, 0xA2B6, 0x4AF0, 0xAC, 0xE4, 0xAD, 0xB1, 0xF7, 0x87, 0xBC, 0x89);
 DEFINE_GUID(DXVA_Intel_VC1_ClearVideo_2,            0xE07EC519, 0xE651, 0x4CD6, 0xAC, 0x84, 0x13, 0x70, 0xCC, 0xEE, 0xC8, 0x51);
 
 DEFINE_GUID(DXVA_nVidia_MPEG4_ASP,                  0x9947EC6F, 0x689B, 0x11DC, 0xA3, 0x20, 0x00, 0x19, 0xDB, 0xBC, 0x41, 0x84);
-DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_Simple,           0xefd64d74, 0xc9e8, 0x41d7, 0xa5, 0xe9, 0xe9, 0xb0, 0xe3, 0x9f, 0xa3, 0x19);
-DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_AdvSimple_NoGMC,  0xed418a9f, 0x010d, 0x4eda, 0x9a, 0xe3, 0x9a, 0x65, 0x35, 0x8d, 0x8d, 0x2e);
-DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_AdvSimple_GMC,    0xab998b5b, 0x4258, 0x44a9, 0x9f, 0xeb, 0x94, 0xe5, 0x97, 0xa6, 0xba, 0xae);
 DEFINE_GUID(DXVA_ModeMPEG4pt2_VLD_AdvSimple_Avivo,  0x7C74ADC6, 0xe2ba, 0x4ade, 0x86, 0xde, 0x30, 0xbe, 0xab, 0xb4, 0x0c, 0xc1);
 
-DEFINE_GUID(DXVA_ModeHEVC_VLD_Main,                 0x5b11d51b, 0x2f4c, 0x4452,0xbc,0xc3,0x09,0xf2,0xa1,0x16,0x0c,0xc0);
-DEFINE_GUID(DXVA_ModeHEVC_VLD_Main10,               0x107af0e0, 0xef1a, 0x4d19,0xab,0xa8,0x67,0xa1,0x63,0x07,0x3d,0x13);
-
 DEFINE_GUID(DXVA_ModeHEVC_VLD_Main_Intel,           0x8c56eb1e, 0x2b47, 0x466f, 0x8d, 0x33, 0x7d, 0xbc, 0xd6, 0x3f, 0x3d, 0xf2);
 DEFINE_GUID(DXVA_ModeHEVC_VLD_Main10_Intel,         0x75fc75f7, 0xc589, 0x4a07, 0xa2, 0x5b, 0x72, 0xe0, 0x3b, 0x03, 0x83, 0xb3);
 DEFINE_GUID(DXVA_ModeHEVC_VLD_Main12_Intel,         0x8ff8a3aa, 0xc456, 0x4132, 0xb6, 0xef, 0x69, 0xd9, 0xdd, 0x72, 0x57, 0x1d);
@@ -121,37 +179,21 @@ DEFINE_GUID(DXVA_ModeHEVC_VLD_Main444_Intel,        0x41a5af96, 0xe415, 0x4b0c,
 DEFINE_GUID(DXVA_ModeHEVC_VLD_Main444_10_Intel,     0x6a6a81ba, 0x912a, 0x485d, 0xb5, 0x7f, 0xcc, 0xd2, 0xd3, 0x7b, 0x8d, 0x94);
 DEFINE_GUID(DXVA_ModeHEVC_VLD_Main444_12_Intel,     0x5b08e35d, 0x0c66, 0x4c51, 0xa6, 0xf1, 0x89, 0xd0, 0x0c, 0xb2, 0xc1, 0x97);
 
-DEFINE_GUID(DXVA_ModeH264_VLD_Stereo_Progressive_NoFGT,     0xd79be8da, 0x0cf1, 0x4c81,0xb8,0x2a,0x69,0xa4,0xe2,0x36,0xf4,0x3d);
-DEFINE_GUID(DXVA_ModeH264_VLD_Stereo_NoFGT,                 0xf9aaccbb, 0xc2b6, 0x4cfc,0x87,0x79,0x57,0x07,0xb1,0x76,0x05,0x52);
-DEFINE_GUID(DXVA_ModeH264_VLD_Multiview_NoFGT,              0x705b9d82, 0x76cf, 0x49d6,0xb7,0xe6,0xac,0x88,0x72,0xdb,0x01,0x3c);
-
 DEFINE_GUID(DXVA_ModeH264_VLD_SVC_Scalable_Baseline,                    0xc30700c4, 0xe384, 0x43e0, 0xb9, 0x82, 0x2d, 0x89, 0xee, 0x7f, 0x77, 0xc4);
 DEFINE_GUID(DXVA_ModeH264_VLD_SVC_Restricted_Scalable_Baseline,         0x9b8175d4, 0xd670, 0x4cf2, 0xa9, 0xf0, 0xfa, 0x56, 0xdf, 0x71, 0xa1, 0xae);
 DEFINE_GUID(DXVA_ModeH264_VLD_SVC_Scalable_High,                        0x728012c9, 0x66a8, 0x422f, 0x97, 0xe9, 0xb5, 0xe3, 0x9b, 0x51, 0xc0, 0x53);
 DEFINE_GUID(DXVA_ModeH264_VLD_SVC_Restricted_Scalable_High_Progressive, 0x8efa5926, 0xbd9e, 0x4b04, 0x8b, 0x72, 0x8f, 0x97, 0x7d, 0xc4, 0x4c, 0x36);
 
-DEFINE_GUID(DXVA_ModeH261_A,                        0x1b81be01, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH261_B,                        0x1b81be02, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-
-DEFINE_GUID(DXVA_ModeH263_A,                        0x1b81be03, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH263_B,                        0x1b81be04, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH263_C,                        0x1b81be05, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH263_D,                        0x1b81be06, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH263_E,                        0x1b81be07, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-DEFINE_GUID(DXVA_ModeH263_F,                        0x1b81be08, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-
-DEFINE_GUID(DXVA_ModeVP8_VLD,                       0x90b899ea, 0x3a62, 0x4705, 0x88, 0xb3, 0x8d, 0xf0, 0x4b, 0x27, 0x44, 0xe7);
-DEFINE_GUID(DXVA_ModeVP9_VLD_Profile0,              0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e);
-DEFINE_GUID(DXVA_ModeVP9_VLD_10bit_Profile2,        0xa4c749ef, 0x6ecf, 0x48aa, 0x84, 0x48, 0x50, 0xa7, 0xa1, 0x16, 0x5f, 0xf7);
 DEFINE_GUID(DXVA_ModeVP9_VLD_Intel,                 0x76988a52, 0xdf13, 0x419a, 0x8e, 0x64, 0xff, 0xcf, 0x4a, 0x33, 0x6c, 0xf5);
 
 #ifndef _DIRECTX_AV1_VA_
+// only found in recent Platform SDK and mingw-w64
 DEFINE_GUID(DXVA_ModeAV1_VLD_Profile0, 0xb8be4ccb, 0xcf53, 0x46ba, 0x8d, 0x59, 0xd6, 0xb8, 0xa6, 0xda, 0x5d, 0x2a);
 DEFINE_GUID(DXVA_ModeAV1_VLD_Profile1, 0x6936ff0f, 0x45b1, 0x4163, 0x9c, 0xc1, 0x64, 0x6e, 0xf6, 0x94, 0x61, 0x08);
 DEFINE_GUID(DXVA_ModeAV1_VLD_Profile2, 0x0c5f2aa1, 0xe541, 0x4089, 0xbb, 0x7b, 0x98, 0x11, 0x0a, 0x19, 0xd7, 0xc8);
 DEFINE_GUID(DXVA_ModeAV1_VLD_12bit_Profile2, 0x17127009, 0xa00f, 0x4ce1, 0x99, 0x4e, 0xbf, 0x40, 0x81, 0xf6, 0xf3, 0xf0);
 DEFINE_GUID(DXVA_ModeAV1_VLD_12bit_Profile2_420, 0x2d80bed6, 0x9cac, 0x4835, 0x9e, 0x91, 0x32, 0x7b, 0xbc, 0x4f, 0x9e, 0xe8);
-#endif
+#endif // !_DIRECTX_AV1_VA_
 
 /* XXX Preferred modes must come first */
 static const directx_va_mode_t DXVA_MODES[] = {
@@ -163,27 +205,29 @@ static const directx_va_mode_t DXVA_MODES[] = {
     { "MPEG-2 decoder, restricted profile D",                                         &DXVA_ModeMPEG2_D,                      8, {1, 1}, 0, NULL, 0 },
 
     { "MPEG-2 variable-length decoder",                                               &DXVA2_ModeMPEG2_VLD,                   8, {1, 1}, AV_CODEC_ID_MPEG2VIDEO, PROF_MPEG2_MAIN, 0 },
-    { "MPEG-2 & MPEG-1 variable-length decoder",                                      &DXVA2_ModeMPEG2and1_VLD,               8, {1, 1}, AV_CODEC_ID_MPEG2VIDEO, PROF_MPEG2_MAIN, 0 },
-    { "MPEG-2 & MPEG-1 variable-length decoder",                                      &DXVA2_ModeMPEG2and1_VLD,               8, {1, 1}, AV_CODEC_ID_MPEG1VIDEO, NULL, 0 },
+    { "MPEG-2 & MPEG-1 variable-length decoder",                                      &DXVA_ModeMPEG2and1_VLD,                8, {1, 1}, AV_CODEC_ID_MPEG2VIDEO, PROF_MPEG2_MAIN, 0 },
+    { "MPEG-2 & MPEG-1 variable-length decoder",                                      &DXVA_ModeMPEG2and1_VLD,                8, {1, 1}, AV_CODEC_ID_MPEG1VIDEO, NULL, 0 },
     { "MPEG-2 motion compensation",                                                   &DXVA2_ModeMPEG2_MoComp,                8, {1, 1}, 0, NULL, 0 },
     { "MPEG-2 inverse discrete cosine transform",                                     &DXVA2_ModeMPEG2_IDCT,                  8, {1, 1}, 0, NULL, 0 },
 
     /* MPEG-1 http://download.microsoft.com/download/B/1/7/B172A3C8-56F2-4210-80F1-A97BEA9182ED/DXVA_MPEG1_VLD.pdf */
-    { "MPEG-1 variable-length decoder, no D pictures",                                &DXVA2_ModeMPEG1_VLD,                   8, {1, 1}, 0, NULL, 0 },
+    { "MPEG-1 variable-length decoder, no D pictures",                                &DXVA_ModeMPEG1_VLD,                   8, {1, 1}, 0, NULL, 0 },
 
     /* H.264 http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3d1c290b-310b-4ea2-bf76-714063a6d7a6 */
-    { "H.264 variable-length decoder, film grain technology",                         &DXVA2_ModeH264_F,                      8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
-    { "H.264 variable-length decoder, no film grain technology",                      &DXVA2_ModeH264_E,                      8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
+    { "H.264 variable-length decoder, film grain technology",                         &DXVA_ModeH264_F,                       8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
+    { "H.264 variable-length decoder, no film grain technology",                      &DXVA_ModeH264_E,                       8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
+#if !(defined(_GAMING_XBOX_SCARLETT) || defined(_GAMING_XBOX_XBOXONE) || defined(_XBOX_ONE)) && defined(FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO)
     { "H.264 variable-length decoder, no film grain technology (Intel ClearVideo)",   &DXVA_Intel_H264_NoFGT_ClearVideo,      8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO },
+#endif
     { "H.264 variable-length decoder, no film grain technology, FMO/ASO",             &DXVA_ModeH264_VLD_WithFMOASO_NoFGT,    8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
     { "H.264 variable-length decoder, no film grain technology, Flash",               &DXVA_ModeH264_VLD_NoFGT_Flash,         8, {1, 1}, AV_CODEC_ID_H264, PROF_H264_HIGH, 0 },
 
-    { "H.264 inverse discrete cosine transform, film grain technology",               &DXVA2_ModeH264_D,                      8, {1, 1}, 0, NULL, 0 },
-    { "H.264 inverse discrete cosine transform, no film grain technology",            &DXVA2_ModeH264_C,                      8, {1, 1}, 0, NULL, 0 },
+    { "H.264 inverse discrete cosine transform, film grain technology",               &DXVA_ModeH264_D,                       8, {1, 1}, 0, NULL, 0 },
+    { "H.264 inverse discrete cosine transform, no film grain technology",            &DXVA_ModeH264_C,                       8, {1, 1}, 0, NULL, 0 },
     { "H.264 inverse discrete cosine transform, no film grain technology (Intel)",    &DXVADDI_Intel_ModeH264_C,              8, {1, 1}, 0, NULL, 0 },
 
-    { "H.264 motion compensation, film grain technology",                             &DXVA2_ModeH264_B,                      8, {1, 1}, 0, NULL, 0 },
-    { "H.264 motion compensation, no film grain technology",                          &DXVA2_ModeH264_A,                      8, {1, 1}, 0, NULL, 0 },
+    { "H.264 motion compensation, film grain technology",                             &DXVA_ModeH264_B,                       8, {1, 1}, 0, NULL, 0 },
+    { "H.264 motion compensation, no film grain technology",                          &DXVA_ModeH264_A,                       8, {1, 1}, 0, NULL, 0 },
     { "H.264 motion compensation, no film grain technology (Intel)",                  &DXVADDI_Intel_ModeH264_A,              8, {1, 1}, 0, NULL, 0 },
 
     /* http://download.microsoft.com/download/2/D/0/2D02E72E-7890-430F-BA91-4A363F72F8C8/DXVA_H264_MVC.pdf */
@@ -198,24 +242,24 @@ static const directx_va_mode_t DXVA_MODES[] = {
     { "H.264 scalable video coding, Scalable Constrained High Profile",               &DXVA_ModeH264_VLD_SVC_Restricted_Scalable_High_Progressive, 8, {1, 1}, 0, NULL, 0 },
 
     /* WMV */
-    { "Windows Media Video 8 motion compensation",                                    &DXVA2_ModeWMV8_B,                      8, {1, 1}, 0, NULL, 0 },
-    { "Windows Media Video 8 post processing",                                        &DXVA2_ModeWMV8_A,                      8, {1, 1}, 0, NULL, 0 },
+    { "Windows Media Video 8 motion compensation",                                    &DXVA_ModeWMV8_B,                       8, {1, 1}, 0, NULL, 0 },
+    { "Windows Media Video 8 post processing",                                        &DXVA_ModeWMV8_A,                       8, {1, 1}, 0, NULL, 0 },
 
-    { "Windows Media Video 9 IDCT",                                                   &DXVA2_ModeWMV9_C,                      8, {1, 1}, 0, NULL, 0 },
-    { "Windows Media Video 9 motion compensation",                                    &DXVA2_ModeWMV9_B,                      8, {1, 1}, 0, NULL, 0 },
-    { "Windows Media Video 9 post processing",                                        &DXVA2_ModeWMV9_A,                      8, {1, 1}, 0, NULL, 0 },
+    { "Windows Media Video 9 IDCT",                                                   &DXVA_ModeWMV9_C,                       8, {1, 1}, 0, NULL, 0 },
+    { "Windows Media Video 9 motion compensation",                                    &DXVA_ModeWMV9_B,                       8, {1, 1}, 0, NULL, 0 },
+    { "Windows Media Video 9 post processing",                                        &DXVA_ModeWMV9_A,                       8, {1, 1}, 0, NULL, 0 },
 
     /* VC-1 */
-    { "VC-1 variable-length decoder",                                                 &DXVA2_ModeVC1_D,                       8, {1, 1}, AV_CODEC_ID_VC1, NULL, 0 },
-    { "VC-1 variable-length decoder",                                                 &DXVA2_ModeVC1_D,                       8, {1, 1}, AV_CODEC_ID_WMV3, NULL, 0 },
-    { "VC-1 variable-length decoder",                                                 &DXVA2_ModeVC1_D2010,                   8, {1, 1}, AV_CODEC_ID_VC1, NULL, 0 },
-    { "VC-1 variable-length decoder",                                                 &DXVA2_ModeVC1_D2010,                   8, {1, 1}, AV_CODEC_ID_WMV3, NULL, 0 },
+    { "VC-1 variable-length decoder",                                                 &DXVA_ModeVC1_D,                        8, {1, 1}, AV_CODEC_ID_VC1, NULL, 0 },
+    { "VC-1 variable-length decoder",                                                 &DXVA_ModeVC1_D,                        8, {1, 1}, AV_CODEC_ID_WMV3, NULL, 0 },
+    { "VC-1 variable-length decoder",                                                 &DXVA_ModeVC1_D2010,                    8, {1, 1}, AV_CODEC_ID_VC1, NULL, 0 },
+    { "VC-1 variable-length decoder",                                                 &DXVA_ModeVC1_D2010,                    8, {1, 1}, AV_CODEC_ID_WMV3, NULL, 0 },
     { "VC-1 variable-length decoder 2 (Intel)",                                       &DXVA_Intel_VC1_ClearVideo_2,           8, {1, 1}, 0, NULL, 0 },
     { "VC-1 variable-length decoder (Intel)",                                         &DXVA_Intel_VC1_ClearVideo,             8, {1, 1}, 0, NULL, 0 },
 
-    { "VC-1 inverse discrete cosine transform",                                       &DXVA2_ModeVC1_C,                       8, {1, 1}, 0, NULL, 0 },
-    { "VC-1 motion compensation",                                                     &DXVA2_ModeVC1_B,                       8, {1, 1}, 0, NULL, 0 },
-    { "VC-1 post processing",                                                         &DXVA2_ModeVC1_A,                       8, {1, 1}, 0, NULL, 0 },
+    { "VC-1 inverse discrete cosine transform",                                       &DXVA_ModeVC1_C,                        8, {1, 1}, 0, NULL, 0 },
+    { "VC-1 motion compensation",                                                     &DXVA_ModeVC1_B,                        8, {1, 1}, 0, NULL, 0 },
+    { "VC-1 post processing",                                                         &DXVA_ModeVC1_A,                        8, {1, 1}, 0, NULL, 0 },
 
     /* Xvid/Divx: TODO */
     { "MPEG-4 Part 2 nVidia bitstream decoder",                                       &DXVA_nVidia_MPEG4_ASP,                 8, {1, 1}, 0, NULL, 0 },


=====================================
modules/codec/avcodec/directx_va.h
=====================================
@@ -37,6 +37,8 @@
 
 #include "va_surface.h"
 
+#include <dxva.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -80,6 +82,107 @@ const directx_va_mode_t * directx_va_Setup(vlc_va_t *, const directx_sys_t *, co
                                            video_format_t *fmt_out, unsigned *surface_count);
 bool directx_va_canUseDecoder(vlc_va_t *, UINT VendorId, UINT DeviceId, const GUID *pCodec, UINT driverBuild);
 
+#ifdef _MSC_VER
+// MSVC should have all the DXVA_xxx GUIDs but not the few DXVA2_xxx ones we
+// need depending on the configuration (they don't have DXVA_xxx equivalents)
+# if HAVE_LIBAVCODEC_DXVA2_H
+
+// nothing to do, dxva2api.h will have them
+
+# elif HAVE_LIBAVCODEC_D3D11VA_H
+
+#  define DXVA2_ModeMPEG2_VLD     D3D11_DECODER_PROFILE_MPEG2_VLD
+#  define DXVA2_ModeMPEG2_MoComp  D3D11_DECODER_PROFILE_MPEG2_MOCOMP
+#  define DXVA2_ModeMPEG2_IDCT    D3D11_DECODER_PROFILE_MPEG2_IDCT
+
+# endif // !HAVE_LIBAVCODEC_xxx
+
+#elif defined(__MINGW64_VERSION_MAJOR) // mingw-w64 doesn't have all the standard GUIDs
+# if HAVE_LIBAVCODEC_DXVA2_H
+
+// redirect missing DXVA_xxx to existing DXVA2_xxx variants
+#  define DXVA_ModeMPEG1_VLD       DXVA2_ModeMPEG1_VLD
+#  define DXVA_ModeMPEG2and1_VLD   DXVA2_ModeMPEG2and1_VLD
+
+#  define DXVA_ModeH264_A          DXVA2_ModeH264_A
+#  define DXVA_ModeH264_B          DXVA2_ModeH264_B
+#  define DXVA_ModeH264_C          DXVA2_ModeH264_C
+#  define DXVA_ModeH264_D          DXVA2_ModeH264_D
+#  define DXVA_ModeH264_E          DXVA2_ModeH264_E
+#  define DXVA_ModeH264_F          DXVA2_ModeH264_F
+
+#  define DXVA_ModeH264_VLD_Stereo_Progressive_NoFGT  DXVA2_ModeH264_VLD_Stereo_Progressive_NoFGT
+#  define DXVA_ModeH264_VLD_Stereo_NoFGT              DXVA2_ModeH264_VLD_Stereo_NoFGT
+#  define DXVA_ModeH264_VLD_Multiview_NoFGT           DXVA2_ModeH264_VLD_Multiview_NoFGT
+
+#  define DXVA_ModeWMV8_A          DXVA2_ModeWMV8_A
+#  define DXVA_ModeWMV8_B          DXVA2_ModeWMV8_B
+
+#  define DXVA_ModeWMV9_A          DXVA2_ModeWMV9_A
+#  define DXVA_ModeWMV9_B          DXVA2_ModeWMV9_B
+#  define DXVA_ModeWMV9_C          DXVA2_ModeWMV9_C
+
+#  define DXVA_ModeVC1_A           DXVA2_ModeVC1_A
+#  define DXVA_ModeVC1_B           DXVA2_ModeVC1_B
+#  define DXVA_ModeVC1_C           DXVA2_ModeVC1_C
+#  define DXVA_ModeVC1_D           DXVA2_ModeVC1_D
+#  define DXVA_ModeVC1_D2010       DXVA2_ModeVC1_D2010
+
+#  define DXVA_ModeMPEG4pt2_VLD_Simple           DXVA2_ModeMPEG4pt2_VLD_Simple
+#  define DXVA_ModeMPEG4pt2_VLD_AdvSimple_NoGMC  DXVA2_ModeMPEG4pt2_VLD_AdvSimple_NoGMC
+#  define DXVA_ModeMPEG4pt2_VLD_AdvSimple_GMC    DXVA2_ModeMPEG4pt2_VLD_AdvSimple_GMC
+
+#  define DXVA_ModeHEVC_VLD_Main    DXVA2_ModeHEVC_VLD_Main
+#  define DXVA_ModeHEVC_VLD_Main10  DXVA2_ModeHEVC_VLD_Main10
+
+#  define DXVA_ModeVP8_VLD                 DXVA2_ModeVP8_VLD
+#  define DXVA_ModeVP9_VLD_Profile0        DXVA2_ModeVP9_VLD_Profile0
+#  define DXVA_ModeVP9_VLD_10bit_Profile2  DXVA2_ModeVP9_VLD_10bit_Profile2
+
+# elif HAVE_LIBAVCODEC_D3D11VA_H && __MINGW64_VERSION_MAJOR > 11
+
+// redirect missing DXVA_xxx to existing D3D11_DECODER_PROFILE_xxx variants
+#  define DXVA2_ModeMPEG2_VLD     D3D11_DECODER_PROFILE_MPEG2_VLD
+#  define DXVA2_ModeMPEG2_MoComp  D3D11_DECODER_PROFILE_MPEG2_MOCOMP
+#  define DXVA2_ModeMPEG2_IDCT    D3D11_DECODER_PROFILE_MPEG2_IDCT
+#  define DXVA_ModeMPEG1_VLD      D3D11_DECODER_PROFILE_MPEG1_VLD
+#  define DXVA_ModeMPEG2and1_VLD  D3D11_DECODER_PROFILE_MPEG2and1_VLD
+
+#  define DXVA_ModeH264_A         D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT
+#  define DXVA_ModeH264_B         D3D11_DECODER_PROFILE_H264_MOCOMP_FGT
+#  define DXVA_ModeH264_C         D3D11_DECODER_PROFILE_H264_IDCT_NOFGT
+#  define DXVA_ModeH264_D         D3D11_DECODER_PROFILE_H264_IDCT_FGT
+#  define DXVA_ModeH264_E         D3D11_DECODER_PROFILE_H264_VLD_NOFGT
+#  define DXVA_ModeH264_F         D3D11_DECODER_PROFILE_H264_VLD_FGT
+
+#  define DXVA_ModeH264_VLD_Stereo_Progressive_NoFGT  D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT
+#  define DXVA_ModeH264_VLD_Stereo_NoFGT              D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT
+#  define DXVA_ModeH264_VLD_Multiview_NoFGT           D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT
+
+#  define DXVA_ModeWMV8_A         D3D11_DECODER_PROFILE_WMV8_POSTPROC
+#  define DXVA_ModeWMV8_B         D3D11_DECODER_PROFILE_WMV8_MOCOMP
+
+#  define DXVA_ModeWMV9_A         D3D11_DECODER_PROFILE_WMV9_POSTPROC
+#  define DXVA_ModeWMV9_B         D3D11_DECODER_PROFILE_WMV9_MOCOMP
+#  define DXVA_ModeWMV9_C         D3D11_DECODER_PROFILE_WMV9_IDCT
+
+#  define DXVA_ModeVC1_A          D3D11_DECODER_PROFILE_VC1_POSTPROC
+#  define DXVA_ModeVC1_B          D3D11_DECODER_PROFILE_VC1_MOCOMP
+#  define DXVA_ModeVC1_C          D3D11_DECODER_PROFILE_VC1_IDCT
+#  define DXVA_ModeVC1_D          D3D11_DECODER_PROFILE_VC1_VLD
+#  define DXVA_ModeVC1_D2010      D3D11_DECODER_PROFILE_VC1_D2010
+
+#  define DXVA_ModeHEVC_VLD_Main    D3D11_DECODER_PROFILE_HEVC_VLD_MAIN
+#  define DXVA_ModeHEVC_VLD_Main10  D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10
+
+#  define DXVA_ModeVP8_VLD                 D3D11_DECODER_PROFILE_VP8_VLD
+#  define DXVA_ModeVP9_VLD_Profile0        D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0
+#  define DXVA_ModeVP9_VLD_10bit_Profile2  D3D11_DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2
+
+# endif // !HAVE_LIBAVCODEC_xxx
+
+#endif // !__MINGW64_VERSION_MAJOR && !_MSC_VER
+
 #ifdef __cplusplus
 }
 #endif


=====================================
modules/codec/avcodec/dxva2.c
=====================================
@@ -58,9 +58,6 @@ vlc_module_begin()
     set_va_callback(Open, 110)
 vlc_module_end()
 
-#include <initguid.h> /* must be last included to not redefine existing GUIDs */
-DEFINE_GUID(DXVA2_NoEncrypt,                        0x1b81bed0, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5);
-
 
 /* */
 typedef struct {
@@ -599,7 +596,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
             score = 2;
         else
             continue;
-        if (IsEqualGUID(&cfg->guidConfigBitstreamEncryption, &DXVA2_NoEncrypt))
+        if (IsEqualGUID(&cfg->guidConfigBitstreamEncryption, &DXVA_NoEncrypt))
             score += 16;
 
         if (cfg_score < score) {


=====================================
modules/codec/avcodec/dxva_blocklist.c
=====================================
@@ -23,23 +23,19 @@
 # include "config.h"
 #endif
 
-#include <vlc_common.h>
-#include <vlc_codecs.h>
-#include <vlc_codec.h>
-
 #include "../../video_chroma/dxgi_fmt.h"
 
 #include "directx_va.h"
 
 extern const GUID DXVA2_ModeMPEG2_VLD;
-extern const GUID DXVA2_ModeMPEG2and1_VLD;
-extern const GUID DXVA2_ModeH264_E;
-extern const GUID DXVA2_ModeH264_F;
+extern const GUID DXVA_ModeMPEG2and1_VLD;
+extern const GUID DXVA_ModeH264_E;
+extern const GUID DXVA_ModeH264_F;
 extern const GUID DXVA_Intel_H264_NoFGT_ClearVideo;
 extern const GUID DXVA_ModeH264_VLD_WithFMOASO_NoFGT;
 extern const GUID DXVA_ModeH264_VLD_NoFGT_Flash;
-extern const GUID DXVA2_ModeVC1_D;
-extern const GUID DXVA2_ModeVC1_D2010;
+extern const GUID DXVA_ModeVC1_D;
+extern const GUID DXVA_ModeVC1_D2010;
 extern const GUID DXVA_ModeHEVC_VLD_Main10;
 extern const GUID DXVA_ModeHEVC_VLD_Main;
 extern const GUID DXVA_ModeVP9_VLD_Profile0;
@@ -65,14 +61,14 @@ static const GUID *NoHEVC[] = {
 
 static const GUID *AnyDecoder[] = {
     &DXVA2_ModeMPEG2_VLD,
-    &DXVA2_ModeMPEG2and1_VLD,
-    &DXVA2_ModeH264_E,
-    &DXVA2_ModeH264_F,
+    &DXVA_ModeMPEG2and1_VLD,
+    &DXVA_ModeH264_E,
+    &DXVA_ModeH264_F,
     &DXVA_Intel_H264_NoFGT_ClearVideo,
     &DXVA_ModeH264_VLD_WithFMOASO_NoFGT,
     &DXVA_ModeH264_VLD_NoFGT_Flash,
-    &DXVA2_ModeVC1_D,
-    &DXVA2_ModeVC1_D2010,
+    &DXVA_ModeVC1_D,
+    &DXVA_ModeVC1_D2010,
     &DXVA_ModeHEVC_VLD_Main,
     &DXVA_ModeHEVC_VLD_Main10,
     &DXVA_ModeVP9_VLD_Profile0,



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4c3538533e33379f216fbecb5accbd99893ef8b8...0f92f19cfcccd3e248e38c21b466a73fb901428c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4c3538533e33379f216fbecb5accbd99893ef8b8...0f92f19cfcccd3e248e38c21b466a73fb901428c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list