mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
Revert "avfilter/vf_limiter: gather per-slice return values"
This reverts commit 2886aa54c5.
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
#include "limiter.h"
|
||||
#include "video.h"
|
||||
|
||||
#define MAX_THREADS 64
|
||||
|
||||
typedef struct ThreadData {
|
||||
AVFrame *in;
|
||||
AVFrame *out;
|
||||
@@ -44,7 +42,6 @@ typedef struct LimiterContext {
|
||||
int linesize[4];
|
||||
int width[4];
|
||||
int height[4];
|
||||
int rets[MAX_THREADS];
|
||||
|
||||
LimiterDSPContext dsp;
|
||||
} LimiterContext;
|
||||
@@ -215,9 +212,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
@@ -231,18 +225,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
||||
|
||||
td.out = out;
|
||||
td.in = in;
|
||||
memset(s->rets, 0, sizeof(s->rets));
|
||||
ff_filter_execute(ctx, filter_slice, &td, s->rets, nb_jobs);
|
||||
ff_filter_execute(ctx, filter_slice, &td, NULL,
|
||||
FFMIN(s->height[2], ff_filter_get_nb_threads(ctx)));
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user