[FFmpeg-devel] [PATCH] avcodec: use sRGB to stringify gbr/bt709/iec61966-2-1 instead

Derek Buitenhuis derek.buitenhuis at gmail.com
Sun Jun 18 14:24:12 EEST 2023


On 6/17/2023 7:07 PM, Leo Izen wrote:
> -                if (strcmp(col, pri) || strcmp(col, trc)) {
> +                if (enc->colorspace == AVCOL_SPC_RGB &&
> +                        enc->color_primaries == AVCOL_PRI_BT709 &&
> +                        enc->color_trc == AVCOL_TRC_IEC61966_2_1) {
> +                    av_bprintf(&bprint, "sRGB, ");
> +                } else if (strcmp(col, pri) || strcmp(col, trc)) {

I real dont think special casing a single colorspace like this is a good idea,
nor do I think hiding the explicit values is.

Same reason we do not special case e.g. HLG.

- Derek


More information about the ffmpeg-devel mailing list