diff options
author | Zhong Li <zhongli_dev@126.com> | 2019-12-04 14:24:09 +0000 |
---|---|---|
committer | Zhong Li <zhongli_dev@126.com> | 2019-12-12 23:44:02 +0800 |
commit | a87b5d5e8c9424b5cadd46abba98dae8edd454df (patch) | |
tree | 6bd2db25d8c4667ba2e22dcb23f79751e911421b /libavcodec/libx265.c | |
parent | 8446318502bf21347a4867a5a1fcd8d9bfbd6a41 (diff) |
lavc/x265: set preferred_transfer_characteristics for HLG
"HEVC HDR UHDTV Bitstreams using HLG10 shall also contain the
alternative_transfer_characteristics SEI message. The
alternative_transfer_characteristics SEI message shall be inserted on
the HEVC DVB_RAP, and preferred_transfer_characteristics shall be set
equal to "18", indicating Recommendation ITU-R BT. 2100 [45] HLG
system."
Signed-off-by: Zhong Li <zhongli_dev@126.com>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r-- | libavcodec/libx265.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 4e7507728f..963c28fb1d 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -159,6 +159,10 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx) // x265 validates the parameters internally ctx->params->vui.colorPrimaries = avctx->color_primaries; ctx->params->vui.transferCharacteristics = avctx->color_trc; +#if X265_BUILD >= 159 + if (avctx->color_trc == AVCOL_TRC_ARIB_STD_B67) + ctx->params->preferredTransferCharacteristics = ctx->params->vui.transferCharacteristics; +#endif ctx->params->vui.matrixCoeffs = avctx->colorspace; } |