[FFmpeg-devel] [PATCH] avcodec/vp9: Add tile threading support
Ronald S. Bultje
rsbultje at gmail.com
Wed Aug 23 18:56:48 EEST 2017
Hi,
I would also recommend to split out the changes to add the mainfunc-aware
slice threading implementation (execute3) into pthread_slice.c into its own
patch, that way others can review that without being obstructed by the vp9
bits.
On Tue, Aug 22, 2017 at 7:59 PM, Ilia Valiakhmetov <zakne0ne at gmail.com>
wrote:
> - avpriv_slicethread_execute(c->thread, job_count, 0);
> + if (c->m_func)
> + avpriv_slicethread_execute(c->thread, job_count, 1);
> + else
> + avpriv_slicethread_execute(c->thread, job_count, 0);
>
avpriv_slicethread_execute(c->thread, job_count, !!c->m_func);
> - if (!c || (thread_count = avpriv_slicethread_create(&c->thread,
> avctx, worker_func, NULL, thread_count)) <= 1) {
> + if (!c || (thread_count = avpriv_slicethread_create(&c->thread,
> avctx, worker_func, main_function, thread_count)) <= 1) {
>
This also affects slice threading without main_func, doesn't it? So
shouldn't main_function being NULL or not depend on whether the slice
threading implementation requires a main func? You could, for example, add
a flag to the AVCodec.capabilities to signal that it has a main function.
Ronald
More information about the ffmpeg-devel
mailing list