[FFmpeg-cvslog] avcodec/dovi_rpu: add ext_blocks array to DOVIContext

Niklas Haas git at videolan.org
Wed Apr 3 17:33:39 EEST 2024


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Sat Mar 23 16:52:41 2024 +0100| [3a1916c38aa44374fbcc24ec647d0beaf6152deb] | committer: Niklas Haas

avcodec/dovi_rpu: add ext_blocks array to DOVIContext

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a1916c38aa44374fbcc24ec647d0beaf6152deb
---

 libavcodec/dovi_rpu.c | 3 +++
 libavcodec/dovi_rpu.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c
index 85aded52bd..ce9be19ed0 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]);
+    ff_refstruct_unref(&s->ext_blocks);
     av_free(s->rpu_buf);
 
     *s = (DOVIContext) {
@@ -59,6 +60,7 @@ void ff_dovi_ctx_flush(DOVIContext *s)
 {
     for (int i = 0; i < FF_ARRAY_ELEMS(s->vdr); i++)
         ff_refstruct_unref(&s->vdr[i]);
+    ff_refstruct_unref(&s->ext_blocks);
 
     *s = (DOVIContext) {
         .logctx = s->logctx,
@@ -77,6 +79,7 @@ void ff_dovi_ctx_replace(DOVIContext *s, const DOVIContext *s0)
     s->dv_profile = s0->dv_profile;
     for (int i = 0; i <= DOVI_MAX_DM_ID; i++)
         ff_refstruct_replace(&s->vdr[i], s0->vdr[i]);
+    ff_refstruct_replace(&s->ext_blocks, s0->ext_blocks);
 }
 
 void ff_dovi_update_cfg(DOVIContext *s, const AVDOVIDecoderConfigurationRecord *cfg)
diff --git a/libavcodec/dovi_rpu.h b/libavcodec/dovi_rpu.h
index 8dcc65bb40..9f26f332ce 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
      */



More information about the ffmpeg-cvslog mailing list