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_colorconstancy.c | |
parent | 32b56af6fb9f97749ad091c9373d399e4678457d (diff) |
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_colorconstancy.c')
-rw-r--r-- | libavfilter/vf_colorconstancy.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c index 0cef043bcd..eae19c1104 100644 --- a/libavfilter/vf_colorconstancy.c +++ b/libavfilter/vf_colorconstancy.c @@ -366,7 +366,8 @@ 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 +501,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 +632,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) |