[vlc-devel] [PATCH 1/2] display: allow the vout to expand the decoder pool dimensions

Steve Lhomme robux4 at videolabs.io
Wed Mar 22 14:11:35 CET 2017


With DXVA we need to align to 128 with some codecs and the decoder doesn't tell
us.
---
 src/video_output/display.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 310f208b4c..098e1e8a86 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -444,6 +444,11 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
         (v_src.i_chroma == VLC_CODEC_J444 && v_dst.i_chroma == VLC_CODEC_I444))
         v_dst_cmp.i_chroma = v_src.i_chroma;
 
+    if (v_dst_cmp.i_width > v_src.i_width)
+        v_dst_cmp.i_width = v_src.i_width;
+    if (v_dst_cmp.i_height > v_src.i_height)
+        v_dst_cmp.i_height = v_src.i_height;
+
     const bool convert = memcmp(&v_src, &v_dst_cmp, sizeof(v_src)) != 0;
     if (!convert)
         return 0;
-- 
2.11.1



More information about the vlc-devel mailing list