diff mbox series

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

Message ID 20210816155102.9731-4-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/4] avcodec/pthread_frame: also keep AVCodecContext.properties in sync between threads
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate fail Make fate failed
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate warning Make fate failed

Commit Message

James Almer Aug. 16, 2021, 3:51 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/av1dec.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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)