1
0
Fork 0
forked from len0rd/rockbox
Commit graph

10 commits

Author SHA1 Message Date
Solomon Peachy
6f4d0b7eb1 m4a: Fix a warning under GCC 8.
...Not sure why this just cropped up now.

Change-Id: I2318ee929fb5fddbf033680d92f21bba73631db6
2024-06-19 09:22:44 -04:00
roman.artiukhin
2030d681e4 Codecs: mp4: Fix sign overflow in seek by offset
Change-Id: I52f536ae959f989c3dc70a50cb802eb1b8615642
2023-11-02 09:40:56 +02:00
roman.artiukhin
a45204f5df Codecs: mp4: Fix seek in files with single element in lookup_table
lookup_table offset shouldn't be zero terminated.
And fix possible out of bound access.

Change-Id: I212a5fcc1868a2ca519b0052b170e836276fe9de
2023-09-22 10:37:38 -04:00
roman.artiukhin
57409f52d5 Codecs: mp4: Accurate seek in large files with small lookup_table
Read sample_byte_sizes table on demand when it can't be cached

Change-Id: I2191be63ceebfd8b16e1e973e13c5b51986b6564
2023-09-20 11:43:39 +03:00
Solomon Peachy
ac82a653bb libm4a: Fix warnings introduced in 001a338e51
Change-Id: Ia915e6f8babbd71533f22af566e5c45c2b40fbe5
2023-09-19 11:47:38 -04:00
roman.artiukhin
001a338e51 Codecs: mp4: Reuse lookup_table index from seek in m4a_check_sample_offset
Change-Id: If2fc3038ce8db8ddf2991406a5cce294a857eadc
2023-09-19 11:13:19 -04:00
roman.artiukhin
ef7d6009b4 Codecs: mp4: Optimize m4a_check_sample_offset
Make optimization from 2358fabb actually work.
Fix potential out of bound access.
Remove redundant zero offset check.

Change-Id: I0a0ba04670b612d410ac17a761bd08c2915721b9
2023-09-19 11:13:19 -04:00
roman.artiukhin
27aa95afcb Codecs: mp4: Fix seek in very large files
Samples count requires 64 bit

Change-Id: Ia54be57d7d15b3db19dbc29ff8a06671594abb4b
2023-09-15 09:08:18 -04:00
Aidan MacDonald
4dd3c2b33e codecs: m4a: improve seek accuracy
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
2022-05-02 12:16:21 -04:00
Sean Bartell
f40bfc9267 Add codecs to librbcodec.
Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97
Reviewed-on: http://gerrit.rockbox.org/137
Reviewed-by: Nils Wallménius <nils@rockbox.org>
Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-25 22:13:20 +02:00
Renamed from apps/codecs/libm4a/m4a.c (Browse further)