aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorZhao Zhili <zhilizhao@tencent.com>2024-08-26 21:30:57 +0800
committerZhao Zhili <zhilizhao@tencent.com>2024-09-10 00:59:30 +0800
commit071c4990265a0605a80c0443ef728945ed8a9f5e (patch)
tree847ca3ac0f9ec0da00a00d1e6ee420fa09da6b06 /libavfilter
parent691e0a1082474815af4b31dbf8f7f8e19193316d (diff)
downloadffmpeg-071c4990265a0605a80c0443ef728945ed8a9f5e.tar.gz
avfilter/unsharp: Call function directly rather than via function pointer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_unsharp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 52b2ab8d44..b5dd468b6f 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -74,7 +74,6 @@ typedef struct UnsharpContext {
int bitdepth;
int bps;
int nb_threads;
- int (* apply_unsharp)(AVFilterContext *ctx, AVFrame *in, AVFrame *out);
int (* unsharp_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
} UnsharpContext;
@@ -173,7 +172,7 @@ static int name##_##nbits(AVFilterContext *ctx, void *arg, int jobnr, int nb_job
DEF_UNSHARP_SLICE_FUNC(unsharp_slice, 16)
DEF_UNSHARP_SLICE_FUNC(unsharp_slice, 8)
-static int apply_unsharp_c(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
+static int apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
{
AVFilterLink *inlink = ctx->inputs[0];
UnsharpContext *s = ctx->priv;
@@ -240,7 +239,6 @@ static av_cold int init(AVFilterContext *ctx)
SET_FILTER_PARAM(chroma, c);
SET_FILTER_PARAM(alpha, a);
- s->apply_unsharp = apply_unsharp_c;
return 0;
}
@@ -337,7 +335,6 @@ static av_cold void uninit(AVFilterContext *ctx)
static int filter_frame(AVFilterLink *link, AVFrame *in)
{
- UnsharpContext *s = link->dst->priv;
AVFilterLink *outlink = link->dst->outputs[0];
AVFrame *out;
int ret = 0;
@@ -349,7 +346,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
}
av_frame_copy_props(out, in);
- ret = s->apply_unsharp(link->dst, in, out);
+ ret = apply_unsharp(link->dst, in, out);
av_frame_free(&in);