[vlc-devel] [PATCH] direct3d11: use the decoder format chroma as seen from the outside

Steve Lhomme robux4 at gmail.com
Thu Oct 26 15:45:15 CEST 2017


We will do the conversion from the decoder format to the display format internally as with I420.
---
 modules/video_output/win32/direct3d11.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 15ce7c63ed..733d623fef 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1650,6 +1650,8 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
     const d3d_format_t *decoder_format = NULL;
     if ( !sys->picQuadConfig && is_d3d11_opaque(fmt->i_chroma) )
         decoder_format = GetDirectDecoderFormat(vd, fmt->i_chroma);
+    else
+        decoder_format = sys->picQuadConfig;
 
     // look for any pixel format that we can handle with enough pixels per channel
     if ( !sys->picQuadConfig )
@@ -1684,7 +1686,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
        return VLC_EGENERIC;
     }
 
-    fmt->i_chroma = sys->picQuadConfig->fourcc;
+    fmt->i_chroma = decoder_format ? decoder_format->fourcc : sys->picQuadConfig->fourcc;
 
     msg_Dbg( vd, "Using pixel format %s for chroma %4.4s", sys->picQuadConfig->name,
                  (char *)&fmt->i_chroma );
-- 
2.12.1



More information about the vlc-devel mailing list