[FFmpeg-devel] [PATCH 5/6] avcodec/dovi_rpu: add ext_blocks array to DOVIContext
Niklas Haas
ffmpeg at haasn.xyz
Sat Mar 23 19:37:34 EET 2024
From: Niklas Haas <git at haasn.dev>
---
libavcodec/dovi_rpu.c | 1 +
libavcodec/dovi_rpu.h | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c
index cd54c8716dc..21cb1850e3e 100644
--- a/libavcodec/dovi_rpu.c
+++ b/libavcodec/dovi_rpu.c
@@ -48,6 +48,7 @@ void ff_dovi_ctx_unref(DOVIContext *s)
for (int i = 0; i < FF_ARRAY_ELEMS(s->vdr); i++)
ff_refstruct_unref(&s->vdr[i]);
av_free(s->rpu_buf);
+ av_free(s->ext_blocks);
*s = (DOVIContext) {
.logctx = s->logctx,
diff --git a/libavcodec/dovi_rpu.h b/libavcodec/dovi_rpu.h
index f88fbf9b558..c632a83f46b 100644
--- a/libavcodec/dovi_rpu.h
+++ b/libavcodec/dovi_rpu.h
@@ -44,6 +44,12 @@ typedef struct DOVIContext {
const AVDOVIDataMapping *mapping;
const AVDOVIColorMetadata *color;
+ /**
+ * Currently active extension blocks, updates on every ff_dovi_rpu_parse()
+ */
+ AVDOVIDmData *ext_blocks;
+ int num_ext_blocks;
+
/**
* Private fields internal to dovi_rpu.c
*/
@@ -51,6 +57,7 @@ typedef struct DOVIContext {
uint8_t dv_profile;
uint8_t *rpu_buf; ///< temporary buffer
unsigned rpu_buf_sz;
+ unsigned ext_blocks_sz;
} DOVIContext;
--
2.44.0
More information about the ffmpeg-devel
mailing list