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
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
Andree Buschmann
6117ffdde5
Submit FS#12115: Use more IRAM in cook codec for several targets. Speeds up PP5022 and MCF5250 by ~3% and S5L87.0x by ~4%.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29913 a1c6a512-1295-4272-9138-f99709370657
2011-05-22 19:03:58 +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
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
Nils Wallménius
800e710258
Set up EMAC mode in cook, fixing whitenois when transitioning from a codec using different emac mode.'
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26016 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 11:08:59 +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
Thomas Martitz
0a1d7c28b7
Make open() posix compliant api-wise. A few calls (those with O_CREAT) need the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 17:35:13 +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
d67e25d3b9
Further work on cook codec. Rounding is not needed when using a large fract part in the internal sample representation. Move quantization array to iram. Beautification of mdct post processing. Speed up of 0.2 MHz on PP5022.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24821 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 21:18:05 +00:00
Andree Buschmann
3d6faa08bf
Optimization for cook codec. Rework sample output to be able to use highly optimized dsp routines. Moved some functions to iram. Speeds up codec by 1.3 MHz on PP5022.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24815 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 19:47:05 +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
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
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
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
Mohamed Tarek
466b2ae248
Factor out bytestream reading functions needed in rm parsers/codecs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22308 a1c6a512-1295-4272-9138-f99709370657
2009-08-14 15:13:14 +00:00
Mohamed Tarek
c956059ec5
Modify libcook to use rockbox's mdct library in its standalone test program.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22297 a1c6a512-1295-4272-9138-f99709370657
2009-08-13 20:26:31 +00:00
Mohamed Tarek
c393b1dc5c
Fix compilation of the standalone test program.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22064 a1c6a512-1295-4272-9138-f99709370657
2009-07-27 11:28:14 +00:00
Dave Hooper
a8d1cfdec8
Approx 10% speedup in cook on files tested: Remove some inner loops in favour of memcpy/memset/vect_add calls; remove multiplication from index arithmetic in loops in favour of pointer arithmetic; make use of the MULT31, MULT31_SHIFT15 and CLIP_TO_15 implementations from codelib instead of having their own implementations in cook
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22055 a1c6a512-1295-4272-9138-f99709370657
2009-07-26 19:06:36 +00:00
Mohamed Tarek
8f572ca525
Compile librm separately in preparation for addition of more codecs.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22028 a1c6a512-1295-4272-9138-f99709370657
2009-07-25 15:13:50 +00:00
Michael Giacomelli
bd9156a4ad
Remove a divide in the cook's init function. Harmless but might as well drop it.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22019 a1c6a512-1295-4272-9138-f99709370657
2009-07-24 00:03:01 +00:00
Michael Giacomelli
debfd39882
Commited the wrong thing, fix zeroing in cook.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21989 a1c6a512-1295-4272-9138-f99709370657
2009-07-21 03:47:41 +00:00
Michael Giacomelli
c062259216
Rearrange loop to avoid one branch per iteration.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21988 a1c6a512-1295-4272-9138-f99709370657
2009-07-21 03:40:53 +00:00
Mohamed Tarek
6f4294219e
Generic codec-extradata parsing, in preparation for addition of AAC/RM.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21941 a1c6a512-1295-4272-9138-f99709370657
2009-07-18 00:29:19 +00:00
Michael Giacomelli
6539b535ad
Optimize overlap_math by only doing shifting if theres gain, and moving the check for sign outside of the for loop. 3% speedup on PP5024.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21940 a1c6a512-1295-4272-9138-f99709370657
2009-07-18 00:24:54 +00:00
Michael Giacomelli
b957f7214b
Rearrange the MDCT library lookup tables so that codecs can access them. Access them in cook. Remove old cook trig tables. Replace old 32x16 bit fixed point multiply code with faster ASM ARM/Coldfire versions using full 32 bit precision. Improves performance signficantly on PP5024 (~200% realtime for a 64k file) while saving a lot of memory and improving accuracy.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21939 a1c6a512-1295-4272-9138-f99709370657
2009-07-17 23:53:40 +00:00
Mohamed Tarek
20f8666b89
Remove a call to av_clip() which limits the PCM output of the decoder to 16-bit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21911 a1c6a512-1295-4272-9138-f99709370657
2009-07-16 23:09:28 +00:00
Mohamed Tarek
cfd8b1444b
Remove an overlooked, unused float from struct COOKContext.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21909 a1c6a512-1295-4272-9138-f99709370657
2009-07-16 22:42:11 +00:00
Maurus Cuelenaere
7414140f7c
Previous commit didn't fix compiling on Cygwin, this one should.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21724 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 18:27:59 +00:00
Maurus Cuelenaere
269ed8a415
Fix compiling on Cygwin hosts.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21722 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 18:06:38 +00:00
Mohamed Tarek
e184ef1027
Adding support for rm playback. Only cook codec is supported for now and no seeking.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21695 a1c6a512-1295-4272-9138-f99709370657
2009-07-06 22:40:45 +00:00
Mohamed Tarek
45f72e933a
Move rm.[c/h] from libcook to librm. No functional changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21066 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 14:10:51 +00:00
Mohamed Tarek
95fa7f6a2e
Move the code segment that corrects the value of (number of packets) to
...
the parser. This is strictly parser-related and main.c shouldn't have to
deal with it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21043 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 20:35:20 +00:00
Mohamed Tarek
b63028d80a
Modify the test program to read audio frames from a memory buffer rather
...
than a file descriptor, to make the decoding process as much similar
as to how it should be in rockbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21042 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 20:23:38 +00:00
Mohamed Tarek
694b3b734f
-Remove some unnecessary defines from rm.c.
...
-Modify code related to the renamed rm.[c/h] instead of rm2wav.[c/h].
-Remove struct cook_extradata from rm.c as it is not used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21041 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 19:51:36 +00:00
Mohamed Tarek
9389a5a4d1
Rename rm2wav.[c/h] to rm.[c/h]. No functional changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21040 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 19:42:00 +00:00
Mohamed Tarek
fde78ddcc0
Move wav related code to main.c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21039 a1c6a512-1295-4272-9138-f99709370657
2009-05-22 19:36:32 +00:00
Mohamed Tarek
1775866fd3
Move bswap.h up from libavutil/ and remove libavutil/
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20931 a1c6a512-1295-4272-9138-f99709370657
2009-05-14 21:30:44 +00:00
Mohamed Tarek
49ba646d57
-Remove all dynamic allocations, hence remove cook_decode_close() which was basically
...
needed for freeing allocated memory.
-Remove any ffmpeg-specific attributes (av_const,av_always_inline .. etc.).
-Move some math functions to cook_fixpoint.h - libavutil/common.h is no longer
needed.
-Remove libavutil/mem.[c/h], libavutil/common.h and libavutil/internal.h.
-Fix a warning in cookdata_fixpoint.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20922 a1c6a512-1295-4272-9138-f99709370657
2009-05-12 20:50:35 +00:00
Mohamed Tarek
f2c18d6922
-Remove calls to av_log() and use DEBUGF/printf instead, thuse removing
...
libavutil/log.[c/h] and libavutil/avutil.h.
-Take necessary defines to bitstream.h from libavutil/intreadwrite.h to
remove the latter.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20918 a1c6a512-1295-4272-9138-f99709370657
2009-05-12 13:21:34 +00:00
Mohamed Tarek
950c4747e3
Remove bytestream.h and and a related comment from cook.h
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20917 a1c6a512-1295-4272-9138-f99709370657
2009-05-12 12:30:33 +00:00
Mohamed Tarek
0cb3ad58b3
-Took cook_random() from an old cook.c revision [6 mar 2007], which is a
...
simple RNG, to eliminate the need for lfg.c/h.
-Remove lfg.c/h and md5.c/h as they are no longer needed and use the
more common form of my name in docs/COMMITTERS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20915 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 23:35:50 +00:00
Dave Chapman
112f39379c
Patch by Mohamed Tarek from FS#10182 - remove avcodec.h as it is no longer needed. Also remove -lm from Makefile.test for the same reason.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20909 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 07:59:10 +00:00
Dave Chapman
44afb00e26
Fix the $Id$ line broken by r20907.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20908 a1c6a512-1295-4272-9138-f99709370657
2009-05-11 07:47:02 +00:00
Michael Giacomelli
9c43aaa41b
Actually remove the unneeded files in the last commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20903 a1c6a512-1295-4272-9138-f99709370657
2009-05-10 23:32:53 +00:00
Michael Giacomelli
65649de515
Patch by Mohamed Tarek from FS #10182 . Remove floating point code (FFT, MDCT, etc) from libcook.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20902 a1c6a512-1295-4272-9138-f99709370657
2009-05-10 23:18:04 +00:00
Dave Chapman
fc28cb4ed5
Patch by Mohamed Tarek from FS#10182 - convert codec to fixed-point using patches submitted to the ffmpeg mailing list in 2007 by Ian Braithwaite.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20901 a1c6a512-1295-4272-9138-f99709370657
2009-05-10 22:26:02 +00:00