[Ffmpeg-devel] Re: [PATCH] Machine endian bytestream functions

matthieu castet castet.matthieu
Sat Apr 14 13:23:42 CEST 2007


Hi,

M?ns Rullg?rd wrote:
>> +    *pdata = 0x01234567;
>> +    return !(*pdata == 0x01234567);
>> +EOF
> 
> This entire check is actually rather pointless.  On many systems that
> do not support unaligned accesses, the OS will by default fix it up in
> a trap handler.  There is no way to detect this, but it will run very
> slowly.  Furthermore, even on x86 aligned accesses are faster than
> unaligned.
> 
Is there arches where unaligned access are faster than aligned one ?

BTW it's nice to have all these configure checks, but they can't be used 
with cross compilation and may be give wrong result if the host and 
target aren't the same machine.

Matthieu




More information about the ffmpeg-devel mailing list