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

James Almer git at videolan.org
Tue Aug 24 16:10:30 EEST 2021


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Aug 16 12:39:19 2021 -0300| [9b05263ac166924f28a2f4a65883629219fa6689] | committer: James Almer

avcodec/av1: signal the presence of Film Grain in the decoder context

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/av1dec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 1dda0f9160..a69808f7b6 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -575,6 +575,11 @@ static int set_context_with_sequence(AVCodecContext *avctx,
         break;
     }
 
+    if (seq->film_grain_params_present)
+        avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
+    else
+        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)



More information about the ffmpeg-cvslog mailing list