From 451e2c077a1fb0ea7bbc77b53329d83da98e3986 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 21 Aug 2005 23:17:25 +0000 Subject: Iriver: somewhat more efficient bitswap for voice files. No assembler this time since this is a temporary solution anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7381 a1c6a512-1295-4272-9138-f99709370657 --- apps/talk.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'apps') diff --git a/apps/talk.c b/apps/talk.c index a1a33bb..3e6bdb9 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -214,15 +214,10 @@ static void load_voicefile(void) for (i = 0; i < length; i++) { - temp = buf[i]; - buf[i] = ((temp >> 7) & 0x01) - | ((temp >> 5) & 0x02) - | ((temp >> 3) & 0x04) - | ((temp >> 1) & 0x08) - | ((temp << 1) & 0x10) - | ((temp << 3) & 0x20) - | ((temp << 5) & 0x40) - | ((temp << 7) & 0x80); + temp = buf[i]; + temp = ((temp >> 4) & 0x0f) | ((temp & 0x0f) << 4); + temp = ((temp >> 2) & 0x33) | ((temp & 0x33) << 2); + buf[i] = ((temp >> 1) & 0x55) | ((temp & 0x55) << 1); } cpu_boost(false); -- cgit v1.1