[FFmpeg-devel] [PATCH v1 13/19] avcodec/vvc/sei: add decode_content_light_level_info

toqsxw at gmail.com toqsxw at gmail.com
Tue Apr 1 20:16:10 EEST 2025


From: Wu Jianhua <toqsxw at outlook.com>

Signed-off-by: Wu Jianhua <toqsxw at outlook.com>
---
 libavcodec/vvc/sei.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/libavcodec/vvc/sei.c b/libavcodec/vvc/sei.c
index 6f918d114c..85a07dad3f 100644
--- a/libavcodec/vvc/sei.c
+++ b/libavcodec/vvc/sei.c
@@ -118,6 +118,15 @@ static int decode_display_orientation(H2645SEIDisplayOrientation *h, const SEIRa
     return 0;
 }
 
+static int decode_content_light_level_info(H2645SEIContentLight *h, const SEIRawContentLightLevelInfo *s)
+{
+    h->present                     = 1;
+    h->max_content_light_level     = s->max_content_light_level;
+    h->max_pic_average_light_level = s->max_pic_average_light_level;
+
+    return 0;
+}
+
 int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameContext *fc)
 {
     H2645SEI *c  = &s->common;
@@ -143,6 +152,9 @@ int ff_vvc_sei_decode(VVCSEI *s, const H266RawSEI *sei, const struct VVCFrameCon
         case SEI_TYPE_DISPLAY_ORIENTATION:
             return decode_display_orientation(&s->common.display_orientation, payload);
 
+        case SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
+            return decode_content_light_level_info(&s->common.content_light, payload);
+
         default:
             av_log(fc->log_ctx, AV_LOG_DEBUG, "Skipped %s SEI %d\n",
                 sei->nal_unit_header.nal_unit_type == VVC_PREFIX_SEI_NUT ?
-- 
2.44.0.windows.1



More information about the ffmpeg-devel mailing list