[vlc-commits] dxva: restrict the supported 8 bit formats
Steve Lhomme
git at videolan.org
Thu Oct 17 12:32:01 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 17 12:30:48 2019 +0200| [010801b87413ff6d6b9b155216eafa72d1fb7279] | committer: Steve Lhomme
dxva: restrict the supported 8 bit formats
Right now we fallback to 8 bits 4:2:0 for any source format. This is wrong if
we even receive 4:2:2, 4:4:4, 12 bits, 16 bits, etc.
Similar to what is done for VAAPI and VDPAU.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=010801b87413ff6d6b9b155216eafa72d1fb7279
---
modules/codec/avcodec/va.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index 0dcd935483..4e60ad3e97 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -53,8 +53,11 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt)
{
case AV_PIX_FMT_YUV420P10LE:
return VLC_CODEC_D3D9_OPAQUE_10B;
- default:
+ case AV_PIX_FMT_YUVJ420P:
+ case AV_PIX_FMT_YUV420P:
return VLC_CODEC_D3D9_OPAQUE;
+ default:
+ return 0;
}
break;
@@ -63,8 +66,11 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt)
{
case AV_PIX_FMT_YUV420P10LE:
return VLC_CODEC_D3D11_OPAQUE_10B;
- default:
+ case AV_PIX_FMT_YUVJ420P:
+ case AV_PIX_FMT_YUV420P:
return VLC_CODEC_D3D11_OPAQUE;
+ default:
+ return 0;
}
break;
More information about the vlc-commits
mailing list