[vlc-commits] dxva2: disable HEVC 10 bits decoding on older Intel drivers
Steve Lhomme
git at videolan.org
Mon Dec 4 00:09:09 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Dec 1 09:55:15 2017 +0100| [fbf3555aae97391b8e64341eb5349c204f015d8a] | committer: Jean-Baptiste Kempf
dxva2: disable HEVC 10 bits decoding on older Intel 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=fbf3555aae97391b8e64341eb5349c204f015d8a
---
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;
More information about the vlc-commits
mailing list