[vlc-devel] [PATCH 4/4] d3d11va: disable HEVC 10 bits decoding on older drivers

Steve Lhomme robux4 at videolabs.io
Thu Nov 30 17:44:40 CET 2017


See https://communities.intel.com/thread/116386?start=15&tstart=0

Fixes #19171
---
 modules/codec/avcodec/d3d11va.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 96f479963f..99305e07aa 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -551,6 +551,24 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list)
     return VLC_SUCCESS;
 }
 
+extern const GUID DXVA_ModeHEVC_VLD_Main10;
+static bool CanUseIntelHEVC(vlc_va_t *va)
+{
+    vlc_va_sys_t *sys = va->sys;
+    /* it should be OK starting after driver 20.19.15.4835 */
+    struct wdmm_version WDMM = {
+        .wddm         = 20,
+        .d3d_features = 19,
+        .revision     = 15,
+        .build        = 4836,
+    };
+    if (D3D11CheckDriverVersion(sys->d3d_dev.d3ddevice, GPU_MANUFACTURER_INTEL, &WDMM) == VLC_SUCCESS)
+        return true;
+
+    msg_Dbg(va, "HEVC not supported with these drivers");
+    return false;
+}
+
 static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt)
 {
     vlc_va_sys_t *sys = va->sys;
@@ -566,6 +584,9 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *
     }
 #endif
 
+    if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10) && !CanUseIntelHEVC(va))
+        return VLC_EGENERIC;
+
     DXGI_FORMAT processorInput[4];
     int idx = 0;
     if ( sys->render != DXGI_FORMAT_UNKNOWN )
-- 
2.14.2



More information about the vlc-devel mailing list