diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-06-09 17:35:22 -0400 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2017-06-28 09:42:24 -0400 |
commit | 3426832ac3074e081923095f7794064a30642841 (patch) | |
tree | 74e78188da372f02531c776b62e9645f4fd7b1e5 /libavcodec/hevcdec.c | |
parent | 850c6db97d1f78e7607952ab8b854a93a185319e (diff) | |
download | ffmpeg-3426832ac3074e081923095f7794064a30642841.tar.gz |
hevc: Add support for alternative transfer characterics SEI
The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r-- | libavcodec/hevcdec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 095564b368..3b24fb9bec 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2725,6 +2725,12 @@ static int set_side_data(HEVCContext *s) s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; } + if (s->sei.alternative_transfer.present && + av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) && + s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) { + s->avctx->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics; + } + return 0; } |