[vlc-devel] [PATCH 6/6] dxva2: disable HEVC 10 bits decoding on older Intel drivers
Steve Lhomme
robux4 at videolabs.io
Fri Dec 1 09:55:15 CET 2017
See https://communities.intel.com/thread/116386?start=15&tstart=0
Fixes #19171
---
modules/codec/avcodec/dxva2.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index b39c47e1cf..077c118b77 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -494,9 +494,31 @@ 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 wddm_version WDMM = {
+ .wddm = 20,
+ .d3d_features = 19,
+ .revision = 15,
+ .build = 4836,
+ };
+ if (D3D9CheckDriverVersion(&sys->hd3d, &sys->d3d_dev, 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_UNUSED(fmt);
+
+ if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10) && !CanUseIntelHEVC(va))
+ return VLC_EGENERIC;
+
int err = VLC_EGENERIC;
UINT output_count = 0;
D3DFORMAT *output_list = NULL;
--
2.14.2
More information about the vlc-devel
mailing list