[vlc-commits] d3d11va: disable HEVC 10 bits decoding on older drivers
Steve Lhomme
git at videolan.org
Thu Nov 30 19:20:37 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Thu Nov 30 17:44:40 2017 +0100| [4d63f935fde9a2b494ac9811eb55d9aebaf9762d] | committer: Jean-Baptiste Kempf
d3d11va: disable HEVC 10 bits decoding on older drivers
See https://communities.intel.com/thread/116386?start=15&tstart=0
Fixes #19171
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4d63f935fde9a2b494ac9811eb55d9aebaf9762d
---
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 )
More information about the vlc-commits
mailing list