[vlc-commits] dxva2: select the render format based on the opaque chroma
Steve Lhomme
git at videolan.org
Mon Nov 4 12:14:58 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jul 22 13:52:04 2019 +0200| [2e8a970b5f72dd9946647c4885cb74adfb0a761a] | committer: Steve Lhomme
dxva2: select the render format based on the opaque chroma
This is similar to what is done in the display module.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e8a970b5f72dd9946647c4885cb74adfb0a761a
---
modules/codec/avcodec/dxva2.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 15ec799063..3caa648a31 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -291,6 +291,18 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *des
va->sys = sys;
+ switch (fmt_out->i_chroma)
+ {
+ case VLC_CODEC_D3D9_OPAQUE_10B:
+ sys->render = MAKEFOURCC('P','0','1','0');
+ break;
+ case VLC_CODEC_D3D9_OPAQUE:
+ sys->render = MAKEFOURCC('N','V','1','2');
+ break;
+ default:
+ vlc_assert_unreachable();
+ }
+
/* Load dll*/
sys->dxva2_dll = LoadLibrary(TEXT("DXVA2.DLL"));
if (!sys->dxva2_dll) {
More information about the vlc-commits
mailing list