On 19/10/2016 00:21, Vittorio Giovara wrote:
> For 'nclx', the latest edition of the standard switched from JPEG XR
> to 23001-8, which matches the current order of our entries.
> For 'nclc', qtff edition 2016-09-13 introduced a few new entries.
> 
> Signed-off-by: Vittorio Giovara <vittorio.giov...@gmail.com>
> ---
>  libavformat/mov.c | 16 ++++++----------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 36e75d5..e1d87cd 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1083,16 +1083,7 @@ static int mov_read_colr(MOVContext *c, AVIOContext 
> *pb, MOVAtom atom)
>              st->codecpar->color_range = AVCOL_RANGE_JPEG;
>          else
>              st->codecpar->color_range = AVCOL_RANGE_MPEG;
> -        /* 14496-12 references JPEG XR specs (rather than the more complete
> -         * 23001-8) so some adjusting is required */
> -        if (color_primaries >= AVCOL_PRI_FILM)
> -            color_primaries = AVCOL_PRI_UNSPECIFIED;
> -        if ((color_trc >= AVCOL_TRC_LINEAR &&
> -             color_trc <= AVCOL_TRC_LOG_SQRT) ||
> -            color_trc >= AVCOL_TRC_BT2020_10)
> -            color_trc = AVCOL_TRC_UNSPECIFIED;
> -        if (color_matrix >= AVCOL_SPC_BT2020_NCL)
> -            color_matrix = AVCOL_SPC_UNSPECIFIED;
> +

maybe something like

if (!av_color_primaries_name(color_primaries)) {
    avpriv_request_sample(...)
    color_primaries = unspecified
}

and so on would be more future proof.

The rest looks fine.

lu
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to