Age | Commit message (Collapse) | Author | Files | Lines |
|
Also fixes typo of using never initialized id3->channels in wav metadata (introduced in 2d1937a1)
Change-Id: I28cddec2b9d9bd1e756ffaa004b4f6e8528a7566
|
|
The supplied time may be more accurate than the calculated time from the bitrate (can be quite inaccurate for long vbr files and even for cbr due to padding)
Change-Id: I1f8291eab45fbd91a161b51776c391a0f7886a5c
|
|
Use current position as toc mark and use it if it gives better accuracy.
Continuation of 3883c978
Change-Id: Ic6e8192fc43061f3c07128486dbefba7382be5ce
|
|
Captured ADTS streams might start from some garbage data from previous frame. We should check for sync errors even for first frame.
Change-Id: I70171298b79713aeedf9fa2e6098a03063487649
|
|
first_frame_offset is not set for mp4 files so seeking to it doesn't make any sense. It can lead only to additional re-buffer request. So instead let's just allow seek back for m4a_check_sample_offset check. And do seek_buffer(0) before reading metadata (fixes possible hang introduced in fc65bdab)
Change-Id: Ia7fae14b0137d73b5e263390be5f143deb7ca789
|
|
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE.
Allows to play backward compatible files as AAC-LC.
Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
|
|
Fixes FS#13402
Change-Id: Iafb21787e8f042e913c86b249bb2552cfdf4f4a8
|
|
Change-Id: I52f536ae959f989c3dc70a50cb802eb1b8615642
|
|
Fix possible crash due to out of bound access.
Fixes FS#13371
Change-Id: I90d28fa89ceb22e6561d33abc5f2b4c7f32d323c
|
|
In files with gaps between chunks and reduced lookup_table we can't properly detect all gaps in m4a_check_sample_offset. So just ignore decode errors till next chunk present in lookup_table
Change-Id: I317864dce6a2251cdb6ddb8c0ad4d7c1640cb7a1
|
|
Instead of FOURCC it needs ignore-case text match. Also value can contain \0 ('m4a\0' instead of expected 'm4a ').But let's simply skip it and let decoder handle it.
Change-Id: I87eefcabbc9010481286257c26cee09e61d1221c
|
|
elifdef appears to be finally supported in C23
elif defined() works everywhere
Change-Id: I8ac6c215bedc81cc9ea8f79850be40cef131594b
|
|
Codecs mostly use custom LOGF define for logging (i.e. see aac.c). Now such logging can be enabled in single file with #define LOGF_ENABLE
Change-Id: I36312fbcd2d9166fb1fe5ead31e7354342d8828d
|
|
lookup_table offset shouldn't be zero terminated.
And fix possible out of bound access.
Change-Id: I212a5fcc1868a2ca519b0052b170e836276fe9de
|
|
Read sample_byte_sizes table on demand when it can't be cached
Change-Id: I2191be63ceebfd8b16e1e973e13c5b51986b6564
|
|
Change-Id: I96fc2b8637cb95c5bd14a6d77fc4b2339c4acd49
|
|
Change-Id: Ia915e6f8babbd71533f22af566e5c45c2b40fbe5
|
|
Change-Id: If2fc3038ce8db8ddf2991406a5cce294a857eadc
|
|
Make optimization from 2358fabb actually work.
Fix potential out of bound access.
Remove redundant zero offset check.
Change-Id: I0a0ba04670b612d410ac17a761bd08c2915721b9
|
|
Remove unnecessary frame modification
Change-Id: I884152a66477efea7cfcadc638f55352ad75fc41
|
|
Don't store sample_to_chunk table and read data on demand instead (it's required only once for building lookup table). It allows to store 2x bigger lookup table.
Change-Id: Ida79d0c281040300d6561e124fe10ebacb0e4679
|
|
Samples count requires 64 bit
Change-Id: Ia54be57d7d15b3db19dbc29ff8a06671594abb4b
|
|
pretty unlikely but I think in a memory exaustion scenario
you might roll the uint8 over to zero and crash
Change-Id: If73dc64484f2d363446be068aa7bf8025407a2a7
|
|
Reduce lookup_table (seek accuracy) till it fits on device
Fixes FS#13049
Change-Id: I934de500a4383e17b82821afa2e0396a27061707
|
|
Needed for opening some m4b books (see FS#13049)
Change-Id: Id289451e6b2b8a7ad1f6b9f00ef512ab9692383d
|
|
Fix jumps in the wrong direction by seeking relative to the current position
Change-Id: I5ca3d5bcb256dd8fb1cd17e6149878190571d359
|
|
Change-Id: If91eed5a0cbce44723e9581dce7de02e644f7e3e
|
|
GCC 4.9 always emits assembly with divided syntax. Setting unified
syntax in inline assembly causes the assembler to complain about
GCC's generated code, because the directive extends past the scope
of the inline asm. Fix this by setting divided mode at the end of
the inline assembly block.
The assembler directives are hidden behind macros because later
versions of GCC won't need this workaround: they can be told to
use the unified syntax with -masm-syntax-unified.
Change-Id: Ic09e729e5bbb6fd44d08dac348daf6f55c75d7d8
|
|
Change-Id: Iae32a8ba8eff6087330e458fafc912a12fee4509
|
|
Replace the minimum version bound with a check on the size of
the API struct. The version only needs to be incremented for
ABI breaking changes. Additions to the API won't need to touch
the version number, resulting in fewer merge conflicts.
Change-Id: I916a04a7bf5890dcf5d615ce30087643165f8e1f
|
|
Also add a note that SID might not play in realtime on all targets
Change-Id: Ic14b20a7c1427e31e38204ae3ecff6bd235ec1b4
|
|
Change-Id: Iee70933e47ff8df8f26c9a63112de4da4a8e6c17
|
|
Needed to compile cRSID as a proper library.
Change-Id: I276967f46037bd65db1ff38985a781183fc26a00
|
|
Plain import of the library parts first. Adaptions to Rockbox will
follow. A *lot* of kudos go to Mihaly Horvath for creating this library
from his already lightweight cSID-light, mainly for Rockbox. Besides a
lot of other things, he made his algorithms integer-only and
significantly improved the C64 emulation, so finally RSIDs could be
played as well as PSIDs. TinySID was nice for what it is, but this is a
quantum leap in SID playback quality for Rockbox. Check for example:
https://hvsc.csdb.dk/MUSICIANS/P/Page_Jason/Eighth.sid
https://hvsc.csdb.dk/MUSICIANS/J/Jeff/Blowing.sid
Change-Id: I353e12fbfd7cd8696b834616e55743e7b844a73e
|
|
It turns out removing DSP_INIT broke the codec ABI and caused
old codecs to crash; the loop and mdelay() was a red herring.
This reverts commit 541960a11061213f682d67bb036f861b2605f9d3.
Change-Id: I020d826e7b4beb006d093d9c3d4f45fa5eaac717
|
|
Commit 6bcd830490 ported an optimization to decode_subframe_fixed()
from FFmpeg (upstream commit 08965b22e2). This contains an out of
bounds read, which doesn't affect the decoder output, but makes ASAN
complain.
FFmpeg fixed the out of bounds read (upstream commit 0ec7b71de8) but
that appears to increase code size a lot.
Inlining the initialization of a, b, c, d into the switch produces
similar code as the non-bounds-checked version with only a handful
of instructions of overhead (checked on MIPS & ARM).
Change-Id: I053fac4efc4676b133eb7545c80e23f37fb00d86
|
|
these are the low hanging fruit identified by ASAN
cast the byte values before shift
Change-Id: Ifc5645354a10c15ccd09d1343e1705857a51e011
|
|
Resume by offset was obviously inaccurate for ALAC -- it tried
to convert the offset to an elapsed time using the approximate
bitrate, which is going to be wrong for VBR files. This became
a problem since commit 26ffcd8f9f restored the ability to resume
by offset.
It turns out that m4a_seek_raw() has terrible resolution since
it can only seek to chunk boundaries, and lies about the real
sample position; basically the same issue that affected seeking
described in commit 4dd3c2b33e. Resuming by offset is still not
very accurate because of this. Prefer to resume by time first,
which is normally highly accurate (and never worse than offset)
but use the file offset if it's the only thing we have.
There were a couple time calculations still using 32-bit math,
so clean those up too to reduce issues due to rounding errors.
Change-Id: Idd3bccd67505f4e59e784d92e45ea80a273975bb
|
|
m4a_seek_raw() is relatively inaccurate, so time-based resume
should be preferred.
Change-Id: I959ef165f9a99d12deb804c13d20413c1cecf867
|
|
The codec used 32-bit math for elapsed time <-> file position
calculations. The rounding errors seem to be the cause of poor
seek/resume accuracy on long VBR files; switching to 64-bit math
makes things much better.
Change-Id: Iba638d9e031a891022510c31c141cc4541e3f149
|
|
It fixes Playback/Bookmarks Resume for long vbr mp3 files
It also fixes resume by time for asf files.
As a replacement for https://gerrit.rockbox.org/r/c/rockbox/+/4750
Change-Id: Iaa59b5862385f5fe91fdc2fb0b1fde8ce75c0b54
|
|
This reverts commit d25d24812e8120c0eb133a412287ac030eb185c9.
Change-Id: I1563223e343fb1e2eda72a45823b38350025ff93
|
|
It might have made sense once upon a time, but in today's world...
Change-Id: I5d638e6f7a2308c50ab12bd901338f02cf426aae
|
|
Change-Id: Ib628a27bfc6f95a822e46b931ccfbed90f41b122
|
|
likely this is truly a bug but I imagine much worse things
happen before this point in that case
Change-Id: If78465cf2ae1e5cf38ad7f087dd436b888bc9996
|
|
Seeking doesn't work well in M4A files with very few chunks due to
the seek method used (chunk based using the info in the 'stco' atom).
According to libm4a/demux.c the expected seek resolution using this
method is 1/4 to 1/2 seconds. However, ffmpeg generates files with a
1 megabyte chunk size, so the resolution is much worse than expected
on some files: around 30-40 seconds at 256kbps.
There was a bug with the seek position reported back to Rockbox: the
codec pretended it could seek exactly to the requested sample, but it
would only seek to the start of a chunk. This could leave the UI in a
confusing state because the real playback position was different from
what the elapsed time showed. Fix this by recalculating the reported
sample position using the chunk start.
To fix the low seek accuracy, use the table in the 'stsz' atom to skip
individual packets within a chunk. This is very accurate, but it takes
a lot of RAM to allocate the table. Currently the table is not allowed
to use more than half of the codec RAM, which should suffice for short
files on most targets. On files where the table is too large the codec
will fall back to the less accurate chunk-based seek method.
Change-Id: Ide38ea846c1cdd69691e9b1e1cd87eb0fa11cf78
|
|
Change-Id: I56bf439df2c05653d65f49238e886e4ef2291176
|
|
Change-Id: I1ca5b1027ec30cbf61093bab35b980196ed14e6b
|
|
Hopefully this will fix all those random build failures.
Change-Id: I02ff625c538a21f20b33874b4ab54ed8c893a433
|
|
* direct use of memcpy() instead of ci->memcpy() in flac and mod
* uninitialized variable in mpegplayer
Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a
|