From 7b244231809ab8c4495b1384819f793d670d136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Mon, 21 Dec 2009 19:52:01 +0000 Subject: Use optimised byteswap function in bitrev for a tiny speedup on coldfire and pp and about 1-2% speedup on gigabeat s (due to the armv6 rev instruction) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24095 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libtremor/codebook.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/codecs/libtremor') diff --git a/apps/codecs/libtremor/codebook.c b/apps/codecs/libtremor/codebook.c index dd0908ba6a..d744f520e5 100644 --- a/apps/codecs/libtremor/codebook.c +++ b/apps/codecs/libtremor/codebook.c @@ -141,8 +141,7 @@ int vorbis_staticbook_unpack(oggpack_buffer *opb,static_codebook *s){ bitreverse is not in the main execution path. */ static inline ogg_uint32_t bitreverse(register ogg_uint32_t x){ - x= ((x>>16)&0x0000ffff) | ((x<<16)&0xffff0000); - x= ((x>> 8)&0x00ff00ff) | ((x<< 8)&0xff00ff00); + x= swap32(x); x= ((x>> 4)&0x0f0f0f0f) | ((x<< 4)&0xf0f0f0f0); x= ((x>> 2)&0x33333333) | ((x<< 2)&0xcccccccc); return((x>> 1)&0x55555555) | ((x<< 1)&0xaaaaaaaa); -- cgit v1.2.3