summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-12-21 19:52:01 +0000
committerNils Wallménius <nils@rockbox.org>2009-12-21 19:52:01 +0000
commit7b244231809ab8c4495b1384819f793d670d136b (patch)
treed2cd8fb5c89b8e54555709ff9a438497eb15a6b1
parent4ed7b0b8a0397357cf509d26681658d07d67ef25 (diff)
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
-rw-r--r--apps/codecs/libtremor/codebook.c3
1 files changed, 1 insertions, 2 deletions
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);