path: root/lib/rbcodec
AgeCommit message (Collapse)AuthorFilesLines
2021-08-11metadata/mp3data.c init vars & add sanity checksWilliam Wilgus1-2/+8
Change-Id: Idface0ea73c4a6f0d46a57bddf77db9475a972f4
2021-08-11metadata/metadata_common.c check read for proper bytes readWilliam Wilgus1-10/+8
Change-Id: I25d7c20d449cde4d5cfd3f57e00ff45f4c14f60b
2021-08-11metadata/metadata_common.c WS changesWilliam Wilgus1-18/+18
Change-Id: Ieef86e94676c603a21cbb5af55e63ba628a09cdf
2021-08-11metadata/asf.c ensure variable init & add sanity checksWilliam Wilgus1-16/+28
Change-Id: If4432549b843cafb000c3fedee12184d75da595b
2021-08-11metadata/mp4.c fix small oversight / bugWilliam Wilgus1-4/+4
didn't set the genre string to null on case entry means read failure would leave genre string indeterminate add explicit NULL & leave genre uninitialized Change-Id: I1452a0b57985646c982ec80755d0df9d03745f1e
2021-08-11metadata/mp4.c check for read errors skip buffer appropriatelyWilliam Wilgus1-47/+61
WIP Change-Id: I770f0d911f7d9826e89d886892ff3913661a8151
2021-08-08As3525 wavpack_enc document some intentional switch fall throughWilliam Wilgus1-0/+1
Change-Id: I56bf439df2c05653d65f49238e886e4ef2291176
2021-08-07metadata/asap.c consolidate read char function and check return valuesWilliam Wilgus1-23/+27
and a bit of cleanup using macros to make the code easier to follow Change-Id: I2c5953a68a9f415453e508c14a9c1a5a1e84e6b5
2021-08-07metadata/asap.c WS cleanupWilliam Wilgus1-26/+26
Change-Id: Id3bc053a45eeea107a54dd47640fa3ceb4b04498
2021-08-07metadata/vfx.c cleanup string and character handlingWilliam Wilgus1-17/+19
Change-Id: I7550d6db05b0d31a1433d0af9b2233f9dc3f5ee2
2021-08-07metadata/smaf.c handle read errorsWilliam Wilgus1-26/+27
Change-Id: I450f1fc8e1b69ce09f9888f5384c3e23a93822a1
2021-08-06metadata/mp3data.c set data to 0 in case of read errorWilliam Wilgus1-3/+2
Change-Id: I15d4e3d3be4bf4531c892f4351355b0b2e8e0ca9
2021-08-06Fix use of uninitialized variable in mp4 metadata parserAidan MacDonald1-1/+1
Change-Id: Idca69e7429af13609785755d4e152d87f471c462
2021-08-05metadata: Fix sign extension in get_uint64_le() routineSolomon Peachy1-1/+1
Change-Id: Ibd85cf72ac1babd1fa636c341b90b76bdfc0491b
2021-08-04Document intentional fallthroughs + fix harmless unintended onesAidan MacDonald2-0/+4
Change-Id: I1ca5b1027ec30cbf61093bab35b980196ed14e6b
2021-08-02metadata/flac.c fix potential buffer overrunWilliam Wilgus1-0/+12
Change-Id: Iee12f251455c4fda9d91d10e466d17e5e02046b9
2021-08-01id3tags.c check for buffer overrunWilliam Wilgus1-0/+3
Change-Id: I74fde8e234fe85abfabefddcea7f10038167c715
2021-07-25rbcodec: Fix typo in makefileAidan MacDonald1-1/+1
Hopefully this will fix all those random build failures. Change-Id: I02ff625c538a21f20b33874b4ab54ed8c893a433
2021-07-15misc: Fix up a few warnings uncovered by LTOSolomon Peachy3-17/+14
* direct use of memcpy() instead of ci->memcpy() in flac and mod * uninitialized variable in mpegplayer Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a
2021-07-08build: Nuke the ASMFLAGS workaround for gcc 3.4.xSolomon Peachy3-5/+5
Change-Id: I0f21e9539d39afd54916fa8d84ce798eef474a2c
2021-07-08build: Rename SHARED_LDFLAG to SHARED_LDFLAGSSolomon Peachy1-1/+1
Change-Id: Icb81c72fbcfcdad624112a386ba38a40a830d18f
2021-06-16FS#13299: Handle MP3 files with more than 128K of headers before audio dataSolomon Peachy1-12/+15
Encountered a file with ~600K of ID3v1 headers. Optimize the potential overhead by minimizing reverse seeks. Change-Id: I972dbf1af1c36659f19c7ab4eed0b9149c642880
2021-06-16Revert "FS#13299: Simplify VBR frame parsing in the metadata decoder."Solomon Peachy1-18/+37
This reverts commit 756c0d2ac82515ea8389c69f5f87ca395daca63d. Change-Id: I5f98972f69e7645239fd9218c9d4eeb9bd2ec7a5
2021-06-13FS#13299: Simplify VBR frame parsing in the metadata decoder.Solomon Peachy1-37/+18
The old code would seek forward by the frame length, expecting to see a frame header there, perform a validity check, and then seek back to the current header. Unfortunately this doesn't handle situations where there is extra padding between the frames, leading us to potentially read garbage, causing the validity tests to fail and rejecting the file outright. Instead, keep track of the previous valid header/position, and if we find "valid" headers in a row return the first after seeking back to it. This change allows the file referenced in FS13299 to be properly parsed, but further work is needed to get the file to be playable. (file reports itself as layer 1, variable bit rate, variable sample rate!) Change-Id: I85f61a6360cc041a172db4b7a6b5516e5b60ceee
2021-05-12FS13094: Fix a divide-by-zero crash parsing zero-length WMA/ASF filesSolomon Peachy1-8/+8
Change-Id: I2e90692327c69c4467a586b23b877c596b8d2c40
2021-04-23Sync opus codec to upstream gitWilliam Wilgus286-1274/+48927
Change-Id: I0cfcc0005c4ad7bfbb1aaf454188ce70fb043dc1
2021-04-06rbcodec: Fix typo in include guardamachronic1-1/+1
Change-Id: I503ace58fb46e803c66b92113d2be7daebeb8b71
2021-03-22Increase id3v2 max item size on high mem targetsChristian Soffke1-1/+4
As per multiple user requests:,53319.msg The acceptable size for id3v2 fields currently maxes out at 240 bytes on targets with more than 2MB of memory. The comments field, especially for Podcasts, can sometimes contain significantly more characters than Rockbox allows. The limit for devices with more than 8MB of memory is increased to 500 bytes for individual fields, and to 1800 bytes for the buffer containing all fields. Change-Id: I4593372229158756f102f67bcc4a43e64f632d58
2021-03-04Clean up places that use #if defined(CPU_ARM | CPU_COLDFIRE | CPU_MIPS)Solomon Peachy2-7/+7
Since that encompasses _all_ of our native targets in a post-archos world, either replace it with #if (CONFIG_PLATFORM & PLATFORM_NATIVE) or delete it altogher as appropriate. Change-Id: I9128a456e850d5c96a9e05806aad3acd923f90c5
2021-03-03flac fix dumb typoWilliam Wilgus1-1/+1
Change-Id: Ic6269ca35374bcb1d6a5ad2c1848a1718fa4e01c
2021-03-02Nudge flac towards upstream FS#13266 -- Fix the Yellow still?William Wilgus1-4/+4
Change-Id: I76056b1a682db055857d759d2ebffae111a8a4c0
2021-03-02Nudge flac towards upstream FS#13266 -- Fix YellowWilliam Wilgus1-4/+4
unused variables Change-Id: I69e1435941da6207c75d0f3cb862dee296a5cc1a
2021-03-02Nudge flac towards upstream FS#13266William Wilgus3-138/+198
Some flac encoded files contain junk that our decoder picked up upstream has some sign and overflow fixes too Change-Id: I5857b2fe56906a48f04944cdfee8fe2306f2c3fd
2021-03-01FS#13267: Fix crash when enabling Perceptual Bass Enhancment during playbackSolomon Peachy1-0/+6
I think the assumption is that during playback, the DSP is already running so it assumes PBE needs to be flushed before it is properly enabled. Change-Id: I2bac3d02c80f97c8d9ce26a575175f6344a8e86a
2021-02-28Support MP3 audiostreams embedded in ASF containers.Solomon Peachy5-22/+151
Full credit to Igor Poretsky Change-Id: I54769e33665cada1e1e0ef3a5511b56c8e1b859a
2021-02-19MP4: append mdat sections together in metadata parserSolomon Peachy1-1/+2
mp4 files can have multiple 'mdat' chunks. This is common for audiobooks, where there is often a secondary mdat containing the chapter names, but it's also legal to have multiple mdat chunks for a single logical "track" This confuses the mp4 metadata parser, which assumes there is only a single mdat, and always uses the last mdat seen to determine the "filesize" of the data we're trying to decode. Work around this by appending each mdat's size to result in the final "filesize" Change-Id: I3e7a7efb0f05ef965e8d77f79e450c957524a480
2020-10-28libgme: Fix yellow in hosted MIPS buildsSolomon Peachy1-0/+1
Change-Id: I6d25c014cc519ddc5d1619c25d48331f512c2f2f
2020-10-28wmapro: Backport multiple fixesSolomon Peachy1-39/+91
upstream commits: 780d454 b28c678 9166f48 97a5add b21ba20 f734671 b86dd1 b4027d9 50f0a6b 4c0080b c7a7605 5dcb990 7ad698e Change-Id: I8e6d74316e1eaf22217a57ddb54c1ea8303e6788
2020-10-13Build: Bump all toolchains to GCC 4.9.4 + Binutils 2.26.1Solomon Peachy1-0/+1
GCC 4.9.4 was already used for MIPS and all hosted targets; this enables it across the board for everything (ie m68k and arm native) Other changes: * Use '-Os' as the default optiomization for all targets (was only disabled for arm native) * Enable -funit-at-a-time and -Wextra * Drop all obsolete toolchain patches * Update ARM multilib/exception patch * Bump toolchain libs (gmp, mpfr, mpc) to recommended versions, and add 'isl' to enable better optimization & vectorization opportunities. (Will revisit optimization for the codecs and plugins at a later date) Confirmed working: * armv4t (ipodmini2g and many other PP502x targets) * arm >= v5 (sansaclipplus, ipod6g, ipodnano2g, sansafuzeplus) * m68k (ihp100) Change-Id: If9ed405ae0f289d9adea46d4cf46bfefc2f4250d
2020-10-09codecs: Add support for the 'VTX' ZX Spectrum chiptunes format.Solomon Peachy16-22/+1625
This codec requires floating point. Original author: Peter Sovietov Ported to Rockbox: Roman Skylarov Further integration and bugfixes: Solomon Peachy Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
2020-09-08surround: Fix two issues with the haas surround code.Solomon Peachy1-2/+3
1) Handle ID 0 is legal 2) Make sure handle is initialized before trying to memset its buffer Change-Id: I91db157863800c01dd9b92bc05a1df5c4fe0e95b
2020-08-10flac: fix warning introduced in 5758a05Solomon Peachy1-19/+19
Change-Id: I649f7c356b8b790d6dfbd071a8e391a84d0cdcca
2020-08-10Handle EOF properly in get_flac_metadataYuxuan Shui1-2/+2
Change-Id: I5e581990046a9f4a0859787aff2fd6fc06fbf7f5
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-6/+0
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy10-90/+16
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-15Add support for ID3 tags embedded in AIFF filesMoshe Piekarski3-5/+43
Change-Id: I15eb50b6ba1c26052f08e01861f47faede3b9b3b
2020-07-15opus: shrink stack usage by nearly 700 bytesSolomon Peachy1-28/+33
By moving three structures to the heap. None are in the hot decode loop, instead having to do with file sync / header state. Has neglible impact on performance (within measurement noise) on Clip+, Rocker, and Xduoo X3. On PP5022 (ipodmini2g) performance drops from 138.66% to 138.22% realtime. (0.3%) Unknown effect on Coldfire which lacks D$. Stack savings are pretty significant especially on lowmem devices. Change-Id: Ic8a1e93062ff5a46230e824134032053c4e1986d
2020-07-09FS#12966: display '+' for positive replaygain valuesSolomon Peachy1-1/+1
Change-Id: I976d5511096c2d4d19eb14fa1c6adf8dd3cd9006
2020-07-03Fix logf warnings in more codecsMoshe Piekarski2-6/+7
Change-Id: I7e83a9979aedadf3b7c2b162a8202efdc6227e88
2020-06-28Fix logf build warnings in speex codecMoshe Piekarski1-10/+11
Change-Id: I8ce9473c98f863cc53273c16b2e55321d7b0795a