Rockbox

Tasklist

FS#11079 - musepack sv8 support

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Friday, 05 March 2010, 20:18 GMT
Last edited by Andree Buschmann (Buschel) - Sunday, 07 March 2010, 20:30 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To Andree Buschmann (Buschel)
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch exchanges the current svn musepack decoder against the current official decoder from musepack.net (r458). With this patch musepack sv8 is supported in addition to svn's sv7 -- including playback and seek. For better performance r458 was merged against rockbox svn to use the already highly optimized filterbanks.

Remarks:
1) Building with this patch will throw several warnings. I am working on this.
2) Tested on pcsim and arm. Results on coldfire are still needed, appreciated and helpful.
3) Decoding is still slower than svn for now (arm svn ~22MHz, arm patched ~27MHz).
4) The metadata check does still use dummy results for sv8 streams.

sv7 and sv8 streams for testing can be found at http://samples.mplayerhq.hu/A-codecs/musepack/
This task depends upon

Closed by  Andree Buschmann (Buschel)
Sunday, 07 March 2010, 20:30 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed with r25057.
Comment by Andree Buschmann (Buschel) - Saturday, 06 March 2010, 00:18 GMT
Next patch version:
- removed tabs
- removed compile warnings (3 warnings were inserted as reminder)
- put some more stuff to iram

Speed on iPod Video is decent now: 22.6 MHz.
Speed on other targets will need some more work as a major data structure could not been moved to iram yet.
Comment by Andree Buschmann (Buschel) - Saturday, 06 March 2010, 13:31 GMT
Final (?) patch version:
- reformated lots of tables
- moved some more tables to iram
- rearranged decoder's data structure to fit it into iram on most targets
- adapted handling of first frame (cutting first samples) to non-interleaved sample format
- fully implemented metadata for mpc sv8
Comment by Andree Buschmann (Buschel) - Saturday, 06 March 2010, 18:55 GMT
Important change in sv8 calculation of replay gain.
Comment by Andree Buschmann (Buschel) - Saturday, 06 March 2010, 22:32 GMT
Works on pcsim, arm (iPod 5G) and coldfire (H140, tested by AlexP on irc).
Still slower as svn for coldfire (svn: ~25 MHz, patch: ~32 MHz).
Comment by Andree Buschmann (Buschel) - Sunday, 07 March 2010, 13:57 GMT
Rearranged demux data structure to be able to move parts of it to IRAM. This speeds up the decoding on coldfire.

Speed on arm (iPod 5.5G) is 22.5 MHz (svn: 22.2 MHz).
Speed on coldfire (h130) is 29.7 MHz (svn: 25.3 MHz).

Measurements by AlexP on irc showed clearly that the main difference in speed on coldfire is located in the bitstream demuxing only (new decoder is about 4 MHz slower in this area). A major change of the new decoder is that it does uses a byte bitstream buffer instead of dword bitstream buffer.
Comment by Andree Buschmann (Buschel) - Sunday, 07 March 2010, 17:50 GMT
Theory about Coldfire issues with the demux code was correct. I wrote a wrapping function to optimize the performance on Coldfire (see mpc_bits_reader.h), other targets are untouched.

Speed on Coldfire (h130) is 26.3 MHz now (svn: 25.3 MHz).
Comment by Andree Buschmann (Buschel) - Sunday, 07 March 2010, 19:08 GMT
Cosmetic changes in comments (do not use 'AB', but 'rockbox').

Loading...