[libav-devel] FFV1 multithreading issue

Peter B. pb at das-werkstatt.com
Sun Nov 3 13:47:17 CET 2013


Hello again,

I've noticed that it seems to be that ffmpeg's ffv1 implementation is
able to use multiple cores while encoding/decoding FFV1 version 1,
whereas libav's current implementation does not:

------------------------
$ time make fate-ffv1.1 SAMPLES=fate-suite THREADS=1
real    0m12.013s
user    0m11.213s
sys    0m0.504s
------------------------
$ time make fate-ffv1.1 SAMPLES=fate-suite THREADS=8
real    0m13.416s
user    0m12.353s
sys    0m0.680s
------------------------

In ffmpeg's implementation, I see parallel usage on my CPU graph, as
well as the speed is faster with THREADS=8:

------------------------
$ time make SAMPLES=fate-suite fate-ffv1.1 THREADS=1
real    0m18.247s
user    0m16.933s
sys    0m0.856s
------------------------
$ time make SAMPLES=fate-suite fate-ffv1.1 THREADS=8
real    0m14.235s
user    0m19.717s
sys    0m1.040s
------------------------

NOTE: ffmpeg's execution time is longer, because it's running 4
additional tests which aren't done in libav's testset.


I remember something about a change by Niedermayer which greatly
improved decoding speeds of FFV1.1. I think it correlated with the
switching to "threadframe" [1]. Maybe...? Don't know the code.


Regards,
Pb

== References:
[1]
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=69cfe63a43f43207f72fd677c47eafcf58fcfd13


More information about the libav-devel mailing list