diff mbox series

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

Message ID 1632836198-23044-4-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit 00ec682a7015dd6f4b441bcc599c3fb2d60264a8
Headers show
Series [FFmpeg-devel,1/4] avutil/detection_bbox: fix the memory leak on error | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Limin Wang Sept. 28, 2021, 1:36 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

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

Comments

Limin Wang Oct. 6, 2021, 10:19 a.m. UTC | #1
On Tue, Sep 28, 2021 at 09:36:38PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@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
> 
will apply patch 2,3(update log message), 4 after two day unless there are any objections.
diff mbox series

Patch

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;
 }