summaryrefslogtreecommitdiff
path: root/apps/codecs/mpa.c (follow)
Commit message (Collapse)AuthorAge
* Add codecs to librbcodec.Sean Bartell2012-04-25
| | | | | | | 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>
* Commit to certain names for cache coherency APIs and discard the aliases.Michael Sevakis2011-12-17
| | | | | | | Wouldn't surprise me a bit to get some non-green. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
* Commit work started in FS#12153 to put timing/position information in PCMMichael Sevakis2011-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | buffer chunks. * Samples and position indication is closely associated with audio data instead of compensating by a latency constant. Alleviates problems with using the elapsed as a track indicator where it could be off by several steps. * Timing is accurate throughout track even if resampling for pitch shift, whereas before it updated during transition latency at the normal 1:1 rate. * Simpler PCM buffer with a constant chunk size, no linked lists. In converting crossfade, a minor change was made to not change the WPS until the fade-in of the incoming track, whereas before it would change upon the start of the fade-out of the outgoing track possibly having the WPS change with far too much lead time. Codec changes are to set elapsed times *before* writing next PCM frame because time and position data last set are saved in the next committed PCM chunk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30366 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12069 - Playback rework - first stages. Gives as thorough as ↵Michael Sevakis2011-04-27
| | | | | | possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
* Purge buffer and codec APIs existing exclusively in support of mpa.codec and ↵Michael Sevakis2011-03-16
| | | | | | fix that to not require them: buf_get_offset and ci.advance_buffer_loc. Sort APIs; everything must become incompatible. :( git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29595 a1c6a512-1295-4272-9138-f99709370657
* Merge functionality of wakeups and semaphores-- fewer APIs and object types. ↵Michael Sevakis2011-03-02
| | | | | | semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
* Enforce that codecs wait for their metadata in a proper-ish and consistent ↵Michael Sevakis2011-02-20
| | | | | | manner. Sort of a halfway patch; best would be to give them an internal copy of the current track information which lasts unaltered by playback until a track switch or unload. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29348 a1c6a512-1295-4272-9138-f99709370657
* mpa: remove bad enum comparison spotted by gcc 4.5.1Rafaël Carré2010-08-01
| | | | | | MAD_FLAG_INCOMPLETE only applies to frame header and isn't an error git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27655 a1c6a512-1295-4272-9138-f99709370657
* codecs: mark some local variables with 'static'Nils Wallménius2010-07-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27566 a1c6a512-1295-4272-9138-f99709370657
* Comment unused code in libmad. Clean up initialization and memset'ing of ↵Andree Buschmann2010-06-27
| | | | | | decoder arrays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27159 a1c6a512-1295-4272-9138-f99709370657
* Submit FS#11365. Speed up mp3 decoding on ARM processors. It is faster to ↵Andree Buschmann2010-06-10
| | | | | | use the C-implementation of dct32 compiled with -O1 as the asm implementation of dct32 compiled with -O2. Configuration for Coldfire processors is untouched. In the new configuration the stack of the COP decoding thread needs to be increased on dualcore targets. Speed is increasing by up to 0.9 MHz (-O2 against -O1 using eabi). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26746 a1c6a512-1295-4272-9138-f99709370657
* Remove more tabsAndree Buschmann2010-02-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24550 a1c6a512-1295-4272-9138-f99709370657
* Fix inaccurate time display for 44.1 (and 22.05) kHz MP3 audio tracks. Time ↵Magnus Holmgren2009-08-03
| | | | | | was off by about 0.2%. Doesn't sound much, but after one hour, that's 8 seconds. Also fix a problem when seeking to near the end of a file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22145 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#10139 (broken seek for very long mp3 files) through avoiding int32 ↵Andree Buschmann2009-04-20
| | | | | | overflow in calculation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20755 a1c6a512-1295-4272-9138-f99709370657
* Make basic cache functions into calls, and get rid of ↵Michael Sevakis2009-02-11
| | | | | | CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
* Make local functions static in codecs, where possible.Bertrik Sikken2008-12-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19612 a1c6a512-1295-4272-9138-f99709370657
* Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis2008-12-10
| | | | | | gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
* Opening function brace style police.Michael Sevakis2008-09-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18574 a1c6a512-1295-4272-9138-f99709370657
* Simplify synchronizaton for MPA codec and make it fully atomic, let synth ↵Michael Sevakis2008-09-23
| | | | | | thread exist for life of codec, do a bit of cleanup and use number of cores do determine if it is compiled as multithread instead of CPU type. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18573 a1c6a512-1295-4272-9138-f99709370657
* Hopefully fix glitches when seeking in MP3s on dual core processors. Also, ↵Michael Giacomelli2008-09-22
| | | | | | clean up initialization and preprocessor commands. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18563 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#9318 - MP3 synthesis filter on COP. Loads the MP3 synth filer on ↵Michael Giacomelli2008-09-20
| | | | | | to the CoProcessor on all PortalPlayer devices, resulting in an ~90% speedup according to test_codec on the Sansa. Real world improvement is somewhat less, but still considerable. Allows MP3 decoding at 30MHz without boosting, or use of more DSP/EQ with less boosting/skipping, thus improving battery life. Minor changes to mpegplayer to retain compatibility with libmad changes. Should be no significant changes for other targets or codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18557 a1c6a512-1295-4272-9138-f99709370657
* Removed unused abort function implementationBertrik Sikken2008-08-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18261 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Move audio_set_elapsed to mpa.c, as recommended by the TODO note. Please ↵Nicolas Pennequin2008-04-03
| | | | | | correct me if affecting ci->id3->elapsed directly (ie without using ci->set_elapsed) is wrong. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16945 a1c6a512-1295-4272-9138-f99709370657
* Move codec_get_file_pos somewhere else like the comment said should be done. ↵Michael Sevakis2008-03-29
| | | | | | Codec API version increment was needed so update all codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16874 a1c6a512-1295-4272-9138-f99709370657
* Fix mp3 resumeBrandon Low2007-11-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15481 a1c6a512-1295-4272-9138-f99709370657
* Remove conf_filechunk, it should never have been a setting and its ↵Brandon Low2007-11-05
| | | | | | implementation doesn't do what it claims any way git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15478 a1c6a512-1295-4272-9138-f99709370657
* Don't keep useless id3v2 or other leading tag data on the buffer, it could ↵Brandon Low2007-11-05
| | | | | | be large git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15465 a1c6a512-1295-4272-9138-f99709370657
* SWCODEC: Dsp speed optimizations. Changes for more modularity. Removal of ↵Michael Sevakis2007-02-24
| | | | | | some usless stuff. Some assembly routines for Coldfire with speed in mind over size for the outputs but the channel modes remain compact. Miscellaneous coldfire asm updates to accomodate the changes. Codec API structure version has to increase so do a full update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12472 a1c6a512-1295-4272-9138-f99709370657
* SWCODEC: Annoying neatness update. Use intptr_t for codec_configure_callback ↵Michael Sevakis2007-02-10
| | | | | | and dsp_configure and stop all the silly type casting of intergral types to pointers to set dsp configuration and watermarks. Shouldn't have any effect on already compiled codecs at all. Will fix any important patches in the tracker so they compile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12259 a1c6a512-1295-4272-9138-f99709370657
* Fix resampling clicking as much as possible at the moment. 1) Upsampling ↵Michael Sevakis2007-02-07
| | | | | | clicked because of size inaccuracies returned by DSP. Fix by simplifying audio system to use per-channel sample count from codec to pcm buffer. 2) Downsampling affected by 1) and was often starting passed the end of the data when not enough was available to generate an output sample. Fix by clamping input range to last sample in buffer and using the last sample value in the buffer. A perfect fix will require a double buffering scheme on the resampler to sufficient data during small data transients on both ends at all times of the down ratio on input and the up ratio on output. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12218 a1c6a512-1295-4272-9138-f99709370657
* FS#6357, patch 1: let iramcopy and bss share the same space in codecs andTomasz Malesinski2006-11-26
| | | | | | | | | | plugins. Currently, in case of plugins using IRAM bss is cleared twice, once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only during codec initialization. Also, removed double variables in codecs storing a pointer to codec_api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
* SWCODEC: Stop clicks between tracks when resampler is active by only ↵Michael Sevakis2006-11-26
| | | | | | switching the DSP frequency and not resetting the resampler at track boundaries. Will make sure DSP is correctly flushed at dicontinuities but don't hear any problems currently. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11600 a1c6a512-1295-4272-9138-f99709370657
* Re-enable the currently unused and broken dithering and noise shaping code ↵Thom Johansen2006-10-27
| | | | | | already in Rockbox, and make it a user option instead of a codec-controlled option. The majority of people probably will not even hear any difference with this enabled, but feedback is welcome. Save your settings! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11368 a1c6a512-1295-4272-9138-f99709370657
* Patch from bug report #5200 by Mark Arigo - attempt to fix gapless playback ↵Dave Chapman2006-05-20
| | | | | | after seeking in an MP3 file. It works for me, but needs more testing with a wider range of files before we can close the bug report - please post feedback on the tracker. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9962 a1c6a512-1295-4272-9138-f99709370657
* Tweak MP3 seeking a little, and don't do gapless trim if a seek has been done.Magnus Holmgren2006-05-01
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9848 a1c6a512-1295-4272-9138-f99709370657
* Remove an unneeded define, add a todoBrandon Low2006-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9765 a1c6a512-1295-4272-9138-f99709370657
* Comment and make pretty the hackBrandon Low2006-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9761 a1c6a512-1295-4272-9138-f99709370657
* Replace one hack with a better hackBrandon Low2006-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9759 a1c6a512-1295-4272-9138-f99709370657
* First commit of reworking voice to be mroe stable on swcodecBrandon Low2006-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9758 a1c6a512-1295-4272-9138-f99709370657
* Put new_track on the codec_api, and use it instead of the reload_codec ↵Brandon Low2006-04-15
| | | | | | variable in most places. Should help with problems people have had with GUI vs. playback sync. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9670 a1c6a512-1295-4272-9138-f99709370657
* Fix warningsBrandon Low2006-03-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9230 a1c6a512-1295-4272-9138-f99709370657
* Fix remaining warnings in 64bit simulator buildsJens Arnold2006-03-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9196 a1c6a512-1295-4272-9138-f99709370657
* Muting trick to prevent tiny pops and glitchless mp3 seeking.Miika Pekkarinen2006-01-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8416 a1c6a512-1295-4272-9138-f99709370657
* Fixed a few iriver playback quirks and issues with previous fixes.Miika Pekkarinen2006-01-20
| | | | | | | | Also fixed "TST.." bug when seeking and possible an enhancement to mp3 gapless playback also. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8402 a1c6a512-1295-4272-9138-f99709370657
* Part of the profiling patch to use a consistent return path in all codecs to ↵Brandon Low2006-01-18
| | | | | | facilitate 'on exit' functionality git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8374 a1c6a512-1295-4272-9138-f99709370657
* New codec loader, using the same mechanism as the new plugin loader. API ↵Jens Arnold2006-01-18
| | | | | | version numbering restarted for the new system. Uses the target ID from configure, so don't change that too often. * Fixed sim_plugin_load_ram() to truncate the tempfile. * Reduced plugin buffer size to 512KB for iriver and iPod. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8362 a1c6a512-1295-4272-9138-f99709370657
* Don't include the .bss and .ibss sections in the binary image for codecs and ↵Jens Arnold2006-01-08
| | | | | | plugins. Saves quite some disk space (and buffer space in case of codec changes during playback). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8308 a1c6a512-1295-4272-9138-f99709370657
* iRiver: improved handling of bad mpeg files.Magnus Holmgren2005-12-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8283 a1c6a512-1295-4272-9138-f99709370657
* fix gcc4 (un)signed warningsDaniel Stenberg2005-12-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8124 a1c6a512-1295-4272-9138-f99709370657