[Ffmpeg-devel] [RFC] LZO optimization, howto detect builtin memcpy?
Wed Jan 31 01:13:53 CET 2007
On Tue, Jan 30, 2007 at 07:36:46PM +0100, Reimar D?ffinger wrote:
> attached patch provide some LZO decoding speeding if either the compiler
> has a builtin memcpy for fixed-size copies or the architecture can do
> unaligned load/stores.
> Problem is, I don't know how to properly detect either one.
> Any ideas? Or should I just commit attached patch which assumes that a
> memcpy builtin is used? Having a UNALIGNED_LOADSTORE or similar define
> available would be nice for the stuff in intreadwrite.h, too, I guess
> (though there you can at least use the unaligned_16 for gnu compilers,
> that would slow things down in this case if unaligned loads/stores are
> not supported though).
assuming that memcpy(a,b,2 or 4) is inlined is reasonable, so always using
that seems like the obvious solution, alternativly you could
add AV_CP16/32 to intreadwrite.h
add a check to configure which tests if unaligned stored and unaligned loads
and depending on the result make AV_CP* either use unaligned_* or bytewise
btw do you have a file (url on mphq?) which uses lzo for testing ... ?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the ffmpeg-devel