[FFmpeg-cvslog] avfilter/af_afftdn: remove ThreadData struct code
Paul B Mahol
git at videolan.org
Sun Feb 27 13:03:30 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Feb 27 11:52:00 2022 +0100| [592cef61353b1712745a121c68df0c26178db86c] | committer: Paul B Mahol
avfilter/af_afftdn: remove ThreadData struct code
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=592cef61353b1712745a121c68df0c26178db86c
---
libavfilter/af_afftdn.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index d7db625c35..628336b18b 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -1083,15 +1083,10 @@ static void set_noise_profile(AudioFFTDeNoiseContext *s,
s->noise_floor = new_noise_floor;
}
-typedef struct ThreadData {
- AVFrame *in;
-} ThreadData;
-
static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
{
AudioFFTDeNoiseContext *s = ctx->priv;
- ThreadData *td = arg;
- AVFrame *in = td->in;
+ AVFrame *in = arg;
const int start = (in->channels * jobnr) / nb_jobs;
const int end = (in->channels * (jobnr+1)) / nb_jobs;
@@ -1165,7 +1160,6 @@ static int output_frame(AVFilterLink *inlink, AVFrame *in)
const int output_mode = ctx->is_disabled ? IN_MODE : s->output_mode;
const int offset = s->window_length - s->sample_advance;
AVFrame *out;
- ThreadData td;
for (int ch = 0; ch < s->channels; ch++) {
float *src = (float *)s->winframe->extended_data[ch];
@@ -1220,8 +1214,7 @@ static int output_frame(AVFilterLink *inlink, AVFrame *in)
}
s->block_count++;
- td.in = s->winframe;
- ff_filter_execute(ctx, filter_channel, &td, NULL,
+ ff_filter_execute(ctx, filter_channel, s->winframe, NULL,
FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx)));
if (av_frame_is_writable(in)) {
More information about the ffmpeg-cvslog
mailing list