From: Neil Birkbeck <neil.birkb...@gmail.com>

Some containers, like webm/mkv, will contain this mastering metadata.
This is analogous to the way 3D fpa data is handled (in frame and
packet side data).

Signed-off-by: Neil Birkbeck <neil.birkb...@gmail.com>
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 doc/APIchanges       | 3 +++
 libavcodec/avcodec.h | 7 +++++++
 libavcodec/decode.c  | 1 +
 libavcodec/version.h | 2 +-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 5ce112262a..e8bb5a4012 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2017-03-23
 
 API changes, most recent first:
 
+2017-04-xx - xxxxxxx - lavc 58.1.1 - avcodec.h
+  Add AV_PKT_DATA_MASTERING_DISPLAY_METADATA.
+
 2017-04-xx - xxxxxxx - lavu 56.1.0 - mastering_display_metadata.h
   Add mastering_display_metadata.h/c, av_mastering_display_metadata_alloc() 
   and av_mastering_display_metadata_create_side_data() API, and 
AVMasteringDisplayMetadata
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1c58fe2d68..fc1f2a4dfc 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1068,6 +1068,13 @@ enum AVPacketSideDataType {
      * to the AVSphericalMapping structure.
      */
     AV_PKT_DATA_SPHERICAL,
+
+    /**
+     * Mastering display metadata (based on SMPTE-2086:2014). This metadata
+     * should be associated with a video stream and containts data in the form
+     * of the AVMasteringDisplayMetadata struct.
+     */
+    AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
 };
 
 typedef struct AVPacketSideData {
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index e4f6a0d727..4a05b8d089 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1029,6 +1029,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame 
*frame)
         { AV_PKT_DATA_SPHERICAL,     AV_FRAME_DATA_SPHERICAL },
         { AV_PKT_DATA_STEREO3D,      AV_FRAME_DATA_STEREO3D },
         { AV_PKT_DATA_AUDIO_SERVICE_TYPE, AV_FRAME_DATA_AUDIO_SERVICE_TYPE },
+        { AV_PKT_DATA_MASTERING_DISPLAY_METADATA, 
AV_FRAME_DATA_MASTERING_DISPLAY_METADATA },
     };
 
     frame->color_primaries = avctx->color_primaries;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 8943ef3d0f..774230b1ef 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 58
 #define LIBAVCODEC_VERSION_MINOR  1
-#define LIBAVCODEC_VERSION_MICRO  0
+#define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
-- 
2.11.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to