summaryrefslogtreecommitdiff
path: root/lib/rbcodec
AgeCommit message (Collapse)Author
2019-08-14opus reset decoder on seek completion to prevent stack overflowWilliam Wilgus
apparently we should be doing this anyway mark4o> The packets overlap and may reuse state set by other recent packets, so if you seek to a different position, resetting the state helps to ensure that the subsequent packets won't use the state set by the unrelated packets that were processed before the seek. remove stack bump WORKAROUND_FS13060 Change-Id: I1c14e23b1721a360b91e3e55202c1557aef0fcc6
2019-08-13Improvements for vbrfix plugin:Solomon Peachy
* Properly account for ID3v1 tags * Play time computation fixes * Add speech feedback Patch by Igor Poretsky Change-Id: Ia6df8fb171882a88527cfa9d3b76b705f09becdd
2019-07-31FS#11052 -- SID Playback in StereoSolomon Peachy
Original patch by Stefan Waigand Updated by Igor Poretsky Change-Id: Icaf7beb8349ab90e21b94baee627c9412cb2b55d
2019-07-25fixed alac_set_info() issues.aozima
2019-01-25opus fix playback opustag skippingWilliam Wilgus
Change-Id: I9ec35e276e24ec7b5a2e1199d6264d9f2d5d9fc2
2019-01-25opus fix comment skipping codeWilliam Wilgus
opus requires the comment header to be a valid file our codec attemps to skip the comment data in order to reduce the ram allocated originally it caused files with large album art to skip the beginning of tracks my first attempt at fixing this then caused files with low bitrates to do the same while fixing files with large album art This patch should fix both although the initial start might be a bit slower but this shouldn't cause too much of an issue Change-Id: Ia1c3561347894cc45f24bb2659436914f8f03b43
2019-01-23opus optimize playback functionWilliam Wilgus
knocks off about .5 second from decode time not a big change but might help a bit on devices that barely achieve realtime Change-Id: If6e822b7273613c9449c102ce7dd3543bf975d37
2019-01-04Fix Opus FS#13133 - Files with embedded artwork 45.8KiB+ skip near beginningWilliam Wilgus
ogg_sync_reset() causes issues on the partial page boundary due to the next page (already in buffer) being discarded instead seek next page boundary past complete page Change-Id: Ic05f188f489b015693d663f131e09cd92ad37ff7
2018-12-28Third attempt to shut up the warble build printf() warning.Solomon Peachy
(resorting to an explicit cast this time) Change-Id: Ib5fc7bcd9e573cd32fc4372003c6c5429e339652
2018-12-28Another attempt to silence the warble build warning on 32-bit hostsSolomon Peachy
Change-Id: Ib83ce41582b18641badb389c3871e501c8be697f
2018-12-25build: Put all codec optiomization definitions in one placeSolomon Peachy
It was already mostly there. Change-Id: I24ff278d9bf18a54be4b67c3075d5ebbe7947f65
2018-12-24Hopefully silence the warning in the warble codec build.Solomon Peachy
Change-Id: I63eef2c33bf3ea31a135cd6336882b600723f946
2018-12-22AAC bitstream format files supportSolomon Peachy
Files with extension "aac" in ADTS or ADIF format are now playable. Full credit goes to Igor Poretsky. Change-Id: I413b34e15e5242fea60d3461966ae0984080f530
2018-12-22Realmedia related codecs fixes and enhancementsSolomon Peachy
* More tolerance to the file format variations. * AC3 coded files in realaudio format are now playable Full credit to Igor Poretsky Change-Id: Id24e94bc00623e89fb8c80403efa92f69ab1e5d7
2018-12-22Improved seeking in a52 codecSolomon Peachy
(Patch by Igor Poretsky) Change-Id: I0cdc2021b44f6cd6e76def190d9f04733b922454
2018-12-08Fix overlapping string region ape.c->read_ape_tagsWilliam Wilgus
Switch to strrchr to find the extension Change-Id: Id7ea01ecc2e0553f560308f8b0fc53bd33b023e5
2018-12-08Fix speex warning lsp.c->lsp_to_lpcWilliam Wilgus
I'm pretty sure this was a false positive Change-Id: I0ab375d1d844b3d468c24888c371f588052e1ce9
2018-10-29codecs: Fix elapsed time calculation for large filesSolomon Peachy
In particular, this solves seeking glitches seen in ~6 hr mp3 files. (Patch taken from Igor Poretsky's tree) Change-Id: Id65b6726146b6d2d1a223e90b88e401d1b2d597a
2018-09-02libmad: Back out a change that disabled optimization for libmad.Solomon Peachy
(Caused non-realtime playback on mips..) Change-Id: I878229e16e31d49156f1ae71ab9c7bb627e4c17b
2018-07-30iPod Classic: disable IRAM1Cástor Muñoz
On Classic, IRAM1 (second 128Kb of a total of 256KB available IRAM) is slower than DRAM. Codecs that actually are using regions of IRAM1 runs faster when DRAM is used, so IRAM1 is disabled and only IRAM0 remains enabled: 48KB for core and 80KB for codecs/plugins. The next test_codec results shows how decode time is decreased: file boosted unboosted *.ra ~1.5% ~0.5% *.mpc ~21% ~4.5% *.ogg ~0.5% ~0% nero_he*.m4a ~8% ~1% nero*.m4a ~25% ~7% wmapro*.wma ~4.5% ~0% wma*.wma ~25% ~7% In addition there is a small power save when IRAM1 HW is disabled. Change-Id: I102adee11458e82037f23076d5d5956e23235de8
2018-06-12Agptek Rocker: Initial commitMarcin Bukat
Change-Id: I26b51106c7b1c36a603fba6d521e917d79b5a95b
2017-12-07Remove explicit 'enum codec_command_action' in codec APIMichael Sevakis
Just use long so the compiler potentially doesn't complain about use of other values not in the enum. It's also the type used around the system for event ids. Increase min codec API version. No functional changes. Change-Id: If4419b42912f5e4ef673adcdeb69313e503f94cc
2017-11-06libpcm: Get unbranded structure tag out of my way.Michael Sevakis
No functional changes. Change-Id: If372023cb605389a203a635b700eca20685ad49b
2017-10-12PBE+Surround: Localize some variables and fixup some flush opsMichael Sevakis
Change-Id: I9fba5b8cbf69d261a7ca1c66e080c08d2fc6d9db
2017-10-12Nitpick configuration code in a few DSP filters to fix some bugsMichael Sevakis
Most importantly is surround shouldn't operate in mono mode. Have it watch and (de)activate itself on relevant format changes as it should. Other changes to better handle buffer allocation failure. PBE was set internally at 100 by default; SBZ. Change-Id: I328e0b674e56751a255eae817d7892d685796b06
2017-09-17fix warning in vorbisAmaury Pouly
Change-Id: I01dd320ac7f4641caaef62363556ca7527dbee19
2017-07-30rbcodec: remove useless includeAmaury Pouly
metadata.c does not need cuesheet.h, which in apps/ and has nothing to do with rbcodec library. Change-Id: I914a49e8c182f5c367d7db3479c2ff39565e5f07
2017-07-30rbcodec: fix compilation in debug modeAmaury Pouly
Change-Id: I124cf59c641c2e161cc147b031d9bef5ef773dfb
2017-02-04Fix dangerous castsAmaury Pouly
On Windows 64-bit, the size of long is 32-bit, thus any pointer to long cast is not valid. In any case, one should use intptr_t and ptrdiff_t when casting to integers. This commit attempts to fix all instances reported by GCC. When relevant, I replaced code by the macros PTR_ADD, ALIGN_UP from system.h Change-Id: I2273b0e8465d3c4689824717ed5afa5ed238a2dc
2017-01-15Fix codecs in simulator builds on WindowsAmaury Pouly
The mingw linker uses strlen() in some cases, and codeclib.c redefines it, that leads to mingw runtime init to call into our strlen() and then ci->strlen() which of course crashes. Apply the same fix as for malloc and friends: rename the symbol. The codeclib.h include is necessary for normal builds. Change-Id: Ifa85901a3e4a31cc0e10b4b905df348a239d5c99
2016-12-03Fix DEBUG build codecsAmaury Pouly
In DEBUG build, the codec API struct is consider with DEBUG flag in apps/ but without DEBUG flah in rbcodecs/, leading to unmatched structure and horrible crashes in some cases (mostly encoders). I have no idea why the codecs Makefile removes the DEBUG flag (maybe for performance reasons?) but it cannot be right. Change-Id: Idb2c5f66741408ec2939624590fc39c4cf69fc2b
2016-09-07Opus: update resume offset correctly while playing.Adam Sampson
The codec wasn't calling ci->set_offset() while decoding; as a result, the saved offset in ci.id3->offset was only updated at the start of the file and when seeking. To reproduce the problem in the simulator or on a real device: - Start playing an Opus file. - Let it play until 15s, then turn the player off. - Turn back on and resume playback. This'll resume correctly from 15s (using time-based resume, I think, as the offset was 0?). - Let it play until 30s, then turn the player off again. - Turn back on and resume playback. This'll resume from 15s, based on the initial position from last time, when it should resume from 30s. I believe this will also fix FS#12799 ("Resuming opus file from bookmark is not working correctly"). Change-Id: Iba67368e0029c968ef802693767e0722719bc38b
2016-05-28Fix race conditions in parallel build.Frank Gevaerts
ffmpeg_bitstream.c is included in libcodec, so there doesn't seem to be any reason for individual codecs to also compile it (and clobber any previous copy while they're at it, leading to broken builds) Change-Id: I2bedc277ab109f44a6e8feb3d12ed01a720e00a6
2016-03-18_BSD_SOURCE is deprecated, and we're supposed to use _DEFAULT_SOURCE now.Frank Gevaerts
Change-Id: Ia051bc758c8fe4002e222511fdc6be613cdd39e7
2015-07-17mp3_enc.c: fix MP3 recording at 32 kHz sample rateCástor Muñoz
Fixes a buffer overflow present when MP3 is encoded at 32000 Hz sample rate, affected bitrates are 320 and 256 kbps. Change-Id: I7634e70409be9d675d47be316a42630dd3147636
2015-02-02iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer
Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
2015-01-30fix surround & pbe dsp crashChiwen Chang
check handle before clean up buffer in flush(). Change-Id: I36a130c45c9f5dce97aa723ef98922b6935ead75
2015-01-22fix pbe/haas surround dsps: surround_enabled, redo flush functions.Chiwen Chang
surround_enabled was never true, end up dsp_surround_flush didn't work; Thats why a cracking noise occurs in right channel when moving track positions. redo pbe/surround flush in a much simpler way suits the current single buffer style. Change-Id: I394054ddfb164b82c90b3dcf49df4442db87d8d2
2015-01-19Enable buflib and core_alloc for warble.Frank Gevaerts
Most of the work comes from http://gerrit.rockbox.org/r/#/c/1088/ by Thomas Jarosch. Change-Id: Iaa673dad2388d1e44fc95ffaa14bafadc6158101
2015-01-19three new DSPsChiwen Chang
perceptual bass enhancement - a bbe-ish group delay corrction with Biophonic EQ boost. - precut auditory fatigue reduction -reduce signal in frequency that may trigger temporary threshold shift haas surround -frequency between f(x1) and f(x2) is always bypassed. -can apply to side only. Change-Id: Icb6355ce9b1c99bf2c58c9385c3c411c0ae209d3
2015-01-11Limit more variables to file scopeThomas Jarosch
Change-Id: I30219d626316776eb73b4205d63376fa3dbc6361
2014-12-27More standard conforming codec_realloc()Thomas Jarosch
- Leave original ptr untouched if allocation fails (bail out early) - Behave like malloc() in case ptr is NULL Change-Id: Ib854ca19bd0e069999b7780d2d9a533ece705add
2014-11-28Fix warning in WMA Pro and remove a c++ comment.Michael Giacomelli
Change-Id: Id9b50c1fdeca4d87f158da717de8958330f027ef
2014-11-28Fix FS#13009.Michael Giacomelli
This file revealed several problems with our ASF parser: 1) The packet count in the ASF was actually a 64 bit value, leading to overflow in very long files. 2) Seeking blindly trusted the bitrate listed in the ASF header rather than computing it from the packet size and number of packets. Fix these problems and fix a few minor issues. Change-Id: Ie0f68734e6423e837757528ddb155f3bdcc979f3
2014-09-22fix yellowMarcin Bukat
Change-Id: Ie3aa9b208e3f4f17d4d02f11f69839e9b381217d
2014-09-22metadata: Add cuesheet embedded in ape tags.nialv7
Change-Id: I5d9e731c3ea786fb910afbb0a5201fc68dcab9f9 Reviewed-on: http://gerrit.rockbox.org/965 Reviewed-by: Nick Peskett <rockbox@peskett.co.uk> Tested: Nick Peskett <rockbox@peskett.co.uk> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-08-30Fix last warning for WarbleMichael Sevakis
Unused result warnings will have to be dealt with separately. Change-Id: I00c45e28d4d43a5376745036e650ff8df576c2db
2014-08-30Get the last errors I hope!Michael Sevakis
Change-Id: Ia285b95480cc9ac6494b745d80892c4b1b912341
2014-08-16Fix warnings from 6ed0087Michael Sevakis
Forgot to (void) an unused parameter when priorityless. usb-drv-rl27xx.c was using a compound init to initialize a semaphore but the structure changed so that it is no longer correct. Use designated initializers to avoid having to complete all fields. Forgot to break compatibility on all plugins and codecs since the kernel objects are now different. Take care of that too and do the sort thing. Change-Id: Ie2ab8da152d40be0c69dc573ced8d697d94b0674
2014-07-13libopus: use iram for more constantsNils Wallménius
Speeds up decoding of the 64 kbps test file by 2.59 MHz and the 128 kbps test file by 4.31 MHz on H300 (cf). Decoding the same files on c200 is sped up by 0.33 MHz and 0.55 MHz respectively. Change-Id: I0f9f9ef6a7293581cf45e3201b33c65504c95c81