@@ -3376,6 +3376,7 @@ typedef struct AVCodec {
uint8_t max_lowres; ///< maximum value for lowres supported by the decoder
const AVClass *priv_class; ///< AVClass for the private context
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
+ int color_range; ///< supported color range by encoder, 0 means any is supported
/*****************************************************************
* No fields below this line are part of the public API. They
@@ -879,6 +879,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ444P)
avctx->color_range = AVCOL_RANGE_JPEG;
}
+ if (avctx->codec->color_range)
+ avctx->color_range = avctx->codec->color_range;
if (avctx->codec->supported_samplerates) {
for (i = 0; avctx->codec->supported_samplerates[i] != 0; i++)
if (avctx->sample_rate == avctx->codec->supported_samplerates[i])
Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavcodec/avcodec.h | 1 + libavcodec/utils.c | 2 ++ 2 files changed, 3 insertions(+)