[FFmpeg-devel] Parallel H.264 decoding with FFmpeg

Mauricio Alvarez alvarez
Wed Apr 28 17:41:05 CEST 2010


On Wed, Apr 28, 2010 at 11:22 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> I tested three samples:
> 720p DVB-S recording
> 40Mbps x264 sample (Samsung Oceanic)
> Apple 1080 trailer
>
> The first two samples show a significant slowdown when decoded with -threads 2
> The third sample shows a 10% speed-up with -threads 2.
> As expected, current svn decodes the third sample another 20% faster (with one
> thread).

You should use a number of threads bigger than 2. The multithreaded
implementation is based on a master-worker approach.  The master
thread performs slice initializations and entropy decoding (right now
only CABAC is supported) and the worker threads do macroblock decoding
(prediction, idct, filtering, ...). If you use just two threads there
is not real parallel decoding. With 3 threads, there are 1 master and
two workers. That's the overhead of this paralellization.

I can check your test sequences if you can provide access to them. I
have used some test videos encoded with x264 at different resolutions.
They are available at
http://alvarez.site.ac.upc.edu/hdvideobench/install.html

Best,

Mauricio



More information about the ffmpeg-devel mailing list