Nils Wallménius
151424a6fd
codeclib/libtremor: Clean up duplication of inline funcs, constify the ones in codeclib and copy over the slightly faster MULT31_SHIFT15 from tremor for cf.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30578 a1c6a512-1295-4272-9138-f99709370657
2011-09-21 15:38:54 +00:00
Nils Wallménius
3f08357f2b
codeclib: more cf asm for the mdct, saves ~0.7MHz decoding vorbis on h300.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30552 a1c6a512-1295-4272-9138-f99709370657
2011-09-15 08:31:39 +00:00
Nils Wallménius
4f27931a58
codeclib: further tweaks to the cf fft asm for a small speedup.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30541 a1c6a512-1295-4272-9138-f99709370657
2011-09-14 09:34:01 +00:00
Nils Wallménius
85ef10826f
codeclib: tweak coldfire mdct asm a bit more, flip usage of mac/msac instead of explicit negation, changes output slightly but is as close to the c version as before. Gives about 0.4MHz speedup of vorbis on cf.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30516 a1c6a512-1295-4272-9138-f99709370657
2011-09-13 16:53:13 +00:00
Nils Wallménius
f93530c4ba
codeclib: coldfire asm for the TRANSFORM* functions in the fft and a little for the mdct, speeds up codecs using the codeclib mdct 0.5-1.5MHz on h300.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30513 a1c6a512-1295-4272-9138-f99709370657
2011-09-12 11:27:48 +00:00
Andree Buschmann
6a989b8d4d
Submit FS#12258. Do not use '-ffunction-sections' and '-fdata-sections' when compiling. Fixes compiler warnings for mingw and cygwin simulatior builds.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30468 a1c6a512-1295-4272-9138-f99709370657
2011-09-07 19:21:57 +00:00
Nils Wallménius
d5ceb4ce2b
codeclib: make selective inclusion of macros and inline functions from the codeclib_misc.h header easier and clean out some old libtremor stuff.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29985 a1c6a512-1295-4272-9138-f99709370657
2011-06-08 10:35:27 +00:00
Nils Wallménius
965113ed50
FS#12146: Fix libcook bugs introduced in r22055 by Sean Bartell.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29973 a1c6a512-1295-4272-9138-f99709370657
2011-06-05 13:12:51 +00:00
Nils Wallménius
4909e09267
FS#12141 by Sean Bartell
...
Some of these were found with http://www.samba.org/junkcode/#findstatic . Changes of note:
* The old MDCT has been removed.
* Makefile.test files that create test programs for libatrac, libcook, and libffmpegFLAC have been removed, as they don't work. My project will have a replacement that works with all codecs.
* I've tried not to remove anything useful. CLIP_TO_15 was removed from libtremor because there's another copy (also commented) in codeclib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29945 a1c6a512-1295-4272-9138-f99709370657
2011-06-02 14:59:15 +00:00
Nils Wallménius
7c6056b352
FS#12140 by Sean Bartell, Make various codec stuff static.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29942 a1c6a512-1295-4272-9138-f99709370657
2011-06-01 10:28:26 +00:00
Michael Giacomelli
0497adffcf
Commit FS#12130 - Fix ADX decoding on 64-bit systems by Sean Bartell. Fixes an incorrect assumption in the ADX decoder that sizeof(int) == 32 when performing fixed point math. Update comments in the fixed point library to correct this.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29927 a1c6a512-1295-4272-9138-f99709370657
2011-05-26 21:22:29 +00:00
Andree Buschmann
609c526d56
Use more IRAM on S5L870x to speed up wmapro by ~2%.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29906 a1c6a512-1295-4272-9138-f99709370657
2011-05-20 23:28:09 +00:00
Andree Buschmann
78b0f94c76
Proper initialization of static variables in codeclib.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29853 a1c6a512-1295-4272-9138-f99709370657
2011-05-10 18:20:56 +00:00
Andree Buschmann
b452fa061d
Use CACHEALIGN_SIZE in codec_malloc for optimal alignment.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29838 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 19:50:39 +00:00
Andree Buschmann
897fd92827
codeclib: Declare several variables static and remove unused variables.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29831 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 10:34:05 +00:00
Nils Wallménius
4a62bc40c2
Work around another 'set but not used' warning.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29811 a1c6a512-1295-4272-9138-f99709370657
2011-05-01 16:53:20 +00:00
Michael Sevakis
08bedf8305
Having a default weak codec_main symbol doesn't seem to be working out for compiling the sim under cygwin in at least some cases. Just implement it explicitly in all cases.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29789 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 12:52:11 +00:00
Michael Sevakis
c537d5958e
Commit FS#12069 - Playback rework - first stages. Gives as thorough as possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
2011-04-27 03:08:23 +00:00
Michael Sevakis
85e40257dc
Enforce that codecs wait for their metadata in a proper-ish and consistent manner. Sort of a halfway patch; best would be to give them an internal copy of the current track information which lasts unaltered by playback until a track switch or unload.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29348 a1c6a512-1295-4272-9138-f99709370657
2011-02-20 15:27:10 +00:00
Nils Wallménius
479414facc
Fix profiling on coldfire with newer Gcc.
...
In switch_thread, make the call to profile_thread_stopped from an inline asm block to make sure the sp is pointing to the right place before storing the context. This apparently worked by luck with the old Gcc.
The workaround used for coldfire in the codeclib's __cyg_profile_func_enter does not work with newer gcc, however the workaround isn't needed for those so enable it only for coldfire gcc version < 4.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28908 a1c6a512-1295-4272-9138-f99709370657
2010-12-27 09:49:33 +00:00
Nils Wallménius
71ad3679dc
codeclib: inline assembler for fft4 and fft8 on coldfire, small 0.2-0.3MHz speedup with gcc 3.4, larger 0.6-0.8MHz speedup with gcc 4.4/4.5
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28716 a1c6a512-1295-4272-9138-f99709370657
2010-12-01 11:27:30 +00:00
Nils Wallménius
ff9e1861b3
codeclib: there is no need to limit the outputs of the coldfire X(N)PROD_R macros to data registers, no significant speed diff
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28656 a1c6a512-1295-4272-9138-f99709370657
2010-11-24 12:01:08 +00:00
Nils Wallménius
8802c5de9d
codeclib: don't mark the outputs for the coldfire X(N)PROD_R asm macros as earlyclobbers as they are not, lets gcc produce better code. Speedup of 0.2-0.3MHz for codecs using the mdct, (larger speedup when building with gcc 4.4).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28650 a1c6a512-1295-4272-9138-f99709370657
2010-11-23 11:58:00 +00:00
Andree Buschmann
3c83cea151
Remove unused define.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28633 a1c6a512-1295-4272-9138-f99709370657
2010-11-21 18:48:45 +00:00
Dave Hooper
a5b17b4511
Rearrange and remove some manual register assignments, make use of pointer address increments for free on arm, and remove macros in favour of explicit inline fns. also add memory clobbers to all uses of stm in inline asm. appears to resolve issues with codeclib failing to work as expected when using ARM_ASM optimisations on targets with native position independent code (e.g. android rockbox targets, but also tremor on non-rockbox targets that has been patched with the fastermdct patches)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28262 a1c6a512-1295-4272-9138-f99709370657
2010-10-12 23:29:17 +00:00
Nils Wallménius
5b2d7e23a0
ARMv6 supports unaligned memory accesses and they are enabled on our only ARMv6 target so we might as well use them. Speeds up decoding of a flac8 file by 3.5%.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28183 a1c6a512-1295-4272-9138-f99709370657
2010-09-29 13:20:03 +00:00
Thomas Martitz
46454ac2a8
Move setjmp to lib and add setjmp for sh (imported from newlib) and compile it as separate library.
...
It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs
so it doesn't fit into sources.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
2010-08-24 12:38:42 +00:00
Nils Wallménius
1de66faa8e
Make codeclib_misc.h include the asm headers to simplify inclusion magic.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27615 a1c6a512-1295-4272-9138-f99709370657
2010-07-29 12:52:04 +00:00
Nils Wallménius
c45e1254c6
FS#11454 Tuning of codec compiler options
...
Tested with h300 and sansa c200v1
h300 speedups:
a52: 2%
cook: 9-17%
aac: 0.5%
vorbis: 0.5%
wma: 6-12%
c200v1 speedups:
alac: 1.5%
wma 3-4%
wavpack 2%
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27486 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 19:05:53 +00:00
Nils Wallménius
d6446d0b08
Begin shoehorning wma into the clip codec buffer again. Reduce the static buffer used by init_vlc so that it is no larger than is needed. Make the VLCcode struct packed to save space.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27457 a1c6a512-1295-4272-9138-f99709370657
2010-07-17 08:33:36 +00:00
Mohamed Tarek
090768194f
Enable ff_copy_bits in ffmpeg_bitstream.c and put_bits.h and intreadwrite.h to codeclib.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27452 a1c6a512-1295-4272-9138-f99709370657
2010-07-17 07:46:38 +00:00
Nils Wallménius
bb22ac539b
libwma has Huffman tables that are too big for the stack temp buffer. Make temp buffer static.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27446 a1c6a512-1295-4272-9138-f99709370657
2010-07-16 08:49:22 +00:00
Nils Wallménius
a87c61854e
Sync codeclib bitstream code with upstream ffmpeg code. Build ffmpeg_bitstream.c as a part of the codec lib. Use this codeclib implementation in libffmpegFLAC. Implement adapted version of the unaligned longword reading optimization for coldfire from the libwma version of this code. Speeds up cook decoding by 2-3% on h300 and flac by 25% on h300, also speeds up flac decoding by 2% on c200 (decoding speed of cook on c200 is unchanged).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27430 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 16:19:17 +00:00
Rafaël Carré
b3fee10175
Check if ROCKBOX_LITTLE_ENDIAN and ROCKBOX_BIG_ENDIAN are defined, no which value they have
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27419 a1c6a512-1295-4272-9138-f99709370657
2010-07-14 20:19:44 +00:00
Thomas Martitz
57613ea5fa
Rename/change SIMVER to APP_TYPE in the Makefiles.
...
SIMVER was really only used to detect a simulator build. With APP_TYPE you can
now differentiate between simulator, application, checkwps and database builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
2010-07-10 13:49:49 +00:00
Nils Wallménius
99517d6319
Fix inline asm argument. Shouldn't have much impact in practice but might save a load if gcc is clever.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27157 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 15:15:46 +00:00
Thomas Martitz
35e8b1429a
Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
...
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.
Should be no functional change to targets or the simulator.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Nils Wallménius
7afea91560
ARMv6 versions of X(N)PROD31 macros and MULT32 macro. Saves about 1MHz or 3% decoding vorbis on gigabeat S.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26889 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 15:24:23 +00:00
Rafaël Carré
45c7498f59
FS#11335 by me: make ARM assembly functions thumb-friendly
...
We can't pop into pc on ARMv4t when using thumb: the T bit won't be
modified if we are returning to a thumb function
Code running on ARMv4t should use the new ldrpc / ldmpc macros instead
of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc}
No modification on pure ARM builds and ARMv5+
Note: USE_THUMB is currently never defined, no targets can currently be
built with -mthumb, see FS#6734
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 04:41:36 +00:00
Rafaël Carré
0ea7905395
ARM: use BX when branch to an address in register
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26432 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 15:14:26 +00:00
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