Re: [FFmpeg-devel] [PATCH] avcodec/pthread_slice: rewrite implementation

2017-07-09 Thread Muhammad Faiz
On Sun, Jul 9, 2017 at 6:45 PM, Ronald S. Bultje wrote: > Hi, > > On Sun, Jul 9, 2017 at 6:27 AM, Muhammad Faiz wrote: >> >> Avoid pthread_cond_broadcast that wakes up all workers. Make each of them >> uses distict mutex/cond. Also let main thread help running jobs. > > > Hm... I'm not against th

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_slice: rewrite implementation

2017-07-09 Thread Ronald S. Bultje
Hi, On Sun, Jul 9, 2017 at 6:27 AM, Muhammad Faiz wrote: > Avoid pthread_cond_broadcast that wakes up all workers. Make each of them > uses distict mutex/cond. Also let main thread help running jobs. Hm... I'm not against this, but I actually had plans to write some extensions and allow the ma

[FFmpeg-devel] [PATCH] avcodec/pthread_slice: rewrite implementation

2017-07-09 Thread Muhammad Faiz
Avoid pthread_cond_broadcast that wakes up all workers. Make each of them uses distict mutex/cond. Also let main thread help running jobs. Similar to 'avfilter/pthread: rewrite implementation' Benchmark on x86_64 with 4 cpus (2 cores x 2 hyperthread) ./ffmpeg -threads $threads -thread_type slice -