avfilter/vf_convolution: disable fast path if rdiv/bias are different from defaults
authorPaul B Mahol <onemda@gmail.com>
Fri, 23 Mar 2018 15:21:38 +0000 (16:21 +0100)
committerPaul B Mahol <onemda@gmail.com>
Fri, 23 Mar 2018 15:21:38 +0000 (16:21 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_convolution.c

index d7f8bf8..ce09e33 100644 (file)
@@ -997,6 +997,9 @@ static av_cold int init(AVFilterContext *ctx)
             } else {
                 return AVERROR(EINVAL);
             }
+
+            if (s->copy[i] && (s->rdiv[i] != 1. || s->bias[i] != 0.))
+                s->copy[i] = 0;
         }
     } else if (!strcmp(ctx->filter->name, "prewitt")) {
         for (i = 0; i < 4; i++) {