summaryrefslogtreecommitdiff
path: root/lib (follow)
Commit message (Collapse)AuthorAge
* opus fix playback opustag skippingWilliam Wilgus2019-01-25
| | | | Change-Id: I9ec35e276e24ec7b5a2e1199d6264d9f2d5d9fc2
* opus fix comment skipping codeWilliam Wilgus2019-01-25
| | | | | | | | | | | | 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
* opus optimize playback functionWilliam Wilgus2019-01-23
| | | | | | | 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
* Fix Opus FS#13133 - Files with embedded artwork 45.8KiB+ skip near beginningWilliam Wilgus2019-01-04
| | | | | | | | | 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
* Third attempt to shut up the warble build printf() warning.Solomon Peachy2018-12-28
| | | | | | (resorting to an explicit cast this time) Change-Id: Ib5fc7bcd9e573cd32fc4372003c6c5429e339652
* Another attempt to silence the warble build warning on 32-bit hostsSolomon Peachy2018-12-28
| | | | Change-Id: Ib83ce41582b18641badb389c3871e501c8be697f
* build: Put all codec optiomization definitions in one placeSolomon Peachy2018-12-25
| | | | | | It was already mostly there. Change-Id: I24ff278d9bf18a54be4b67c3075d5ebbe7947f65
* Hopefully silence the warning in the warble codec build.Solomon Peachy2018-12-24
| | | | Change-Id: I63eef2c33bf3ea31a135cd6336882b600723f946
* AAC bitstream format files supportSolomon Peachy2018-12-22
| | | | | | | | Files with extension "aac" in ADTS or ADIF format are now playable. Full credit goes to Igor Poretsky. Change-Id: I413b34e15e5242fea60d3461966ae0984080f530
* Realmedia related codecs fixes and enhancementsSolomon Peachy2018-12-22
| | | | | | | | | * More tolerance to the file format variations. * AC3 coded files in realaudio format are now playable Full credit to Igor Poretsky Change-Id: Id24e94bc00623e89fb8c80403efa92f69ab1e5d7
* Improved seeking in a52 codecSolomon Peachy2018-12-22
| | | | | | (Patch by Igor Poretsky) Change-Id: I0cdc2021b44f6cd6e76def190d9f04733b922454
* Fix overlapping string region ape.c->read_ape_tagsWilliam Wilgus2018-12-08
| | | | | | Switch to strrchr to find the extension Change-Id: Id7ea01ecc2e0553f560308f8b0fc53bd33b023e5
* Fix speex warning lsp.c->lsp_to_lpcWilliam Wilgus2018-12-08
| | | | | | I'm pretty sure this was a false positive Change-Id: I0ab375d1d844b3d468c24888c371f588052e1ce9
* codecs: Fix elapsed time calculation for large filesSolomon Peachy2018-10-29
| | | | | | | | In particular, this solves seeking glitches seen in ~6 hr mp3 files. (Patch taken from Igor Poretsky's tree) Change-Id: Id65b6726146b6d2d1a223e90b88e401d1b2d597a
* libmad: Back out a change that disabled optimization for libmad.Solomon Peachy2018-09-02
| | | | | | (Caused non-realtime playback on mips..) Change-Id: I878229e16e31d49156f1ae71ab9c7bb627e4c17b
* iPod Classic: disable IRAM1Cástor Muñoz2018-07-30
| | | | | | | | | | | | | | | | | | | | | | 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
* Agptek Rocker: Initial commitMarcin Bukat2018-06-12
| | | | Change-Id: I26b51106c7b1c36a603fba6d521e917d79b5a95b
* Remove explicit 'enum codec_command_action' in codec APIMichael Sevakis2017-12-07
| | | | | | | | | | | | 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
* Undo hacks to meant to get around string formatting limitationsMichael Sevakis2017-11-21
| | | | | | | | | | | | | | | The new vuprintf makes unnecessary workarounds due to formatting limitations. I checked grep output for whatever appeared to fit but it's possible I missed some instances because they weren't so obvious. Also, this means sound settings can dynamically work with any number of decimals rather than the current assumption of one or two. Add an ipow() function to help and take advantage of dynamic field width and precision. Consolidate string formatting of sound settings. Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
* libpcm: Get unbranded structure tag out of my way.Michael Sevakis2017-11-06
| | | | | | No functional changes. Change-Id: If372023cb605389a203a635b700eca20685ad49b
* Revert "tlsf: pack info structs"Franklin Wei2017-10-29
| | | | | | | This reverts commit 8a6d7cefc9bf45b979ff064d87141949e9b81ca4. Packing the structs was mostly a precautionary measure, tlsf should still work without it.
* tlsf: remove memset() call in add_new_area()Franklin Wei2017-10-29
| | | | | | | This call was not needed in the first place, but was causing crashes in sgt-puzzles. Removing it fixes the crashes. Change-Id: I1149d5600e1c97e0e848fdd34bf65d54c930adab
* tlsf: pack info structsFranklin Wei2017-10-29
| | | | | | | This should make it build cleanly under -Wcast-align, which should hopefully avoid any alignment issues on ARM. Change-Id: Ie147323d2d8cb980dcbb94710387b7ee80826c4d
* PBE+Surround: Localize some variables and fixup some flush opsMichael Sevakis2017-10-12
| | | | Change-Id: I9fba5b8cbf69d261a7ca1c66e080c08d2fc6d9db
* Nitpick configuration code in a few DSP filters to fix some bugsMichael Sevakis2017-10-12
| | | | | | | | | | | 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
* Need limits.h for hosted buildsMichael Sevakis2017-10-01
| | | | Change-Id: Iac1433957de80ad5db51396f74acf1f4f8d45bf3
* Replace fp_sqrt function with one that only uses shift, or and sub.Michael Sevakis2017-10-01
| | | | | | | | | | | | Simply extends the current isqrt() to be able to do fractional bits and improves the initial estimate using clz(). iqrt() itself is no more and is equivalent to fp_sqrt(x, 0). The original also had a small bug where the guess comparision should have been >=, not >. Uses no large integer math or division and is very accurate (simply returns a truncated fraction). Change-Id: I2ae26e6505df1770dc01e56220f7385369f90ae9
* fix warning in vorbisAmaury Pouly2017-09-17
| | | | Change-Id: I01dd320ac7f4641caaef62363556ca7527dbee19
* ARM support: provide compiler a better popcount functionMichael Sevakis2017-09-07
| | | | | | | Just the 32-bit one for now. The default uses lookup tables and is ungainly and bloated. Change-Id: I4a2eb31defb1f4d6f6853b65fe6dacc380d6ffc0
* Initial commit for the Sony NWZ linux portAmaury Pouly2017-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SUPPORTED SERIES: - NWZ-E450 - NWZ-E460 - NWZ-E470 - NWZ-E580 - NWZ-A10 NOTES: - bootloader makefile convert an extra font to be installed alongside the bootloader since sysfont is way too small - the toolsicon bitmap comes from the Oxygen iconset - touchscreen driver is untested TODO: - implement audio routing driver (pcm is handled by pcm-alsa) - fix playback: it crashes on illegal instruction in DEBUG builds - find out why the browser starts at / instead of /contents - implement radio support - implement return to OF for usb handling - calibrate battery curve (NB: of can report a battery level on a 0-5 scale but probabl don't want to use that ?) - implement simulator build (we need a nice image of the player) - figure out if we can detect jack removal POTENTIAL TODOS: - try to build a usb serial gadget and gdbserver Change-Id: Ic77d71e0651355d47cc4e423a40fb64a60c69a80
* rbcodec: remove useless includeAmaury Pouly2017-07-30
| | | | | | | metadata.c does not need cuesheet.h, which in apps/ and has nothing to do with rbcodec library. Change-Id: I914a49e8c182f5c367d7db3479c2ff39565e5f07
* rbcodec: fix compilation in debug modeAmaury Pouly2017-07-30
| | | | Change-Id: I124cf59c641c2e161cc147b031d9bef5ef773dfb
* Fix dangerous castsAmaury Pouly2017-02-04
| | | | | | | | | 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
* Fix codecs in simulator builds on WindowsAmaury Pouly2017-01-15
| | | | | | | | | | 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
* unwinder: in get__sp(), use the more correct "msr cpsr_c, ..." formAmaury Pouly2016-12-12
| | | | Change-Id: I9cfdca80536fc9fb6e8983a81219ccdf5c0b3c42
* Fix DEBUG build codecsAmaury Pouly2016-12-03
| | | | | | | | | 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
* Opus: update resume offset correctly while playing.Adam Sampson2016-09-07
| | | | | | | | | | | | | | | | | | | | 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
* Fix race conditions in parallel build.Frank Gevaerts2016-05-28
| | | | | | | | 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
* _BSD_SOURCE is deprecated, and we're supposed to use _DEFAULT_SOURCE now.Frank Gevaerts2016-03-18
| | | | Change-Id: Ia051bc758c8fe4002e222511fdc6be613cdd39e7
* mp3_enc.c: fix MP3 recording at 32 kHz sample rateCástor Muñoz2015-07-17
| | | | | | | Fixes a buffer overflow present when MP3 is encoded at 32000 Hz sample rate, affected bitrates are 320 and 256 kbps. Change-Id: I7634e70409be9d675d47be316a42630dd3147636
* iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix surround & pbe dsp crashChiwen Chang2015-01-30
| | | | | | check handle before clean up buffer in flush(). Change-Id: I36a130c45c9f5dce97aa723ef98922b6935ead75
* fix pbe/haas surround dsps: surround_enabled, redo flush functions.Chiwen Chang2015-01-22
| | | | | | | | 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
* Enable buflib and core_alloc for warble.Frank Gevaerts2015-01-19
| | | | | | | Most of the work comes from http://gerrit.rockbox.org/r/#/c/1088/ by Thomas Jarosch. Change-Id: Iaa673dad2388d1e44fc95ffaa14bafadc6158101
* three new DSPsChiwen Chang2015-01-19
| | | | | | | | | | | | | | | 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
* ARM unwinder for thumb: Fix broken MOV opcodeThomas Jarosch2015-01-12
| | | | | | | | | | | | | | | | | The origin of the register value was never moved in the desired register state due to a typo ('rhs' vs. 'rhd'). While looking at the code, I noticed the action taken for the register value is another copy'n'paste error from the ADD opcode above -> it added to the register value instead of MOVing the current value. Patch submitted upstream. cppcheck reported: [lib/unwarminder/unwarm_thumb.c:473]: (warning) Redundant assignment of 'state.regData[rhd].o' to itself. Change-Id: I78cdbf37a191007a3bddbaa350b906dbce2fe671
* Fix redThomas Jarosch2015-01-12
| | | | Change-Id: Ia7565dac0f6b9703a5dfff723167620deb218bc3
* ARM unwinder for thumb: Fix broken SUB opcodeThomas Jarosch2015-01-12
| | | | | | | Detected while looking through the code. Patch submitted upstream. Change-Id: I7ebe7b5f5947cf3df1b054d545dba92829f21b99
* ARM unwinder: Add missing 'register' variable in debug outputThomas Jarosch2015-01-12
| | | | | | | Also fix a wrong format specifier for an unsigned variable. Detected by cppcheck, patch submitted upstream. Change-Id: I9b84d91eeb242ed77b53ecc16252c5b35190bb9f
* ARM unwinder: Add missing va_end() call.Thomas Jarosch2015-01-12
| | | | | | Detected by cppcheck, patch submitted upstream. Change-Id: Ieeec9d2e7e2c22d64c94936958f5a4ff02d3548b