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

Mauricio Alvarez alvarez
Tue Apr 27 13:23:17 CEST 2010

Hi All,

We have implemented the so called 2d-wave parallel H.264 decoder (1).
This parallelization approach exploits spatial (intra-frame)
macroblock-level parallelism. It runs on a parallel machine with a
shared memory architecture and is based on pthreads. It has been
tested on parallel platforms based on the PowerPC, X86 (32 and 64
bits) and Itanium processors.

It is based on a rather old ffmpeg code and the code is not ready for
being included in main ffmpeg. But it works, and depending on the
input resolution and the speed of CABAC decoding you can obtain
important speedups (see (2)).

Take it a probe case of intra-frame macroblock level parallelization.

The main limitation of this implementation is the performance of CABAC
decoding. A possible solution is to start the CABAC decoding of the
next frame while a set of processors are decoding (predicting, IDCT,
filtering) the macroblocks of the current frame. Or, another option is
to have some kind of acceleration for the CABAC decoder.

The code and some basic documentation are available at:

Your comments are welcome,


Mauricio Alvarez


(1) E. B. van der Tol, E. G. T. Jaspers, and R. H. Gelderblom, Mapping
of H.264 Decoding on a Multiprocessor Architecture, in Proceedings of
SPIE, 2003.

(2) M. Alvarez, A. Ramirez, A. Azevedo, C.H. Meenderinck, B.H.H.
Juurlink, M. Valero. Scalability of Macroblock-level parallelism for
H.264 decoding. International Conference on Parallel and Distributed
Systems 2009,

More information about the ffmpeg-devel mailing list