[FFmpeg-devel] [PATCH v1 06/19] avcodec/vvc/dec: support removing film grain params from side data

toqsxw at gmail.com toqsxw at gmail.com
Tue Apr 1 20:16:03 EEST 2025


From: Wu Jianhua <toqsxw at outlook.com>

Signed-off-by: Wu Jianhua <toqsxw at outlook.com>
---
 libavcodec/vvc/refs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c
index 4cf44bcf46..cfbc2977c0 100644
--- a/libavcodec/vvc/refs.c
+++ b/libavcodec/vvc/refs.c
@@ -295,6 +295,9 @@ int ff_vvc_output_frame(VVCContext *s, VVCFrameContext *fc, AVFrame *out, const
             if (ret < 0)
                 return ret;
 
+            if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN))
+                av_frame_remove_side_data(out, AV_FRAME_DATA_FILM_GRAIN_PARAMS);
+
             if (frame->flags & VVC_FRAME_FLAG_BUMPING)
                 ff_vvc_unref_frame(fc, frame, VVC_FRAME_FLAG_OUTPUT | VVC_FRAME_FLAG_BUMPING);
             else
-- 
2.44.0.windows.1



More information about the ffmpeg-devel mailing list