This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5219 - Performance optimizations for libmad mp3 decoder (mainly iH1xxx) Part.II
|
DetailsThe three patches give a cumulative performance increase of ~19% to the swcodec on iHxxx players. At least the huffdecode.patch should affect other swcodec based players too. I measured following boost ratio on my H120:
current: 10% @34MHz => 43.0MHz realtime patches: 3% @34MHz => 36.7MHz realtime This leads to ~15% performance improvement on the whole system. If the cpu speed is the main battery eater, then 1h more play time can be expected from these patches if the "normal" cpu speed is lowered to 34MHz. The optimizations in detail: huffdecode: * simplify bit read functions (and extend to 32bit access) * restructure huffdecode function (less if/else statements) * more effective bit caching * less error checking on inconsistent mp3 input data imdct: * reduce multiple access of identical scalefactors * usage of all four emac accus synth_full * reduce number of variables * extend the asm code to odd / even segments * remove double access of identical scalefactors The output of the modified sw is exactly the same as with current sw for consistent mp3 files. For inconsistent files it may differ slightly. The following table shows a time measurement with current sw and patched sw. The used test file has been encoded with lame -preset extreme option: function: current patched huffdecode 23F 1B7 => 6% of total < huffdecode.patch (algorithmic changes) joint stereo F E aliasreduce 66 65 imdct 296 1D8 => 8% of total < imdct.patch (more asm optimized) dct32 191 185 synth_full 21C 1B2 => 5% of total < synth.patch (more asm optimized) =========================================== sum 8F7 739 => 19% faster swcodec on H1xx/H3xx |
This task depends upon
Closed by Thom Johansen (preglow)
Thursday, 27 April 2006, 21:52 GMT+1
Reason for closing: Accepted
Additional comments about closing: Great work, as usual!
Thursday, 27 April 2006, 21:52 GMT+1
Reason for closing: Accepted
Additional comments about closing: Great work, as usual!
* use correct min number of bits in huffdecode (use logical instead of experimental values :-)
* remove the empty swap() macro with betoh32()