Commit graph

101 commits

Author SHA1 Message Date
Nils Wallménius
e1ea13ee75 libtremor: hack to work around huge allocations for the comment packet in files with embedded album art. Should fix playback of such files on targets with large codec buffers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30728 a1c6a512-1295-4272-9138-f99709370657
2011-10-08 10:09:11 +00:00
Nils Wallménius
d1e241f55a libtremor: arm asm for ff_vector_fmul_window_c on v4 and v5 cores, speeds up c200v1 and fuzev1 by ~0.4MHz and ipod classic by ~1MHz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30584 a1c6a512-1295-4272-9138-f99709370657
2011-09-23 14:01:48 +00:00
Nils Wallménius
2abb52a084 libtremor: small whitespace cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30583 a1c6a512-1295-4272-9138-f99709370657
2011-09-23 13:54:36 +00:00
Nils Wallménius
c2bd876e89 libtremor: cf asm for ff_vector_fmul_window_c, gives a speedup of ~0.3MHz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30582 a1c6a512-1295-4272-9138-f99709370657
2011-09-22 17:32:02 +00:00
Nils Wallménius
3afdedaef2 libtremor: rename file that now contains more ffmpeg code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30581 a1c6a512-1295-4272-9138-f99709370657
2011-09-22 11:54:17 +00:00
Nils Wallménius
412cdd6cf7 libtremor: port over ffmpeg's windowing code
Use the windowing approach from ffmpeg in tremor, does the mdct doubling, windowing and overlap add in one go.
Also uses less memory so all the processing buffers fit in iram on targets with small iram for the common blocksizes (256/2048) now.

