[vlc-devel] [PATCH 06/13] decoder: ensure we have a visible geometry

Rémi Denis-Courmont remi at remlab.net
Tue Feb 19 11:15:13 CET 2019


I agree that it seems wrong, but I don't think that the grand father clause applies here. A decoder could already pass an odd geometry explicitly, so in all likelihood the current situation is a bug.

Le 19 février 2019 11:38:19 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>It seems wrong to do it after the width/height has been adjusted for
>the chroma.
>The original width/height is more likely how it's intended to be
>displayed (and this is an odd value to set by the decoder with
>mismatching
>chroma padding, so this must be it).
>
>But that's how it was done in the vout so we keep it for now
>---
> src/input/decoder_helpers.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
>diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
>index 36043753ca..c2242c330a 100644
>--- a/src/input/decoder_helpers.c
>+++ b/src/input/decoder_helpers.c
>@@ -108,6 +108,25 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
>         }
>     }
> 
>+    if( !fmt_out.i_visible_width || !fmt_out.i_visible_height )
>+    {
>+        if( dec->fmt_in.video.i_visible_width &&
>+            dec->fmt_in.video.i_visible_height )
>+        {
>+            fmt_out.i_visible_width  =
>dec->fmt_in.video.i_visible_width;
>+            fmt_out.i_visible_height =
>dec->fmt_in.video.i_visible_height;
>+            fmt_out.i_x_offset       = dec->fmt_in.video.i_x_offset;
>+            fmt_out.i_y_offset       = dec->fmt_in.video.i_y_offset;
>+        }
>+        else
>+        {
>+            fmt_out.i_visible_width  = fmt_out.i_width;
>+            fmt_out.i_visible_height = fmt_out.i_height;
>+            fmt_out.i_x_offset       = 0;
>+            fmt_out.i_y_offset       = 0;
>+        }
>+    }
>+
>     video_format_t original = dec->fmt_out.video;
>     dec->fmt_out.video = fmt_out;
>     int err = dec->cbs->video.format_update( dec );
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190219/5fe47721/attachment.html>


More information about the vlc-devel mailing list