[FFmpeg-devel] [PATCH 2/2] Pass through HDR dynamic metdata (HDR10+) to AV packet side data.

Mohammad Izadi moh.izadi at gmail.com
Thu Jan 3 22:05:41 EET 2019


---
 libavcodec/avcodec.h  | 8 ++++++++
 libavcodec/avpacket.c | 1 +
 libavcodec/decode.c   | 1 +
 libavcodec/version.h  | 2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 92567ec6d0..75fd44d74c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1361,6 +1361,14 @@ enum AVPacketSideDataType {
      */
     AV_PKT_DATA_A53_CC,
 
+    /**
+     * HDR10+ dynamic metadata associated with a video frame. The metadata is in
+     * the form of the AVDynamicHDRPlus struct and contains
+     * information for color volume transform - application 4 of
+     * SPMTE 2094-40:2016 standard.
+     */
+    AV_PKT_DATA_HDR_DYNAMIC_HDR_PLUS,
+
     /**
      * This side data is encryption initialization data.
      * The format is not part of ABI, use av_encryption_init_info_* methods to
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 11ac4e80cd..48f3857fc2 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -391,6 +391,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type)
     case AV_PKT_DATA_CONTENT_LIGHT_LEVEL:        return "Content light level metadata";
     case AV_PKT_DATA_SPHERICAL:                  return "Spherical Mapping";
     case AV_PKT_DATA_A53_CC:                     return "A53 Closed Captions";
+    case AV_PKT_DATA_HDR_DYNAMIC_HDR_PLUS:       return "HDR10+ Dynamic Metadata (SMPTE 2094-40)";
     case AV_PKT_DATA_ENCRYPTION_INIT_INFO:       return "Encryption initialization data";
     case AV_PKT_DATA_ENCRYPTION_INFO:            return "Encryption info";
     case AV_PKT_DATA_AFD:                        return "Active Format Description data";
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index a32ff2fcd3..c6bc48567a 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1706,6 +1706,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
         { AV_PKT_DATA_MASTERING_DISPLAY_METADATA, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA },
         { AV_PKT_DATA_CONTENT_LIGHT_LEVEL,        AV_FRAME_DATA_CONTENT_LIGHT_LEVEL },
         { AV_PKT_DATA_A53_CC,                     AV_FRAME_DATA_A53_CC },
+        { AV_PKT_DATA_HDR_DYNAMIC_HDR_PLUS,       AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
     };
 
     if (pkt) {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index ed56a1ece5..e72168affb 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  58
-#define LIBAVCODEC_VERSION_MINOR  43
+#define LIBAVCODEC_VERSION_MINOR  44
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-- 
2.20.1.415.g653613c723-goog



More information about the ffmpeg-devel mailing list