Skip to content

Commit

Permalink
avfilter/vf_convolution: Fix compilation with sobel disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
  • Loading branch information
mkver committed May 7, 2024
1 parent dd246bd commit 3c7dc9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libavfilter/convolution.h
Expand Up @@ -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++) {
s->filter[i] = filter_sobel;
Expand Down
2 changes: 2 additions & 0 deletions libavfilter/vf_convolution.c
Expand Up @@ -761,8 +761,10 @@ static int param_init(AVFilterContext *ctx)
s->rdiv[i] = s->scale;
s->bias[i] = s->delta;
}
#if CONFIG_SOBEL_FILTER
} else if (!strcmp(ctx->filter->name, "sobel")) {
ff_sobel_init(s, s->depth, s->nb_planes);
#endif
} else if (!strcmp(ctx->filter->name, "kirsch")) {
for (i = 0; i < 4; i++) {
s->filter[i] = filter_kirsch;
Expand Down

0 comments on commit 3c7dc9e

Please sign in to comment.