Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Optimized bitswap
From: Magnus Holmgren (lear_at_algonet.se)
Date: 2002-08-18


Hi,

After testing using a small fliptable (i.e. 256 bytes rather than 128
kB), I've found that the following code in mpeg.c:bitswap() actually is
quick enough (at least when executing in internal RAM) on my Player.
Seems to slow down scrolling a bit though. :)

    data[i] = (fliptable[data[i] >> 8] << 8)
        | fliptable[data[i] & 0xff];

The memory accesses seems to be the critical part. (I first tried
swaping a byte at a time, reading/writing each byte to the MP3 buffer,
but that didn't work well.) Perhaps the above should be rewritten in
assembler?

Using a tweaked playlist limit (2000 tracks, as I don't need more), I
now have buffer on 1.84 MB. :)

-- 
Magnus Holmgren



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa