[vlc-devel] [PATCH 1/3] decoder: forward the source colorimetry if the decoder doesn't set it

Rémi Denis-Courmont remi at remlab.net
Mon Feb 18 17:45:20 CET 2019


Le maanantaina 18. helmikuuta 2019, 17.56.40 EET Steve Lhomme a écrit :
> ---
>  src/input/decoder_helpers.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
> index 3cc02de8d6..a019a540df 100644
> --- a/src/input/decoder_helpers.c
> +++ b/src/input/decoder_helpers.c
> @@ -79,6 +79,22 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
>                    dec->cbs->video.format_update == NULL) )
>          return -1;
> 
> +    if ( dec->fmt_in.video.color_range != COLOR_RANGE_UNDEF &&
> +         dec->fmt_out.video.color_range == COLOR_RANGE_UNDEF )
> +        dec->fmt_out.video.color_range = dec->fmt_in.video.color_range;

This is equivalent and simpler:

+    if (dec->fmt_out.video.color_range == COLOR_RANGE_UNDEF)
+        dec->fmt_out.video.color_range = dec->fmt_in.video.color_range;

The only Q is whether fmt_out should be mangled in the back of the decoder. 
That seems sketchy.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list