diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-08-27 22:44:42 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-08-29 16:27:09 +0200 |
commit | a0a57072c93be397afe346d03b907397d6b88396 (patch) | |
tree | 1b3ba1437f6eaab36f9747bf88f3d9e425a69f40 /libavfilter/vf_signalstats.c | |
parent | 5b1907142dca052c3254d0b4ca3e2ff7ddc7d96b (diff) | |
download | ffmpeg-a0a57072c93be397afe346d03b907397d6b88396.tar.gz |
avfilter: make use of ff_filter_get_nb_threads
Diffstat (limited to 'libavfilter/vf_signalstats.c')
-rw-r--r-- | libavfilter/vf_signalstats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 6796af8079..22a1db196f 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -185,7 +185,7 @@ static int config_props(AVFilterLink *outlink) s->fs = inlink->w * inlink->h; s->cfs = s->chromaw * s->chromah; - s->nb_jobs = FFMAX(1, FFMIN(inlink->h, ctx->graph->nb_threads)); + s->nb_jobs = FFMAX(1, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx))); s->jobs_rets = av_malloc_array(s->nb_jobs, sizeof(*s->jobs_rets)); if (!s->jobs_rets) return AVERROR(ENOMEM); @@ -602,7 +602,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in) } ctx->internal->execute(ctx, compute_sat_hue_metrics8, &td_huesat, - NULL, FFMIN(s->chromah, ctx->graph->nb_threads)); + NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); // Calculate luma histogram and difference with previous frame or field. for (j = 0; j < link->h; j++) { @@ -820,7 +820,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in) } ctx->internal->execute(ctx, compute_sat_hue_metrics16, &td_huesat, - NULL, FFMIN(s->chromah, ctx->graph->nb_threads)); + NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); // Calculate luma histogram and difference with previous frame or field. memset(s->histy, 0, (1 << s->depth) * sizeof(*s->histy)); |