[FFmpeg-devel] [PATCH v2 02/13] avcodec: add extended AVCodec color metadata
Leo Izen
leo.izen at gmail.com
Sat Oct 14 16:31:32 EEST 2023
On 10/13/23 10:24, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
>
> This is motivated primarily by a desire for YUVJ removal, which will
> require signalling the supported color ranges as part of the codec
> capabilities. But since we're here anyway, we might as well add all of
> the metadata, which I foresee seeing more use in the future (e.g.
> automatic conversion from HDR to SDR when encoding to formats that don't
> support AVCOL_TRC_SMPTE2084, ...)
> ---
> +
> + /* Extended colorspace support metadata */
> + const enum AVColorSpace *csps; ///< array of supported color spaces, or NULL if unknown, array is terminated by AVCOL_SPC_UNSPECIFIED
> + const enum AVColorRange *color_ranges; ///< array of supported color ranges, or NULL if unknown, array is terminated by 0
> + const enum AVChromaLocation *chroma_locs; ///< array of supported chroma locations, or NULL if unknown, array is terminated by 0
> + const enum AVColorPrimaries *primaries; ///< array of supported color primaries, or NULL if unknown, array is terminated by 0
> + const enum AVColorTransferCharacteristic *trcs; ///< array of supported transfer characteristics, or NULL if known, array is terminated by 0
> } AVCodec;
Any particular reason we're using AVCOL_SPC_UNSPECIFIED to terminate
csps, but not using AVCOL_PRI_UNSPECIFIED for the primaries and the
equivalent for the TRC? It seems a bit more consistent than using RESERVED0
- Leo Izen (Traneptora)
More information about the ffmpeg-devel
mailing list