[FFmpeg-devel] [PATCH 4/4] avcodec/av1: signal the presence of Film Grain in the decoder context

James Almer jamrial at gmail.com
Mon Aug 16 18:51:02 EEST 2021


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/av1dec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1dda0f9160..139374f0a0 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -575,6 +575,9 @@ static int set_context_with_sequence(AVCodecContext *avctx,
         break;
     }
 
+    if (seq->film_grain_params_present)
+        avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
+
     if (avctx->width != width || avctx->height != height) {
         int ret = ff_set_dimensions(avctx, width, height);
         if (ret < 0)
-- 
2.32.0



More information about the ffmpeg-devel mailing list