Nils Wallménius
b086458e4e
FS#12231
...
Centralize the selection of codec compilation flags to codec.make
to avoid having to duplicate the per cpu selection logic and the
build rule in the individual codec lib make files and make tweaking
easier.
The two special cases, libmad and libspeex were left alone.
I plan to introduce a var for arm generation so that appropriate flags
can be selected per generation as benchmarking results have shown that
different arm arches might have different optimal flags.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30330 a1c6a512-1295-4272-9138-f99709370657
2011-08-18 16:33:41 +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
Andree Buschmann
7b054efa0b
FS#12117: Use more IRAM for atrac3. Speeds up decoding from 1-2% (PP5022, PP5024, S5L870x) to 11% (MCF5250).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29892 a1c6a512-1295-4272-9138-f99709370657
2011-05-16 21:47:13 +00:00
Nils Wallménius
c8535f27d1
Switch coldfire builds over to new toolchain using gcc 4.5.2 and binutils 2.20.1
...
Retune codec compiler optimizations with new compiler. Overall speedup with aac and flac getting big speedups.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29042 a1c6a512-1295-4272-9138-f99709370657
2011-01-12 22:28:43 +00:00
Andree Buschmann
5e6b9f7ed4
Use MEM_ALIGN_ATTR in libatrac3.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28643 a1c6a512-1295-4272-9138-f99709370657
2010-11-22 23:41:57 +00:00
Andree Buschmann
dedffd3f40
Fix bug in libatrac which lead to playback errors and/or distortions with some atrac3 files.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28642 a1c6a512-1295-4272-9138-f99709370657
2010-11-22 23:26:39 +00:00
Andree Buschmann
f99b896017
Remove tabs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28635 a1c6a512-1295-4272-9138-f99709370657
2010-11-21 21:54:46 +00:00
Michael Giacomelli
c38378eff1
Remove some benchmarking code accidentally included in the previous commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28550 a1c6a512-1295-4272-9138-f99709370657
2010-11-10 18:34:27 +00:00
Michael Giacomelli
f51189fa4d
Commit FS#11709 by me. Introduces ARMv5E optimized iQMF for atrac3 based on packed multiply instructions. Additionally, improves scheduling on arm9 and arm11 and forces cache alignment of buffers on all targets. Accuracy is slightly reduced, but still greater then 16 bit. Clip+ CPU clock required for LP2 files decreases by 13MHz and ARM11 by 18MHz. No performance or accuracy changes on armv4 or non-arm.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28549 a1c6a512-1295-4272-9138-f99709370657
2010-11-10 18:29:29 +00:00
Andree Buschmann
de0fcc3500
Introduce macros to ARM asm atrac3 filterbank for better readability.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28546 a1c6a512-1295-4272-9138-f99709370657
2010-11-10 07:16:04 +00:00
Teruaki Kawashima
930a8a5050
set mode argument for open() where O_CREAT flag is/can be set.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28527 a1c6a512-1295-4272-9138-f99709370657
2010-11-07 11:45:20 +00:00
Andree Buschmann
ae37fadb1b
Submit FS#11502. Minor optimization to Coldfire assembler in libatrac's fixmul16(). Thanks to Nils Willménius.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27596 a1c6a512-1295-4272-9138-f99709370657
2010-07-28 18:17:56 +00:00
Nils Wallménius
6087d89603
libatrac: Coldfire asm for atrac3_iqmf_dewindowing, speeds up decoding of my atrac3 rm file by 45%. Based on preliminary patch by Andree Buschmann
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27578 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 17:22:35 +00:00
Nils Wallménius
97b9a4bad8
libatrac: Set the emac mode on coldfire, fixes whitenoise output if playing an atrac file after using a codec that sets macsr to integer mode.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27536 a1c6a512-1295-4272-9138-f99709370657
2010-07-23 23:47:22 +00:00
Andree Buschmann
7c33e1b4fe
Introduce macros for identical multiply-add blocks.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27535 a1c6a512-1295-4272-9138-f99709370657
2010-07-23 22:06:45 +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é
c0bd4173aa
Make sure files which aren't windows-specific use \n line endings only
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26893 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 16:59:51 +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
Andree Buschmann
9ab57e510e
Small changes to asm for better readability.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26375 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 14:56:25 +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
Andree Buschmann
24c0474472
Fix comment on interpolation macro.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25136 a1c6a512-1295-4272-9138-f99709370657
2010-03-12 20:09:55 +00:00
Andree Buschmann
76e8701626
Fix playback of atrac3 joint stereo encoded files. Define the interpolation macro in the right way.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25135 a1c6a512-1295-4272-9138-f99709370657
2010-03-12 20:07:28 +00:00
Dave Hooper
e4217d4845
Reinstate ICONST_ATTR for matrixCoeffs_fix ; remove (silly) gain_tab1 and replace with a simple bitshift in the code
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24788 a1c6a512-1295-4272-9138-f99709370657
2010-02-20 12:55:35 +00:00
Dave Hooper
e90deded40
Remove ICONST_ATTR from some tables, to fit into PP5020 iram (now that mdct is in iram it's a bit of a squeeze). (per Buschel on irc)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24787 a1c6a512-1295-4272-9138-f99709370657
2010-02-20 12:44:52 +00:00
Dave Hooper
6552412027
Fix yellow (bad function declaration)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24714 a1c6a512-1295-4272-9138-f99709370657
2010-02-17 00:58:54 +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
Mohamed Tarek
2c25fa88a5
Add the Rockbox GNU header to some files in libatrac.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24692 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 10:35:22 +00:00
Mohamed Tarek
6e5dcaed29
Fix yellow.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24684 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 02:00:28 +00:00
Mohamed Tarek
2e314093c8
"Detach" ATRAC3 from RM. Since ATRAC3 isn't really specific to RM, it must not be obligatory to initialize the decoder through RMContext.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24682 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 01:47:22 +00:00
Andree Buschmann
800e3d9a97
Major optimization of atrac3 codec for Coldfire targets. Moving several number cruncher arrays to IRAM. Decoder is sped up by +50% on h300, decoder now finally is realtime on Coldfire targets as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24677 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 22:38:01 +00:00
Andree Buschmann
86fc47c33a
Minor atrac3 codec optimization. Refacturate requantization of spectral lines, unroll loops.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24672 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 20:20:52 +00:00
Andree Buschmann
51a8be1a0f
Further optimization of atrac3 codec. Refacturate gainCompensateAndOverlap(), avoid multiplication if not needed, unroll loops. Speeds up codec by 1.1 MHz (+2%) on ARM.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24668 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 16:11:49 +00:00
Andree Buschmann
ad1ba429b9
Minor speed up of atrac3 codec. Applying 2 bits fract part to scalefactors instead of brute force adding it to the full spectrum. Move decodeSpectrum() to IRAM. Speeds up codec by 1.2 MHz (+2%) on ARM.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24667 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 13:14:43 +00:00
Andree Buschmann
57461d7c4f
Work on atrac Joint Stereo mode. Correct calculation in getChannelWeights(), introduce lookup table and remove obsolete code. Optimize interpolation macro.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24665 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 13:00:02 +00:00
Mohamed Tarek
1bef4c6650
revert last commit (r24660). There was a mistake in the location of the
...
shifts leading to a deteriorated sound quality for some samples.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24662 a1c6a512-1295-4272-9138-f99709370657
2010-02-15 00:04:33 +00:00
Mohamed Tarek
b540be8f4b
Fold a 2-bit shift into decodeSpectrum(), saves 1MHz on ARM, +2%
...
speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24660 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 23:41:32 +00:00
Andree Buschmann
f5a0d61a1b
Further optimization and minor clean up of atrac codec: Unroll iqmf_dewindowing for non-ARM speeds up decoder by +10% on H300. Removed some non-used arrays. Codec is still not fully realtime on Coldfire targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24648 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 14:38:18 +00:00
Mohamed Tarek
8722c6f2bb
Make deceodeSpectrum() store the spectral coefficients of odd bands in reverse order, rather than having to reverse them in IMLT(). Also saves 0.11MHz, ~0.16% speedup on PP5024.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24641 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 01:59:14 +00:00
Andree Buschmann
35024bd54e
Speed up atrac codec for ARM through simple loop unrolling. Saves 9 MHz on PP5022 (14% speed up).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24637 a1c6a512-1295-4272-9138-f99709370657
2010-02-13 22:01:24 +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
2dbb424eb9
Further performance optimization of the atrac3 decoder. Rework the internal sample representation and usage of dsp routines. For now a quick and dirty solution is used to add a fract part of 2 bits. Through this several buffers and functions as well as copy loops could be removed. Furthermore add some ASM for coldfire and place some additional data in IRAM on PP5022/24 and X5/M5. Speedup on ARM: +3%, speedup on Coldfire: +639%. Both ARM and Coldfire can decode in realtime now.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22561 a1c6a512-1295-4272-9138-f99709370657
2009-08-30 14:14:22 +00:00
Andree Buschmann
f62125bb72
fix red
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22549 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 19:57:21 +00:00
Andree Buschmann
f4774bf5bf
Submit interim version of FS#10565. Performance optimization of atrac3 decoder for ARM. Introduce ASM routines for multiplications and two synthesis loops, refactured parts of synthesis and windowing. Speeds up decoding by a factor of 2.4 on PP502x.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22548 a1c6a512-1295-4272-9138-f99709370657
2009-08-29 19:44:27 +00:00
Mohamed Tarek
6c5714a6ee
Put the lookup tables into iram ; 2% speedup on ColdFire 1% on ARM
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22345 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 12:51:17 +00:00
Jens Arnold
3d6f86eb2f
Make those functions actually inline. Around 20% speedup on coldfire, 10% speedup on arm.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22344 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 12:41:04 +00:00
Jens Arnold
aa24b677e0
Revert r22339 as it causes immediate stack overflow on target, at least on coldfire.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22341 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 11:32:41 +00:00
Michael Giacomelli
3b81dd4749
Put QMF coefficients into IRAM. Update test program to still compile with IBSS_ATTR defined.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22340 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 04:05:40 +00:00
Michael Giacomelli
415546921b
Make the IMDCT temporary working buffer a local variable instead of keeping one for each channel. Saves 4KB of RAM.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22339 a1c6a512-1295-4272-9138-f99709370657
2009-08-16 02:24:09 +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