This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11445 - Speed-up of faad decoder
Attached to Project:
Rockbox
Opened by Andree Buschmann (Buschel) - Monday, 28 June 2010, 23:04 GMT+2
Last edited by Andree Buschmann (Buschel) - Thursday, 01 July 2010, 23:46 GMT+2
Opened by Andree Buschmann (Buschel) - Monday, 28 June 2010, 23:04 GMT+2
Last edited by Andree Buschmann (Buschel) - Thursday, 01 July 2010, 23:46 GMT+2
|
DetailsThis patch speeds up the faad decoder. Tested on PP5022 (iPod Video), needs testing on CF targets (MCF5250 and other CF CPU).
Changes: 1) bits.c: move buffer to iram. 2) bits.c: check requested buffer_size to avoid memory overwriting 3) iq_table.h: use large buffer to have full table lookup 4) iq_table.h: move array to iram 5) common.h: introduce CPU dependent iram configuration Measurements on iPod Video (nero_192.m4a): svn = 36.12 MHz patched = 35.49 MHz |
This task depends upon
Closed by Andree Buschmann (Buschel)
Thursday, 01 July 2010, 23:46 GMT+2
Reason for closing: Accepted
Additional comments about closing: Submitted with r27225 and r27226.
Thursday, 01 July 2010, 23:46 GMT+2
Reason for closing: Accepted
Additional comments about closing: Submitted with r27225 and r27226.
svn = 60.22 MHz (206.21% realtime)
patched = 59.31 MHz (209.37% realtime)
~1.5% speedup
Changes:
1) bits.c: move buffer to iram.
2) bits.c: check requested buffer_size to avoid memory overwriting
3) iq_table.h: use large buffer to have full table lookup
4) common.h: introduce CPU dependent iram configuation
5) aac.c: define 2 global arrays in iram that are linked to the decder-struct -> speed up in the mdct synthesis.
Measurements on iPod Video (nero_192.m4a):
svn = 36.12 MHz
patched = 34.23 MHz
svn (r27168): 60.29MHz (205.96% realtime)
with patch v2: 58.24MHz (213.20% realtime)
- full decode: 34.23 MHz
- ifilter_bank() for 2 channels: 14.95 MHz
- ms_decode(): 1.15 MHz
- quant_to_spec() for 2 channels: 4.87 MHz
- tns/is/pns need ~0.26 MHz in total
- 13 MHz seem to be needed by bitstream decoding. <-- seems to be quite a lot...
The v03-patch does additionally use IRAM for several huffman tables. Speed on PP5022 is 34.05 MHz.
- refactor some huffman code
- put some more arrays (mostly huffman tables) to IRAM
- inlining the huffman functions called the most
- inlining some bit.c helper functions
Speed on PP5022 is 32.51 MHz (svn 36.12 MHz).
Speed on MCF5249 is 55.00 MHz (svn 60.29 MHz).
SVN see earlier comment.
SVN: 162.45% realtime (49.24 MHz)
Patch v8: 177.23% realtime (45.13 MHz)
Moved as much huffman code tables as possible to IRAM on targets with standard IRAM. This should speed up decoding on MCF5249.
Edit: Updated to v11, because IRAM was full on PP5002.