Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Codecs
  • Assigned To No-one
  • Operating System All players
  • 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-09

FS#5078 - erformance improvements in libmad mp3 decoder

This patch improves the performance of the libmad mp3 decoder by roughly 10% (measured on "lame –preset extreme" encoded music) with exactly the same pcm output as before. I could only test the improvements with iriver, but these should be effective also for other swcodec based players.
Warning: The patch has been compiled only for iriver.

The changes in detail:
- move huffman tables to IRAM
- move cs- & ca- tables to IRAM
- improved cache hit decision in 'big values' calculation
- bit structures in rq_table removed

The data extraction part in libmad still takes nearly 25% of the decoder time, so the next patch is in work. :)

   libmad.zip (215.2 KiB)
Closed by  preglow
2006-04-11 23:29
Reason for closing:  Accepted

This looks good, I don't know libmad well enough to apply or not apply it. Did you use profiling to conclude where time is being spent, or another method?

Thanks!

I created a plugin from the existing libmad codec and configured iriver TIMER1 for internal plugin usage.
I did manually measure the following functions, which cover 90% of the madlib runtime (assuming that reading
the timer register does not take reasonable time):
(1) III_huffdecode
(2) III_aliasreduce
(3) III_imdct
(4) III_overlap
(5) mad_synthframe
The result on "lame –preset extreme" encoded file:

improved  current

(0) 0x24A 0x2EC
(1) 0x00E 0x00E
(2) 0x065 0x0E1
(3) 0x276 0x27A
(4) 0x005 0x005
(5) 0x3AD 0x3AF

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing