diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-15 21:33:25 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-15 21:33:25 +0200 |
commit | 1b20853fb3e2c4879cdecf2414a2d68760df1149 (patch) | |
tree | 131de80408a5a252609a067b2ab1d086b30ef2b5 /libavfilter/vf_signalstats.c | |
parent | 32b56af6fb9f97749ad091c9373d399e4678457d (diff) | |
download | ffmpeg-1b20853fb3e2c4879cdecf2414a2d68760df1149.tar.gz |
avfilter/internal: Factor out executing a filter's execute_func
The current way of doing it involves writing the ctx parameter twice.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_signalstats.c')
-rw-r--r-- | libavfilter/vf_signalstats.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 49a2996b5c..fc8e81375f 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -596,8 +596,8 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in) av_frame_make_writable(out); } - ctx->internal->execute(ctx, compute_sat_hue_metrics8, &td_huesat, - NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); + 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. memset(s->histy, 0, s->maxsize * sizeof(*s->histy)); @@ -645,8 +645,8 @@ 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, - &td, s->jobs_rets, s->nb_jobs); + 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,8 +818,8 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in) av_frame_make_writable(out); } - ctx->internal->execute(ctx, compute_sat_hue_metrics16, &td_huesat, - NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); + 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. memset(s->histy, 0, s->maxsize * sizeof(*s->histy)); @@ -867,8 +867,8 @@ 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, - &td, s->jobs_rets, s->nb_jobs); + 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]; } |