[FFmpeg-devel] [PATCH 08/13] avformat/mxfenc: add white/black ref /color range

Tomas Härdin tjoppen at acc.umu.se
Tue May 8 13:47:35 EEST 2018


mån 2018-05-07 klockan 12:38 +0200 skrev Michael Niedermayer:
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> 
> +    if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) {
> +        int black = 0,
> +            white = (1<<sc->component_depth) - 1,
> +            color = (1<<sc->component_depth) - 1;
> +        if (st->codecpar->color_range == AVCOL_RANGE_MPEG) {
> +            black = 1   << (sc->component_depth - 4);
> +            white = 235 << (sc->component_depth - 8);
> +            color = (14 << (sc->component_depth - 4)) + 1;
> +        }

This feels like something that should be part of pix_fmt stuff or
something. But maybe someone can refactor that later. Looks OK
otherwise

/Tomas


More information about the ffmpeg-devel mailing list