Andree Buschmann
6bab4e8dc0
get_sample_info() has been removed.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29771 a1c6a512-1295-4272-9138-f99709370657
2011-04-23 22:28:47 +00:00
Andree Buschmann
7d1de584fe
Minor speed optimization to m4a lookup table build up.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29770 a1c6a512-1295-4272-9138-f99709370657
2011-04-23 20:43:47 +00:00
Andree Buschmann
2358fabb70
Optimization to latest aac decoder changes. Significantly reduce loop count in m4a_check_sample_offset() during standard playback. Before this change the loop count increased with each decoded chunk and for each frame.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29750 a1c6a512-1295-4272-9138-f99709370657
2011-04-19 05:55:54 +00:00
Andree Buschmann
68199cc195
Major rework of the m4a parser for aac/alac playback, seek and resume support. As a result the memory consumption was drastically reduced. This allows to play several files with long duration -- especially on low memory targets. The change builds a lookup table from m4a's sample_to_chunk[] and chunk_offset[] and completely removes the allocation of the large tables chunk_offset[] and sample_byte_size[]. To be able to remove reading and allocating sample_byte_offset[] the aac and alac decoder now buffer a fixed amount of bytes for each frame. The generated lookup table is used for seek/resume and skipping bytes in empty chunks (aac decoder only). The precision for seek/resume is somewhat lower but still equals 0.5 sec for the worst case. Fixes FS#8923.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29745 a1c6a512-1295-4272-9138-f99709370657
2011-04-18 19:12:51 +00:00
Andree Buschmann
5775159462
Refactor aac decoder as preparation for upcoming m4a changes. The aac decoder does not need to use get_sample_info() to gather frame size or the number of consumed bytes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29727 a1c6a512-1295-4272-9138-f99709370657
2011-04-16 19:39:01 +00:00
Andree Buschmann
8055b48b46
Fix yellow.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29725 a1c6a512-1295-4272-9138-f99709370657
2011-04-16 19:26:07 +00:00
Andree Buschmann
19f9fd0f5f
Refactor alac decoder as preparation for upcoming m4a changes. The alac decoder does not need to use get_sample_info() to gather frame size or the number of consumed bytes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29724 a1c6a512-1295-4272-9138-f99709370657
2011-04-16 19:08:50 +00:00
Andree Buschmann
e9c5190de7
Headroom in AAC SBR HF-generator's fixed point implementation of autocorrelation was too small. Fixes FS#12019.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29622 a1c6a512-1295-4272-9138-f99709370657
2011-03-20 15:57:38 +00:00
Nils Wallménius
5aaabbfd12
FS#12014 by Huan Zhang fixing some link errors with a recent mips toolchain.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29615 a1c6a512-1295-4272-9138-f99709370657
2011-03-19 10:14:12 +00:00
Michael Sevakis
56dd75d204
Purge buffer and codec APIs existing exclusively in support of mpa.codec and fix that to not require them: buf_get_offset and ci.advance_buffer_loc. Sort APIs; everything must become incompatible. :(
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29595 a1c6a512-1295-4272-9138-f99709370657
2011-03-16 05:38:37 +00:00
Michael Sevakis
12375d1d3a
Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 08:49:38 +00:00
Michael Sevakis
b3bfc09852
r29348 changes can cause certain codecs to jump to code on early track change that assumes initializations have been done. Make sure that track change cleanups are only called if the state is sane to do so. Stops my vorbis data abort issue. Correctness for speex is a guess based on the library calls' source. It appears only speex/vorbis should have been bothered by said revision.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29489 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 03:47:42 +00:00
Michael Sevakis
6510973223
Give playback engine better control over the codec. Codec simply follows commands and doesn't concern itself with audio state. Get track change notification in on the actual last buffer insert of the track because now audio simply waits for a track change notify from PCM on the last track and it must be sent reliably. This is still at an intermediate stage but works. Codecs and plugins become incompatible.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29387 a1c6a512-1295-4272-9138-f99709370657
2011-02-23 14:31:13 +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
Jens Arnold
8c38983b22
Fix standalone demac tool build.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29239 a1c6a512-1295-4272-9138-f99709370657
2011-02-06 23:18:30 +00:00
Andree Buschmann
ae019419ff
Use the very large IRAM of S5L870x to speed up AAC-HE by ~1-5%.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29212 a1c6a512-1295-4272-9138-f99709370657
2011-02-05 20:22:12 +00:00
Andree Buschmann
8033cb6250
Use MEM_ALIGN_ATTR in libfaad. Remove global array and re-use existing one.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29211 a1c6a512-1295-4272-9138-f99709370657
2011-02-05 19:50:16 +00:00
Andree Buschmann
8b540fa9d9
Speed up AAC-HE SBR by 2% on S5L8701. Use MEM_ALIGN on critical arrays and avoid stalls in asm code.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29209 a1c6a512-1295-4272-9138-f99709370657
2011-02-05 14:29:47 +00:00
Michael Sevakis
62fb090ac4
Fix #11897 - Multiple 'divide by zero' while playing particular APE on Clip+. Problem and solution observed and checked on Gigabeat S by myself. Fix submitted by Mikhail Titov resolves it. range_decode_short was declared as returing 'int short' rather than 'unsigned short' resulting in unwanted sign extension.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29208 a1c6a512-1295-4272-9138-f99709370657
2011-02-05 09:59:36 +00:00
Andree Buschmann
7e63bfd2ab
Correctly re-initialize wma decoder on next track. This fixes strange observed issues (noise, crashes) which only could be solved through re-entering the wma codec.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29202 a1c6a512-1295-4272-9138-f99709370657
2011-02-03 11:05:33 +00:00
Andree Buschmann
7345ac124e
Submit FS#11918: Add 2 more codec types to be able to differentiate between AAC / AAC-HE and MPC SV7 / SV8. Additionally handle ATARI soundfiles in get_codec_base_type() as intended.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29199 a1c6a512-1295-4272-9138-f99709370657
2011-02-03 08:28:23 +00:00
Andree Buschmann
35bcdef144
Find a more consistent and resilient way to handle SBR upsampled files. The detection is only done in one place (the metadata parser) and takes into account that the m4a header might already report corrected frame/sample sizes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29188 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 15:12:55 +00:00
Andree Buschmann
4343399473
Recognize AAC-HE SBR with upsampling and correct duration, bitrate, seek and resume behaviour for such files. When SBR upsampling is used the decoder outputs the double amount of samples per frame. As the seek and resume functions do not know about this fact a special handling is introduced. Fixes issues reported in FS#11916.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29186 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 09:38:24 +00:00
Magnus Holmgren
11b7a4fb26
Add a safety check in the resume seek code, just in case.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29181 a1c6a512-1295-4272-9138-f99709370657
2011-02-01 20:17:42 +00:00
Andree Buschmann
ee6a74e7e3
We seeked one chunk too far when resuming m4a files.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29180 a1c6a512-1295-4272-9138-f99709370657
2011-02-01 19:55:54 +00:00
Andree Buschmann
411023c6be
Rework m4a seek/resume code. Seek/resume does now also work properly with files having sample_to_chunk of 1 or 2.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29178 a1c6a512-1295-4272-9138-f99709370657
2011-01-31 21:54:50 +00:00
Andree Buschmann
ad6c3bc8c5
Fix resume for m4a files. Solves FS#9306.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29175 a1c6a512-1295-4272-9138-f99709370657
2011-01-31 15:18:26 +00:00
Michael Sevakis
18770dac2e
Use __builtin_constant_p() to select the best byteswapping method: constant or target optimized. Same macro can then be used for constant values and inits as well as non-constant.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29171 a1c6a512-1295-4272-9138-f99709370657
2011-01-30 00:58:45 +00:00
Michael Sevakis
d1ff237798
SPC Codec: AS3525 targets should be fast enough for realtime BRR decode and echo.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29089 a1c6a512-1295-4272-9138-f99709370657
2011-01-19 10:05:01 +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
Thomas Martitz
0bf1bd1d51
Redo r28026 so that all .S files get the __ASSEMBLER__ define.
...
Patch by Thomas Jarosch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28913 a1c6a512-1295-4272-9138-f99709370657
2010-12-27 17:27:59 +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
Thomas Martitz
6a9a8197b3
Add stdio.h include for SEEK_SET define to various files.
...
Patch by Thomas Jarosch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28892 a1c6a512-1295-4272-9138-f99709370657
2010-12-25 18:43:34 +00:00
Michael Sevakis
6e4e5ea757
SPC Codec: Was broken on ARMv6 since EABI switch and somehow I failed to notice in the first place (and so did eveyone else it seems :). Some early-clobber constraints were needed on inline assemebly operands. In some places, they aren't necessary where they were used, so remove those.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28880 a1c6a512-1295-4272-9138-f99709370657
2010-12-23 07:36:21 +00:00
Nils Wallménius
d5c082598d
libwavpack: put some lookup tables in iram, speedup of 8-10% on coldfire (h300).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28873 a1c6a512-1295-4272-9138-f99709370657
2010-12-21 14:08:41 +00:00
Nils Wallménius
74cc5c77e3
aac: put two local structs on the stack as they are small and the codec uses little stack anyway ( < 20% on h300)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28872 a1c6a512-1295-4272-9138-f99709370657
2010-12-21 13:35:02 +00:00
Nils Wallménius
984e1a860c
Add a newline to a debugf printing an error.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28838 a1c6a512-1295-4272-9138-f99709370657
2010-12-15 21:28:52 +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