[FFmpeg-devel] [PATCH 4/4] avcodec/hevcdec: set the film grain property if present

lance.lmwang at gmail.com lance.lmwang at gmail.com
Tue Sep 28 16:36:38 EEST 2021


From: Limin Wang <lance.lmwang at gmail.com>

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
 libavcodec/hevcdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 57a6175..b4edb3b 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -385,6 +385,9 @@ static int export_stream_params_from_sei(HEVCContext *s)
         avctx->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
     }
 
+    if (s->sei.film_grain_characteristics.present)
+        avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
+
     return 0;
 }
 
-- 
1.8.3.1



More information about the ffmpeg-devel mailing list