This enables the encoders - i.e. to record audio -
to be loaded also on the simulator.
Change-Id: I54fdbeb75b89023c0d7824a34cf76301c02c3150
Reviewed-on: http://gerrit.rockbox.org/632
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Sync opus codec to upstream commit
02fed471a4568852d6618e041c4f2af0d7730ee2 (August 30 2013)
This brings in a lot of optimizations but also makes the diff
between our codec and the upstream much smaller as most of our
optimizations have been upstreamed or supeceded.
Speedups across the board for CELT mode files:
64kbps 128kbps
H300 9.82MHz 15.48MHz
c200 4.86MHz 9.63MHz
fuze v1 10.32MHz 15.92MHz
For the silk mode test file (16kbps) arm targets get a speedup
of about 2MHz while the H300 is 7.8MHz slower, likely because it's
now using the pseudostack more rather than the real stack which
is in iram. Patches to get around that are upcomming.
Change-Id: Ifecf963e461c51ac42e09dac1e91bc4bc3b12fa3
Instead of providing yet another memory allocator implementation
use tlsf and simply link tlsf library.
Another small improvement is to *grow* memory pool by grabbing
audiobuffer instead of just switching to use audiobuf exclusively.
Tested with simple lua 'memory eater' script.
This patch extends tlsf lib slightly. You can provide
void *get_new_area(size_t * size) function which will override
weak dummy implementation provided in lib itself. This allows to
automaticaly initialize memory pool as well as grow memory
pool if needed (for example grab audiobuffer when pluginbuffer
is exhaused).
Change-Id: I841af6b6b5bbbf546c14cbf139a7723fbb982f1b
codec makefiles larger freedom in what they can do to it.
Use this in libopus to prepend the libopus searchpaths to
CODECFLAGS so that its internal config.h will be picked up before
our global one. This avoids having to do a s/config.h/opus_config.h/
when syncing which will be handy soon.
Change-Id: I018d729aa0c8300fa3149f22a5a8c5668b339dfa
Reviewed-on: http://gerrit.rockbox.org/496
Reviewed-by: Nils Wallménius <nils@rockbox.org>
The quickscreen calls settings_apply() and the crossfeed code wasn't
checking that the right crossfeed was set before updating the filter
for the custom setting, which was overwriting the Meier crossfeed
data (custom and Meier share the same data space).
Change-Id: Ifaa2f46fe062d4497681a2dd0d5068ec906c96a3
Distractions make logic fail. It only needs one more loop and should
not trigger further compression cycles after not feeding more data.
Change-Id: Ie0dbb34af92e0ca5718480dd4ab4719a141717ff
For mp3_enc, split encoding duties between COP and CPU.
For wavpack_enc, simply run the encoding on COP (splitting that one
needs more consideration) which keeps the it and the UI from running
on the same core.
As a result, at least they are now useable on PP at "normal" sample
rates.
mp3_enc in all this gets an extensive renovation and some optimizations
for speed, to reduce IRAM requirements and remove unneeded stuff.
Change-Id: I215578dbe36f14e516b05a5ca70880eb01ca0ec2
Replaces the NATIVE_FREQUENCY constant with a configurable frequency.
The user may select 48000Hz if the hardware supports it. The default is
still 44100Hz and the minimum is 44100Hz. The setting is located in the
playback settings, under "Frequency".
"Frequency" was duplicated in english.lang for now to avoid having to
fix every .lang file for the moment and throwing everything out of sync
because of the new play_frequency feature in features.txt. The next
cleanup should combine it with the one included for recording and
generalize the ID label.
If the hardware doesn't support 48000Hz, no setting will be available.
On particular hardware where very high rates are practical and desireable,
the upper bound can be extended by patching.
The PCM mixer can be configured to play at the full hardware frequency
range. The DSP core can configure to the hardware minimum up to the
maximum playback setting (some buffers must be reserved according to
the maximum rate).
If only 44100Hz is supported or possible on a given target for playback,
using the DSP and mixer at other samperates is possible if the hardware
offers them.
Change-Id: I6023cf0c0baa8bc6292b6919b4dd3618a6a25622
Reviewed-on: http://gerrit.rockbox.org/479
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
Basically, just give it a good rewrite.
Software codec recording can be implemented in a more straightforward
and simple manner and made more robust through the better codec
control now available.
Encoded audio buffer uses a packed format instead of fixed-size
chunks and uses smaller data headers leading to more efficient usage.
The greatest benefit is with a VBR format like wavpack which needs
to request a maximum size but only actually ends up committing part
of that request.
No guard buffers are used for either PCM or encoded audio. PCM is
read into the codec's provided buffer and mono conversion done at
that time in the core if required. Any highly-specialized sample
conversion is still done within the codec itself, such as 32-bit
(wavpack) or interleaved mono (mp3).
There is no longer a separate filename array. All metadata goes
onto the main encoded audio buffer, eliminating any predermined
file limit on the buffer as well as not wasting the space for
unused path queue slots.
The core and codec interface is less awkward and a bit more sensible.
Some less useful interface features were removed. Threads are kept
on narrow code paths ie. the audio thread never calls encoding
functions and the codec thread never calls file functions as before.
Codecs no longer call file functions directly. Writes are buffered
in the core and data written to storage in larger chunks to speed up
flushing of data. In fact, codecs are no longer aware of the stream
being a file at all and have no access to the fd.
SPDIF frequency detection no longer requires a restart of recording
or plugging the source before entering the screen. It will poll
for changes and update when stopped or prerecording (which does
discard now-invalid prerecorded data).
I've seen to it that writing a proper header on full disk works
when the format makes it reasonably practical to do so. Other cases
may have incorrect data sizes but sample info will be in tact. File
left that way may play anyway.
mp3_enc.codec acquires the ability to write 'Info' headers with LAME
tags to make it gapless (bonus).
Change-Id: I670685166d5eb32ef58ef317f50b8af766ceb653
Reviewed-on: http://gerrit.rockbox.org/493
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
The old presets never made sense for Rockbox's EQ. They were apparently
copied from some other software. We have a parametric EQ, that means that
EQ bands can be made wider or narrower. Putting two identical bands side
by side just wastes battery life and adds rounding error. Replacement
presets are on gerrit but they need more work. In the mean time, users
should probably not be using these.
Change-Id: I85213100129fafd3ac0fa1a9438cb4d651bb94cb
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
When writing a value to PC, execution continues at that location,
so subtracting 4 returns to the next instruction. Previously, two
instructions after the faulting instruction were being skipped, causing
safe_read functions to return true even if a data abort happened.
Change-Id: I3fd02d54646323ea2050d0504e38f6d22f09c749
Most SoCs are these days are fast enough for realtime BRR, gaussian
interpolation and echo processing.
Change-Id: I180ce8ad45242c67b5e573a406b9522098a3f12b
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
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
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
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>
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
While it made the mini2g not crash during startup anymore further tests showed
that other mini2g devices still exhibit the crash, or end up with a "No
partition found" error; furthermore the device tested first still crashes on
USB disconnect. Therefore the change doesn't really help with the problem, and
at the expense of increasing binary size for all other targets there is no
point in keeping it for now.
This reverts commit 850491a043.
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
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
fixedpoint.make is not a subdir Makefile but a lib Makefile. Setting
CORE_GCSECTIONS in it will affect the final link and make it always use
--gc-sections (for SWCODEC Rockbox), since libfixedpoint is always needed
(bootloader and HWCODEC don't use libfixedpoint).
Fixes FS#12857.
Change-Id: Ib30bd03cbcea9c339a73daf7b673868aa3cc7a88
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
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
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>
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
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
libtlsf used not to be built for HWCODEC, but now that the gif
viewer uses libtlsf instead of building its own copy, libtlsf
is needed everywhere.
Change-Id: I730719c6a20e749adb8597056d2049b7758620e4
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>
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>
The skin_parser now needs __PCTOOL__ set to build libskin_parser.a properly for
use with the Theme Editor.
Change-Id: I48a518fa296cc8ec5d0e3022baaedd796afe7c5f
- 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>
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>
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
Use %x9(id) to draw an image in the whole current viewport using the
9 segment drawer (which draws the corners as normal and *tiles*
the middle segments to the needed width/height).
Future work is to make it scale instead of tile
Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203
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
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>
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>
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>
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>
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>
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>
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
Skip expensive multiply-accumulate loop when gains are 0 and
just copy using memcpy if soure and destination are not the same
Speeds up decoding of a 64kbps test file by 6MHz on h300 (cf)
7MHz on c200 (pp) and 6MHz on fuzev1 (amsv1)
Change-Id: Ibbc9ddfd45a9ac661467b1327b8c67761924fb8b
Signed-off-by: Nils Wallménius <nils@rockbox.org>
Reorder operands to take advantage of the early termination of
multiplications. Saves 2.5MHz decoding a 64kbps opus test file
on c200 (pp).
Change-Id: I470266dc870ab183ece3b23426d41e2a64342a71
Speeds up decoding of 64kbps test file by 6.3MHz on h300 (cf)
and 1.2MHz on c200 (pp).
Signed-off-by: Nils Wallménius <nils@rockbox.org>
Change-Id: I08c2c332153abcbef9447c81986777fd2fcc73fe
speeds up decoding of 64kbps test file by 19MHz on h300 (cf)
and 2.5MHz on c200 (pp)
Change-Id: Idacd2f8962c20c518055d586daeec6b932b7ded2
Signed-off-by: Nils Wallménius <nils@rockbox.org>
Although the mimetype for jpeg is clearly image/jpeg, many tagging
applications seem to use image/jpg, so we'll support that too.
Change-Id: Icb9063fd5a9d8aea169eaa7f74ac52b72603d148
Reviewed-on: http://gerrit.rockbox.org/318
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Speeds up decoding of a 64kbps test file 26MHz on H300 (cf) and
2MHz on c200 (pp)
Change-Id: I2fb4fe6c0a29321087e02fbd17fd1b1eb84e7b57
Signed-off-by: Nils Wallménius <nils@rockbox.org>
Remove downsampling code from deemphasis loop as we don't use
it and remove multiplications that are not relevant when
not using custom modes. Saves 1.4MHz on h300 (cf), 4.3MHz on
c200 (pp) and 4.6 on fuzev1 (amsv1).
Change-Id: Iab3f1d737a656a563aaa351d50db987a9cff2287
Saves about 30MHz on h300 (cf) and 1.5MHz on c200 (pp) decoding a
64kbps test file. Stack usage is still below 70%.
Change-Id: Ib13df9011adb4eef4bb91a52e5a32741c8bf8988
Speeds up decoding of a 64kbps opus test file by 34MHz on h300 (cf),
24MHz on c200 (pp) and 13MHz on fuzev1 (amsv1)
Change-Id: I0dce6b3bfe6c81d0a722dfebb13891b9a428c6ba
Synchronised with opus repo on github (https://github.com/freqmod/rockbox-opus)
Status:
* Seeking ported from speex, but fails on some cases (e.g. seek to granule 0)
* ReplayGain parsing needs to be reworked, we do vorbis-style replaygain now.
http://wiki.xiph.org/OggOpus#Comment_Header explicitly forbids these in
favour of R128_TRACK_GAIN tag.
* No optimisation yet, source files still nearly identical to opus upstream
* Multi-stream opus files may not be parsed correctly
Change-Id: Ia66f1027dc1d288083e3c57b2816700078376f9a
Reviewed-on: http://gerrit.rockbox.org/300
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
%V(0,50%,75%,50%,-) - make a viewport at x=0, y=half the lcd height,
75% lcd width and the remaining height (the other half) of the lcd.
Change-Id: If26ccb65e8dc52c9225f3fd6d7b222d770add0f0
Reviewed-on: http://gerrit.rockbox.org/184
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Tag params where a [] group is followed (but not immediatly) by
a * will not parse correctly. e.g [si]iii|s* will attempt to find
an 'i' after the second s instead of looping s's
Change-Id: I3982f726b6539818f8332334b263b673259f98ef
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
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
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
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
No known samples are fixed by this problem, but I haven't tested many.
Backport of ffmpeg revision 26388.
Change-Id: Ife9654b7477a432834e3cab2cb43d16da071445a
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
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
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
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
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
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>
Input functions have common setup sequences that can be placed
into an inline function instead of repeating it all repeatedly.
Change-Id: I9e62904ff0948651c64ddf160ed4400ed6dc81ff
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>
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>
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));
~~~~~~~~~~~~~ ~~~~~~~^~~~~~
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
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>
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>
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>
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>
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>
Move a few functions to .text that probably don't see a huge benefit
from being .icode. Will scrutinize later.
Change-Id: I7bdffc326076c5cd7e6a1c57d25d31e653920327
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>
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>
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>
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
The parser was unconditionally scanning things which it thought
were conditional/enum lists (or tag arg lists) when they couldn't
possibly be (i.e < inside a param which should be valid).
This change fixes it (i.e %?and(%if(%pv, <, -50), %if(%mp, >i, 1))
is perfectly valid now.
This *may* break your exsiting skins if you were using %if with < or >
Change-Id: Ia24dbdf0b11fc7d8a735c1111d648c3bebd68ac6