[FFmpeg-cvslog] avcodec: add ambient viewing environment packet side data.
Damiano Galassi
git at videolan.org
Sun Feb 4 19:06:57 EET 2024
ffmpeg | branch: master | Damiano Galassi <damiog at gmail.com> | Sun Feb 4 15:14:10 2024 +0000| [45697e6a51244e3393c8bf5e931ad86387fd8ec8] | committer: James Almer
avcodec: add ambient viewing environment packet side data.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45697e6a51244e3393c8bf5e931ad86387fd8ec8
---
doc/APIchanges | 3 +++
fftools/ffprobe.c | 3 +++
libavcodec/avpacket.c | 1 +
libavcodec/decode.c | 1 +
libavcodec/packet.h | 7 +++++++
libavcodec/version.h | 2 +-
6 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index e477ed78e0..1f5724324a 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09
API changes, most recent first:
+2024-02-04 - xxxxxxxxxx - lavc 60.39.100 - packet.h
+ Add AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT.
+
2023-11-xx - xxxxxxxxxx - lavfi 9.16.100 - buffersink.h buffersrc.h
Add av_buffersink_get_colorspace and av_buffersink_get_color_range.
Add AVBufferSrcParameters.color_space and AVBufferSrcParameters.color_range.
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index f33e2471cb..aa1153e709 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2392,6 +2392,9 @@ static void print_pkt_side_data(WriterContext *w,
AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data;
print_int("max_content", metadata->MaxCLL);
print_int("max_average", metadata->MaxFALL);
+ } else if (sd->type == AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
+ print_ambient_viewing_environment(
+ w, (const AVAmbientViewingEnvironment *)sd->data);
} else if (sd->type == AV_PKT_DATA_DYNAMIC_HDR10_PLUS) {
AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
print_dynamic_hdr10_plus(w, metadata);
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 0f8c9b77ae..e118bbaad1 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -301,6 +301,7 @@ const char *av_packet_side_data_name(enum AVPacketSideDataType type)
case AV_PKT_DATA_DOVI_CONF: return "DOVI configuration record";
case AV_PKT_DATA_S12M_TIMECODE: return "SMPTE ST 12-1:2014 timecode";
case AV_PKT_DATA_DYNAMIC_HDR10_PLUS: return "HDR10+ Dynamic Metadata (SMPTE 2094-40)";
+ case AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT:return "Ambient viewing environment";
case AV_PKT_DATA_IAMF_MIX_GAIN_PARAM: return "IAMF Mix Gain Parameter Data";
case AV_PKT_DATA_IAMF_DEMIXING_INFO_PARAM: return "IAMF Demixing Info Parameter Data";
case AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM: return "IAMF Recon Gain Info Parameter Data";
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 2cfb3fcf97..da6446d879 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1434,6 +1434,7 @@ static const struct {
{ AV_PKT_DATA_CONTENT_LIGHT_LEVEL, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL },
{ AV_PKT_DATA_ICC_PROFILE, AV_FRAME_DATA_ICC_PROFILE },
{ AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
+ { AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT },
};
int ff_decode_frame_props_from_pkt(const AVCodecContext *avctx,
diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index 2c57d262c6..8558ae849e 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -323,6 +323,13 @@ enum AVPacketSideDataType {
*/
AV_PKT_DATA_IAMF_RECON_GAIN_INFO_PARAM,
+ /**
+ * Ambient viewing environment metadata, as defined by H.274. This metadata
+ * should be associated with a video stream and contains data in the form
+ * of the AVAmbientViewingEnvironment struct.
+ */
+ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT,
+
/**
* The number of side data types.
* This is not part of the public API/ABI in the sense that it may
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 0fae3d06d3..f2f14eaed1 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 38
+#define LIBAVCODEC_VERSION_MINOR 39
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
More information about the ffmpeg-cvslog
mailing list