[Ffmpeg-devel] [REQUEST] MMX/MMX2 and SSE optimizations for H.264 decoding

Martin Boehme boehme
Thu Sep 15 14:59:37 CEST 2005

Gamester17 wrote:
> Yes there already are some MMX integer optimization for H264 but what 
> about SSE (Streaming SIMD Extensions) optimizations?, isn't SSE suppose 
> to be much more powerfull than MMX (and in fact be the thing that 
> replaces MMX)?

Well, for a start, SSE has registers that are 128 bits wide, while MMX's 
registers are 64 bits. As long as you're operating only on the registers 
(i.e. you're CPU-bound, not memory bandwidth limited) that's an instant 
factor of 2 speedup.

> To me (as a none-programmer)it looks like the only video codec in FFmpeg 
> that have any SSE optimization is the VP3 decoder (and those are in the 
> newer SSE2 format so can't be used by 'older' processors as I believe 
> that Intel Pentium 4 is the first processor which supports SSE2?)?

For many codecs, MMX optimization is enough to make them memory 
bandwidth limited. Hence, no need to spend extra optimization effort on 
SSE routines that wouldn't make a difference anyway.

Problem with the SSE/SSE2 thing is that SSE2 supports a whole lot more 
data formats than SSE does. SSE only supports packed single-precision 
floating point (which isn't very useful for most multimedia code). 
Support for packed bytes/words/doublewords (which I'm guessing is what 
the VP3 decoder uses) was only added with SSE2. These data types are 
just not supported by SSE, so there's no way of converting that SSE2 
code to run on SSE.


Martin B?hme
Inst. f. Neuro- and Bioinformatics
Ratzeburger Allee 160, D-23538 Luebeck
Phone: +49 451 500 5514
Fax:   +49 451 500 5502
boehme at inb.uni-luebeck.de

More information about the ffmpeg-devel mailing list