This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Feature requests · Rockbox frontpage
FS#8750 - add some ARM assembler for dsp-routines
Attached to Project:
Rockbox
Opened by Andree Buschmann (Buschel) - Monday, 17 March 2008, 13:39 GMT+2
Last edited by Nils Wallménius (nls) - Wednesday, 19 March 2008, 18:25 GMT+2
Opened by Andree Buschmann (Buschel) - Monday, 17 March 2008, 13:39 GMT+2
Last edited by Nils Wallménius (nls) - Wednesday, 19 March 2008, 18:25 GMT+2
|
DetailsAdding ARM assembler for the dsp-routines sample_output_mono() and sample_output_stereo(). Saves roughly 0.6MHz during playback of 44.1kHz stereo playback.
|
This task depends upon
- minor change after discussion in IRC (other solution for "bx lr")
- added ARM assembler channels_process_sound_chan_karaoke() -- can be further optimized, but has nearly no influence on CPU-load
- store 2 halfword samples via packing into 1 word
- process 2 samples in each loop -> use of ldm and stm possible
ToDo: Odd sample counts are not handled properly. On odd counts the routines will process an additional (not needed) sample. This should not end up in any bad effects as odd counts will always access a valid buffer address (odd counts are always smaller than SAMPLE_BUF_COUNT/2).
Speed of this patchversion vs. C-code:
- sound processing mono: +76%
- sound processing karaoke: +77%
- playback mono: +83%
- playback stereo: +41%
- within sound processing mono/karaoke the division by 2 is done before adding/subtracting to avoid possible overflow
- added a note regarding the behaviour with odd sample counts (tested and showed no negative effect)
- only perform yield() in dsp.c each tick, not each 128 samples