Commit graph

55 commits

Author SHA1 Message Date
Jens Arnold
ee39863459 Speed up WMA decoding on coldfire (14% speedup with a 128kbps test file).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18228 a1c6a512-1295-4272-9138-f99709370657
2008-08-09 22:32:34 +00:00
Michael Giacomelli
1334738071 Use Tremor IMDCT for WMA. Gives a ~20% speedup on ARM and coldfire. All my test samples gave equivilent or better accuracy (>>16 bit), but there may still be problems. Code becomes somewhat less readable since the IMDCT has bits of Vorbis in it, but this is not a serious issue and the old ffmpeg transform remains in SVN if anyone wants it. Also, WMA now passes Vorbis as the fastest transform codec on ARM, although MPC remains the fastest lossy codec overall.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18084 a1c6a512-1295-4272-9138-f99709370657
2008-07-17 17:43:49 +00:00
Michael Giacomelli
95fb20b7a8 Fix warning due to typo on my part.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17948 a1c6a512-1295-4272-9138-f99709370657
2008-07-05 22:55:09 +00:00
Michael Giacomelli
2a75a9045c More WMAv1 fixes by Rafael Carre.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17943 a1c6a512-1295-4272-9138-f99709370657
2008-07-05 00:44:01 +00:00
Michael Giacomelli
a06f651c3e Put the WMA windowing and output buffer into IRAM on targets with > 96KB of it. Improves 192k WMA decoding speed by about 2MHz on PP5024, and maybe saves some more when applying DSP.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17853 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:56:19 +00:00
Michael Giacomelli
dab9fa1ef7 Fix for WMAv1 decoding suggested by Rafael Carre. I don't think anyone out there will ever use V1, but its worth having correct code for its own sake.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17782 a1c6a512-1295-4272-9138-f99709370657
2008-06-24 15:17:14 +00:00
Michael Giacomelli
e7999873f5 Fix mistake in previous WMA commit. Also update comments to reflect changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17202 a1c6a512-1295-4272-9138-f99709370657
2008-04-21 00:46:55 +00:00
Michael Giacomelli
82dc8175cf Make the WMA decoder less noisy in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17014 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 02:32:48 +00:00
Michael Giacomelli
231f0c208d Let the console know when the huffman tables have overflown. This should never happen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17012 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 02:11:14 +00:00
Michael Giacomelli
4a808073c7 Amazingly, I've only been initing about 1/2 the huffman table entries needed to actually decode a WMA file for the last 8 months and yet somehow never noticed. Fixes FS#8713, FS#8606 and probably a lot of other files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17011 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 02:01:44 +00:00
Michael Giacomelli
03f1b98531 Fix misleading debug statement.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16838 a1c6a512-1295-4272-9138-f99709370657
2008-03-27 01:40:16 +00:00
Michael Giacomelli
5730da2ba8 Apply last fall's exponent fix to WMA v1 files as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16114 a1c6a512-1295-4272-9138-f99709370657
2008-01-19 23:00:50 +00:00
Michael Giacomelli
dadd80a8a6 If seek fails, don't insert nonsense for the current position. Also, make one of the error messages a bit more clear.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16002 a1c6a512-1295-4272-9138-f99709370657
2008-01-06 02:50:01 +00:00
Thom Johansen
9a1a2fd686 Oversight in syncing on my end, sorry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15184 a1c6a512-1295-4272-9138-f99709370657
2007-10-18 10:14:31 +00:00
Thom Johansen
6e4aa260d0 Add Coldfire and ARM assembler for "reverse multiply and copy" function too. Gives big speedup on Coldfire, small on ARM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15183 a1c6a512-1295-4272-9138-f99709370657
2007-10-18 10:09:21 +00:00
Thom Johansen
fffc257897 Woops, movem.l needs other order.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15178 a1c6a512-1295-4272-9138-f99709370657
2007-10-18 00:48:00 +00:00
Thom Johansen
00662a235c Add Coldfire assembler for window and add function, yielding a nice speedup. Tweak ARM assembler version of same routine to act the same as the Coldfire version. Remove an error condition that newer ffmpegs do not bail out on. Files requiring this new behaviour have been observed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15177 a1c6a512-1295-4272-9138-f99709370657
2007-10-18 00:28:10 +00:00
Marcoen Hirschberg
b8753ffdaa move structures around in the header files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14941 a1c6a512-1295-4272-9138-f99709370657
2007-10-01 13:46:07 +00:00
Marcoen Hirschberg
b2abd67671 remove unused struct member and variable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14777 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 12:32:39 +00:00
Marcoen Hirschberg
1ddef375df move (i)MDCT and FFT code to separate files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14776 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 12:27:24 +00:00
Marcoen Hirschberg
cd5edbe52c small cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14772 a1c6a512-1295-4272-9138-f99709370657
2007-09-20 10:50:59 +00:00
Jens Arnold
20444c47a8 Fix warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14577 a1c6a512-1295-4272-9138-f99709370657
2007-09-02 11:06:29 +00:00
Michael Giacomelli
a514c60fd0 Apparently, negative exponents are possible when decoding exponential VLC. Should fix occasional glitches that happened in files of all bitrates.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14571 a1c6a512-1295-4272-9138-f99709370657
2007-09-02 03:28:49 +00:00
Michael Giacomelli
153d74443a Clean up iMDCT coefficient calculations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14451 a1c6a512-1295-4272-9138-f99709370657
2007-08-24 20:02:50 +00:00
Michael Giacomelli
8159b9ee9a Faster Q1.31 multiply for ARM. Add some ARM asm windowing code. Simply replacing c code with loop unrolled + load/store multiple instructions makes a surprising difference on PP. Also, add comments to the windowing code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14365 a1c6a512-1295-4272-9138-f99709370657
2007-08-16 03:33:15 +00:00
Marcoen Hirschberg
c43629f08b use the full resolution we get from the WMA decoder and let the DSP code do the rest
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14224 a1c6a512-1295-4272-9138-f99709370657
2007-08-06 23:34:28 +00:00
Michael Giacomelli
98f0d77879 Clean up VLC functions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14206 a1c6a512-1295-4272-9138-f99709370657
2007-08-06 01:43:09 +00:00
Dave Chapman
2ff816fab6 Cosmetic changes - TAB and whitespace policing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14135 a1c6a512-1295-4272-9138-f99709370657
2007-08-02 07:41:28 +00:00
Michael Giacomelli
206e883e78 Initial attept at supporting Line Spectral Pairs. Various issues remain, and the ffmpeg decoder itself often fails on certain valid LSP files. Expect some issues.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14134 a1c6a512-1295-4272-9138-f99709370657
2007-08-02 04:47:33 +00:00
Michael Giacomelli
54b80471a5 Fix overflow in noise coding. Greatly improves sound quality of some low bitrate files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13975 a1c6a512-1295-4272-9138-f99709370657
2007-07-25 02:34:21 +00:00
Michael Giacomelli
e9c09d4d0e Fix decoding of misc sample rates that no one ever uses
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13946 a1c6a512-1295-4272-9138-f99709370657
2007-07-21 01:03:58 +00:00
Michael Giacomelli
bc3ada265b Add incomplete support for files using noise coding but not LSP. In practice, this means files >= 20kbps will probably work, and those below will probably not.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13945 a1c6a512-1295-4272-9138-f99709370657
2007-07-20 21:36:54 +00:00
Michael Giacomelli
bab671eb4d Fix nasty bug that causes low bitrate files to crash because of an incorrect assumption about MDCT window sizes on my part. Clears the way for further low bitrate fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13937 a1c6a512-1295-4272-9138-f99709370657
2007-07-20 03:41:09 +00:00
Michael Giacomelli
362f894a53 Sync the bitstream functions with ffmpeg. Switch wmadeci.c over to get_vlc2 which is how ffmpeg now does it and is also slightly faster. Add in defines for later VLC memory usage optization. Kill some header files that weren't needed and update others that were out of sync. We're now much closer to the current ffmpeg codec which should make fixing the remaining issues much easier.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13859 a1c6a512-1295-4272-9138-f99709370657
2007-07-12 03:17:19 +00:00
Dave Chapman
a9df713ee9 TAB and whitespace police
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13858 a1c6a512-1295-4272-9138-f99709370657
2007-07-11 23:07:41 +00:00
Michael Giacomelli
28b0c58726 Don't assume files are WMAv2, instead actually check that they are and quit gracefully if they are not.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13855 a1c6a512-1295-4272-9138-f99709370657
2007-07-11 16:58:11 +00:00
Michael Giacomelli
00b16fab6c Ancient ffmpeg bug fix that should never have been missed. Prevents floating point value from truncating downward. My files are byte for byte identical with this fix, but the ffmpeg mailing list claims its important.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13846 a1c6a512-1295-4272-9138-f99709370657
2007-07-11 01:20:31 +00:00
Dave Chapman
88e32c2fc6 Reorganise the wma_decode_superframe() function - split into a separate init and decode functions. Each call to the decode function now decodes a single frame (2048 samples) instead of an entire superframe (which typically contained about 7 or 8 frames and can in theory contain up to 16 frames). This allows us to replace the 256KB output buffer with a 8KB buffer, and also perform more yields in the main decoding loop.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13833 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 17:24:00 +00:00
Dave Chapman
85aa3a8d38 Code reorganisation - move the vlc functions back to common.c/common.h (where they originally were in the ffmpeg source). This code is still identical to the ffmpeg source.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13830 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 10:53:56 +00:00
Michael Giacomelli
4b1cf3ea44 Compute MDCT in place. Make that place within IRAM. Gives nice speed boost on ARM. Probably make a huge difference on Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13828 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 02:48:32 +00:00
Michael Giacomelli
5a1999eacd Move very commonly accessed array into IRAM. Should give a nice speedup on Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13827 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 01:59:33 +00:00
Michael Giacomelli
899212858c Code clean up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13825 a1c6a512-1295-4272-9138-f99709370657
2007-07-09 00:21:19 +00:00
Michael Giacomelli
9b176d88c8 Inline wma_window functions. No real performance improvement. Also, thanks to Benjamin Larsson for cleaning up some code I was simply to lazy to fix myself.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13823 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 22:03:56 +00:00
Michael Giacomelli
610d3b4cc5 Merge bit reverse tables together.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13822 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 21:52:49 +00:00
Michael Giacomelli
93bc5ef1d6 Fix rare overflow when decoding MDCT coefficients. As a bonus, decoding is now slightly faster. Thanks to preglow for suggesting I test with a full scale normalized square wave.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13815 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 06:06:00 +00:00
Michael Giacomelli
030dce6f88 Fix previous
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13814 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 05:57:14 +00:00
Michael Giacomelli
f5114daa73 Move MDCT reconstruction window code over to new trig function. Improves accuracy significantly and slightly reduces code size. Codec SNR now appears to be limited by truncation to 16 bit. Comparison to MS decoder gives > 91 dB of agreement, and a lower RMS error verses the source wav then MS. Additionally, move one commonly accessed table into IRAM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13813 a1c6a512-1295-4272-9138-f99709370657
2007-07-08 05:16:24 +00:00
Michael Giacomelli
2f1da8d24a Merged in first part of ffmpeg accuracy improvments. No change on my samples, but brings us closer to ffmpeg's source and clears the way for additional bug fixes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13804 a1c6a512-1295-4272-9138-f99709370657
2007-07-06 02:44:58 +00:00
Michael Giacomelli
e0473717e5 Merged in ffmpeg combined MDCT reconstruction. Saves us a 16KB buffer, and gives a nice speed increase. Brings code much closer to ffmpeg's.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13803 a1c6a512-1295-4272-9138-f99709370657
2007-07-06 01:50:24 +00:00
Dave Chapman
ba3f4ed565 Remove some unused code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13788 a1c6a512-1295-4272-9138-f99709370657
2007-07-04 20:27:26 +00:00