This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 2886aa54c566de980a37a3121b17deb4ac7b91eb Author: Niklas Haas <[email protected]> AuthorDate: Thu Sep 10 13:58:10 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Wed Sep 16 11:17:01 2026 +0000 avfilter/vf_limiter: gather per-slice return values Needed for the upcoming commit. Signed-off-by: Niklas Haas <[email protected]> Sponsored-by: nxtedition AB --- libavfilter/vf_limiter.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c index 68e7e9d98d..3730527bad 100644 --- a/libavfilter/vf_limiter.c +++ b/libavfilter/vf_limiter.c @@ -26,6 +26,8 @@ #include "limiter.h" #include "video.h" +#define MAX_THREADS 64 + typedef struct ThreadData { AVFrame *in; AVFrame *out; @@ -40,6 +42,7 @@ typedef struct LimiterContext { int linesize[4]; int width[4]; int height[4]; + int rets[MAX_THREADS]; LimiterDSPContext dsp; } LimiterContext; @@ -188,6 +191,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) ThreadData td; AVFrame *out; + const int nb_jobs = FFMIN3(ff_filter_get_nb_threads(ctx), + MAX_THREADS, s->height[2]); + if (av_frame_is_writable(in)) { out = in; } else { @@ -201,11 +207,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) td.out = out; td.in = in; - ff_filter_execute(ctx, filter_slice, &td, NULL, - FFMIN(s->height[2], ff_filter_get_nb_threads(ctx))); + memset(s->rets, 0, sizeof(s->rets)); + ff_filter_execute(ctx, filter_slice, &td, s->rets, nb_jobs); if (out != in) av_frame_free(&in); + for (int i = 0; i < nb_jobs; i++) { + if (s->rets[i] < 0) { + av_frame_free(&out); + return s->rets[i]; + } + } + return ff_filter_frame(outlink, out); } -- 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]
