Commit graph

1028 commits

Author SHA1 Message Date
Nils Wallménius
135d983433 This should fix FS#10917, and also fix channel swapping i introduced in r23784. Lets hope the third time's the charm
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24271 a1c6a512-1295-4272-9138-f99709370657
2010-01-18 04:32:47 +00:00
Nils Wallménius
cf39c86d3d This should fix FS#10917, unfortunately i have no target evailable to test on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24270 a1c6a512-1295-4272-9138-f99709370657
2010-01-18 03:08:17 +00:00
Nils Wallménius
f9b05db006 Fix typo causing l+r mono encoding to use only one channel
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24269 a1c6a512-1295-4272-9138-f99709370657
2010-01-18 03:00:59 +00:00
Andrew Mahone
5313bf52b5 Invert divisor earlier in udiv32_arm, allowing the div0 test to be done before entering the 32-bit divide portion of the code, and making the handling of div0 simpler.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24166 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 15:57:03 +00:00
Bertrik Sikken
6fef14bd16 Set svn:keywords property on .c and .h files that didn't already have it. Correct svn:executable property on some files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24165 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 14:28:09 +00:00
Andree Buschmann
5cebdcd06b More tabs removed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24157 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 11:12:31 +00:00
Andrew Mahone
686c4e53ce Use long jump to reach __div0 from udiv32_arm if building with IRAM and without EABI.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24152 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 04:48:19 +00:00
Andrew Mahone
c1f4d4037a More comments for udiv32_armv4.S, reduce zero divisor test to one cycle for the skipped branch by setting flags when inverting divisor, 32-bit numerators are handled by calling the 31-bit divider and fixing the results.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24151 a1c6a512-1295-4272-9138-f99709370657
2010-01-03 04:30:13 +00:00
Michael Giacomelli
ce8640d7b8 Second part of FS#10832 by Juliusz Chroboczek. Ignore empty mdat chunks in mp4 files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24148 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 21:02:13 +00:00
Michael Giacomelli
008c368c87 Commit first part of FS#10832 by Juliusz Chroboczek. Allows playback of unstreamable AAC/ALAC files by stepping through the file to find the index, potientially rebuffering. This is likely to impose a battery life hit on files which are unstreamable and not much smaller then the buffer, but should not impact streamable files at all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24147 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 20:54:55 +00:00
Andrew Mahone
d03768bc14 Add missing EOF newline.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24143 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 15:25:34 +00:00
Andrew Mahone
934514558b Remove special cases from udiv32_armv4.S, except for zero divisor and large numerator. Improvement of 1.23MHz on e200 with ape normal.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24142 a1c6a512-1295-4272-9138-f99709370657
2010-01-02 15:15:21 +00:00
Bertrik Sikken
5c4ef78cc9 Simplify some expressions using the ? operator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24136 a1c6a512-1295-4272-9138-f99709370657
2010-01-01 22:47:25 +00:00
Andrew Mahone
822abc1236 Add 31/31-bit unsigned division in apps/codecs/lib/udiv_arm.S, with 2 cycles / iteration, falling back to previous 32-bit, 3 cycle / iteration code when needed (well under 1% of divisions in sample file). APE normal sample is now 96.90% realtime, approx 1.3% improved vs svn. TODO: unify divisor normalization for both trial subtraction routines, possibly use divisor bits to select 31- vs 32-bit division.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24130 a1c6a512-1295-4272-9138-f99709370657
2009-12-31 08:32:15 +00:00
Jens Arnold
9e45b27e08 Assembler optimised bitreverse for ARM, again a little bit faster and smaller. * Separated 'x' and 'ret' gives gcc a bit more freedom regarding register allocation (except on coldfire where it doesn't matter).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24107 a1c6a512-1295-4272-9138-f99709370657
2009-12-23 23:44:56 +00:00
Nils Wallménius
87ecc7020e Improved bitrev with approach suggested by Jens Arnold, gives 0.5%-1% speedup for tremor decoding on sansa c200 (PP) and a tiny speedup on coldfire as well
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24102 a1c6a512-1295-4272-9138-f99709370657
2009-12-23 18:05:11 +00:00
Nils Wallménius
7b24423180 Use optimised byteswap function in bitrev for a tiny speedup on coldfire and pp and about 1-2% speedup on gigabeat s (due to the armv6 rev instruction)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24095 a1c6a512-1295-4272-9138-f99709370657
2009-12-21 19:52:01 +00:00
Michael Giacomelli
d6ae8edc13 Commit both patches in FS#10833 - Protect against division by zero in AAC (mp4) codec by Juliusz Chroboczek. Adds some return value checking so that faad errors don't crash rockbox when decoding broken or unsupported files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23983 a1c6a512-1295-4272-9138-f99709370657
2009-12-14 01:09:01 +00:00
Nils Wallménius
b2a27b4280 Improved bitrev12, using a larger LUT to save one lookup, speeds up vorbis about 2% on beast, about 0.5% on h300
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23973 a1c6a512-1295-4272-9138-f99709370657
2009-12-13 15:00:20 +00:00
Andrew Mahone
5783bef32c Fix red, DESCALE_SHIFT macro was missing a right-parenthesis.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23968 a1c6a512-1295-4272-9138-f99709370657
2009-12-13 04:06:45 +00:00
Andrew Mahone
af5bad46d8 Libfaad pow2/log2 improvements:
Correct pow2_* to calculate correct output for input < 0.0 or between 0.0 and 1.0 instead of returning 0. This will change output, but the float version of this codec uses pow(2.0,x) in place of these functions, so this behavior was probably a bug
Replace 64-bit multiply in pow2_* with left or right shift by whole part of input, rounding if shifting right. An ARM-specific optimized version is provided as a C inline function, other targets use a C macro.
Increase constant size of table for pow2 to improve accuracy, also avoid early truncation in linear interpolation of result.
Move constant tables for pow2 and log2 to iram.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23967 a1c6a512-1295-4272-9138-f99709370657
2009-12-13 03:45:40 +00:00
Nils Wallménius
de159ceb3d Comment var only used by already commented out debug code, delete #if 0'ed block move a comment and fix some broken indentation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23945 a1c6a512-1295-4272-9138-f99709370657
2009-12-12 16:37:44 +00:00
Nils Wallménius
c0dc3c7a74 Remove inline asm that hasn't been useful for years, no speed difference
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23928 a1c6a512-1295-4272-9138-f99709370657
2009-12-10 21:43:59 +00:00
Andrew Mahone
bafe14db55 Remove some sample functions from codeclib - these were for verifying the generated asm for bs_generic and never intended for use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23911 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 17:13:06 +00:00
Andrew Mahone
85aad9b397 Extend av_log2 in codeclib into a generic for scanning for set bits, which can provide either log2 or leading-zero-count output, and can force mapping 0 input to 0 output if needed (otherwise 0 input produces undefined result). Replace av_log2 in lib/codeclib.h, floor_log2 and wl_min_lzc in libfaad/common.c and common.h, and count_leading_zeros in libalac/alac.c with macros using bs_generic.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23903 a1c6a512-1295-4272-9138-f99709370657
2009-12-09 02:24:45 +00:00
Andrew Mahone
50512cdeac Fix red: av_log2 undefined for ARM_ARCH <= 4, missing codeclib.h includes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23869 a1c6a512-1295-4272-9138-f99709370657
2009-12-06 04:43:23 +00:00
Nils Wallménius
cd22b32450 slightly faster asm av_log2 for armv6 (currently only Gigabeat S)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23868 a1c6a512-1295-4272-9138-f99709370657
2009-12-06 02:03:03 +00:00
Andrew Mahone
491e0978ec Fix yellow: mixed signed/unsigned in conditional.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23867 a1c6a512-1295-4272-9138-f99709370657
2009-12-05 21:53:49 +00:00
Andrew Mahone
2aeb6c781d Slightly improve av_log2 in codeclib on ARMv6.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23866 a1c6a512-1295-4272-9138-f99709370657
2009-12-05 21:32:23 +00:00
Nils Wallménius
b9d7f98f8c Move av_log2 function and asociated table to the codec lib, remove 3 identical implementations, always have LUT in iram (gives a *tiny* speedup on coldfire), make the clz based function return the same value as the non clz based function for 0 input to be safe (slows down flac ~2% on the gigabeat S)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23858 a1c6a512-1295-4272-9138-f99709370657
2009-12-05 16:47:43 +00:00
Nils Wallménius
5750daa2ac Oops, correct typo that made the previous commit useless
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23794 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 21:41:58 +00:00
Nils Wallménius
3cc0796a37 Disable strict aliasing for speex for now to get rid of warnings, some very nasty casting in here
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23793 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 21:37:57 +00:00
Nils Wallménius
d502086e7f Fix yellow by making the ifdef hell slightly worse
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23790 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 21:22:23 +00:00
Nils Wallménius
13f08d70fd Enable strict aliasing optimizations for codecs on gcc versions >= 4.0, fix alising violations that this uncovered, gives small speedups for most codecs, FS#10801
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23784 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 18:11:49 +00:00
Nils Wallménius
685ca2672e Use clz instruction to calculate integer logarithms, speeds up decoding of one flac 8 sample by 12%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23783 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 15:21:00 +00:00
Nils Wallménius
07fe3562a1 #if 0 out unused stuff
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23782 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 14:29:18 +00:00
Nils Wallménius
727984b4ff Use clz instruction to count leading zeroes on armv5+, gives about 2% speedup with one sample on the Gigabeat S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23781 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 10:57:21 +00:00
Nils Wallménius
3c1cffae70 These macros have been replaced by (UN)LIKELY macros and were not used anywhere.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23780 a1c6a512-1295-4272-9138-f99709370657
2009-11-29 09:44:15 +00:00
Magnus Holmgren
6b6463c8b7 Add support for the MP4 file type 'isom'. Based on FS#10790 with an additional fix, making the sample file play. Also updated some debug prints.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23708 a1c6a512-1295-4272-9138-f99709370657
2009-11-22 16:37:36 +00:00
Andrew Mahone
36deb0a315 Fix warning on new gcc for checking value or truth of undefined _WIN32 and MIPS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23670 a1c6a512-1295-4272-9138-f99709370657
2009-11-20 02:51:10 +00:00
Nils Wallménius
ad9f554eb2 Avoid possible memory corruption
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23666 a1c6a512-1295-4272-9138-f99709370657
2009-11-19 17:12:58 +00:00
Mohamed Tarek
a67deef2b6 Set svn:keywords property.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23660 a1c6a512-1295-4272-9138-f99709370657
2009-11-18 01:00:43 +00:00
Mohamed Tarek
9669bbc135 Handle mid-track resumes in RM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23659 a1c6a512-1295-4272-9138-f99709370657
2009-11-18 00:41:46 +00:00
Michael Sparmann
099df2fb71 Make the codecs use more IRAM on S5L870x, as we have plenty of it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23594 a1c6a512-1295-4272-9138-f99709370657
2009-11-09 20:01:07 +00:00
Michael Giacomelli
b92e778fd7 Reenable -O2 for Wavpack, which appears to have been lost during makefile clean up. Improves wavpack decoding performance by several MHz on ARM and Coldfire.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23566 a1c6a512-1295-4272-9138-f99709370657
2009-11-08 07:04:14 +00:00
Dave Chapman
9546e4093d Add STATICIRAM_NOT_MDCT as a workaround for the gcc bug where static functions are not long called. This is currently only an issue on the Nano2G (S5L8701 CPU) which is the only ARM target with enough IRAM for these functions. Also add multiple-inclusion protection for config-tremor.h. All plugins and codecs now compile cleanly for the Nano2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22914 a1c6a512-1295-4272-9138-f99709370657
2009-10-04 08:49:23 +00:00
Mohamed Tarek
f0c6c88f6d Smarter check for failed packet parsing in RM. Also fixes a bug in playback where sometimes "codec failure" is splashed at the end of playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22880 a1c6a512-1295-4272-9138-f99709370657
2009-10-03 00:18:42 +00:00
Michael Giacomelli
e4fb3dc14c Commit unrolled version of WMA's exponent decode taken from latest ffmpeg. Gives a 1% speedup @ 192kbps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22871 a1c6a512-1295-4272-9138-f99709370657
2009-10-02 00:47:15 +00:00
Jens Arnold
5f3fbd1bb9 Actually qualify the tables put into .irodata in r22849 as 'const'. Also mark fftorder[] as 'const'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22860 a1c6a512-1295-4272-9138-f99709370657
2009-09-30 19:36:06 +00:00
Tomer Shalev
a0eadade30 FS#10122 - Fix wrong format type of logf functions in speex.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22857 a1c6a512-1295-4272-9138-f99709370657
2009-09-30 12:56:33 +00:00