[vlc-commits] d3d11va: use the GUID bitdepth to select the best output rendering format

Steve Lhomme git at videolan.org
Tue Oct 8 10:14:33 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct  4 10:34:16 2019 +0200| [953aaeecc4478c49981f50e48b7ba9c76e5ee607] | committer: Steve Lhomme

d3d11va: use the GUID bitdepth to select the best output rendering format

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=953aaeecc4478c49981f50e48b7ba9c76e5ee607
---

 modules/codec/avcodec/d3d11va.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 42b496dd9b..573951ea1b 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -516,9 +516,6 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list)
     return VLC_SUCCESS;
 }
 
-extern const GUID DXVA_ModeHEVC_VLD_Main10;
-extern const GUID DXVA_ModeVP9_VLD_10bit_Profile2;
-
 static int DxSetupOutput(vlc_va_t *va, const directx_va_mode_t *mode, const video_format_t *fmt)
 {
     vlc_va_sys_t *sys = va->sys;
@@ -550,11 +547,13 @@ static int DxSetupOutput(vlc_va_t *va, const directx_va_mode_t *mode, const vide
         return VLC_EGENERIC;
     }
 
-    DXGI_FORMAT processorInput[5];
+    DXGI_FORMAT processorInput[6];
     int idx = 0;
     if ( sys->render != DXGI_FORMAT_UNKNOWN )
         processorInput[idx++] = sys->render;
-    if (IsEqualGUID(mode->guid, &DXVA_ModeHEVC_VLD_Main10) || IsEqualGUID(mode->guid, &DXVA_ModeVP9_VLD_10bit_Profile2))
+    if (mode->bit_depth > 10)
+        processorInput[idx++] = DXGI_FORMAT_P016;
+    if (mode->bit_depth == 10)
         processorInput[idx++] = DXGI_FORMAT_P010;
     processorInput[idx++] = DXGI_FORMAT_NV12;
     processorInput[idx++] = DXGI_FORMAT_420_OPAQUE;



More information about the vlc-commits mailing list