summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2012-06-11Fix libmad compilation on MIPS with newer gcc. FS#12013Huan Zhang
Since gcc 4.4 the MIPS port no longer recognizes the "h" asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences. We can achieve the same effect using 128-bit types. See also:GCC 4.4 release notes at http://gcc.gnu.org/gcc-4.4/ Change-Id: I713cdf57cde1a989ad960aa441ab1ccf51f1cdc6
2012-06-07unwarminder: fix data_abort_handler (wrong address to UIE)Amaury Pouly
Change-Id: I060735363f2e408c42a8e11ac1f31dc96e3cb2d6
2012-05-28New crossfeed algorithm for Rockbox: "Meier" crossfeedBertrik Sikken
Emulates the basic "Meier" crossfeed (2 capacitors, 3 resistors) as discussed in http://www.meier-audio.homepage.t-online.de/passivefilter.htm This crossfeed blends a bit of low-pass filtered L signal into the R signal (and vice versa) while adding about 300 us delay to the crossfed-signal. A difference with the crossfeed already present in rockbox, is that this algorithm keeps the total spectrum flat (the one currently in rockbox accentuates low-frequency signals, making it sound a bit muffled). This implementation is quite lightweight, just 3 multiplies per left-right pair of samples. Has a default C implementation and optimized assembly versions for ARM and Coldfire. The crossfeed effect is quite subtle and is noticeable mostly one albums that have very strong left-right separation (e.g. one instrument only on the left, another only on the right). In the user interface, the new crossfeed option appears as "Meier" and is not configureable. The existing crossfeed is renamed to "Custom" as it allows itself to be customised. There is no entry for the user manual yet. Change-Id: Iaa100616fe0fcd7e16f08cdb9a7f41501973eee1
2012-05-28Use shorter lines to show an ARM backtrace (so address fit on the clip zip ↵Bertrik Sikken
screen) Change-Id: Ib36c09a44230fbaaa119f756367f98bdc7756983
2012-05-21Stop timestretch freezing things during format changes.Michael Sevakis
When it was inactive but enabled, the format change hook was dropping through to code that it shouldn't execute without it also being active in processing samples. Change-Id: Ie7899df0395d3f0d10f2bf2b55ea549dd06749a7
2012-05-20Expand the range of the inverse quant table in WMA Pro.Michael Giacomelli
Several of the problem samples on the tracker use values outside this range. Trying the larger table doesn't quite seem to fix things, but its only a small amount of additional memory and looking at ffmpeg, I think the larger table is correct. Change-Id: Id046e62b68550701aa1f80c9abd0a1dcd711bd0d
2012-05-20Revert "Work in progress hermite resampler."Michael Giacomelli
This reverts commit f358228ea1bc66804e9ea12b65c2593c6c1fe8ee.
2012-05-20support decoding of files that contain the number of vector coded ↵Michael Giacomelli
coefficients in their bitstream No known samples are fixed by this problem, but I haven't tested many. Backport of ffmpeg revision 26388. Change-Id: Ife9654b7477a432834e3cab2cb43d16da071445a
2012-05-20Work in progress hermite resampler.Michael Giacomelli
Based on http://src.gnu-darwin.org/ports/multimedia/helixplayer/work/hxplay-1.0.7/audio/resampler/hermite.c Change-Id: Id87565a060aa2383701e7c2f3ea023c7555ad9ef
2012-05-13dsp_arm: Fix up some .section directives to fix crash on app targets.Thomas Martitz
This is needed on app targets as e.g. ".section .icode" leads to the code getting linked to incorrect locations (0x0 in this case). Change-Id: Ic28c5ae6d4f8001d211d685b5ca92d5ffff0c7b2
2012-05-12TDSpeed: Fix crackling on some systemsNils Wallménius
Use memmove instead of memcpy for overlapping copy, fixes crackling in sims and warble on my system. Native targets seem to have been unaffected. Change-Id: I265d4ce373e224581bd2f5ba15c75b473ec231f2
2012-05-11TDSpeed settings to setup call need to be recorded, always.Michael Sevakis
If the settings, like samplerate, were to go out of range where timestretch drops out of processing and then go back to the same as when they were valid, it would fail to switch back on by itelf. Change-Id: Ic5bcb268540b0db8e0483117b8a5a0ce5c5a9db0
2012-05-11TDSpeed: Minor assembly optimization to frame fade on Coldfire.Michael Sevakis
Makes quite a huge difference to get rid of 64-bit math in a hot area. Cuts about 12 MHz. Generic routine generates good code on ARM and asm cuts no instructions there. Change-Id: I4ac647406006c42004f9f5ab396cbf4e85688854
2012-05-10TDSpeed: Fix up samples consumed return (FS#12666) + other stuff like...Michael Sevakis
Wrap up the the stereo case into loops and remove unused calculations hanging out in tdspeed_update(). A wee little bit of code style and column policing. Change-Id: I8dd3ab4b3e7e56b55dc00c00f3e32996228cc457
2012-05-09Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROLNils Wallménius
Also move the definition to config.h Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff Reviewed-on: http://gerrit.rockbox.org/234 Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-08Tweak dsp_format_change_process (default format handler).Michael Sevakis
Just stop searching if the entry is found (as it should have been). Change-Id: Id968694e825282d58c8ca4a7789c236f98643a5f
2012-05-08Consolidate some sample input code.Michael Sevakis
Input functions have common setup sequences that can be placed into an inline function instead of repeating it all repeatedly. Change-Id: I9e62904ff0948651c64ddf160ed4400ed6dc81ff
2012-05-08Remove STATICIRAM hackNils Wallménius
It was only needed by the old arm toolchain that we no longer use or support. Change-Id: Id0e6c67477f8834a637079b03cde5fbf9da68b1c Reviewed-on: http://gerrit.rockbox.org/233 Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-07rbcodec: abstract tdspeed buffer allocationNils Wallménius
Move code dealing with rockbox specific buflib allocations into a rockbox specific file and implement buffer allocation with malloc/free for warble/stand alone lib. Based on patch by Sean Bartell. Change-Id: I8cb85dad5890fbd34c1bb26abbb89c0b0f6b55cf Reviewed-on: http://gerrit.rockbox.org/144 Tested-by: Nils Wallménius <nils@rockbox.org> Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-06remove extraneous parensRafaël Carré
2012-05-06asap codec: remove invalid memsetRafaël Carré
This would zero the first 4 or 8 bytes of the array because it is declared as a pointer rockbox/lib/rbcodec/codecs/libasap/asap.c:1229:44: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(ast -> memory, 0, sizeof(ast -> memory)); ~~~~~~~~~~~~~ ~~~~~~~^~~~~~
2012-05-06Don't use function in a functionRafaël Carré
It is not supported by clang
2012-05-06Correct comments in lin_resample re: what is actually used by asm.Michael Sevakis
Change-Id: Idd457f3c645c5d469ebc6fab0bfc85e7b8dd56da
2012-05-04Remove pointless IRAM allocation from voice DSP.Michael Sevakis
It's always used in MONO mode and doesn't need the IRAM sample/ resample buffers and 1280 bytes can be freed. M5 can now have its PCM mixer downmix buffer in IRAM. Change-Id: I0af08be5b212b7dfe382bba588a6585eb328a038
2012-05-03rbcodec: Hooks for target specific functions in dsp_process loopMichael Sevakis
Use them to move tick counting, yielding and coldfire macsr handling code to a rockbox specific file. Change-Id: Id7417dc98c08a342eba45ba56b044a276e50564b Reviewed-on: http://gerrit.rockbox.org/229 Tested-by: Nils Wallménius <nils@rockbox.org> Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-03Add rbcodecplatform.h and rbcodecconfig.h.Sean Bartell
librbcodec users must provide these two files when the library is built. rbcodecconfig.h provides configuration #defines and basic types, and will be included by public librbcodec headers, so it must not conflict with the user's code. rbcodecplatform.h provides various OS functions, and will only be included by source files and private headers. This system is intended to provide maximum flexibility for use on embedded systems, where no operating system headers are included. Unix systems can just copy rbcodecconfig-example.h and rbcodecplatform-unix.h with minimal changes. Change-Id: I350a2274d173da391fd1ca00c4202e9760d91def Reviewed-on: http://gerrit.rockbox.org/143 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
2012-05-02Delete unused stub functions.Nils Wallménius
Change-Id: I886d65b60364699845475e2ea1a741aece506a8f
2012-05-01Delete autoconf.h file in the warble source, one less headache.Nils Wallménius
Change-Id: I83c1b523de453c45aa4df3340b9a1aa63bf321ed
2012-05-01rbcodec refactoring: autoresumableSean Bartell
Moved to playback.c, since it doesn't use metadata from the music file. Change-Id: I5c3ad7750d94b36754f64eb302f96ec163785cb9 Reviewed-on: http://gerrit.rockbox.org/142 Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-01Fix audio corruption when sequentially playing low bitrate WMA filesMichael Giacomelli
for real this time. Also, use English grammar. Change-Id: I1f2156afa313280deb02b58a191511699671a761
2012-05-01Make INITDATA_ATTR work on everything that has INIT_ATTR enabled for code.Michael Sevakis
Change-Id: If9936bfbbd3bc3eb2a3e3e290701b8517eabfb13
2012-05-01Fix corrupt when repeatidly playing very low bitrate WMA files.Michael Giacomelli
The LSP feature in WMA requires that the noise table values be doubled verses when it is not used. Unfortunately, the previous code would double the same values every time a LSP file was decoded without first resetting them to their original values. Change the code to check if the values are already doubled, and then double/halve them as needed. This is still a bit ugly, in the future consider using the built in rockbox dither instead of a lookup table. Fixes playback when skipping back and forth between low and high bitrate WMA. Change-Id: I4c393092e4a789bc8f98d74274fe207400b9550e Reviewed-on: http://gerrit.rockbox.org/226 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com> Tested-by: Michael Giacomelli <giac2000@hotmail.com>
2012-04-30Should've had dsp_replaygain_set_gains as static for now...Michael Sevakis
...because currently gains are only set through dsp_configure. Change-Id: I2866473a82fdd5f41de4705b45928daa7e43f8eb
2012-04-30Still need settings.h in dsp_misc.c for now for software volume.Michael Sevakis
Change-Id: I824e8f9935013f6e2a1db6ccd2db4bd406257057
2012-04-30Make DSP's replaygain independent of global_settings.Michael Sevakis
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h. Intermediate functions in misc.c handle any adjustment and calling the rbcodec APIs. Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024 Reviewed-on: http://gerrit.rockbox.org/140 Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-30Warble must have a call to dsp_init before setting options or using it.Michael Sevakis
Change-Id: If5cabba99baffe87002d07f11641175f539315a1
2012-04-29Put the <string.h> channel_mode.c for memcpy.Michael Sevakis
Hmmm, how'd I miss that? Change-Id: I30d9a1b5f053aad069687aa0a01ebdf40a6b2d76
2012-04-29Make rbcodec/dsp includes more specific.Michael Sevakis
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29Make compressor_update static.Michael Sevakis
Change-Id: Ic29242b4c397e82c2bee3808492a2d0a9ffebbe6
2012-04-29Lower IRAM footprint on ARM.Michael Sevakis
Move a few functions to .text that probably don't see a huge benefit from being .icode. Will scrutinize later. Change-Id: I7bdffc326076c5cd7e6a1c57d25d31e653920327
2012-04-29Fix 3g warning in dsp_arm.S (which showed as an error).Michael Sevakis
Change-Id: Iccbeca66e809413dda90fec36439b4a180b8a879
2012-04-29Get warble building again.Michael Sevakis
Change-Id: Ibdb2d9064d0e948cfb745c10a7b23de1a750d55b
2012-04-29Fix no newline at end warning.Michael Sevakis
Change-Id: I9edb1ebb34f91893b6290d7640fcdaede3434b40
2012-04-29Fundamentally rewrite much of the audio DSP.Michael Sevakis
Creates a standard buffer passing, local data passing and messaging system for processing stages. Stages can be moved to their own source files to reduce clutter and ease assimilation of new ones. dsp.c becomes dsp_core.c which supports an engine and framework for effects. Formats and change notifications are passed along with the buffer so that they arrive at the correct time at each stage in the chain regardless of the internal delays of a particular one. Removes restrictions on the number of samples that can be processed at a time and it pays attention to destination buffer size restrictions without having to limit input count, which also allows pcmbuf to remain fuller and safely set its own buffer limits as it sees fit. There is no longer a need to query input/output counts given a certain number of input samples; just give it the sizes of the source and destination buffers. Works in harmony with stages that are not deterministic in terms of sample input/output ratio (like both resamplers but most notably the timestretch). As a result it fixes quirks with timestretch hanging up with certain settings and it now operates properly throughout its full settings range. Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734 Reviewed-on: http://gerrit.rockbox.org/200 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-28rbcodec refactoring: get_audio_base_data_typeSean Bartell
This function has been changed to rbcodec_format_is_atomic, which doesn't require an enum from the kernel. Change-Id: I1d537605087fe130a9b545509d7b8a340806dbf2 Reviewed-on: http://gerrit.rockbox.org/141 Reviewed-by: Nils Wallménius <nils@rockbox.org> Tested-by: Nils Wallménius <nils@rockbox.org>
2012-04-27Some whitespace correction in dsp_*.SMichael Sevakis
Change-Id: I6ee14c0adc9dd456c8a2d171952cbaedb3752428
2012-04-27rbcodec refactoring: dsp_set_eq_coefsSean Bartell
dsp_set_eq_coefs now has parameters for the band settings, so it doesn't need to access global_settings. Change-Id: I29ac19fc353b15a79cb25f0e45132aef0881e4c9 Reviewed-on: http://gerrit.rockbox.org/138 Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-04-26Consolidate compressor settings into a struct.Michael Sevakis
Doing that makes things cleaner for later on. Change-Id: I4e279aa57ace16a348acc0fc09059592325ec95f
2012-04-26Add a more correct absolute difference function to dsp-util.Michael Sevakis
Differences between signed samples cover the entire unsigned 32-bit range. "abs" will think any difference exceeding INT32_MAX is negative which is not corrent. Test which argument is greater and subtract the lesser from it, outputting unsigned difference. Change-Id: I73a8e5e418d49ff73d1a7c98eeb4731946dcfe84
2012-04-25Add codecs to librbcodec.Sean Bartell
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>