summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_h265_syntax_template.c
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2018-05-10 13:47:46 +0800
committerMark Thompson <sw@jkqxz.net>2018-05-10 20:55:42 +0100
commit2943dd35b7591b8e84ee8bf2e8dbc78627f36632 (patch)
tree7ef6c60f8c81652f77e29972b50bdd796492da22 /libavcodec/cbs_h265_syntax_template.c
parent345b6962b68b78bd435d1c931935e86008bf309a (diff)
downloadffmpeg-2943dd35b7591b8e84ee8bf2e8dbc78627f36632.tar.gz
cbs_h265: read/write content light level information SEI message
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavcodec/cbs_h265_syntax_template.c')
-rw-r--r--libavcodec/cbs_h265_syntax_template.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c
index 1c67271300..d4e4f7b1c2 100644
--- a/libavcodec/cbs_h265_syntax_template.c
+++ b/libavcodec/cbs_h265_syntax_template.c
@@ -1526,6 +1526,17 @@ static int FUNC(sei_mastering_display)(CodedBitstreamContext *ctx, RWContext *rw
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,
H265RawSEIPayload *current)
{
@@ -1545,6 +1556,12 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
break;
+ case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
+ CHECK(FUNC(sei_content_light_level)
+ (ctx, rw, &current->payload.content_light_level));
+
+ break;
+
default:
{
#ifdef READ