Speeds up decoding of vorbis files by 3MHz for 256/2048 and 20MHz for 512/4096 files on h300.
Speeds up decoding of vorbis files by 3MHz for 256/2048 and 4.5MHz for 512/4096 on the beast.
Speeds up decoding of vorbis files by 0.3MHz for 256/2048 and 1MHz for 512/4096 on c200v1.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30580 a1c6a512-1295-4272-9138-f99709370657
2011-09-22 11:47:51 +00:00
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
d3904712e1 libtremor: pass the floor1 lookup table pointer as a param to the render_line function to make this a little nicer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30573 a1c6a512-1295-4272-9138-f99709370657
2011-09-19 16:37:37 +00:00
Nils Wallménius
769996654b libtremor: save a kB or two limiting an array size to the maximum number of channels we support and using a shorter type for another. No speed diff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30559 a1c6a512-1295-4272-9138-f99709370657
2011-09-16 14:00:06 +00:00
Nils Wallménius
bcfb2b53eb libtremor: small tweak to cf channel coupling asm, speeding up vorbis decoding by ~0.1MHz. Drop unused macro params and add some comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30558 a1c6a512-1295-4272-9138-f99709370657
2011-09-16 12:51:22 +00:00
Nils Wallménius
91ba09b099 libtremor: comment out some more unused functions, make a function param unsigned to simplify generated code, gives a small speedup on cf.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30372 a1c6a512-1295-4272-9138-f99709370657
2011-08-28 17:28:44 +00:00
Nils Wallménius
1be2290bfa libtremor: remove some inline cf asm that is no longer needed with the new toolchain, no speed diff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30371 a1c6a512-1295-4272-9138-f99709370657
2011-08-28 16:36:42 +00:00
Nils Wallménius
12e159dcb4 libtremor: comment out some unused functions and mark some file local functions static, saves a few hundred bytes and might give a tiny speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30370 a1c6a512-1295-4272-9138-f99709370657
2011-08-28 16:35:45 +00:00
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
f2e7c05c22 libtremor: comment out unused struct member.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29987 a1c6a512-1295-4272-9138-f99709370657
2011-06-09 06:46:44 +00:00
Nils Wallménius
e62b9a9aae libtremor: Implement a memory configuration for targets that don't use separate iram for codecs.
Such targets would previously default to using the configuration for targets with small iram which uses an extra memcpy per block.
This saves 2MHz decoding a 128kbps vorbis file on the Gigabeat S and saves a bit of codec buffer.
Patch from FS#11268, also replaces patch from FS#12147.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29976 a1c6a512-1295-4272-9138-f99709370657
2011-06-06 13:27:12 +00:00
Nils Wallménius
684b74147f Safe part of FS#11268, saving some codec buffer space for targets that don't use separate iram.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29975 a1c6a512-1295-4272-9138-f99709370657
2011-06-05 20:18:31 +00:00
Nils Wallménius
03c12a7906 Delete old unused macro.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29962 a1c6a512-1295-4272-9138-f99709370657
2011-06-05 09:27:58 +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
e720724b95 Use MEM_ALIGN_ATTR and CACHEALIGN_SIZE in oggmalloc to ensure optimal alignment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29833 a1c6a512-1295-4272-9138-f99709370657
2011-05-08 16:41:23 +00:00
Nils Wallménius
a47c04f0c8 Revert tab police as it makes merging upstream changes more annoying and messed up indentation in some places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28818 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 17:59:05 +00:00
Andree Buschmann
b655f58406 Tab police.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28817 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 17:18:19 +00:00
Nils Wallménius
2aa511f6bd libtremor: merge upstream revisions 17541, 17542, 17543, 17544, 17545, 17546, 17547, 17555, 17572, bringing in various fixes and finally bringing our libtremor up to date, for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28773 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 17:28:17 +00:00
Nils Wallménius
f6297c1f3e libtremor: merge upstream revision 17539 and 17540 'Additional codebook validity checks.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28771 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 16:48:17 +00:00
Nils Wallménius
7484fd3b18 libtremor: merge upstream revision 17538 'Fix decoder handling of floor0 when the LSP order is 1.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28770 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 16:44:08 +00:00
Nils Wallménius
199b2a84e2 libtremor: merge upstream revision 17534 and 17536, fixing a possible 64 bit math overflow and correct types for some comparisons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28769 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 16:34:25 +00:00
Nils Wallménius
c0e3e16285 libtremor: merge upstream revision 17528-17530, more error checking and bug fixes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28768 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 16:07:46 +00:00
Nils Wallménius
a5897697f9 libtremor: merge upstream revision 17527, 'Eliminate possibility of booklist overflow in res0/1/2 unpacking.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28767 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 15:47:56 +00:00
Nils Wallménius
715749a7f4 libtremor: merge upstream revision 17526 and 17531, adding some more error checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28766 a1c6a512-1295-4272-9138-f99709370657
2010-12-08 15:42:40 +00:00
Nils Wallménius
1930e9f4ba libtremor: merge upstream revision 17525 'Commit additional hardening to setup packet decode.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28762 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 16:55:36 +00:00
Nils Wallménius
02f836b1b2 libtremor: merge upstream revision 17524 more sanity checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28761 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 16:27:41 +00:00
Nils Wallménius
0bfa899544 libtremor: merge upstream revision 17522 and 17523 adding more sanity checking.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28760 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 16:22:51 +00:00
Nils Wallménius
13eac3bd2f libtremor: merge upstream revision 17520 and 17521 tweaking some of the recently introduced chaecks to not reject files made with buggy beta encoders.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28759 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 16:12:32 +00:00
Nils Wallménius
d44fb16feb libtremor: merge upstream revision 17519 'Correct an accidental dereference-before-check in error cleanup in comments.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28758 a1c6a512-1295-4272-9138-f99709370657
2010-12-07 16:08:26 +00:00
Nils Wallménius
23321dca5e libtremor: merge upstream revision 17518 actually returning failure code from vorbis_synthesis_init
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28750 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 17:35:36 +00:00
Nils Wallménius
2aa76d7a18 libtremor: export a libogg function that is now needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28749 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 17:16:45 +00:00
Nils Wallménius
c28778fb5a libtremor: merge part of upstream revision 17514 adding some limit checking for allocations when unpacking comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28748 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 17:15:00 +00:00
Nils Wallménius
bdf8a243fa libtremor: merge upstream revision 17513 'Add code to prevent heap attacks by exploiting dim==bignum and partition_codewords==partion_values^dim.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28747 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 16:48:57 +00:00
Nils Wallménius
0d43bf6a88 libtremor: merge upstream revision 17512 'Correctly handle the nonsensical codebook.dim==0 case.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28746 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 16:44:40 +00:00
Nils Wallménius
8a239cf4f7 libtremor: merge upstream revision 17511 'Add checks/rejection for absurdly huge codebooks.'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28745 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 16:40:05 +00:00
Nils Wallménius
4487107d25 libtremor: merge upstream revision 17510.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28744 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 16:34:21 +00:00
Nils Wallménius
67efbc1387 libtremor:
Merge in upstream revision 17375.
This removes tremor's internal ogg code and now uses libogg instead so a bunch of changes are just adjusting to the new api. Also brings in improvements to vorbisfile which fixes FS#10484.
Disabled a lot of unused code in the libogg files and moved some small functions into the ogg.h header so they can be inlined. Some small tweaks to fix warnings.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28742 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 14:36:52 +00:00
Nils Wallménius
911f2a7dac libtremor: merge upstream revision 17374 and some inline/icode tweaks to maintain speed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28732 a1c6a512-1295-4272-9138-f99709370657
2010-12-04 12:59:37 +00:00
Nils Wallménius
b397fe5ae3 libtremor: small tweak to coldfire inline asm function MULT31_SHIFT15, saving one instruction, *tiny* speedup, output unchanged
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28666 a1c6a512-1295-4272-9138-f99709370657
2010-11-26 10:45:33 +00:00
Andree Buschmann
1aac58553c Comment unused function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28634 a1c6a512-1295-4272-9138-f99709370657
2010-11-21 18:59:24 +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
Nils Wallménius
8a2c480af7 libtremor: Use larger cachesize for codebook decoding on targets with 1MB codec buffer.
speedups as follows:
~3%/2MHz on high bitrate files (500kbps) on Gigabeat S
~1%/0.5MHz on high bitrate files (500kbps) on Fuze v1

~3%/1MHz (128kbps) - 12%/7MHz (500kbps) on H300
~2%/0.5MHz (128kbps) - 10%/3.5MHz (500kbps) on C200 v1



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28615 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 15:51:59 +00:00
Nils Wallménius
76027b5951 libtremor: correct constraint for coldfire asm, swap can only be used on data registers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28604 a1c6a512-1295-4272-9138-f99709370657
2010-11-15 16:02:17 +00:00
Nils Wallménius
dfac9503eb libtremor: tweak a hot function for codebook decoding, mostly moving pointer lookups outside the loop. Speeds up decoding by 3-6% on Coldfire and a small speedup on arm too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28419 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 14:48:40 +00:00