Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-06-10 00:27:22 +0300
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-06-28 16:44:09 +0300
commit969f215957b25ec014aeed6e440ecb450e6927c1 (patch)
tree11302d9c13c27716aceb3e1d1542dc813106fcf5 /libavcodec/hevcdec.c
parenta594f17f83a1ffdc1eec18818208fe39487dd5d7 (diff)
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 7a9182af9b..ac0b1a3c1d 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2407,6 +2407,12 @@ static int set_side_data(HEVCContext *s)
s->sei.display_orientation.vflip);
}
+ 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;
}