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 Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by tmal - 2007-09-25
Last edited by amiconn - 2008-01-25

FS#7833 - Optimizations to Vorbis codec

I attach a few patches that improve efficiency of the Vorbis codec. I would like them to be tested on various targets. The patches are independent.

codebook.patch includes a faster vorbis_book_decodevv_add function for one common case. It also doesn’t inline decode_packed_block, because inlining such a big function confuses gcc making it fail to allocate registers properly in the loop after the call to decode_packed_block.

mdct_arm.patch contains a part of mdct.c rewritten in ARM assembly. It saves some cycles, mostly by using ldm/stm where possible (gcc is not very good at it). It also does less inlining which makes it more cache friendly and easier to fit in IRAM.

vbpcm.patch tries to put the output of the codec in vb→pcm, which is usually in IRAM, unlike v→pcm.

Closed by  amiconn
2008-01-25 18:53
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

The crash on gigabeat if the code is enabled is fixed now (gigabeat uses no IRAM), but the asm mdct is kept disabled because the C code is slightly faster.

nls commented on 2007-09-26 17:26

Very nice work! :-D

I tested on my h300

vbpcm.patch 300% → 333% realtime

codebook.patch 300% → 312% realtime
(minor nitpick though, there’s an unused variable in vorbis_book_decodevv_add_2ch_even)

both 300% → 341% realtime

Thank you very much.

Using all three patches reduces boost ratio on my e200 from 30-35% to ~15%, for ~96kbps Vorbis files.

Nice, 262.21% to 282.03% on H120 and 203.72% to 232.02% on Ipod Nano, both on a 202kbps file.
I see no reason not to commit this :)

Reopening the task was not really necessary, as the crash fix for gigabeat disabled the assembler optimisations for gigabeat *only*. All other arm targets use the optimised code. I have prepared a patch that enables the assembler code for gigabeat as well, hopefully without crashing. Needs testing, and I don’t own a gigabeat.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing