diff options
author | James Almer <jamrial@gmail.com> | 2018-03-29 01:03:24 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-03-29 01:03:24 -0300 |
commit | e5819fa62930966e6fb905cef21c985b91631d87 (patch) | |
tree | 5865df090c8a894b38c30adbb641f63172685499 /libavcodec/libaomenc.c | |
parent | 97de37da9c2973eea98e805b1f04920c9e00c374 (diff) | |
download | ffmpeg-e5819fa62930966e6fb905cef21c985b91631d87.tar.gz |
libavcodec/libaomenc: add support for transfer characteristics and color primaries
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libaomenc.c')
-rw-r--r-- | libavcodec/libaomenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index c424f14824..7aac019b5b 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -74,6 +74,9 @@ static const char *const ctlidstr[] = { [AOME_SET_ENABLEAUTOALTREF] = "AOME_SET_ENABLEAUTOALTREF", [AOME_SET_STATIC_THRESHOLD] = "AOME_SET_STATIC_THRESHOLD", [AV1E_SET_COLOR_RANGE] = "AV1E_SET_COLOR_RANGE", + [AV1E_SET_COLOR_PRIMARIES] = "AV1E_SET_COLOR_PRIMARIES", + [AV1E_SET_MATRIX_COEFFICIENTS] = "AV1E_SET_MATRIX_COEFFICIENTS", + [AV1E_SET_TRANSFER_CHARACTERISTICS] = "AV1E_SET_TRANSFER_CHARACTERISTICS", }; static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc) @@ -449,6 +452,9 @@ static av_cold int aom_init(AVCodecContext *avctx, if (ctx->crf >= 0) codecctl_int(avctx, AOME_SET_CQ_LEVEL, ctx->crf); + codecctl_int(avctx, AV1E_SET_COLOR_PRIMARIES, avctx->color_primaries); + codecctl_int(avctx, AV1E_SET_MATRIX_COEFFICIENTS, avctx->colorspace); + codecctl_int(avctx, AV1E_SET_TRANSFER_CHARACTERISTICS, avctx->color_trc); set_color_range(avctx); // provide dummy value to initialize wrapper, values will be updated each _encode() |