[FFmpeg-devel] [PATCH v2] avfilter/pthread: rewrite implementation

Marton Balint cus at passwd.hu
Tue Jul 11 12:08:26 EEST 2017


On Tue, 11 Jul 2017, wm4 wrote:

> On Mon, 10 Jul 2017 23:40:10 +0200
> Michael Niedermayer <michael at niedermayer.cc> wrote:
>
>> On Mon, Jul 10, 2017 at 10:53:42AM +0200, wm4 wrote:
>> > On Sat, 8 Jul 2017 01:45:06 +0200
>> > Michael Niedermayer <michael at niedermayer.cc> wrote:
>> > 
>> > > On Fri, Jul 07, 2017 at 09:04:37PM +0700, 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.
>> > > > 
>> > > > Benchmark using afir with threads=5 and 4096 taps fir:
>> > > > channels=1:
>> > > > old:
>> > > >     1849650 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     1525719 decicycles in afir_execute,    1024 runs,      0 skips
>> > > >     1546032 decicycles in afir_execute,   16356 runs,     28 skips
>> > > > new:
>> > > >     1495525 decicycles in afir_execute,       2 runs,      0 skips
>> > > >      968897 decicycles in afir_execute,    1024 runs,      0 skips
>> > > >      941286 decicycles in afir_execute,   16384 runs,      0 skips
>> > > > 
>> > > > channels=2:
>> > > > old:
>> > > >     3135485 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     1967158 decicycles in afir_execute,    1024 runs,      0 skips
>> > > >     1802430 decicycles in afir_execute,   16364 runs,     20 skips
>> > > > new:
>> > > >     1864750 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     1437792 decicycles in afir_execute,    1024 runs,      0 skips
>> > > >     1183963 decicycles in afir_execute,   16382 runs,      2 skips
>> > > > 
>> > > > channels=4:
>> > > > old:
>> > > >     4879925 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     3557950 decicycles in afir_execute,    1022 runs,      2 skips
>> > > >     3206843 decicycles in afir_execute,   16379 runs,      5 skips
>> > > > new:
>> > > >     2962320 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     2450430 decicycles in afir_execute,    1024 runs,      0 skips
>> > > >     2446219 decicycles in afir_execute,   16383 runs,      1 skips
>> > > > 
>> > > > channels=8:
>> > > > old:
>> > > >     6032455 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     4838614 decicycles in afir_execute,    1023 runs,      1 skips
>> > > >     4720760 decicycles in afir_execute,   16369 runs,     15 skips
>> > > > new:
>> > > >     5228150 decicycles in afir_execute,       2 runs,      0 skips
>> > > >     4592129 decicycles in afir_execute,    1023 runs,      1 skips
>> > > >     4469067 decicycles in afir_execute,   16383 runs,      1 skips 
>> > > 
>> > > this causes a strange change:
>> > > 
>> > > ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg  -vcodec libxavs  -vf scale=80x60 -t 1 file3.nut
>> > > 
>> > > results in different files before and after this patch. Neither plays
>> > > i suspect this is not a bug in the patch but something odd elsewhere
>> > > but i dont know 
>> > 
>> 
>> > OK so you're saying there's no bug. 
>> 
>> no, i didnt say that
>> 
>> 
>> > Something changed, 
>> 
>> yes
>> 
>> 
>> > and you're too
>> > lazy to investigate, 
>> 
>> no, i didnt say that either, nor is that true
>> 
>> 
>> > but I guess he has all time in the world.
>> > 
>> > So why should he care? 
>> 
>> You seem to try to imply that i asked Muhammad to look into this
>> or take care of or fix the issue.
>> 
>> please read my reply again its just 3 lines, i have not asked
>> Muhammad to do anything. Nor was it intended to imply that.
>> It is just a report of some odd findings which were triggered by
>> the patch but which quite possibly are unrelated to the patch excpt
>> by coincidence.
>
> So he can just ignore your mail? What was your mail supposed to
> achieve? You basically wrote that something happened and that it
> probably doesn't have to do with the patch. Why didn't you investigate
> whether it did before writing that? Why post something completely
> unrelated? It's not helpful.

I really don't see what is your problem. It is completely understandable 
if somebody does not track down every strange behaviour, we all have 
limted time. Reporting it still might be useful if the issue may be 
related to the patch, because investigating it might help improve the 
patch or find corner cases otherwise not easy to find.

Regards,
Marton


More information about the ffmpeg-devel mailing list