This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 4ebe12ef59f0f355bba28e501f6552fd8d9b85fc Author: Andreas Rheinhardt <[email protected]> AuthorDate: Thu Nov 5 10:27:27 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sat Nov 7 21:41:13 2026 +0100 avfilter/limiter,vf_limiter_init: Only use DSP context for DSP init Reviewed-by: Marvin Scholz <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavfilter/limiter.h | 15 --------------- libavfilter/vf_limiter.c | 16 +++++++++++++++- libavfilter/vf_limiter_init.h | 8 ++++---- tests/checkasm/vf_limiter.c | 4 ++-- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/libavfilter/limiter.h b/libavfilter/limiter.h index 8740c51bcb..54d423d1f4 100644 --- a/libavfilter/limiter.h +++ b/libavfilter/limiter.h @@ -21,7 +21,6 @@ #include <stddef.h> #include <stdint.h> -#include "avfilter.h" typedef struct LimiterDSPContext { void (*limiter)(const uint8_t *src, uint8_t *dst, @@ -29,20 +28,6 @@ typedef struct LimiterDSPContext { int w, int h, int min, int max); } LimiterDSPContext; -typedef struct LimiterContext { - const AVClass *class; - int min, max; /* user-facing option */ - int planes; - int nb_planes; - int plane_min[4]; /* resolved per-plane limits */ - int plane_max[4]; - int linesize[4]; - int width[4]; - int height[4]; - - LimiterDSPContext dsp; -} LimiterContext; - void ff_limiter_init_x86(LimiterDSPContext *dsp, int bpp); #endif /* AVFILTER_LIMITER_H */ diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c index d3be902491..6edc1912eb 100644 --- a/libavfilter/vf_limiter.c +++ b/libavfilter/vf_limiter.c @@ -33,6 +33,20 @@ typedef struct ThreadData { AVFrame *out; } ThreadData; +typedef struct LimiterContext { + const AVClass *class; + int min, max; /* user-facing option */ + int planes; + int nb_planes; + int plane_min[4]; /* resolved per-plane limits */ + int plane_max[4]; + int linesize[4]; + int width[4]; + int height[4]; + + LimiterDSPContext dsp; +} LimiterContext; + #define OFFSET(x) offsetof(LimiterContext, x) #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM @@ -88,7 +102,7 @@ static int config_input(AVFilterLink *inlink) s->width[1] = s->width[2] = AV_CEIL_RSHIFT(inlink->w, hsub); s->width[0] = s->width[3] = inlink->w; - ff_limiter_init(s, depth); + ff_limiter_init(&s->dsp, depth); return 0; } diff --git a/libavfilter/vf_limiter_init.h b/libavfilter/vf_limiter_init.h index fad61dfb38..a33b4dcc65 100644 --- a/libavfilter/vf_limiter_init.h +++ b/libavfilter/vf_limiter_init.h @@ -48,16 +48,16 @@ static void limiter##n(const uint8_t *ssrc, uint8_t *ddst, \ LIMITER(8, uint8_t) LIMITER(16, uint16_t) -av_unused static void ff_limiter_init(LimiterContext *s, int depth) +av_unused static void ff_limiter_init(LimiterDSPContext *s, int depth) { if (depth == 8) { - s->dsp.limiter = limiter8; + s->limiter = limiter8; } else { - s->dsp.limiter = limiter16; + s->limiter = limiter16; } #if ARCH_X86 && HAVE_X86ASM - ff_limiter_init_x86(&s->dsp, depth); + ff_limiter_init_x86(s, depth); #endif } diff --git a/tests/checkasm/vf_limiter.c b/tests/checkasm/vf_limiter.c index 2cfc1ee647..28730677fd 100644 --- a/tests/checkasm/vf_limiter.c +++ b/tests/checkasm/vf_limiter.c @@ -51,10 +51,10 @@ static void check_limiter(int depth) if (depth == 16) w /= 2; - LimiterContext s; + LimiterDSPContext s; ff_limiter_init(&s, depth); - if (check_func(s.dsp.limiter, "limiter%d", depth)) { + if (check_func(s.limiter, "limiter%d", depth)) { call_ref(src, dst_ref, WIDTH_PADDED, WIDTH_PADDED, w, HEIGHT, min, max); call_new(src, dst_new, WIDTH_PADDED, WIDTH_PADDED, w, HEIGHT, min, max); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
