diff mbox series

[FFmpeg-devel] avcodec/hevcdec: Fix precedence, bogus film grain warning

Message ID AS8P250MB0744B5E5FEB3F67EDC8802B98F0D2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit bba996d6cdac15367f265e245987477d0f7b1899
Headers show
Series [FFmpeg-devel] avcodec/hevcdec: Fix precedence, bogus film grain warning | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 19, 2024, 12:01 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/hevcdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Andreas Rheinhardt April 19, 2024, 3:53 p.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/hevcdec.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index a2c967cf09..1974bf9cb3 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -2898,10 +2898,10 @@ static int hevc_frame_start(HEVCContext *s)
>          goto fail;
>  
>      if (s->ref->needs_fg &&
> -        ( s->sei.common.film_grain_characteristics.present &&
> -          !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
> -                                             s->ref->frame->format))
> -          || !av_film_grain_params_select(s->ref->frame)) {
> +        (s->sei.common.film_grain_characteristics.present &&
> +         !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
> +                                              s->ref->frame->format)
> +         || !av_film_grain_params_select(s->ref->frame))) {
>          av_log_once(s->avctx, AV_LOG_WARNING, AV_LOG_DEBUG, &s->film_grain_warning_shown,
>                      "Unsupported film grain parameters. Ignoring film grain.\n");
>          s->ref->needs_fg = 0;

Approved by Niklas on IRC and pushed.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index a2c967cf09..1974bf9cb3 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2898,10 +2898,10 @@  static int hevc_frame_start(HEVCContext *s)
         goto fail;
 
     if (s->ref->needs_fg &&
-        ( s->sei.common.film_grain_characteristics.present &&
-          !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
-                                             s->ref->frame->format))
-          || !av_film_grain_params_select(s->ref->frame)) {
+        (s->sei.common.film_grain_characteristics.present &&
+         !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id,
+                                              s->ref->frame->format)
+         || !av_film_grain_params_select(s->ref->frame))) {
         av_log_once(s->avctx, AV_LOG_WARNING, AV_LOG_DEBUG, &s->film_grain_warning_shown,
                     "Unsupported film grain parameters. Ignoring film grain.\n");
         s->ref->needs_fg = 0;