[vlc-devel] [PATCH 06/13] decoder: ensure we have a visible geometry
Steve Lhomme
robux4 at ycbcr.xyz
Tue Feb 19 11:37:27 CET 2019
I'll add another patch for this change to make it clear we change the
current behaviour.
On 19/02/2019 11:15, Rémi Denis-Courmont wrote:
> 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 );
>
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> excuser ma brièveté.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list