[Ffmpeg-devel] [PATCH]: Too much alignment assumed by H264 decoder
Mon Jan 2 10:04:45 CET 2006
Mike Melanson wrote:
> David S. Miller wrote:
>> I did the fix, some folks just don't like it. To be honest, I don't
>> think it decreases performance all as much as is being implied.
>> The fact is that the object is 4-byte, not 8-byte aligned, on 32-bit
>> platforms. So you can't legally do 8-byte memory accesses to them
>> in such cases.
>> With the way the code is now, it crashes on 32-bit platforms other
>> than x86 and x86_64 (which do not trap on unaligned memory accesses).
>> And because the x86 and x86_64 don't trap, but instead just eat a
>> couple extra cycles to perform the unaligned memory accesses, this
>> makes me believe that the "performance penalty" of my patch is
>> possibly a myth not fact.
> Do you have any numbers to back this up? Per my understanding,
> unaligned accessed for MMX instructions is possible but slightly slower.
> IIRC, unaligned access on SSE2 instructions is not possible.
It is possible, but you have to use the MOVDQU (move double quad
unaligned) instruction instead of MOVDQA (...aligned).
Inst. f. Neuro- and Bioinformatics
Ratzeburger Allee 160, D-23538 Luebeck
Phone: +49 451 500 5814
Fax: +49 451 500 5502
boehme at inb.uni-luebeck.de
More information about the ffmpeg-devel