]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_convolution: Fix build failures
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 12 Aug 2019 01:14:55 +0000 (03:14 +0200)
committerRuiling Song <ruiling.song@intel.com>
Wed, 14 Aug 2019 06:37:47 +0000 (14:37 +0800)
98e419cb added SIMD for the convolution filter for x64 systems. As
usual, it used a check of the form
if (ARCH_X86_64)
    ff_convolution_init_x86(s);
and thereby relied on the compiler eliminating this pseudo-runtime check
at compiletime for non x64 systems (for which ff_convolution_init_x86
isn't defined) to compile. But vf_convolution.c contains more than one
filter and if the convolution filter is disabled, but one of the other
filters (prewitt, sobel, roberts) is enabled, the build will fail on x64,
because ff_convolution_init_x86 isn't defined in this case.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavfilter/vf_convolution.c

index e3bf1df79f4ae06b5de567ce1f7a20b1f8fa7e2d..f29df38a2020007f51bf0adb376ca6badd62827d 100644 (file)
@@ -588,8 +588,9 @@ static int config_input(AVFilterLink *inlink)
                     s->filter[p] = filter16_7x7;
             }
         }
-        if (ARCH_X86_64)
-            ff_convolution_init_x86(s);
+#if CONFIG_CONVOLUTION_FILTER && ARCH_X86_64
+        ff_convolution_init_x86(s);
+#endif
     } else if (!strcmp(ctx->filter->name, "prewitt")) {
         if (s->depth > 8)
             for (p = 0; p < s->nb_planes; p++)