[Tremor] optimizing for coldfire
Pedro Vasconcelos
pbv at st-andrews.ac.uk
Wed May 25 03:41:18 PDT 2005
Hi,
I am trying to optimize Tremor for the Rockbox port to the iriver
ihp-120. This device is based on the Coldfire 5249 and the stock
firmware has ogg vorbis support (presumabily using tremor), so it has
enought resources to do it.
The iriver has plenty of ram but no data cache; instead the cpu has 96kb
of fast sram that should be used for critical data.
I don't have access to profiling in the colfire so I'm resorting to
profiling on my development machine as a rought estimation: I guess the
mdct and windowing routines are the critical ones.
The stock tremor decodes at about 25% real-time. I managed to improve
this to about 50% by:
1) doing the 32x32 math in asm using the multiply-and-accumulate unit
2) placing some of the window lookup tables in sram
3) copying the pcm buffer used for mdct_backwards to the sram
Sram data must be statically declared, and a lot of the buffers in
tremor are dynamically allocated; that's why I had to resort to copying
in step 3, which is a bit of hack.
Also, because space is critical in sram, I haven't place lookup data for
windows larger than 2048 or floor0 coeficients. Are these optimal
choices? Anyway, I'd appreciate some hints or guidelines to get this to
run in real-time.
Thanks,
Pedro
--
Pedro Vasconcelos, School of Computer Science, University of St Andrews
-----------------------------------------------------------------------
"The difference between Theory and Practice
is greater in Practice than in Theory."
More information about the Tremor
mailing list