[FFmpeg-devel] [PATCH] pgssubdec: fix subpicture output colorspace and range

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Apr 23 10:09:02 CEST 2016


Jan Ekström <jeebjp <at> gmail.com> writes:

> Functionality used before didn't widen the values from limited to
> full range. Additionally, now the decoder uses BT.709 where it
> should be used according to the video resolution.

Please mention the relevant ticket in the commit message.

> +    int hdtv;

Please rename to sdtv so you can remove the assignment from 
init_decoder().

> +    // Set colorimetry according to resolution
> +    if (h > 576)
> +        ctx->hdtv = 1;
> +    else
> +        ctx->hdtv = 0;

ctx->sdtv = h <=576 (or add braces).

> +#define YUV_TO_RGB1_CCIR_BT709(cb1, cr1)\

Just being curious: Did you test how much the values were 
off without this hunk?

Carl Eugen


More information about the ffmpeg-devel mailing list