[vlc-devel] [PATCH 5/7] d3d11va: use the GUID bitdepth to select the best output rendering format

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 4 15:15:56 CEST 2019


---
 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 42b496dd9b8..573951ea1b3 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;
-- 
2.17.1



More information about the vlc-devel mailing list