summaryrefslogtreecommitdiff
path: root/lib/rbcodec (follow)
Commit message (Collapse)AuthorAge
...
* Silence some (harmless) warnings.Frank Gevaerts2013-06-16
| | | | Change-Id: I8d1278b8cfaa376d2ad5a99dd552dc980c66e1da
* Fix id3v2 album art if more than one image is present.Dominik Riebeling2013-06-15
| | | | | | | | | | | | | Rockbox only uses the first album art image (APIC / PIC frame) found in id3v2 tags. When a file contains more than one image the second one is ignored but the parsealbumart() callback overwrites the already set data. This causes the metadata structure to contain an invalid pointer to the image data, resulting in no image shown. Make parsealbumart() aware of this and skip parsing when an albumart image has already been found. Fixes FS#12870. Change-Id: Id8164f319cd5e1ee868b581f8f4ad3ea69c17f77
* Missed removing a couple unwanted includes in previous commit.Michael Sevakis2013-05-27
| | | | | | Get those too. Change-Id: Id2a39afe7a61d6ec0cea38633b94fe1b7122204f
* Remove explicit config.h and system.h includes from DSP code.Michael Sevakis2013-05-27
| | | | | | | Replace with rbcodecconfig.h and platform.h includes. Remove now- unneeded ones as well. Change-Id: I6111b71e90bf86d9fe272a7916f2d34a5c6dd724
* SPC Codec ARMv5: I didn't have fast gauss quite right.Michael Sevakis2013-05-26
| | | | | | Fix wrapping hazard which did eventually manifest on the right file. Change-Id: I996a6efd3181b56fd172b5c3a526c7434f88bbbe
* Remove dsp_callback because DSP is now library code, not app code.Michael Sevakis2013-05-23
| | | | | | Yep, nope, not necessary anymore. Just call functions directly. Change-Id: I21dc35f8d674c2a9c8379b7cebd5613c1f05b5eb
* SPC Codec: Add ARMv5 optimized code. Easy peasy.Michael Sevakis2013-05-23
| | | | | | Why? Why not? Cuts a few MHz. Change-Id: Ied5c70b1aedd255cbe5d42b7d3028bbe47aad01d
* SPC Codec: Simplify configuration and assume nothing need be disabled.Michael Sevakis2013-05-21
| | | | | | | Most SoCs are these days are fast enough for realtime BRR, gaussian interpolation and echo processing. Change-Id: I180ce8ad45242c67b5e573a406b9522098a3f12b
* SPC Codec: Have metadata parser fill in frequency and bitrate.Michael Sevakis2013-05-21
| | | | Change-Id: I6c72f4d1c79b1a99a11fb28e7d46886c08a56a75
* SPC Codec: Need to restore a bit more data from cached waves.Michael Sevakis2013-05-21
| | | | | | 'Nuff said. Last update wasn't quite right. Change-Id: I082a79c4e0c82b968fe2375cb82ee5c3a64a208b
* Opus: fix glitch caused by 2e9aa3dNils Wallménius2013-05-21
| | | | Change-Id: I1519f3bf2cdf74f3d4741951973352b2678b7722
* Fix FS#9577 - SNES player missing tracks on certain SPCsMichael Sevakis2013-05-21
| | | | | | | | Affected BRR cached waveforms but not realtime BRR decode as far as I could ascertain. BRR cached waves required loop points to be inside the initial waveform but this change removes that restriction. Change-Id: I0ef4db720e5c28bd7b2fb9ae255d27c0a7213f79
* Fix 87021f7 errors. There is no this->echo_pos when SPC_NOECHO != 0.Michael Sevakis2013-05-21
| | | | | | Anyway, that's true now. Change-Id: I247ea9a10543a8b65f3e73495f0e2ea725ec533e
* SPC Codec: Refactor for CPU and clean up some things.Michael Sevakis2013-05-21
| | | | | | | | | | | | | CPU optimization gets its own files in which to fill-in optimizable routines. Some pointless #if 0's for profiling need removal. Those macros are empty if not profiling. Force some functions that are undesirable to be force-inlined by the compiler to be not inlined. Change-Id: Ia7b7e45380d7efb20c9b1a4d52e05db3ef6bbaab
* Opus: fix seeking to start of trackNils Wallménius2013-05-19
| | | | Change-Id: I8a8604d6726304d04281671b475b2f75f9bfc0e5
* Opus: avoid allocating space for comment packetsNils Wallménius2013-05-19
| | | | | | Fixes playback of files with large embedded album art. Change-Id: I94d336e3da968a93047dd00a5fa65e4c3423a7da
* Fix opus craches with large embedded album artNils Wallménius2013-05-18
| | | | | | | | | | | | Use the tlsf malloc and friends instead of the silly codec_malloc to get actually working free and saner realloc that doesn't leak memory. Makes files with moderately sized embedded AA play on targets with large enough codec buffers and files with too large AA are now skipped rather than crashing. Fixes crash when playing example file in FS#12842. Change-Id: I06562955c4d9a95bd90f55738214fba462092b71
* Introduce new hermite polynomial resampler.Michael Sevakis2013-05-16
| | | | | | | | | | | | | | | Uses the Catmull-Rom case of Hermite cubic splines. Vastly improves the quality and accuracy of audio resampling with a rather minor additional overhead compared to the previous linear implementation. ARM and Coldfire assembly implementations included. Change-Id: Ic45d84bc66c5b312ef373198297a952167a4be26 Reviewed-on: http://gerrit.rockbox.org/304 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Rename all the "lin_resample..." stuff to simply "resample_...".Michael Sevakis2013-05-07
| | | | Change-Id: I79f44f0dcc1b23b33a5040795220713660a1d18a
* Purge the usage of DSP_SWITCH_FREQUENCY.Michael Sevakis2013-05-05
| | | | | | | | DSP_SWITCH_FREQUENCY has been deprecated and the same enumerated value as DSP_SET_FREQUENCY since major DSP revisions were committed. This task should have been performed much earlier but, oh well, do it now. Change-Id: I3f30d651b894136a07c7e17f78fc16a7d98631ff
* Fix missed optimization opportunity in dsp_process.Michael Sevakis2013-05-04
| | | | | | | | | Input type can only change once per call because the DSP parameters are only copied at the start and input is always taken from the src buffer which means sample input format switching can be once per call instead of once per loop. Change-Id: Ifa3521753428fb0e6997e4934f24a3b915628cc7
* Cleanup and simplify latest DSP code incarnation.Michael Sevakis2013-05-04
| | | | | | | | | | | | | | Some things can just be a bit simpler in handling the list of stages and some things, especially format change handling, can be simplified for each stage implementation. Format changes are sent through the configure() callback. Hide some internal details and variables from processing stages and let the core deal with it. Do some miscellaneous cleanup and keep things a bit better factored. Change-Id: I19dd8ce1d0b792ba914d426013088a49a52ecb7e
* Properly seek to next id3v2 frame for unsynced tags.Dominik Riebeling2013-04-26
| | | | | | | | | | | When seeking to the next id3v2 frame we need to consider if the tag has the unsync flag set. Not doing so will likely make parsing end up in the middle of the current frame if the frame size exceeds the upper limit set during read. The latter usually happens for album art frames. Fixes FS#12849. Change-Id: Ic92853eef4374508d84df347bcc66b6661d5037d
* Properly implement volume in warble. dB cut only.Michael Sevakis2013-04-25
| | | | Change-Id: I34b77287ba0b1a0002db3d52e893a52c50593362
* Make fixepoint.c as a shared library (libfixedpoint.a).Michael Sevakis2013-04-26
| | | | | | | Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d Reviewed-on: http://gerrit.rockbox.org/456 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Straighten out the mad twisted state of sound.c and related areas.Michael Sevakis2013-04-15
| | | | | | | | | | | | | | | | | | This is going right in since it's long overdue. If anything is goofed, drop me a line or just tweak it yourself if you know what's wrong. :-) Make HW/SW codec interface more uniform when emulating HW functionality on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to- DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX" APIs are all in sound.c with none in DSP code any longer. Reduce number of settings definitions needed by each codec by providing defaults for common ones like balance, channels and SW tone controls. Remove need for separate SIM code and tables and add virtual codec header for hosted targets. Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
* Implement universal in-PCM-driver software volume control.Michael Sevakis2013-04-11
| | | | | | | | | | | | | | | | | | | | | | Implements double-buffered volume, balance and prescaling control in the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring that all PCM is volume controlled and level changes are low in latency. Supports -73 to +6 dB using a 15-bit factor so that no large-integer math is needed. Low-level hardware drivers do not have to implement it themselves but parameters can be changed (currently defined in pcm-internal.h) to work best with a particular SoC or to provide different volume ranges. Volume and prescale calls should be made in the codec driver. It should appear as a normal hardware interface. PCM volume calls expect .1 dB units. Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db Reviewed-on: http://gerrit.rockbox.org/423 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Move fixedpoint.h to be accessible in /firmware.Michael Sevakis2013-04-10
| | | | | | | | | | Will need it soon enough. Combine the contents of all the various fixedpoint.h files. Not moving fixedpoint.c for now since I'm not sure where it should be and it causes some dependency issues. Change-Id: Ideacbca2ca78f9158c2b114b113c274f68e908d5
* VGM Codec: Improve time and fade behavior. Tweak minor misc.Michael Sevakis2013-03-06
| | | | | | | | | | | | | | | | | Prevents cutoff of tracks, especially short ones: * Extend looped tracks by fade length to fade at start of loop repeat. * No fade occurs for non-repeating track only having an intro. * Uses id3.tail_trim field to store fade duration. Use libGME built-in elapsed time reporting instead of custom calculation: * libGME already reports in milliseconds. * Don't advance time counter when Repeat == One. It just runs the progress over the length limit. Fix a comment about sample rate and set the reported bitrate to be accurate for 44.1 kHz stereo. Change-Id: I3ede22bda0f9a941a3fef751f4d678eb0027344c
* Fix FSB#12826 - Mini-sound burp between track skips [with WMA].Michael Sevakis2013-02-18
| | | | | | | | | | | Flush decoder state and frame out buffer upon a forced stop to prevent a short burst of stale audio from the previously decoding track from playing when skipping from one WMA track to another. Change-Id: I24c910c5dbd83caed2510db68d9e39a474332a79 Reviewed-on: http://gerrit.rockbox.org/406 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* EQ settings: Rework the settings to clean up the config file.Jonathan Gordon2013-02-09
| | | | | | | | | | | | | | | | | | | Instead of 3 cfg lines per eq band there is now a single line for each: <config name>: <cutoff/center freq>, <q>, <gain> In addition, the config value names make a bit more sense. The old settings are still readable but config.cfg and any new settings files will be written with the new config values. (The old settings will be removed completly sometime after the next stable release). Also a slight rework of the advanced EQ menu UI Change-Id: I9008658d36ded442a5f2f825916df42a3934cbef Reviewed-on: http://gerrit.rockbox.org/394 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* 10 Band EQ w/PresetsHayden Pearce2013-01-29
| | | | | | | | | | | - A 10 Band EQ for Rockbox w/ presets adapted from VLC - frequency stepping at 32, 64, 125, 250, 500 1K, 2K, 4K, 8K, 16K Change-Id: I85ad84d70a534edfc66c6ad9af8a76f022a02ec7 Reviewed-on: http://gerrit.rockbox.org/386 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* Deprecate the EXTRA_LIBS variable.Björn Stenberg2013-01-24
| | | | Instead specify explicit library dependencies for codecs and plugins.
* ARMv5 optimized complex multiply function for libopus.Michael Giacomelli2013-01-21
| | | | | | | | | | | | | Speeds up decoding of 128k opus files by 1.2MHz on AMSv2. Rounding error is 1 bit due to KissFFT using a 15 bit shift instead of a 16 bit shift. Also, change an LDMIA in the armv4 code to LDM as the pointer should not increment. Change-Id: I626a207c6a056a1984e33cfe89415c35d0caed93 Reviewed-on: http://gerrit.rockbox.org/377 Reviewed-by: Michael Giacomelli <giac2000@hotmail.com> Tested-by: Michael Giacomelli <giac2000@hotmail.com>
* Fix FS#12794 - new EQ code does not compile for the Nokia N8x0Michael Sevakis2012-12-28
| | | | | | | | | The old GCC version currently required (sbox-arm-linux-gcc 3.4.4 release) apparently has trouble with function pointers used as static array initializers when using indexed initializers + ranges (ie. [A ... B] = fn). Change-Id: I494c2b607e4d93a9893264749d0ac257fb54ce3b
* Add support for 16 bit 'half float' format PCM.Michael Giacomelli2012-11-22
| | | | | | | | | I'm not 100% sure that the rounding of denormals is correct. As compared to foobar2000, some samples are off by +1 LSB. However, since I can't output 24 bit PCM easily with rockbox, I'm not sure if this is due to a bug or just how rockbox rounds. In practice I don't think it matters so I'm just going to commit this for now. Change-Id: Ic0792fcb172e4369a5512d202121c2b918b36079
* flac: use 64 bit math to calculate the elapsed timeNils Wallménius2012-10-25
| | | | | | avoids overflows for very long files Change-Id: Idb1e9a411bd9007cfddbbd2d3dcf127645fa9a7c
* libgme: fix badly written cpp conditions spotted by gcc 4.6.3Marcin Bukat2012-10-18
| | | | Change-Id: Ia3fba4ba2c46a202c48f3a9b7db0cba9f75b6a50
* opus: only put the mdct function in iram for cf,Nils Wallménius2012-10-17
| | | | | | doesn't make any speed diff on pp Change-Id: Ia6484e2a2bbf72d33a583470918c0fa267fd9b97
* opus: don't rely on stride being 1<<shiftNils Wallménius2012-10-16
| | | | Change-Id: I2d64fb20b2526d912eb665df0df4e87459676a92
* opus: use two pointers for mdct pre and post rotationAndree Buschmann2012-10-16
| | | | | | | | | avoids complicated index calculations in the loops. saves 0.3MHz decoding a 64kbps test file on h300 (cf) and 0.2MHz on c200 (pp) Change-Id: I1918912d9a4502f89980c6bb270ec2ef10a07010 Signed-off-by: Nils Wallménius <nils@rockbox.org>
* opus: put hot code in iramNils Wallménius2012-10-16
| | | | | | | Saves 1.1MHz decoding a 64kbps test file on h300 (cf) and 0.2MHz on c200 (pp) Change-Id: If9ed03f2e3787ee497eababda4013fbb5d395946
* Improve seeking in opus, tested on Sansa; not testedFrederik M.J. Vestre2012-10-14
| | | | | | | | | | on a target with a disk. Change-Id: I37c875c9cd014eb61fe5232dab0f4b8f15f057dd Reviewed-on: http://gerrit.rockbox.org/319 Tested-by: Thiago Okada <thiago.mast3r@gmail.com> Reviewed-by: Frederik Vestre <freqmod@gmail.com> Tested-by: Frederik Vestre <freqmod@gmail.com>
* opus: arm asm for C_MULCAndree Buschmann2012-10-10
| | | | | | | | speeds up decoding of a 64kbps test_file by 1.5MHz on c200 (pp) and 1.9MHz on fuzev1 (amsv1) Change-Id: I1db460b634eba608c3e00541d96fc93d5a05710b Signed-off-by: Nils Wallménius <nils@rockbox.org>
* opus: cf asm for C_MULCNils Wallménius2012-10-10
| | | | | | saves 2.7MHz decoding a 64kbps test file on h300 Change-Id: Id63791f79b44ed398ce5d341a5f5212d9a30282e
* opus: replace copy loops with calls to memcpyAndree Buschmann2012-10-07
| | | | | | | | speeds up decoding of a 64kbps test file by 0.5Hz on h300 (cf) 0.9MHz on c200 (pp) and 0.2MHz on fuzev1 (amsv1) Change-Id: Ib537c2393fa6dca0b61e4e9f80eef5e688c2c2bd Signed-off-by: Nils Wallménius <nils@rockbox.org>
* opus: speed up mdct overlap add and copyingAndree Buschmann2012-10-07
| | | | | | | | Unroll overlap add loop by four and use memcpy for copying instead of loops. Change-Id: I17114626a395d5972130251d892f851bc86e3a6a Signed-off-by: Nils Wallménius <nils@rockbox.org>
* opus: cf inline asm for MULT32_32_Q31Nils Wallménius2012-10-06
| | | | | | speeds up decoding of a 64kbps test file by 2MHz on h300 Change-Id: I437d05278fe1c495715cf0e3477f9960d1df9d3a
* opus: full precision MULT32_32_Q31 (32*32=64>>31) multiplicationAndree Buschmann2012-10-06
| | | | | | | | | Replace complicated macro doing three 16*16 muls and add an inline asm implementation for arm, speeds up decoding a 64kbps test file by 0.5MHz on c200 (pp) and gives slightly better precision. Change-Id: I6fc5b83c210f01bffdc38aec54cc5a8b646d8169 Signed-off-by: Nils Wallménius <nils@rockbox.org>
* opus: slight speedup of deemphasisAndree Buschmann2012-10-06
| | | | | | | | | | | Hoist load of coefficients out of the loop. Speeds up decoding of a 64kbps test file by 0.6MHz on h300 (cf) 0.2MHz on c200 (pp) and 0.1MHz on fuzev1 (amsv1) Signed-off-by: Nils Wallménius <nils@rockbox.org> Change-Id: I4be0059fc2a77748575f5fc9378f7f348d64f1c4