Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Codecs
  • Assigned To No-one
  • Operating System Iriver H100 series
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by ahellmann - 2006-04-23

FS#5219 - Performance optimizations for libmad mp3 decoder (mainly iH1xxx) Part.II

The 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

Closed by  preglow
2006-04-27 19:52
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Great work, as usual!

Bugfixes for huffdecode.patch:
* use correct min number of bits in huffdecode (use logical instead of experimental values :-) * remove the empty swap() macro with betoh32()

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing