From ebf3b9e8a875eb12312460aee505118791ef805f Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 8 Aug 2017 16:06:29 +0200 Subject: h264: 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 --- libavcodec/h264_sei.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavcodec/h264_sei.h') diff --git a/libavcodec/h264_sei.h b/libavcodec/h264_sei.h index ce9768ec3d..f6ac6034da 100644 --- a/libavcodec/h264_sei.h +++ b/libavcodec/h264_sei.h @@ -33,6 +33,7 @@ typedef enum { H264_SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync) H264_SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement H264_SEI_TYPE_DISPLAY_ORIENTATION = 47, ///< display orientation + H264_SEI_TYPE_ALTERNATIVE_TRANSFER = 147, ///< alternative transfer } H264_SEI_Type; /** @@ -115,6 +116,11 @@ typedef struct H264SEIDisplayOrientation { int hflip, vflip; } H264SEIDisplayOrientation; +typedef struct H264SEIAlternativeTransfer { + int present; + int preferred_transfer_characteristics; +} H264SEIAlternativeTransfer; + typedef struct H264SEIContext { H264SEIPictureTiming picture_timing; H264SEIAFD afd; @@ -124,6 +130,7 @@ typedef struct H264SEIContext { H264SEIBufferingPeriod buffering_period; H264SEIFramePacking frame_packing; H264SEIDisplayOrientation display_orientation; + H264SEIAlternativeTransfer alternative_transfer; } H264SEIContext; struct H264ParamSets; -- cgit v1.2.3