[FFmpeg-devel] [PATCH 07/10] avfilter/internal: Factor out executing a filter's execute_func
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Wed Aug 11 04:17:50 EEST 2021
The current way of doing it involves writing the ctx parameter twice.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/af_acrossover.c | 2 +-
libavfilter/af_adeclick.c | 2 +-
libavfilter/af_adenorm.c | 2 +-
libavfilter/af_aemphasis.c | 2 +-
libavfilter/af_afftdn.c | 2 +-
libavfilter/af_afir.c | 2 +-
libavfilter/af_afreqshift.c | 2 +-
libavfilter/af_afwtdn.c | 2 +-
libavfilter/af_aiir.c | 2 +-
libavfilter/af_anequalizer.c | 2 +-
libavfilter/af_anlmdn.c | 2 +-
libavfilter/af_anlms.c | 2 +-
libavfilter/af_arnndn.c | 2 +-
libavfilter/af_asoftclip.c | 4 ++--
libavfilter/af_astats.c | 2 +-
libavfilter/af_asubboost.c | 2 +-
libavfilter/af_asupercut.c | 2 +-
libavfilter/af_biquads.c | 2 +-
libavfilter/af_crystalizer.c | 2 +-
libavfilter/af_headphone.c | 4 ++--
libavfilter/af_sofalizer.c | 4 ++--
libavfilter/af_surround.c | 4 ++--
libavfilter/avf_showspatial.c | 2 +-
libavfilter/avf_showspectrum.c | 10 +++++-----
libavfilter/internal.h | 6 ++++++
libavfilter/vf_amplify.c | 2 +-
libavfilter/vf_atadenoise.c | 2 +-
libavfilter/vf_avgblur.c | 4 ++--
libavfilter/vf_blackdetect.c | 2 +-
libavfilter/vf_blend.c | 2 +-
libavfilter/vf_bm3d.c | 2 +-
libavfilter/vf_bwdif.c | 2 +-
libavfilter/vf_cas.c | 2 +-
libavfilter/vf_chromakey.c | 2 +-
libavfilter/vf_chromanr.c | 2 +-
libavfilter/vf_chromashift.c | 2 +-
libavfilter/vf_colorbalance.c | 2 +-
libavfilter/vf_colorchannelmixer.c | 2 +-
libavfilter/vf_colorconstancy.c | 8 ++++----
libavfilter/vf_colorcontrast.c | 2 +-
libavfilter/vf_colorcorrect.c | 2 +-
libavfilter/vf_colorize.c | 2 +-
libavfilter/vf_colorkey.c | 2 +-
libavfilter/vf_colorlevels.c | 2 +-
libavfilter/vf_colormatrix.c | 8 ++++----
libavfilter/vf_colorspace.c | 2 +-
libavfilter/vf_colortemperature.c | 2 +-
libavfilter/vf_convolution.c | 2 +-
libavfilter/vf_convolve.c | 14 +++++++-------
libavfilter/vf_curves.c | 2 +-
libavfilter/vf_datascope.c | 2 +-
libavfilter/vf_dctdnoiz.c | 2 +-
libavfilter/vf_deband.c | 2 +-
libavfilter/vf_dedot.c | 6 +++---
libavfilter/vf_despill.c | 2 +-
libavfilter/vf_epx.c | 2 +-
libavfilter/vf_estdif.c | 2 +-
libavfilter/vf_exposure.c | 2 +-
libavfilter/vf_fade.c | 8 ++++----
libavfilter/vf_framerate.c | 2 +-
libavfilter/vf_gblur.c | 6 +++---
libavfilter/vf_geq.c | 2 +-
libavfilter/vf_guided.c | 12 ++++++------
libavfilter/vf_hflip.c | 2 +-
libavfilter/vf_hqdn3d.c | 2 +-
libavfilter/vf_hqx.c | 2 +-
libavfilter/vf_identity.c | 2 +-
libavfilter/vf_lagfun.c | 2 +-
libavfilter/vf_lenscorrection.c | 2 +-
libavfilter/vf_lensfun.c | 4 ++--
libavfilter/vf_limiter.c | 2 +-
libavfilter/vf_lumakey.c | 2 +-
libavfilter/vf_lut.c | 8 ++++----
libavfilter/vf_lut2.c | 4 ++--
libavfilter/vf_lut3d.c | 4 ++--
libavfilter/vf_maskedclamp.c | 2 +-
libavfilter/vf_maskedmerge.c | 2 +-
libavfilter/vf_maskedminmax.c | 2 +-
libavfilter/vf_maskedthreshold.c | 2 +-
libavfilter/vf_maskfun.c | 2 +-
libavfilter/vf_median.c | 2 +-
libavfilter/vf_mix.c | 4 ++--
libavfilter/vf_monochrome.c | 4 ++--
libavfilter/vf_neighbor.c | 2 +-
libavfilter/vf_nlmeans.c | 2 +-
libavfilter/vf_nnedi.c | 2 +-
libavfilter/vf_noise.c | 2 +-
libavfilter/vf_overlay.c | 2 +-
libavfilter/vf_perspective.c | 2 +-
libavfilter/vf_photosensitivity.c | 4 ++--
libavfilter/vf_premultiply.c | 2 +-
libavfilter/vf_pseudocolor.c | 2 +-
libavfilter/vf_psnr.c | 2 +-
libavfilter/vf_readeia608.c | 2 +-
libavfilter/vf_remap.c | 2 +-
libavfilter/vf_removegrain.c | 2 +-
libavfilter/vf_rotate.c | 2 +-
libavfilter/vf_scroll.c | 2 +-
libavfilter/vf_selectivecolor.c | 2 +-
libavfilter/vf_shear.c | 2 +-
libavfilter/vf_shufflepixels.c | 2 +-
libavfilter/vf_signalstats.c | 8 ++++----
libavfilter/vf_ssim.c | 2 +-
libavfilter/vf_stack.c | 2 +-
libavfilter/vf_stereo3d.c | 2 +-
libavfilter/vf_super2xsai.c | 2 +-
libavfilter/vf_threshold.c | 2 +-
libavfilter/vf_tonemap.c | 2 +-
libavfilter/vf_transpose.c | 2 +-
libavfilter/vf_unsharp.c | 2 +-
libavfilter/vf_v360.c | 4 ++--
libavfilter/vf_vibrance.c | 2 +-
libavfilter/vf_vif.c | 14 +++++++-------
libavfilter/vf_w3fdif.c | 2 +-
libavfilter/vf_waveform.c | 2 +-
libavfilter/vf_weave.c | 2 +-
libavfilter/vf_xbr.c | 2 +-
libavfilter/vf_xfade.c | 2 +-
libavfilter/vf_xmedian.c | 4 ++--
libavfilter/vf_yadif.c | 2 +-
libavfilter/vf_yaepblur.c | 6 +++---
libavfilter/vsrc_gradients.c | 2 +-
libavfilter/vsrc_sierpinski.c | 2 +-
123 files changed, 183 insertions(+), 177 deletions(-)
diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index 2e4cd367c7..f511a59b7f 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -517,7 +517,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
goto fail;
s->input_frame = in;
- ctx->internal->execute(ctx, s->filter_channels, NULL, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, s->filter_channels, NULL, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
for (i = 0; i < ctx->nb_outputs; i++) {
diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
index cda83bbb67..3b59c856ff 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -576,7 +576,7 @@ static int filter_frame(AVFilterLink *inlink)
goto fail;
td.out = out;
- ret = ctx->internal->execute(ctx, filter_channel, &td, NULL, inlink->channels);
+ ret = ff_filter_execute(ctx, filter_channel, &td, NULL, inlink->channels);
if (ret < 0)
goto fail;
diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c
index 5c604bcbd7..2dc87ddbbd 100644
--- a/libavfilter/af_adenorm.c
+++ b/libavfilter/af_adenorm.c
@@ -250,7 +250,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
s->level = exp(s->level_db / 20. * M_LN10);
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
s->in_samples += in->nb_samples;
diff --git a/libavfilter/af_aemphasis.c b/libavfilter/af_aemphasis.c
index 9fbf8bbb73..1be332218b 100644
--- a/libavfilter/af_aemphasis.c
+++ b/libavfilter/af_aemphasis.c
@@ -143,7 +143,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
if (in != out)
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index 38bd474c80..c595a0eddb 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -1224,7 +1224,7 @@ static int output_frame(AVFilterLink *inlink)
s->block_count++;
td.in = in;
- ctx->internal->execute(ctx, filter_channel, &td, NULL,
+ ff_filter_execute(ctx, filter_channel, &td, NULL,
FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx)));
out = ff_get_audio_buffer(outlink, s->sample_advance);
diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index e60bdc4f6f..3ff6c22284 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -225,7 +225,7 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink)
if (s->pts == AV_NOPTS_VALUE)
s->pts = in->pts;
s->in = in;
- ctx->internal->execute(ctx, fir_channels, out, NULL, FFMIN(outlink->channels,
+ ff_filter_execute(ctx, fir_channels, out, NULL, FFMIN(outlink->channels,
ff_filter_get_nb_threads(ctx)));
out->pts = s->pts;
diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c
index c2fa2cedfc..59a8d787df 100644
--- a/libavfilter/af_afreqshift.c
+++ b/libavfilter/af_afreqshift.c
@@ -329,7 +329,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
s->in_samples += in->nb_samples;
diff --git a/libavfilter/af_afwtdn.c b/libavfilter/af_afwtdn.c
index 6a25c98d7a..6d717536aa 100644
--- a/libavfilter/af_afwtdn.c
+++ b/libavfilter/af_afwtdn.c
@@ -1060,7 +1060,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->filter_channel, &td, NULL, inlink->channels);
+ ff_filter_execute(ctx, s->filter_channel, &td, NULL, inlink->channels);
if (s->need_profile)
s->got_profile = 1;
diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c
index 7ff49aab4d..803a44698d 100644
--- a/libavfilter/af_aiir.c
+++ b/libavfilter/af_aiir.c
@@ -1401,7 +1401,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->iir_channel, &td, NULL, outlink->channels);
+ ff_filter_execute(ctx, s->iir_channel, &td, NULL, outlink->channels);
for (ch = 0; ch < outlink->channels; ch++) {
if (s->iir[ch].clippings > 0)
diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c
index faa0e2a230..041fffd4b4 100644
--- a/libavfilter/af_anequalizer.c
+++ b/libavfilter/af_anequalizer.c
@@ -730,7 +730,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
AVFilterLink *outlink = ctx->outputs[0];
if (!ctx->is_disabled)
- ctx->internal->execute(ctx, filter_channels, buf, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, filter_channels, buf, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
if (s->draw_curves) {
diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c
index 0ed49bb630..f0c78ffcfe 100644
--- a/libavfilter/af_anlmdn.c
+++ b/libavfilter/af_anlmdn.c
@@ -309,7 +309,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (ret < 0)
break;
- ctx->internal->execute(ctx, filter_channel, out, NULL, inlink->channels);
+ ff_filter_execute(ctx, filter_channel, out, NULL, inlink->channels);
av_audio_fifo_drain(s->fifo, s->H);
diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c
index fb9c8cef4c..b3364eaafc 100644
--- a/libavfilter/af_anlms.c
+++ b/libavfilter/af_anlms.c
@@ -203,7 +203,7 @@ static int activate(AVFilterContext *ctx)
return AVERROR(ENOMEM);
}
- ctx->internal->execute(ctx, process_channels, out, NULL, FFMIN(ctx->outputs[0]->channels,
+ ff_filter_execute(ctx, process_channels, out, NULL, FFMIN(ctx->outputs[0]->channels,
ff_filter_get_nb_threads(ctx)));
out->pts = s->frame[0]->pts;
diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c
index 0a227b35ac..15a3e531ea 100644
--- a/libavfilter/af_arnndn.c
+++ b/libavfilter/af_arnndn.c
@@ -1441,7 +1441,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out->pts = in->pts;
td.in = in; td.out = out;
- ctx->internal->execute(ctx, rnnoise_channels, &td, NULL, FFMIN(outlink->channels,
+ ff_filter_execute(ctx, rnnoise_channels, &td, NULL, FFMIN(outlink->channels,
ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c
index 44071d8dae..b4096c7e53 100644
--- a/libavfilter/af_asoftclip.c
+++ b/libavfilter/af_asoftclip.c
@@ -400,7 +400,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = s->frame;
td.nb_samples = av_sample_fmt_is_planar(in->format) ? ret : ret * in->channels;
td.channels = channels;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(channels,
ff_filter_get_nb_threads(ctx)));
ret = swr_convert(s->down_ctx, (uint8_t**)out->extended_data, out->nb_samples,
@@ -419,7 +419,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.nb_samples = nb_samples;
td.channels = channels;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(channels,
ff_filter_get_nb_threads(ctx)));
}
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index 67e7aaf69f..a84e2f7bb1 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -632,7 +632,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
s->nb_frames++;
}
- ctx->internal->execute(ctx, filter_channel, buf, NULL, FFMIN(inlink->channels, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_channel, buf, NULL, FFMIN(inlink->channels, ff_filter_get_nb_threads(ctx)));
if (s->metadata)
set_metadata(s, metadata);
diff --git a/libavfilter/af_asubboost.c b/libavfilter/af_asubboost.c
index 4ec7cf64e0..9d3b3a035e 100644
--- a/libavfilter/af_asubboost.c
+++ b/libavfilter/af_asubboost.c
@@ -169,7 +169,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, filter_channels, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
if (out != in)
diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c
index c6f5b0d1bd..d7b18df2cf 100644
--- a/libavfilter/af_asupercut.c
+++ b/libavfilter/af_asupercut.c
@@ -299,7 +299,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in; td.out = out;
- ctx->internal->execute(ctx, s->filter_channels, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, s->filter_channels, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
if (out != in)
diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 8ccdbf4fe2..184282b8c6 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -797,7 +797,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
td.in = buf;
td.out = out_buf;
- ctx->internal->execute(ctx, filter_channel, &td, NULL, FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_channel, &td, NULL, FFMIN(outlink->channels, ff_filter_get_nb_threads(ctx)));
for (ch = 0; ch < outlink->channels; ch++) {
if (s->cache[ch].clippings > 0)
diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c
index 50c3c812a4..ec4fff1cb1 100644
--- a/libavfilter/af_crystalizer.c
+++ b/libavfilter/af_crystalizer.c
@@ -398,7 +398,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.channels = in->channels;
td.mult = ctx->is_disabled ? 0.f : s->mult;
td.clip = s->clip;
- ctx->internal->execute(ctx, s->filter, &td, NULL, FFMIN(inlink->channels,
+ ff_filter_execute(ctx, s->filter, &td, NULL, FFMIN(inlink->channels,
ff_filter_get_nb_threads(ctx)));
if (out != in)
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c
index 1b7dd51d64..596049852e 100644
--- a/libavfilter/af_headphone.c
+++ b/libavfilter/af_headphone.c
@@ -341,9 +341,9 @@ static int headphone_frame(HeadphoneContext *s, AVFrame *in, AVFilterLink *outli
td.temp_afft = s->temp_afft;
if (s->type == TIME_DOMAIN) {
- ctx->internal->execute(ctx, headphone_convolute, &td, NULL, 2);
+ ff_filter_execute(ctx, headphone_convolute, &td, NULL, 2);
} else {
- ctx->internal->execute(ctx, headphone_fast_convolute, &td, NULL, 2);
+ ff_filter_execute(ctx, headphone_fast_convolute, &td, NULL, 2);
}
emms_c();
diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c
index 0412bc5dda..9708aab634 100644
--- a/libavfilter/af_sofalizer.c
+++ b/libavfilter/af_sofalizer.c
@@ -604,9 +604,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.temp_afft = s->temp_afft;
if (s->type == TIME_DOMAIN) {
- ctx->internal->execute(ctx, sofalizer_convolute, &td, NULL, 2);
+ ff_filter_execute(ctx, sofalizer_convolute, &td, NULL, 2);
} else if (s->type == FREQUENCY_DOMAIN) {
- ctx->internal->execute(ctx, sofalizer_fast_convolute, &td, NULL, 2);
+ ff_filter_execute(ctx, sofalizer_fast_convolute, &td, NULL, 2);
}
emms_c();
diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c
index 8d6eebe2e5..d81908f5aa 100644
--- a/libavfilter/af_surround.c
+++ b/libavfilter/af_surround.c
@@ -1586,7 +1586,7 @@ static int filter_frame(AVFilterLink *inlink)
if (ret < 0)
return ret;
- ctx->internal->execute(ctx, fft_channel, NULL, NULL, inlink->channels);
+ ff_filter_execute(ctx, fft_channel, NULL, NULL, inlink->channels);
s->filter(ctx);
@@ -1594,7 +1594,7 @@ static int filter_frame(AVFilterLink *inlink)
if (!out)
return AVERROR(ENOMEM);
- ctx->internal->execute(ctx, ifft_channel, out, NULL, outlink->channels);
+ ff_filter_execute(ctx, ifft_channel, out, NULL, outlink->channels);
out->pts = s->pts;
if (s->pts != AV_NOPTS_VALUE)
diff --git a/libavfilter/avf_showspatial.c b/libavfilter/avf_showspatial.c
index 82d202a817..3e1d4bd70e 100644
--- a/libavfilter/avf_showspatial.c
+++ b/libavfilter/avf_showspatial.c
@@ -318,7 +318,7 @@ static int spatial_activate(AVFilterContext *ctx)
av_assert0(fin->nb_samples == s->win_size);
- ctx->internal->execute(ctx, run_channel_fft, fin, NULL, 2);
+ ff_filter_execute(ctx, run_channel_fft, fin, NULL, 2);
ret = draw_spatial(inlink, fin);
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 1c94a06e3f..9cecd3d299 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1369,7 +1369,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
/* initialize buffer for combining to black */
clear_combine_buffer(s, z);
- ctx->internal->execute(ctx, s->plot_channel, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, s->plot_channel, NULL, NULL, s->nb_display_channels);
for (y = 0; y < z * 3; y++) {
for (x = 0; x < s->nb_display_channels; x++) {
@@ -1543,13 +1543,13 @@ static int activate(AVFilterContext *ctx)
av_assert0(fin->nb_samples == s->win_size);
- ctx->internal->execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
if (s->data == D_MAGNITUDE)
- ctx->internal->execute(ctx, calc_channel_magnitudes, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, calc_channel_magnitudes, NULL, NULL, s->nb_display_channels);
if (s->data == D_PHASE)
- ctx->internal->execute(ctx, calc_channel_phases, NULL, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, calc_channel_phases, NULL, NULL, s->nb_display_channels);
ret = plot_spectrum_column(inlink, fin);
@@ -1746,7 +1746,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
}
}
- ctx->internal->execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
+ ff_filter_execute(ctx, run_channel_fft, fin, NULL, s->nb_display_channels);
acalc_magnitudes(s);
consumed += spf;
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 2d1dab5788..48a911f082 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -138,6 +138,12 @@ struct AVFilterInternal {
avfilter_execute_func *execute;
};
+static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func,
+ void *arg, int *ret, int nb_jobs)
+{
+ return ctx->internal->execute(ctx, func, arg, ret, nb_jobs);
+}
+
/**
* Tell if an integer is contained in the provided -1-terminated list of integers.
* This is useful for determining (for instance) if an AVPixelFormat is in an
diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c
index 2640b61be8..49f62bc306 100644
--- a/libavfilter/vf_amplify.c
+++ b/libavfilter/vf_amplify.c
@@ -264,7 +264,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = s->frames;
- ctx->internal->execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
} else {
out = av_frame_clone(s->frames[s->radius]);
if (!out)
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index ad99c7a797..e39670d982 100644
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -488,7 +488,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
}
td.in = in; td.out = out;
- ctx->internal->execute(ctx, s->filter_slice, &td, NULL,
+ ff_filter_execute(ctx, s->filter_slice, &td, NULL,
FFMIN3(s->planeheight[1],
s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c
index f6d36abb50..cbfcb13136 100644
--- a/libavfilter/vf_avgblur.c
+++ b/libavfilter/vf_avgblur.c
@@ -216,10 +216,10 @@ static void averageiir2d(AVFilterContext *ctx, AVFrame *in, AVFrame *out, int pl
td.height = height;
td.ptr = in->data[plane];
td.linesize = in->linesize[plane];
- ctx->internal->execute(ctx, s->filter_horizontally, &td, NULL, FFMIN(height, nb_threads));
+ ff_filter_execute(ctx, s->filter_horizontally, &td, NULL, FFMIN(height, nb_threads));
td.ptr = out->data[plane];
td.linesize = out->linesize[plane];
- ctx->internal->execute(ctx, s->filter_vertically, &td, NULL, FFMIN(width, nb_threads));
+ ff_filter_execute(ctx, s->filter_vertically, &td, NULL, FFMIN(width, nb_threads));
}
static int query_formats(AVFilterContext *ctx)
diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c
index e7fa5ce3ab..6d24682ef0 100644
--- a/libavfilter/vf_blackdetect.c
+++ b/libavfilter/vf_blackdetect.c
@@ -188,7 +188,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
BlackDetectContext *s = ctx->priv;
double picture_black_ratio = 0;
- ctx->internal->execute(ctx, black_counter, picref, NULL,
+ ff_filter_execute(ctx, black_counter, picref, NULL,
FFMIN(inlink->h, s->nb_threads));
for (int i = 0; i < s->nb_threads; i++)
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index 5eed52a5d8..80ff23f1fd 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -624,7 +624,7 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
.w = outw, .h = outh, .param = param, .plane = plane,
.inlink = inlink };
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outh, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(outh, ff_filter_get_nb_threads(ctx)));
}
if (!s->tblend)
diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c
index 96bf8b671a..49a52ecc18 100644
--- a/libavfilter/vf_bm3d.c
+++ b/libavfilter/vf_bm3d.c
@@ -763,7 +763,7 @@ static int filter_frame(AVFilterContext *ctx, AVFrame **out, AVFrame *in, AVFram
td.ref = ref->data[p];
td.ref_linesize = ref->linesize[p];
td.plane = p;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, nb_jobs);
+ ff_filter_execute(ctx, filter_slice, &td, NULL, nb_jobs);
s->do_output(s, (*out)->data[p], (*out)->linesize[p], p, nb_jobs);
}
diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
index d63976b70b..a676bba7f5 100644
--- a/libavfilter/vf_bwdif.c
+++ b/libavfilter/vf_bwdif.c
@@ -279,7 +279,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
td.h = h;
td.plane = i;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(h, ff_filter_get_nb_threads(ctx)));
}
if (yadif->current_field == YADIF_FIELD_END) {
yadif->current_field = YADIF_FIELD_NORMAL;
diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c
index 4378ccd5eb..00c77b0fcb 100644
--- a/libavfilter/vf_cas.c
+++ b/libavfilter/vf_cas.c
@@ -193,7 +193,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
s->in = in;
- ctx->internal->execute(ctx, s->do_slice, out, NULL,
+ ff_filter_execute(ctx, s->do_slice, out, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
s->in = NULL;
diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c
index 61a1ab53f9..a21a136b33 100644
--- a/libavfilter/vf_chromakey.c
+++ b/libavfilter/vf_chromakey.c
@@ -260,7 +260,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
ChromakeyContext *ctx = avctx->priv;
int res;
- if (res = avctx->internal->execute(avctx, ctx->do_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
+ if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
return res;
return ff_filter_frame(avctx->outputs[0], frame);
diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c
index 006d6410b7..227eb698bb 100644
--- a/libavfilter/vf_chromanr.c
+++ b/libavfilter/vf_chromanr.c
@@ -208,7 +208,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
s->out = out;
- ctx->internal->execute(ctx, s->filter_slice, in, NULL,
+ ff_filter_execute(ctx, s->filter_slice, in, NULL,
FFMIN3(s->planeheight[1],
s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
index 8079196862..42ea697b6b 100644
--- a/libavfilter/vf_chromashift.c
+++ b/libavfilter/vf_chromashift.c
@@ -359,7 +359,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
in->data[0], in->linesize[0],
s->linesize[0], s->height[0]);
}
- ctx->internal->execute(ctx, s->filter_slice, out, NULL,
+ ff_filter_execute(ctx, s->filter_slice, out, NULL,
FFMIN3(s->height[1],
s->height[2],
ff_filter_get_nb_threads(ctx)));
diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
index 1da1a643eb..51278cf949 100644
--- a/libavfilter/vf_colorbalance.c
+++ b/libavfilter/vf_colorbalance.c
@@ -411,7 +411,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->color_balance, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->color_balance, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
if (in != out)
av_frame_free(&in);
diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c
index e259fa3028..66b761db87 100644
--- a/libavfilter/vf_colorchannelmixer.c
+++ b/libavfilter/vf_colorchannelmixer.c
@@ -753,7 +753,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->filter_slice[pl], &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->filter_slice[pl], &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
if (in != out)
av_frame_free(&in);
diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c
index 0cef043bcd..8ba84a7f7d 100644
--- a/libavfilter/vf_colorconstancy.c
+++ b/libavfilter/vf_colorconstancy.c
@@ -366,7 +366,7 @@ get_deriv(AVFilterContext *ctx, ThreadData *td, int ord, int dir,
td->meta_data[INDEX_DIR] = dir;
td->meta_data[INDEX_SRC] = src;
td->meta_data[INDEX_DST] = dst;
- ctx->internal->execute(ctx, slice_get_derivative, td, NULL, FFMIN(dim, nb_threads));
+ ff_filter_execute(ctx, slice_get_derivative, td, NULL, FFMIN(dim, nb_threads));
}
/**
@@ -500,10 +500,10 @@ static int filter_grey_edge(AVFilterContext *ctx, AVFrame *in)
}
get_derivative(ctx, &td);
if (difford > 0) {
- ctx->internal->execute(ctx, slice_normalize, &td, NULL, nb_jobs);
+ ff_filter_execute(ctx, slice_normalize, &td, NULL, nb_jobs);
}
- ctx->internal->execute(ctx, filter_slice_grey_edge, &td, NULL, nb_jobs);
+ ff_filter_execute(ctx, filter_slice_grey_edge, &td, NULL, nb_jobs);
if (!minknorm) {
for (plane = 0; plane < NUM_PLANES; ++plane) {
white[plane] = 0; // All values are absolute
@@ -631,7 +631,7 @@ static void chromatic_adaptation(AVFilterContext *ctx, AVFrame *in, AVFrame *out
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, diagonal_transformation, &td, NULL, nb_jobs);
+ ff_filter_execute(ctx, diagonal_transformation, &td, NULL, nb_jobs);
}
static int query_formats(AVFilterContext *ctx)
diff --git a/libavfilter/vf_colorcontrast.c b/libavfilter/vf_colorcontrast.c
index 8aae031745..003287f8d6 100644
--- a/libavfilter/vf_colorcontrast.c
+++ b/libavfilter/vf_colorcontrast.c
@@ -303,7 +303,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
ColorContrastContext *s = ctx->priv;
int res;
- if (res = ctx->internal->execute(ctx, s->do_slice, frame, NULL,
+ if (res = ff_filter_execute(ctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
return res;
diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c
index d4567d2a30..135813ec83 100644
--- a/libavfilter/vf_colorcorrect.c
+++ b/libavfilter/vf_colorcorrect.c
@@ -135,7 +135,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVFilterContext *ctx = inlink->dst;
ColorCorrectContext *s = ctx->priv;
- ctx->internal->execute(ctx, s->do_slice, frame, NULL,
+ ff_filter_execute(ctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_colorize.c b/libavfilter/vf_colorize.c
index 1dc99681ce..776a4add9c 100644
--- a/libavfilter/vf_colorize.c
+++ b/libavfilter/vf_colorize.c
@@ -203,7 +203,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
hsl2rgb(s->hue, s->saturation, s->lightness, &c[0], &c[1], &c[2]);
rgb2yuv(c[0], c[1], c[2], &s->c[0], &s->c[1], &s->c[2], s->depth);
- ctx->internal->execute(ctx, do_slice, frame, NULL,
+ ff_filter_execute(ctx, do_slice, frame, NULL,
FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c
index 93e69b712c..779094d72d 100644
--- a/libavfilter/vf_colorkey.c
+++ b/libavfilter/vf_colorkey.c
@@ -138,7 +138,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
if (res = av_frame_make_writable(frame))
return res;
- if (res = avctx->internal->execute(avctx, ctx->do_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
+ if (res = ff_filter_execute(avctx, ctx->do_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
return res;
return ff_filter_frame(avctx->outputs[0], frame);
diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c
index b17bb9f11f..d54f6510c8 100644
--- a/libavfilter/vf_colorlevels.c
+++ b/libavfilter/vf_colorlevels.c
@@ -286,7 +286,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
break;
}
- ctx->internal->execute(ctx, s->colorlevels_slice, &td, NULL,
+ ff_filter_execute(ctx, s->colorlevels_slice, &td, NULL,
FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
if (in != out)
diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 0686ca068b..c16169f324 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -470,16 +470,16 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
td.c7 = color->yuv_convert[color->mode][2][2];
if (in->format == AV_PIX_FMT_YUV444P)
- ctx->internal->execute(ctx, process_slice_yuv444p, &td, NULL,
+ ff_filter_execute(ctx, process_slice_yuv444p, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
else if (in->format == AV_PIX_FMT_YUV422P)
- ctx->internal->execute(ctx, process_slice_yuv422p, &td, NULL,
+ ff_filter_execute(ctx, process_slice_yuv422p, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
else if (in->format == AV_PIX_FMT_YUV420P)
- ctx->internal->execute(ctx, process_slice_yuv420p, &td, NULL,
+ ff_filter_execute(ctx, process_slice_yuv420p, &td, NULL,
FFMIN(in->height / 2, ff_filter_get_nb_threads(ctx)));
else
- ctx->internal->execute(ctx, process_slice_uyvy422, &td, NULL,
+ ff_filter_execute(ctx, process_slice_uyvy422, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 65e072d137..5053f6495e 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -873,7 +873,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
return res;
}
} else {
- ctx->internal->execute(ctx, convert, &td, NULL,
+ ff_filter_execute(ctx, convert, &td, NULL,
FFMIN((in->height + 1) >> 1, ff_filter_get_nb_threads(ctx)));
}
av_frame_free(&in);
diff --git a/libavfilter/vf_colortemperature.c b/libavfilter/vf_colortemperature.c
index ad288e3b84..c8c2bc7087 100644
--- a/libavfilter/vf_colortemperature.c
+++ b/libavfilter/vf_colortemperature.c
@@ -270,7 +270,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
kelvin2rgb(s->temperature, s->color);
- ctx->internal->execute(ctx, s->do_slice, frame, NULL,
+ ff_filter_execute(ctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index db92f5aa0b..e889f51fee 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -736,7 +736,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN3(s->planeheight[1], s->planewidth[1], s->nb_threads));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN3(s->planeheight[1], s->planewidth[1], s->nb_threads));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c
index fd0f3ca404..489ed91369 100644
--- a/libavfilter/vf_convolve.c
+++ b/libavfilter/vf_convolve.c
@@ -472,8 +472,8 @@ static int do_convolve(FFFrameSync *fs)
td.hdata = s->fft_hdata[plane];
td.vdata = s->fft_vdata[plane];
- ctx->internal->execute(ctx, fft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
- ctx->internal->execute(ctx, fft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, fft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, fft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
if ((!s->impulse && !s->got_impulse[plane]) || s->impulse) {
if (s->depth == 8) {
@@ -498,8 +498,8 @@ static int do_convolve(FFFrameSync *fs)
td.hdata = s->fft_hdata_impulse[plane];
td.vdata = s->fft_vdata_impulse[plane];
- ctx->internal->execute(ctx, fft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
- ctx->internal->execute(ctx, fft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, fft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, fft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
s->got_impulse[plane] = 1;
}
@@ -507,13 +507,13 @@ static int do_convolve(FFFrameSync *fs)
td.hdata = input;
td.vdata = filter;
- ctx->internal->execute(ctx, s->filter, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->filter, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
td.hdata = s->fft_hdata[plane];
td.vdata = s->fft_vdata[plane];
- ctx->internal->execute(ctx, ifft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
- ctx->internal->execute(ctx, ifft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, ifft_vertical, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, ifft_horizontal, &td, NULL, FFMIN3(MAX_THREADS, n, ff_filter_get_nb_threads(ctx)));
get_output(s, s->fft_hdata[plane], mainpic, w, h, n, plane, 1.f / (n * n));
}
diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c
index 457fd77184..d5d718f7f4 100644
--- a/libavfilter/vf_curves.c
+++ b/libavfilter/vf_curves.c
@@ -739,7 +739,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, curves->filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, curves->filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
if (out != in)
av_frame_free(&in);
diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c
index 63c93fd98d..f3c06286e7 100644
--- a/libavfilter/vf_datascope.c
+++ b/libavfilter/vf_datascope.c
@@ -370,7 +370,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in; td.out = out, td.yoff = xmaxlen, td.xoff = ymaxlen, td.PP = PP;
- ctx->internal->execute(ctx, s->filter, &td, NULL, FFMIN(ff_filter_get_nb_threads(ctx), FFMAX(outlink->w / 20, 1)));
+ ff_filter_execute(ctx, s->filter, &td, NULL, FFMIN(ff_filter_get_nb_threads(ctx), FFMAX(outlink->w / 20, 1)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c
index 8c0691c07f..d1bb7bf96b 100644
--- a/libavfilter/vf_dctdnoiz.c
+++ b/libavfilter/vf_dctdnoiz.c
@@ -745,7 +745,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
.src = s->cbuf[0][plane],
.dst = s->cbuf[1][plane],
};
- ctx->internal->execute(ctx, filter_slice, &td, NULL, s->nb_threads);
+ ff_filter_execute(ctx, filter_slice, &td, NULL, s->nb_threads);
}
s->color_correlation(out->data, out->linesize[0],
s->cbuf[1], s->p_linesize,
diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c
index 767f1c7687..8a9b63be39 100644
--- a/libavfilter/vf_deband.c
+++ b/libavfilter/vf_deband.c
@@ -422,7 +422,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.in = in; td.out = out;
- ctx->internal->execute(ctx, s->deband, &td, NULL, FFMIN3(s->planeheight[1],
+ ff_filter_execute(ctx, s->deband, &td, NULL, FFMIN3(s->planeheight[1],
s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
diff --git a/libavfilter/vf_dedot.c b/libavfilter/vf_dedot.c
index 8660eb08b4..050b2368c7 100644
--- a/libavfilter/vf_dedot.c
+++ b/libavfilter/vf_dedot.c
@@ -296,17 +296,17 @@ static int activate(AVFilterContext *ctx)
ret = av_frame_make_writable(out);
if (ret >= 0) {
if (s->m & 1)
- ctx->internal->execute(ctx, s->dedotcrawl, out, NULL,
+ ff_filter_execute(ctx, s->dedotcrawl, out, NULL,
FFMIN(s->planeheight[0],
ff_filter_get_nb_threads(ctx)));
if (s->m & 2) {
ThreadData td;
td.out = out; td.plane = 1;
- ctx->internal->execute(ctx, s->derainbow, &td, NULL,
+ ff_filter_execute(ctx, s->derainbow, &td, NULL,
FFMIN(s->planeheight[1],
ff_filter_get_nb_threads(ctx)));
td.plane = 2;
- ctx->internal->execute(ctx, s->derainbow, &td, NULL,
+ ff_filter_execute(ctx, s->derainbow, &td, NULL,
FFMIN(s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
}
diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c
index 315104638b..307879fa26 100644
--- a/libavfilter/vf_despill.c
+++ b/libavfilter/vf_despill.c
@@ -97,7 +97,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
if (ret = av_frame_make_writable(frame))
return ret;
- if (ret = ctx->internal->execute(ctx, do_despill_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
+ if (ret = ff_filter_execute(ctx, do_despill_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
return ret;
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_epx.c b/libavfilter/vf_epx.c
index f33be65095..53416cad30 100644
--- a/libavfilter/vf_epx.c
+++ b/libavfilter/vf_epx.c
@@ -247,7 +247,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.in = in, td.out = out;
- ctx->internal->execute(ctx, s->epx_slice, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->epx_slice, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c
index 92b1c77806..6b65f62df4 100644
--- a/libavfilter/vf_estdif.c
+++ b/libavfilter/vf_estdif.c
@@ -441,7 +441,7 @@ static int filter(AVFilterContext *ctx, int is_second, AVFrame *in)
out->pts = s->pts;
td.out = out; td.in = in;
- ctx->internal->execute(ctx, deinterlace_slice, &td, NULL,
+ ff_filter_execute(ctx, deinterlace_slice, &td, NULL,
FFMIN(s->planeheight[1] / 2, s->nb_threads));
if (s->mode)
diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c
index 135a9a0e03..42297c1a02 100644
--- a/libavfilter/vf_exposure.c
+++ b/libavfilter/vf_exposure.c
@@ -69,7 +69,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
ExposureContext *s = ctx->priv;
s->scale = 1.f / (exp2f(-s->exposure) - s->black);
- ctx->internal->execute(ctx, s->do_slice, frame, NULL,
+ ff_filter_execute(ctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 05ab762ec8..e1259f8fbe 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -493,19 +493,19 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
if (s->factor < UINT16_MAX) {
if (s->alpha) {
- ctx->internal->execute(ctx, s->filter_slice_alpha, frame, NULL,
+ ff_filter_execute(ctx, s->filter_slice_alpha, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
} else if (s->is_rgb && !s->black_fade) {
- ctx->internal->execute(ctx, filter_slice_rgb, frame, NULL,
+ ff_filter_execute(ctx, filter_slice_rgb, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
} else {
/* luma, or rgb plane in case of black */
- ctx->internal->execute(ctx, s->filter_slice_luma, frame, NULL,
+ ff_filter_execute(ctx, s->filter_slice_luma, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
if (frame->data[1] && frame->data[2] && !s->is_rgb) {
/* chroma planes */
- ctx->internal->execute(ctx, s->filter_slice_chroma, frame, NULL,
+ ff_filter_execute(ctx, s->filter_slice_chroma, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
}
}
diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index e8f6b5b8c5..ab69e4034a 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -146,7 +146,7 @@ static int blend_frames(AVFilterContext *ctx, int interpolate)
av_frame_copy_props(s->work, s->f0);
ff_dlog(ctx, "blend_frames() INTERPOLATE to create work frame\n");
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(FFMAX(1, outlink->h >> 2), ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(FFMAX(1, outlink->h >> 2), ff_filter_get_nb_threads(ctx)));
return 1;
}
return 0;
diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
index 1def5b049b..8d347695e0 100644
--- a/libavfilter/vf_gblur.c
+++ b/libavfilter/vf_gblur.c
@@ -196,9 +196,9 @@ static void gaussianiir2d(AVFilterContext *ctx, int plane)
td.width = width;
td.height = height;
- ctx->internal->execute(ctx, filter_horizontally, &td, NULL, FFMIN(height, nb_threads));
- ctx->internal->execute(ctx, filter_vertically, &td, NULL, FFMIN(width, nb_threads));
- ctx->internal->execute(ctx, filter_postscale, &td, NULL, FFMIN(width * height, nb_threads));
+ ff_filter_execute(ctx, filter_horizontally, &td, NULL, FFMIN(height, nb_threads));
+ ff_filter_execute(ctx, filter_vertically, &td, NULL, FFMIN(width, nb_threads));
+ ff_filter_execute(ctx, filter_postscale, &td, NULL, FFMIN(width * height, nb_threads));
}
static int query_formats(AVFilterContext *ctx)
diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 4162476f41..97fea280c3 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -449,7 +449,7 @@ static int geq_filter_frame(AVFilterLink *inlink, AVFrame *in)
if (geq->needs_sum[plane])
calculate_sums(geq, plane, width, height);
- ctx->internal->execute(ctx, slice_geq_filter, &td, NULL, FFMIN(height, nb_threads));
+ ff_filter_execute(ctx, slice_geq_filter, &td, NULL, FFMIN(height, nb_threads));
}
av_frame_free(&geq->picref);
diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c
index 83976cbcae..3dcba39759 100644
--- a/libavfilter/vf_guided.c
+++ b/libavfilter/vf_guided.c
@@ -250,16 +250,16 @@ static int guided_##name(AVFilterContext *ctx, GuidedContext *s,
t.dstStride = w; \
t.src = I; \
t.dst = meanI; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
t.src = II; \
t.dst = meanII; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
t.src = P; \
t.dst = meanP; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
t.src = IP; \
t.dst = meanIP; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
\
for (int i = 0;i < h;i++) { \
for (int j = 0;j < w;j++) { \
@@ -273,10 +273,10 @@ static int guided_##name(AVFilterContext *ctx, GuidedContext *s,
\
t.src = A; \
t.dst = meanA; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
t.src = B; \
t.dst = meanB; \
- ctx->internal->execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
+ ff_filter_execute(ctx, s->box_slice, &t, NULL, FFMIN(h, nb_threads)); \
\
for (int i = 0;i < height;i++) { \
for (int j = 0;j < width;j++) { \
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 2a0defda6c..7d35eb1d6f 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -221,7 +221,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
td.in = in, td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 99c43593cd..885ae02f74 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -337,7 +337,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.direct = direct;
/* one thread per plane */
- ctx->internal->execute(ctx, do_denoise, &td, NULL, 3);
+ ff_filter_execute(ctx, do_denoise, &td, NULL, 3);
if (ctx->is_disabled) {
av_frame_free(&out);
diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c
index b6c3893b66..301230e594 100644
--- a/libavfilter/vf_hqx.c
+++ b/libavfilter/vf_hqx.c
@@ -499,7 +499,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
td.rgbtoyuv = hqx->rgbtoyuv;
- ctx->internal->execute(ctx, hqx->func, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, hqx->func, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c
index f5dcdfc906..284541f215 100644
--- a/libavfilter/vf_identity.c
+++ b/libavfilter/vf_identity.c
@@ -196,7 +196,7 @@ static int do_identity(FFFrameSync *fs)
td.planeheight[c] = s->planeheight[c];
}
- ctx->internal->execute(ctx, s->filter_slice, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
+ ff_filter_execute(ctx, s->filter_slice, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
for (int j = 0; j < s->nb_threads; j++) {
for (int c = 0; c < s->nb_components; c++)
diff --git a/libavfilter/vf_lagfun.c b/libavfilter/vf_lagfun.c
index 0f4f38e0ed..f57b3f39d5 100644
--- a/libavfilter/vf_lagfun.c
+++ b/libavfilter/vf_lagfun.c
@@ -173,7 +173,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = in;
- ctx->internal->execute(ctx, s->lagfun, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->lagfun, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c
index 9d89f79101..209067d103 100644
--- a/libavfilter/vf_lenscorrection.c
+++ b/libavfilter/vf_lenscorrection.c
@@ -315,7 +315,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(rect->planeheight[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(rect->planeheight[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c
index ffe81b9bc2..8b6b068fa6 100644
--- a/libavfilter/vf_lensfun.c
+++ b/libavfilter/vf_lensfun.c
@@ -461,7 +461,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
.modifier = lensfun->modifier
};
- ctx->internal->execute(ctx,
+ ff_filter_execute(ctx)(ctx,
vignetting_filter_slice,
&vignetting_thread_data,
NULL,
@@ -489,7 +489,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
.interpolation_type = lensfun->interpolation_type
};
- ctx->internal->execute(ctx,
+ ff_filter_execute(ctx)(ctx,
distortion_correction_filter_slice,
&distortion_correction_thread_data,
NULL,
diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c
index 3bf1b371cf..d5921365e0 100644
--- a/libavfilter/vf_limiter.c
+++ b/libavfilter/vf_limiter.c
@@ -219,7 +219,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = in;
- ctx->internal->execute(ctx, filter_slice, &td, NULL,
+ 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);
diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c
index 8b2a102369..dcf5b84ad1 100644
--- a/libavfilter/vf_lumakey.c
+++ b/libavfilter/vf_lumakey.c
@@ -138,7 +138,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
if (ret = av_frame_make_writable(frame))
return ret;
- if (ret = ctx->internal->execute(ctx, s->do_lumakey_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
+ if (ret = ff_filter_execute(ctx, s->do_lumakey_slice, frame, NULL, FFMIN(frame->height, ff_filter_get_nb_threads(ctx))))
return ret;
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 78f0955446..c08c3bfaf8 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -538,22 +538,22 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
if (s->is_rgb && s->is_16bit && !s->is_planar) {
/* packed, 16-bit */
PACKED_THREAD_DATA
- ctx->internal->execute(ctx, lut_packed_16bits, &td, NULL,
+ ff_filter_execute(ctx, lut_packed_16bits, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
} else if (s->is_rgb && !s->is_planar) {
/* packed 8 bits */
PACKED_THREAD_DATA
- ctx->internal->execute(ctx, lut_packed_8bits, &td, NULL,
+ ff_filter_execute(ctx, lut_packed_8bits, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
} else if (s->is_16bit) {
/* planar >8 bit depth */
PLANAR_THREAD_DATA
- ctx->internal->execute(ctx, lut_planar_16bits, &td, NULL,
+ ff_filter_execute(ctx, lut_planar_16bits, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
} else {
/* planar 8bit depth */
PLANAR_THREAD_DATA
- ctx->internal->execute(ctx, lut_planar_8bits, &td, NULL,
+ ff_filter_execute(ctx, lut_planar_8bits, &td, NULL,
FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
}
diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c
index 85669a2e2d..3ea782e5ba 100644
--- a/libavfilter/vf_lut2.c
+++ b/libavfilter/vf_lut2.c
@@ -316,7 +316,7 @@ static int process_frame(FFFrameSync *fs)
td.out = out;
td.srcx = srcx;
td.srcy = srcy;
- ctx->internal->execute(ctx, s->lut2, &td, NULL, FFMIN(s->heightx[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->lut2, &td, NULL, FFMIN(s->heightx[1], ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
@@ -613,7 +613,7 @@ static int tlut2_filter_frame(AVFilterLink *inlink, AVFrame *frame)
td.out = out;
td.srcx = frame;
td.srcy = s->prev_frame;
- ctx->internal->execute(ctx, s->lut2, &td, NULL, FFMIN(s->heightx[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->lut2, &td, NULL, FFMIN(s->heightx[1], ff_filter_get_nb_threads(ctx)));
}
av_frame_free(&s->prev_frame);
s->prev_frame = frame;
diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c
index b81ef46b48..48a5a75061 100644
--- a/libavfilter/vf_lut3d.c
+++ b/libavfilter/vf_lut3d.c
@@ -1231,7 +1231,7 @@ static AVFrame *apply_lut(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, lut3d->interp, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, lut3d->interp, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
if (out != in)
av_frame_free(&in);
@@ -2229,7 +2229,7 @@ static AVFrame *apply_1d_lut(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, lut1d->interp, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, lut1d->interp, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
if (out != in)
av_frame_free(&in);
diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c
index 2cd1ec88c7..cd62a819a0 100644
--- a/libavfilter/vf_maskedclamp.c
+++ b/libavfilter/vf_maskedclamp.c
@@ -159,7 +159,7 @@ static int process_frame(FFFrameSync *fs)
td.m = bright;
td.d = out;
- ctx->internal->execute(ctx, maskedclamp_slice, &td, NULL, FFMIN(s->height[0],
+ ff_filter_execute(ctx, maskedclamp_slice, &td, NULL, FFMIN(s->height[0],
ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c
index 6a15a907c5..fd2b24c3d4 100644
--- a/libavfilter/vf_maskedmerge.c
+++ b/libavfilter/vf_maskedmerge.c
@@ -134,7 +134,7 @@ static int process_frame(FFFrameSync *fs)
td.base = base;
td.overlay = overlay;
td.mask = mask;
- ctx->internal->execute(ctx, filter_slice, &td, NULL,
+ ff_filter_execute(ctx, filter_slice, &td, NULL,
FFMIN(s->height[2], ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c
index 6ad5ddb1de..d2e35dabe5 100644
--- a/libavfilter/vf_maskedminmax.c
+++ b/libavfilter/vf_maskedminmax.c
@@ -221,7 +221,7 @@ static int process_frame(FFFrameSync *fs)
td.f2 = f2;
td.dst = out;
- ctx->internal->execute(ctx, maskedminmax_slice, &td, NULL, FFMIN(s->planeheight[0],
+ ff_filter_execute(ctx, maskedminmax_slice, &td, NULL, FFMIN(s->planeheight[0],
ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
diff --git a/libavfilter/vf_maskedthreshold.c b/libavfilter/vf_maskedthreshold.c
index e80d383f9d..4f526fa5b5 100644
--- a/libavfilter/vf_maskedthreshold.c
+++ b/libavfilter/vf_maskedthreshold.c
@@ -191,7 +191,7 @@ static int process_frame(FFFrameSync *fs)
td.ref = ref;
td.dst = out;
- ctx->internal->execute(ctx, threshold_slice, &td, NULL, FFMIN(s->planeheight[2],
+ ff_filter_execute(ctx, threshold_slice, &td, NULL, FFMIN(s->planeheight[2],
ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
diff --git a/libavfilter/vf_maskfun.c b/libavfilter/vf_maskfun.c
index 70198c66bc..5ac6e367b7 100644
--- a/libavfilter/vf_maskfun.c
+++ b/libavfilter/vf_maskfun.c
@@ -105,7 +105,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return ff_filter_frame(outlink, out);
}
- ctx->internal->execute(ctx, s->maskfun, frame, NULL,
+ ff_filter_execute(ctx, s->maskfun, frame, NULL,
FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, frame);
diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c
index e02629a5ca..9d92f1543b 100644
--- a/libavfilter/vf_median.c
+++ b/libavfilter/vf_median.c
@@ -230,7 +230,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.in = in; td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, s->nb_threads);
+ ff_filter_execute(ctx, filter_slice, &td, NULL, s->nb_threads);
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c
index 0ca60d5522..677ca1e8ba 100644
--- a/libavfilter/vf_mix.c
+++ b/libavfilter/vf_mix.c
@@ -226,7 +226,7 @@ static int process_frame(FFFrameSync *fs)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, mix_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, mix_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, out);
}
@@ -412,7 +412,7 @@ static int tmix_filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = s->frames;
- ctx->internal->execute(ctx, mix_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, mix_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, out);
}
diff --git a/libavfilter/vf_monochrome.c b/libavfilter/vf_monochrome.c
index 870811d4d4..ea9248a807 100644
--- a/libavfilter/vf_monochrome.c
+++ b/libavfilter/vf_monochrome.c
@@ -214,9 +214,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVFilterContext *ctx = inlink->dst;
MonochromeContext *s = ctx->priv;
- ctx->internal->execute(ctx, s->do_slice, frame, NULL,
+ ff_filter_execute(ctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
- ctx->internal->execute(ctx, s->clear_uv, frame, NULL,
+ ff_filter_execute(ctx, s->clear_uv, frame, NULL,
FFMIN(frame->height >> s->subh, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(ctx->outputs[0], frame);
diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c
index ea6449830c..31d2e11d48 100644
--- a/libavfilter/vf_neighbor.c
+++ b/libavfilter/vf_neighbor.c
@@ -328,7 +328,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c
index 95cdad780e..e85df1a979 100644
--- a/libavfilter/vf_nlmeans.c
+++ b/libavfilter/vf_nlmeans.c
@@ -455,7 +455,7 @@ static int nlmeans_plane(AVFilterContext *ctx, int w, int h, int p, int r,
compute_ssd_integral_image(&s->dsp, s->ii, s->ii_lz_32,
src, src_linesize,
offx, offy, e, w, h);
- ctx->internal->execute(ctx, nlmeans_slice, &td, NULL,
+ ff_filter_execute(ctx, nlmeans_slice, &td, NULL,
FFMIN(td.endy - td.starty, ff_filter_get_nb_threads(ctx)));
}
}
diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c
index cffb23d37c..0805fcf2af 100644
--- a/libavfilter/vf_nnedi.c
+++ b/libavfilter/vf_nnedi.c
@@ -671,7 +671,7 @@ static int get_frame(AVFilterContext *ctx, int is_second)
dst->interlaced_frame = 0;
dst->pts = s->pts;
- ctx->internal->execute(ctx, filter_slice, dst, NULL, FFMIN(s->planeheight[1] / 2, s->nb_threads));
+ ff_filter_execute(ctx, filter_slice, dst, NULL, FFMIN(s->planeheight[1] / 2, s->nb_threads));
if (s->field == -2 || s->field > 1)
s->field_n = !s->field_n;
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index 73e88063e9..6f9bd2b716 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -272,7 +272,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
}
td.in = inpicref; td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(n->height[0], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(n->height[0], ff_filter_get_nb_threads(ctx)));
emms_c();
if (inpicref != out)
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 8fec1f554c..cd421b8aa0 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -1029,7 +1029,7 @@ static int do_blend(FFFrameSync *fs)
td.dst = mainpic;
td.src = second;
- ctx->internal->execute(ctx, s->blend_slice, &td, NULL, FFMIN(FFMAX(1, FFMIN3(s->y + second->height, FFMIN(second->height, mainpic->height), mainpic->height - s->y)),
+ ff_filter_execute(ctx, s->blend_slice, &td, NULL, FFMIN(FFMAX(1, FFMIN3(s->y + second->height, FFMIN(second->height, mainpic->height), mainpic->height - s->y)),
ff_filter_get_nb_threads(ctx)));
}
return ff_filter_frame(ctx->outputs[0], mainpic);
diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c
index eb8e5e2414..55544d872f 100644
--- a/libavfilter/vf_perspective.c
+++ b/libavfilter/vf_perspective.c
@@ -476,7 +476,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
.h = s->height[plane],
.hsub = hsub,
.vsub = vsub };
- ctx->internal->execute(ctx, s->perspective, &td, NULL, FFMIN(td.h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->perspective, &td, NULL, FFMIN(td.h, ff_filter_get_nb_threads(ctx)));
}
av_frame_free(&frame);
diff --git a/libavfilter/vf_photosensitivity.c b/libavfilter/vf_photosensitivity.c
index c28d06b08a..fb343b0c79 100644
--- a/libavfilter/vf_photosensitivity.c
+++ b/libavfilter/vf_photosensitivity.c
@@ -143,7 +143,7 @@ static void convert_frame(AVFilterContext *ctx, AVFrame *in, PhotosensitivityFra
td.in = in;
td.out = out;
td.skip = skip;
- ctx->internal->execute(ctx, convert_frame_partial, &td, NULL, FFMIN(NUM_CELLS, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, convert_frame_partial, &td, NULL, FFMIN(NUM_CELLS, ff_filter_get_nb_threads(ctx)));
}
typedef struct ThreadData_blend_frame
@@ -182,7 +182,7 @@ static void blend_frame(AVFilterContext *ctx, AVFrame *target, AVFrame *source,
td.target = target;
td.source = source;
td.s_mul = (uint16_t)(factor * 0x100);
- ctx->internal->execute(ctx, blend_frame_partial, &td, NULL, FFMIN(ctx->outputs[0]->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, blend_frame_partial, &td, NULL, FFMIN(ctx->outputs[0]->h, ff_filter_get_nb_threads(ctx)));
}
static int get_badness(PhotosensitivityFrame *a, PhotosensitivityFrame *b)
diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c
index 1dde273eae..305a6d67fa 100644
--- a/libavfilter/vf_premultiply.c
+++ b/libavfilter/vf_premultiply.c
@@ -635,7 +635,7 @@ static int filter_frame(AVFilterContext *ctx,
td.d = *out;
td.a = alpha;
td.m = base;
- ctx->internal->execute(ctx, premultiply_slice, &td, NULL, FFMIN(s->height[0],
+ ff_filter_execute(ctx, premultiply_slice, &td, NULL, FFMIN(s->height[0],
ff_filter_get_nb_threads(ctx)));
}
diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
index 35b9a10519..9d4d1651be 100644
--- a/libavfilter/vf_pseudocolor.c
+++ b/libavfilter/vf_pseudocolor.c
@@ -869,7 +869,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.out = out, td.in = in;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index 715230142b..0b00a9c1b8 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -189,7 +189,7 @@ static int do_psnr(FFFrameSync *fs)
td.planeheight[c] = s->planeheight[c];
}
- ctx->internal->execute(ctx, compute_images_mse, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
+ ff_filter_execute(ctx, compute_images_mse, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
for (int j = 0; j < s->nb_threads; j++) {
for (int c = 0; c < s->nb_components; c++)
diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c
index fe4a8c4648..60d6c0704e 100644
--- a/libavfilter/vf_readeia608.c
+++ b/libavfilter/vf_readeia608.c
@@ -471,7 +471,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
ReadEIA608Context *s = ctx->priv;
int nb_found;
- ctx->internal->execute(ctx, extract_lines, in, NULL, FFMIN(FFMAX(s->end - s->start + 1, 1),
+ ff_filter_execute(ctx, extract_lines, in, NULL, FFMIN(FFMAX(s->end - s->start + 1, 1),
ff_filter_get_nb_threads(ctx)));
nb_found = 0;
diff --git a/libavfilter/vf_remap.c b/libavfilter/vf_remap.c
index 5ab6199d71..c1b90ca8bd 100644
--- a/libavfilter/vf_remap.c
+++ b/libavfilter/vf_remap.c
@@ -302,7 +302,7 @@ static int process_frame(FFFrameSync *fs)
td.nb_planes = s->nb_planes;
td.nb_components = s->nb_components;
td.step = s->step;
- ctx->internal->execute(ctx, s->remap_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->remap_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
}
out->pts = av_rescale_q(s->fs.pts, s->fs.time_base, outlink->time_base);
diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c
index 2fde9a954c..d50e0b6133 100644
--- a/libavfilter/vf_removegrain.c
+++ b/libavfilter/vf_removegrain.c
@@ -615,7 +615,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
memcpy(dst, src, s->planewidth[i]);
td.in = in; td.out = out; td.plane = i;
- ctx->internal->execute(ctx, filter_slice, &td, NULL,
+ ff_filter_execute(ctx, filter_slice, &td, NULL,
FFMIN(s->planeheight[i], ff_filter_get_nb_threads(ctx)));
src = in->data[i] + (s->planeheight[i] - 1) * in->linesize[i];
diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 654a7171a9..f08ed9bdb3 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -549,7 +549,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
.plane = plane, .c = c, .s = s };
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outh, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(outh, ff_filter_get_nb_threads(ctx)));
}
av_frame_free(&in);
diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c
index 77d8db51bc..1f72c7595d 100644
--- a/libavfilter/vf_scroll.c
+++ b/libavfilter/vf_scroll.c
@@ -128,7 +128,7 @@ static void scroll(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
s->pos_h[0] = s->pos_h[3] = h_pos * s->bytes;
td.in = in; td.out = out;
- ctx->internal->execute(ctx, scroll_slice, &td, NULL,
+ ff_filter_execute(ctx, scroll_slice, &td, NULL,
FFMIN(out->height, ff_filter_get_nb_threads(ctx)));
s->h_pos += s->h_speed * in->width;
diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c
index af6e8b2518..92a81ed0ac 100644
--- a/libavfilter/vf_selectivecolor.c
+++ b/libavfilter/vf_selectivecolor.c
@@ -441,7 +441,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, funcs[s->is_16bit][direct][s->correction_method],
+ ff_filter_execute(ctx, funcs[s->is_16bit][direct][s->correction_method],
&td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
if (!direct)
diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c
index 849592ccde..acabef3732 100644
--- a/libavfilter/vf_shear.c
+++ b/libavfilter/vf_shear.c
@@ -243,7 +243,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
0, 0, outlink->w, outlink->h);
td.in = in, td.out = out;
- ctx->internal->execute(ctx, s->filter_slice[s->interp], &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->filter_slice[s->interp], &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c
index 051be44bf3..6df830a3e4 100644
--- a/libavfilter/vf_shufflepixels.c
+++ b/libavfilter/vf_shufflepixels.c
@@ -387,7 +387,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = in;
- ctx->internal->execute(ctx, s->shuffle_pixels, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->shuffle_pixels, &td, NULL, FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(ctx->outputs[0], out);
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
index 49a2996b5c..b91aa0012e 100644
--- a/libavfilter/vf_signalstats.c
+++ b/libavfilter/vf_signalstats.c
@@ -596,7 +596,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in)
av_frame_make_writable(out);
}
- ctx->internal->execute(ctx, compute_sat_hue_metrics8, &td_huesat,
+ ff_filter_execute(ctx, compute_sat_hue_metrics8, &td_huesat,
NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx)));
// Calculate luma histogram and difference with previous frame or field.
@@ -645,7 +645,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in)
.out = out != in && s->outfilter == fil ? out : NULL,
};
memset(s->jobs_rets, 0, s->nb_jobs * sizeof(*s->jobs_rets));
- ctx->internal->execute(ctx, filters_def[fil].process8,
+ ff_filter_execute(ctx, filters_def[fil].process8,
&td, s->jobs_rets, s->nb_jobs);
for (i = 0; i < s->nb_jobs; i++)
filtot[fil] += s->jobs_rets[i];
@@ -818,7 +818,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in)
av_frame_make_writable(out);
}
- ctx->internal->execute(ctx, compute_sat_hue_metrics16, &td_huesat,
+ ff_filter_execute(ctx, compute_sat_hue_metrics16, &td_huesat,
NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx)));
// Calculate luma histogram and difference with previous frame or field.
@@ -867,7 +867,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in)
.out = out != in && s->outfilter == fil ? out : NULL,
};
memset(s->jobs_rets, 0, s->nb_jobs * sizeof(*s->jobs_rets));
- ctx->internal->execute(ctx, filters_def[fil].process16,
+ ff_filter_execute(ctx, filters_def[fil].process16,
&td, s->jobs_rets, s->nb_jobs);
for (i = 0; i < s->nb_jobs; i++)
filtot[fil] += s->jobs_rets[i];
diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 618b24c010..6479d45d0a 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -359,7 +359,7 @@ static int do_ssim(FFFrameSync *fs)
td.planeheight[n] = s->planeheight[n];
}
- ctx->internal->execute(ctx, s->ssim_plane, &td, NULL, FFMIN((s->planeheight[1] + 3) >> 2, s->nb_threads));
+ ff_filter_execute(ctx, s->ssim_plane, &td, NULL, FFMIN((s->planeheight[1] + 3) >> 2, s->nb_threads));
for (i = 0; i < s->nb_components; i++) {
for (int j = 0; j < s->nb_threads; j++)
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 3368e25c9c..2dc04dc2ac 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -179,7 +179,7 @@ static int process_frame(FFFrameSync *fs)
ff_fill_rectangle(&s->draw, &s->color, out->data, out->linesize,
0, 0, outlink->w, outlink->h);
- ctx->internal->execute(ctx, process_slice, out, NULL, FFMIN(s->nb_inputs, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, process_slice, out, NULL, FFMIN(s->nb_inputs, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, out);
}
diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index 099dd5724b..ba67156688 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -937,7 +937,7 @@ copy:
ThreadData td;
td.ileft = ileft; td.iright = iright; td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL,
+ ff_filter_execute(ctx, filter_slice, &td, NULL,
FFMIN(s->out.height, ff_filter_get_nb_threads(ctx)));
}
break;
diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c
index d6371644e6..1c93f77f8e 100644
--- a/libavfilter/vf_super2xsai.c
+++ b/libavfilter/vf_super2xsai.c
@@ -331,7 +331,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out->height = outlink->h;
td.in = in, td.out = out;
- ctx->internal->execute(ctx, super2xsai, &td, NULL, FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, super2xsai, &td, NULL, FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c
index 17ceb0dfa8..4517b8da33 100644
--- a/libavfilter/vf_threshold.c
+++ b/libavfilter/vf_threshold.c
@@ -146,7 +146,7 @@ static int process_frame(FFFrameSync *fs)
td.threshold = threshold;
td.min = min;
td.max = max;
- ctx->internal->execute(ctx, filter_slice, &td, NULL,
+ ff_filter_execute(ctx, filter_slice, &td, NULL,
FFMIN(s->height[2], ff_filter_get_nb_threads(ctx)));
}
diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c
index da6b4e235d..ef2c34def6 100644
--- a/libavfilter/vf_tonemap.c
+++ b/libavfilter/vf_tonemap.c
@@ -275,7 +275,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
td.in = in;
td.desc = desc;
td.peak = peak;
- ctx->internal->execute(ctx, tonemap_slice, &td, NULL, FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, tonemap_slice, &td, NULL, FFMIN(in->height, ff_filter_get_nb_threads(ctx)));
/* copy/generate alpha if needed */
if (desc->flags & AV_PIX_FMT_FLAG_ALPHA && odesc->flags & AV_PIX_FMT_FLAG_ALPHA) {
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index 6affbed0a6..6d51126589 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -352,7 +352,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
td.in = in, td.out = out;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
av_frame_free(&in);
return ff_filter_frame(outlink, out);
}
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index e9f75a673f..b4f358ddc5 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -164,7 +164,7 @@ static int apply_unsharp_c(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
td.height = plane_h[i];
td.dst_stride = out->linesize[i];
td.src_stride = in->linesize[i];
- ctx->internal->execute(ctx, s->unsharp_slice, &td, NULL, FFMIN(plane_h[i], s->nb_threads));
+ ff_filter_execute(ctx, s->unsharp_slice, &td, NULL, FFMIN(plane_h[i], s->nb_threads));
}
return 0;
}
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index d4bd5756da..4bba7140ba 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -4887,7 +4887,7 @@ static int config_output(AVFilterLink *outlink)
set_mirror_modifier(s->h_flip, s->v_flip, s->d_flip, s->output_mirror_modifier);
- ctx->internal->execute(ctx, v360_slice, NULL, NULL, s->nb_threads);
+ ff_filter_execute(ctx, v360_slice, NULL, NULL, s->nb_threads);
return 0;
}
@@ -4910,7 +4910,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->remap_slice, &td, NULL, s->nb_threads);
+ ff_filter_execute(ctx, s->remap_slice, &td, NULL, s->nb_threads);
av_frame_free(&in);
return ff_filter_frame(outlink, out);
diff --git a/libavfilter/vf_vibrance.c b/libavfilter/vf_vibrance.c
index abbc25436f..bc4cf2578c 100644
--- a/libavfilter/vf_vibrance.c
+++ b/libavfilter/vf_vibrance.c
@@ -285,7 +285,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
VibranceContext *s = avctx->priv;
int res;
- if (res = avctx->internal->execute(avctx, s->do_slice, frame, NULL,
+ if (res = ff_filter_execute(avctx, s->do_slice, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(avctx))))
return res;
diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c
index 4d2381abcb..e1b51aae3f 100644
--- a/libavfilter/vf_vif.c
+++ b/libavfilter/vf_vif.c
@@ -331,12 +331,12 @@ static int compute_vif2(AVFilterContext *ctx,
td.src_stride = curr_ref_stride;
td.dst_stride = w;
td.temp = temp;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
td.src = curr_main_scale;
td.dst = mu2;
td.src_stride = curr_main_stride;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
vif_dec2(mu1, ref_scale, buf_valid_w, buf_valid_h, w, w);
vif_dec2(mu2, main_scale, buf_valid_w, buf_valid_h, w, w);
@@ -361,12 +361,12 @@ static int compute_vif2(AVFilterContext *ctx,
td.src_stride = curr_ref_stride;
td.dst_stride = w;
td.temp = temp;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
td.src = curr_main_scale;
td.dst = mu2;
td.src_stride = curr_main_stride;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
vif_xx_yy_xy(mu1, mu2, mu1_sq, mu2_sq, mu1_mu2, w, h);
@@ -375,16 +375,16 @@ static int compute_vif2(AVFilterContext *ctx,
td.src = ref_sq;
td.dst = ref_sq_filt;
td.src_stride = w;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
td.src = main_sq;
td.dst = main_sq_filt;
td.src_stride = w;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
td.src = ref_main;
td.dst = ref_main_filt;
- ctx->internal->execute(ctx, vif_filter1d, &td, NULL, nb_threads);
+ ff_filter_execute(ctx, vif_filter1d, &td, NULL, nb_threads);
vif_statistic(mu1_sq, mu2_sq, mu1_mu2, ref_sq_filt, main_sq_filt,
ref_main_filt, &num, &den, w, h);
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index e8e55d5be3..9c10874606 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -504,7 +504,7 @@ static int filter(AVFilterContext *ctx, int is_second)
adj = s->field ? s->next : s->prev;
td.out = out; td.cur = s->cur; td.adj = adj;
- ctx->internal->execute(ctx, deinterlace_slice, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
+ ff_filter_execute(ctx, deinterlace_slice, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
if (s->mode)
s->field = !s->field;
diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index 977ebad9ce..57b429d28d 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -3416,7 +3416,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.component = k;
td.offset_y = offset_y;
td.offset_x = offset_x;
- ctx->internal->execute(ctx, s->waveform_slice, &td, NULL, ff_filter_get_nb_threads(ctx));
+ ff_filter_execute(ctx, s->waveform_slice, &td, NULL, ff_filter_get_nb_threads(ctx));
switch (s->filter) {
case LOWPASS:
if (s->bits <= 8)
diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c
index 98b8d0bd06..ea6cd8db97 100644
--- a/libavfilter/vf_weave.c
+++ b/libavfilter/vf_weave.c
@@ -150,7 +150,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_copy_props(out, in);
td.out = out, td.in = in;
- ctx->internal->execute(ctx, weave_slice, &td, NULL, FFMIN(s->planeheight[1],
+ ff_filter_execute(ctx, weave_slice, &td, NULL, FFMIN(s->planeheight[1],
ff_filter_get_nb_threads(ctx)));
out->pts = s->double_weave ? s->prev->pts : in->pts / 2;
diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c
index 28642fa323..f025061888 100644
--- a/libavfilter/vf_xbr.c
+++ b/libavfilter/vf_xbr.c
@@ -367,7 +367,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.in = in;
td.out = out;
td.rgbtoyuv = s->rgbtoyuv;
- ctx->internal->execute(ctx, s->func, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->func, &td, NULL, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx)));
out->width = outlink->w;
out->height = outlink->h;
diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c
index c3e5f3df85..8bbe3a1955 100644
--- a/libavfilter/vf_xfade.c
+++ b/libavfilter/vf_xfade.c
@@ -1830,7 +1830,7 @@ static int xfade_frame(AVFilterContext *ctx, AVFrame *a, AVFrame *b)
av_frame_copy_props(out, a);
td.xf[0] = a, td.xf[1] = b, td.out = out, td.progress = progress;
- ctx->internal->execute(ctx, xfade_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, xfade_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
out->pts = s->pts;
diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c
index c8ff37f797..0e387fe960 100644
--- a/libavfilter/vf_xmedian.c
+++ b/libavfilter/vf_xmedian.c
@@ -253,7 +253,7 @@ static int process_frame(FFFrameSync *fs)
if (!ctx->is_disabled) {
td.in = in;
td.out = out;
- ctx->internal->execute(ctx, s->median_frames, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->median_frames, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
}
return ff_filter_frame(outlink, out);
@@ -440,7 +440,7 @@ static int tmedian_filter_frame(AVFilterLink *inlink, AVFrame *in)
td.out = out;
td.in = s->frames;
- ctx->internal->execute(ctx, s->median_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->median_frames, &td, NULL, FFMIN(s->height[0], ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, out);
}
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 41069a711c..084d766d18 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -249,7 +249,7 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
td.h = h;
td.plane = i;
- ctx->internal->execute(ctx, filter_slice, &td, NULL, FFMIN(h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, filter_slice, &td, NULL, FFMIN(h, ff_filter_get_nb_threads(ctx)));
}
emms_c();
diff --git a/libavfilter/vf_yaepblur.c b/libavfilter/vf_yaepblur.c
index c68edc815a..ef49bf442c 100644
--- a/libavfilter/vf_yaepblur.c
+++ b/libavfilter/vf_yaepblur.c
@@ -253,12 +253,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
td.height = s->planeheight[plane];
td.src = in->data[plane];
td.src_linesize = in->linesize[plane];
- ctx->internal->execute(ctx, s->pre_calculate_row, &td, NULL, FFMIN(td.height, nb_threads));
- ctx->internal->execute(ctx, pre_calculate_col, &td, NULL, FFMIN(td.width, nb_threads));
+ ff_filter_execute(ctx, s->pre_calculate_row, &td, NULL, FFMIN(td.height, nb_threads));
+ ff_filter_execute(ctx, pre_calculate_col, &td, NULL, FFMIN(td.width, nb_threads));
td.dst = out->data[plane];
td.dst_linesize = out->linesize[plane];
- ctx->internal->execute(ctx, s->filter_slice, &td, NULL, FFMIN(td.height, nb_threads));
+ ff_filter_execute(ctx, s->filter_slice, &td, NULL, FFMIN(td.height, nb_threads));
}
if (out != in)
diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c
index c1962b1ed8..2705b1ab93 100644
--- a/libavfilter/vsrc_gradients.c
+++ b/libavfilter/vsrc_gradients.c
@@ -277,7 +277,7 @@ static int activate(AVFilterContext *ctx)
frame->sample_aspect_ratio = (AVRational) {1, 1};
frame->pts = s->pts++;
- ctx->internal->execute(ctx, s->draw_slice, frame, NULL,
+ ff_filter_execute(ctx, s->draw_slice, frame, NULL,
FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
return ff_filter_frame(outlink, frame);
diff --git a/libavfilter/vsrc_sierpinski.c b/libavfilter/vsrc_sierpinski.c
index eec9e8c25d..5160fa52b2 100644
--- a/libavfilter/vsrc_sierpinski.c
+++ b/libavfilter/vsrc_sierpinski.c
@@ -191,7 +191,7 @@ static void draw_sierpinski(AVFilterContext *ctx, AVFrame *frame)
s->pos_y--;
}
- ctx->internal->execute(ctx, s->draw_slice, frame, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
+ ff_filter_execute(ctx, s->draw_slice, frame, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
}
static int sierpinski_request_frame(AVFilterLink *link)
--
2.30.2
More information about the ffmpeg-devel
mailing list