[vlc-devel] [vlc-commits] directx_va: allow 4835 drivers to decode HEVC 8 bits
Steve Lhomme
robux4 at ycbcr.xyz
Thu Apr 19 08:17:03 CEST 2018
I removed this. Digging through old threads it's bogus too. The problem
here is not really the driver version for the GPU version.
Le 19/04/2018 à 08:07, Steve Lhomme a écrit :
> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 19 08:05:48 2018 +0200| [9b5781df362cbb981659267709e91ec65a533afa] | committer: Steve Lhomme
>
> directx_va: allow 4835 drivers to decode HEVC 8 bits
>
> It may be better to detect HD 5500 and HD6000 which seem to be the (only?) ones
> with bogus HEVC capabilities. Basically 5xxx Intel CPUs.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b5781df362cbb981659267709e91ec65a533afa
> ---
>
> modules/codec/avcodec/d3d11va.c | 23 ++++++++++++++++++++---
> modules/codec/avcodec/dxva2.c | 23 ++++++++++++++++++++---
> 2 files changed, 40 insertions(+), 6 deletions(-)
>
> diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
> index 3aee0cd621..b594e7e654 100644
> --- a/modules/codec/avcodec/d3d11va.c
> +++ b/modules/codec/avcodec/d3d11va.c
> @@ -546,7 +546,23 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list)
> extern const GUID DXVA_ModeHEVC_VLD_Main;
> extern const GUID DXVA_ModeHEVC_VLD_Main10;
> extern const GUID DXVA_ModeVP9_VLD_10bit_Profile2;
> -static bool CanUseIntelHEVC(vlc_va_t *va)
> +static bool CanUseIntelHEVC8(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 = 0,
> + .d3d_features = 0,
> + .revision = 0,
> + .build = 4835,
> + };
> + if (D3D11CheckDriverVersion(&sys->d3d_dev, GPU_MANUFACTURER_INTEL, &WDMM) == VLC_SUCCESS)
> + return true;
> +
> + msg_Dbg(va, "HEVC not supported with these drivers");
> + return false;
> +}
> +static bool CanUseIntelHEVC10(vlc_va_t *va)
> {
> vlc_va_sys_t *sys = va->sys;
> /* it should be OK starting after driver 20.19.15.4835 */
> @@ -578,8 +594,9 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *
> }
> #endif
>
> - if ((IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) ||
> - IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10)) && !CanUseIntelHEVC(va))
> + if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) && !CanUseIntelHEVC8(va))
> + return VLC_EGENERIC;
> + if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10) && !CanUseIntelHEVC10(va))
> return VLC_EGENERIC;
>
> DXGI_FORMAT processorInput[5];
> diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
> index 9131cdc8db..fd78c65630 100644
> --- a/modules/codec/avcodec/dxva2.c
> +++ b/modules/codec/avcodec/dxva2.c
> @@ -497,7 +497,23 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list)
>
> extern const GUID DXVA_ModeHEVC_VLD_Main;
> extern const GUID DXVA_ModeHEVC_VLD_Main10;
> -static bool CanUseIntelHEVC(vlc_va_t *va)
> +static bool CanUseIntelHEVC8(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 = 0,
> + .d3d_features = 0,
> + .revision = 0,
> + .build = 4835,
> + };
> + 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 bool CanUseIntelHEVC10(vlc_va_t *va)
> {
> vlc_va_sys_t *sys = va->sys;
> /* it should be OK starting after driver 20.19.15.4835 */
> @@ -518,8 +534,9 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *
> {
> VLC_UNUSED(fmt);
>
> - if ((IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) ||
> - IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10)) && !CanUseIntelHEVC(va))
> + if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) && !CanUseIntelHEVC8(va))
> + return VLC_EGENERIC;
> + if (IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10) && !CanUseIntelHEVC10(va))
> return VLC_EGENERIC;
>
> int err = VLC_EGENERIC;
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
More information about the vlc-devel
mailing list