[FFmpeg-devel] [PATCH 2/2] avfilter/vf_gblur: remove unnecessary check

Paul B Mahol onemda at gmail.com
Sat Jan 4 13:03:31 EET 2020


Invalid, sigma can be 0.

On 1/4/20, quinkblack at foxmail.com <quinkblack at foxmail.com> wrote:
> From: Zhao Zhili <zhilizhao at tencent.com>
>
> ---
>  libavfilter/vf_gblur.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
> index e057937fb7..0d7d5438d1 100644
> --- a/libavfilter/vf_gblur.c
> +++ b/libavfilter/vf_gblur.c
> @@ -189,9 +189,6 @@ static void gaussianiir2d(AVFilterContext *ctx, int
> plane)
>      const int nb_threads = ff_filter_get_nb_threads(ctx);
>      ThreadData td;
>
> -    if (s->sigma <= 0 || s->steps < 0)
> -        return;
> -
>      td.width = width;
>      td.height = height;
>      ctx->internal->execute(ctx, filter_horizontally, &td, NULL,
> FFMIN(height, nb_threads));
> @@ -301,7 +298,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame
> *in)
>          uint16_t *dst16 = (uint16_t *)out->data[plane];
>          int y, x;
>
> -        if (!s->sigma || !(s->planes & (1 << plane))) {
> +        if (!(s->planes & (1 << plane))) {
>              if (out != in)
>                  av_image_copy_plane(out->data[plane], out->linesize[plane],
>                                      in->data[plane], in->linesize[plane],
> --
> 2.22.0
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list