mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
cbs_h265: read/write content light level information SEI message
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
This commit is contained in:
parent
345b6962b6
commit
2943dd35b7
@ -488,6 +488,7 @@ static void cbs_h265_free_sei_payload(H265RawSEIPayload *payload)
|
|||||||
{
|
{
|
||||||
switch (payload->payload_type) {
|
switch (payload->payload_type) {
|
||||||
case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO:
|
case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO:
|
||||||
|
case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_buffer_unref(&payload->payload.other.data_ref);
|
av_buffer_unref(&payload->payload.other.data_ref);
|
||||||
|
@ -533,11 +533,17 @@ typedef struct H265RawSEIMasteringDisplayColourVolume {
|
|||||||
uint32_t min_display_mastering_luminance;
|
uint32_t min_display_mastering_luminance;
|
||||||
} H265RawSEIMasteringDisplayColourVolume;
|
} H265RawSEIMasteringDisplayColourVolume;
|
||||||
|
|
||||||
|
typedef struct H265RawSEIContentLightLevelInfo {
|
||||||
|
uint16_t max_content_light_level;
|
||||||
|
uint16_t max_pic_average_light_level;
|
||||||
|
} H265RawSEIContentLightLevelInfo;
|
||||||
|
|
||||||
typedef struct H265RawSEIPayload {
|
typedef struct H265RawSEIPayload {
|
||||||
uint32_t payload_type;
|
uint32_t payload_type;
|
||||||
uint32_t payload_size;
|
uint32_t payload_size;
|
||||||
union {
|
union {
|
||||||
H265RawSEIMasteringDisplayColourVolume mastering_display;
|
H265RawSEIMasteringDisplayColourVolume mastering_display;
|
||||||
|
H265RawSEIContentLightLevelInfo content_light_level;
|
||||||
struct {
|
struct {
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
size_t data_length;
|
size_t data_length;
|
||||||
|
@ -1526,6 +1526,17 @@ static int FUNC(sei_mastering_display)(CodedBitstreamContext *ctx, RWContext *rw
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int FUNC(sei_content_light_level)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||||
|
H265RawSEIContentLightLevelInfo *current)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
u(16, max_content_light_level, 0, MAX_UINT_BITS(16));
|
||||||
|
u(16, max_pic_average_light_level, 0, MAX_UINT_BITS(16));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
|
static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||||
H265RawSEIPayload *current)
|
H265RawSEIPayload *current)
|
||||||
{
|
{
|
||||||
@ -1545,6 +1556,12 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
|
||||||
|
CHECK(FUNC(sei_content_light_level)
|
||||||
|
(ctx, rw, ¤t->payload.content_light_level));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef READ
|
#ifdef READ
|
||||||
|
Loading…
Reference in New Issue
Block a user