Nils Wallménius
889b4a8ce8
Two tiny tweaks to some arm asm
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25993 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 09:44:05 +00:00
Nils Wallménius
88bd8e74c4
Some asm for mdct on coldfire, speeds up vorbis decoding by about 0.3MHz
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25984 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 08:03:42 +00:00
Thomas Martitz
50a6ca39ad
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
...
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Rafaël Carré
d2c1765800
Use bx lr unconditionally in setjmp_arm.S
...
Rockbox doesn't support ARMv4 non T CPUs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25083 a1c6a512-1295-4272-9138-f99709370657
2010-03-09 00:22:23 +00:00
Michael Giacomelli
4e797175f1
Remove unused GPL code from ffmpeg mdct library in order to restore it to LGPL.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25035 a1c6a512-1295-4272-9138-f99709370657
2010-03-05 21:37:46 +00:00
Andree Buschmann
398b37124e
Remove all tabs within codec path.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24862 a1c6a512-1295-4272-9138-f99709370657
2010-02-22 19:44:05 +00:00
Andree Buschmann
28bc321dbb
Remove CLIP_TO_15 from codeclib. Remove tabs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24834 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 22:05:48 +00:00
Andree Buschmann
02ab23e92f
Make mdct compilable again for non-ARM targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24822 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 21:39:38 +00:00
Dave Hooper
0b5338a6e9
Eep, didn't mean to commit those other files
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24820 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 21:17:53 +00:00
Dave Hooper
3c52395b57
Get a few more % speedup on ARM (measured on ipod video) - improve imdct full final symmetries using ldm/stm and simple register swapping. Also, add more comments (and improve/update some of the existing ones) regarding the layout of the imdct_half and the imdct_full
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24819 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 21:14:40 +00:00
Dave Hooper
730a618fae
Adding ICODE for imdct (and its constituent ifft bits) gives 0.5MHz boost on arm (ipod video) and about 5MHz boost on coldfire (H120)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24786 a1c6a512-1295-4272-9138-f99709370657
2010-02-20 11:00:16 +00:00
Dave Hooper
3a9852be1c
I don't yet fully understand why this is required, but without it the output is signed-inverted (compared to e.g. the output of oggdec). ac3 confirmed to be ok so the problem must be in the imdct not the ifft. but the algo seems correct (in that seems same as original ffmpeg version)..
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24739 a1c6a512-1295-4272-9138-f99709370657
2010-02-18 00:14:13 +00:00
Dave Hooper
eb943e9495
split_radix_permutation also unused (since now a hardcoded table) - but left intact so we can/could regenerate the table
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24716 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 01:09:45 +00:00
Dave Hooper
7f01b7479a
FIx typo in coldfire asm which caused yellow
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24715 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 01:00:45 +00:00
Dave Hooper
a5ca79edb5
Fix yellow (ff_fft_permute_c an unused function in codeclib)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24713 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 00:56:57 +00:00
Dave Hooper
42774d3128
Merge from branches/mdctexp - faster ifft+imdct in codec lib
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24712 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 00:49:53 +00:00
Andrew Mahone
8ed7bda64c
Move udiv32_arm.S into libdemac, as this divider is specialized for the APE codec and an optimized divider is already provided for general use in codeclib.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24506 a1c6a512-1295-4272-9138-f99709370657
2010-02-04 05:49:37 +00:00
Jens Arnold
b2ffb3e08f
Reduce reciprocal table size a bit on Nano 2nd Gen as well (fix red).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24474 a1c6a512-1295-4272-9138-f99709370657
2010-02-02 23:06:28 +00:00
Jens Arnold
9f6586698a
APE codec: Speed up decoding of -c2000 and higher on ARMv4 and coldfire by fusing vector math for the filters. Speedup is roughly 3.5% for -c2000, 8% for -c3000 and 12% for -c4000. To be extended to other architectures.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24473 a1c6a512-1295-4272-9138-f99709370657
2010-02-02 22:50:21 +00:00
Andrew Mahone
bff5a35c3c
FS#10943, optimized division and clz routines to replace libgcc routines for ARM. Replaces libgcc support functions for unsigned and signed 32-bit division on ARMv4 and up, and leading-zero count on ARMv4.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24432 a1c6a512-1295-4272-9138-f99709370657
2010-02-01 01:36:46 +00:00
Andrew Mahone
436f4d3a20
Improve libdemac SATURATE slightly on ARMv4/5, move filter buffers and code out of IRAM for sizes that aren't near realtime and extend udiv32_arm reciprocal table.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24376 a1c6a512-1295-4272-9138-f99709370657
2010-01-30 02:20:54 +00:00
Andrew Mahone
2347a7dc65
Small fix for ARMv5e/v6 APE divider, correct large-divisor path and remove specialized version of it for small dividend, as the test and branch can't be fit into delay slots on that path.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24360 a1c6a512-1295-4272-9138-f99709370657
2010-01-28 09:04:38 +00:00
Andrew Mahone
a6bd83a315
Fix red: smlal operand ordering in udiv32_arm.S
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24355 a1c6a512-1295-4272-9138-f99709370657
2010-01-28 02:40:33 +00:00
Andrew Mahone
e76f30a57c
Improvements to specialized dividers for APE codec:
...
* Use Newton-Raphson divider on ARMv5e and ARMv6, about 7% speedup on Gigabeat S.
* On ARMv4 targets using IRAM, remove insane filter buffer from IRAM, fill available IRAM with LUT of reciprocals for small divisors - speedup varies according to target and available IRAM, APE normal sample is approx. 109% RT on e200.
* Rename apps/codecs/lib/udiv32_armv4.S to apps/codecs/lib/udiv32_arm.S, which includes dividers for all ARM targets specialized for APE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24354 a1c6a512-1295-4272-9138-f99709370657
2010-01-28 02:28:52 +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
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
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
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
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
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
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
Dave Hooper
d43bcb7dc4
C code is NOT faster on S3C2440 - tested by AlexP on r22529
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22530 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 13:03:40 +00:00
Magnus Holmgren
0dad8d5ae9
Don't know why svn decided to delete tlsf/src... Maybe due to some aborted tests I did to see where it would be best to place TLSF.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22529 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 12:42:47 +00:00
Magnus Holmgren
3fad1523c7
FS#10466: Introduce a real malloc for tremor.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22528 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 12:23:40 +00:00
Dave Hooper
260ed99139
Removed remaining MB usage
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22527 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 12:20:04 +00:00
Dave Hooper
e9dcb0f145
Fix condition code clobbers (and one TAB) for inline arm code in lib and libtremor
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22526 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 12:07:32 +00:00
Dave Hooper
59cdbf5efc
Rerrange some registers in butterfly_generic to combine some 2-word stores into 4-word stores and remove some redundant mov instructions. Shave off some additional instructions (stacking and additions) in butterfly_32 by getting butterfly_8 and butterfly_16 to do the address incrementing for us. Add a few comments.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22525 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 11:50:15 +00:00
Michael Giacomelli
873d266199
Add stdint.h to the codeclib when compiled outside of rockbox so that int32_t is typedef'ed.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22502 a1c6a512-1295-4272-9138-f99709370657
2009-08-24 18:14:56 +00:00
Dominik Riebeling
6e5e625596
Remove svn:executable on source file and set keywords.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22342 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 12:24:50 +00:00
Mohamed Tarek
adf3f09251
Move bitstream.[ch] to codecs/lib/ffmpeg_bitstream.[ch] to avoid duplicate copies across codecs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22337 a1c6a512-1295-4272-9138-f99709370657
2009-08-15 22:06:42 +00:00
Mohamed Tarek
2402aecbb5
remove duplicates of bswap.h from libwma, libcook and libatrac. Create codecs/lib/ffmpeg_bswap.h and use it instead.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22328 a1c6a512-1295-4272-9138-f99709370657
2009-08-15 16:50:52 +00:00