diff mbox series

[FFmpeg-devel,5/6] avcodec/dovi_rpu: add ext_blocks array to DOVIContext

Message ID 20240323173735.26224-5-ffmpeg@haasn.xyz
State New
Headers show
Series [FFmpeg-devel,1/6] avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
yinshiyou/configure_loongarch64 warning Failed to apply patch

Commit Message

Niklas Haas March 23, 2024, 5:37 p.m. UTC
From: Niklas Haas <git@haasn.dev>

---
 libavcodec/dovi_rpu.c | 1 +
 libavcodec/dovi_rpu.h | 7 +++++++
 2 files changed, 8 insertions(+)
diff mbox series

Patch

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;