avfilter/vf_convolution: Fix compilation with sobel disabled

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.1
Andreas Rheinhardt 8 months ago
parent dd246bdc0f
commit 3c7dc9ea59
  1. 2
      libavfilter/convolution.h
  2. 2
      libavfilter/vf_convolution.c

@ -119,7 +119,7 @@ static void filter16_sobel(uint8_t *dstp, int width,
} }
} }
static av_unused void ff_sobel_init(ConvolutionContext *s, int depth, int nb_planes) static inline void ff_sobel_init(ConvolutionContext *s, int depth, int nb_planes)
{ {
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
s->filter[i] = filter_sobel; s->filter[i] = filter_sobel;

@ -761,8 +761,10 @@ static int param_init(AVFilterContext *ctx)
s->rdiv[i] = s->scale; s->rdiv[i] = s->scale;
s->bias[i] = s->delta; s->bias[i] = s->delta;
} }
#if CONFIG_SOBEL_FILTER
} else if (!strcmp(ctx->filter->name, "sobel")) { } else if (!strcmp(ctx->filter->name, "sobel")) {
ff_sobel_init(s, s->depth, s->nb_planes); ff_sobel_init(s, s->depth, s->nb_planes);
#endif
} else if (!strcmp(ctx->filter->name, "kirsch")) { } else if (!strcmp(ctx->filter->name, "kirsch")) {
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
s->filter[i] = filter_kirsch; s->filter[i] = filter_kirsch;

Loading…
Cancel
Save