This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new e1797cdd51 avcodec/libvpxenc: Copy Smpte2094App5 metadata
e1797cdd51 is described below
commit e1797cdd5110310c57390e093dec729b50888646
Author: Vignesh Venkat <[email protected]>
AuthorDate: Thu May 7 13:06:32 2026 -0700
Commit: James Zern <[email protected]>
CommitDate: Mon May 11 20:17:11 2026 +0000
avcodec/libvpxenc: Copy Smpte2094App5 metadata
If incoming packets contain Smpte2094App5 metadata, retain them
so that they are passed through to the output.
Signed-off-by: Vignesh Venkat <[email protected]>
---
Changelog | 1 +
libavcodec/libvpxenc.c | 23 ++++++++++++++++++++++-
libavcodec/version.h | 2 +-
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/Changelog b/Changelog
index 3f5e38e0c7..0eb121be0f 100644
--- a/Changelog
+++ b/Changelog
@@ -9,6 +9,7 @@ version <next>:
- HE-AAC 960 decoding (DAB+)
- transpose_cuda filter
- Add AMF Frame Rate Converter (vf_frc_amf) filter
+- SMPTE 2094-50 metadata support and passthrough
version 8.1:
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index b21ba175ab..963fa6c619 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -74,6 +74,7 @@ typedef struct FrameData {
AVBufferRef *frame_opaque_ref;
AVBufferRef *hdr10_plus;
+ AVBufferRef *hdr_smpte2094_app5;
} FrameData;
typedef struct VPxEncoderContext {
@@ -341,6 +342,7 @@ static void frame_data_uninit(FrameData *fd)
{
av_buffer_unref(&fd->frame_opaque_ref);
av_buffer_unref(&fd->hdr10_plus);
+ av_buffer_unref(&fd->hdr_smpte2094_app5);
}
static av_cold void fifo_free(AVFifo **fifo)
@@ -366,12 +368,13 @@ static int frame_data_submit(AVCodecContext *avctx,
AVFifo *fifo,
FrameData fd = { .pts = frame->pts };
int ret;
+ const AVFrameSideData *sd;
if (IS_VP9(avctx) &&
// Keep HDR10+ if it has bit depth higher than 8 and
// it has PQ trc (SMPTE2084).
enccfg->g_bit_depth > 8 && avctx->color_trc == AVCOL_TRC_SMPTE2084) {
- const AVFrameSideData *sd = av_frame_get_side_data(frame,
AV_FRAME_DATA_DYNAMIC_HDR_PLUS);
+ sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DYNAMIC_HDR_PLUS);
if (sd) {
fd.hdr10_plus = av_buffer_ref(sd->buf);
@@ -380,6 +383,14 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo
*fifo,
}
}
+ // Keep SMPTE2094_APP5 metadata.
+ sd = av_frame_get_side_data(frame,
AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5);
+ if (sd) {
+ fd.hdr_smpte2094_app5 = av_buffer_ref(sd->buf);
+ if (!fd.hdr_smpte2094_app5)
+ return AVERROR(ENOMEM);
+ }
+
fd.duration = frame->duration;
fd.frame_opaque = frame->opaque;
if (avctx->flags & AV_CODEC_FLAG_COPY_OPAQUE && frame->opaque_ref) {
@@ -454,6 +465,16 @@ static int frame_data_apply(AVCodecContext *avctx, AVFifo
*fifo, AVPacket *pkt)
memcpy(data, fd.hdr10_plus->data, fd.hdr10_plus->size);
}
+ if (fd.hdr_smpte2094_app5) {
+ data = av_packet_new_side_data(pkt,
AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5, fd.hdr_smpte2094_app5->size);
+ if (!data) {
+ ret = AVERROR(ENOMEM);
+ goto skip;
+ }
+
+ memcpy(data, fd.hdr_smpte2094_app5->data, fd.hdr_smpte2094_app5->size);
+ }
+
skip:
av_fifo_drain2(fifo, 1);
frame_data_uninit(&fd);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index aeb58e3fed..497389d3f3 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "version_major.h"
-#define LIBAVCODEC_VERSION_MINOR 30
+#define LIBAVCODEC_VERSION_MINOR 31
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]