Lines Matching defs:nb_threads
46 int nb_threads;
69 int nb_threads = c->nb_threads;
77 if (c->current_job == nb_threads + c->nb_jobs)
108 for (i = 0; i < c->nb_threads; i++)
119 while (c->current_job != c->nb_threads + c->nb_jobs)
135 c->current_job = c->nb_threads;
156 static int thread_init_internal(ThreadContext *c, int nb_threads)
160 if (!nb_threads) {
164 nb_threads = nb_cpus + 1;
166 nb_threads = 1;
169 if (nb_threads <= 1)
172 c->nb_threads = nb_threads;
173 c->workers = av_mallocz_array(sizeof(*c->workers), nb_threads);
186 for (i = 0; i < nb_threads; i++) {
190 c->nb_threads = i;
198 return c->nb_threads;
209 if (graph->nb_threads == 1) {
218 ret = thread_init_internal(graph->internal->thread, graph->nb_threads);
222 graph->nb_threads = 1;
225 graph->nb_threads = ret;