- Status Closed
- Percent Complete
- 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
- Bertrik Sikken (2007-10-21)
- Private
Opened by Tomasz Malesinski - 2007-09-25
Last edited by Jens Arnold - 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.
2008-01-25 18:53
Reason for closing: Accepted
Additional comments about closing:
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.
Very nice work!
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.