Kip Warner
cc4c242081
avresample: Mark avresample_buffer() as pointer to const
...
That buffer is read only and marking it accordingly let
the user passing a constant buffer to it without having
a const-correctness warning.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
e2854e731f
avresample: Document avresample_open() a little better
...
Bug-Id: 911
9 years ago
Ganesh Ajjanagadde
84dfc426ce
avresample: Remove an unused variable
...
This fixes a -Wunused-variable warning.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Vittorio Giovara
c7247eb7fe
lavr: Remove unreachable code
...
Bug-Id: CID 1323180
9 years ago
Vittorio Giovara
9a003fc388
lavr: Remove unused label
9 years ago
Vittorio Giovara
e88103a7f9
Bump major versions of all libraries
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
11b2eed43e
lavr: Drop deprecated context reinitialization if resampling was not enabled
...
Deprecated in 11/2012.
9 years ago
Henrik Gramner
ab43beefab
x86inc: Drop SECTION_TEXT macro
...
The .text section is already 16-byte aligned by default on all supported
platforms so `SECTION_TEXT` isn't any different from `SECTION .text`.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
James Almer
d68c05380c
x86: check for AV_CPU_FLAG_AVXSLOW where useful
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Luca Barbato
0ac8ff618c
avresample: Reallocate the internal buffer to the correct size
...
Fixes the corner case in which the internal buffer size
is larger than input buffer provided and resizing it
before moving the left over samples would make it write
to now unallocated memory.
Bug-Id: 825
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
10 years ago
Peter Meerwald
12655c4804
libavresample: NEON optimized FIR audio resampling
...
modelled after aarch64 code
on Cortex-A8, s16 and s32 code is about 2x faster,
float code about 7x faster
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Peter Meerwald
df0891fc8f
libavresample: Annotate AARCH64 init function with av_cold
...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Luca Barbato
963f761448
avresample: Make sure the even check does not overflow
...
CC: libav-stable@libav.org
Bug-Id: CID 732225
10 years ago
Vittorio Giovara
088eca2816
avresample: prevent theoretical division by zero
...
CC: libav-stable@libav.org
Bug-Id: CID 1231986
10 years ago
Luca Barbato
11db644a8e
lavr: Update the planar check in ff_audio_convert
...
Leftover from fbc0b86599
.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Luca Barbato
fb1ddcdc8f
avresample: Introduce AVFrame-based API
11 years ago
Anton Khirnov
1985c2e75c
Bump major versions of all libraries.
11 years ago
Anton Khirnov
f4c444e17d
Postpone API-incompatible changes until the next bump.
11 years ago
Justin Ruggles
fbc0b86599
lavr: Do not change the sample format for mono audio
...
This treats mono as planar internally within libavresample rather
than changing the sample format.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Luca Barbato
b2d4565422
avresample: Add avresample_get_out_samples
...
Utility function to get the upper bound on the number of samples the
resampler would output.
11 years ago
Janne Grunau
449511740f
build: handle library dependencies in configure
...
Instead of setting FFLIBS in each library Makefile configure
exports FFLIBS-$library in config.mak.
11 years ago
Janne Grunau
a24a252709
aarch64: NEON optimized FIR audio resampling
...
Optimized for the default filter length 16.
30% faster opus silk decoding.
11 years ago
Janne Grunau
cae8df7875
lavr: define ResampleContext in resample.h
...
Required for arch optimized resampling.
11 years ago
Janne Grunau
f4d5a2cc35
aarch64: NEON float to s16 audio conversion
11 years ago
Anton Khirnov
21d8f4da91
resample: remove an unneeded context variable
11 years ago
Anton Khirnov
ac976ed91e
lavr: allocate the resampling buffer with a positive size
...
This fixes cases where very few input samples (fewer than needed for one
output sample) are passed to lavr at the beginning.
CC:libav-stable@libav.org
11 years ago
Anton Khirnov
f7c5fd8151
resample: implement flushing
11 years ago
Anton Khirnov
254c95cdd1
resample: split linear into its own function
11 years ago
Anton Khirnov
be394968c8
resample: add initial padding explicitly
...
This simplifies the code, since we do not have to deal with a possibly
negative source index anymore.
11 years ago
Anton Khirnov
eed752d61d
resample: drop useless abs()
...
negative sample_index is handled in the block above.
11 years ago
Anton Khirnov
3c84f6b5d2
resample: reindent
11 years ago
Anton Khirnov
f20892eb67
resample: split the nearest neighbour path into a separate function pointer
11 years ago
Anton Khirnov
b9dea23766
resample: fix avresample_get_delay() return value
...
The correct "next" input sample is not the first sample of the
resampling buffer, but the center sample of the filter_length-sized
block at the beginning.
CC:libav-stable@libav.org
11 years ago
Diego Biurrun
01c5779f56
x86: Drop some unnecessary YASM ifdefs
...
Dead code elimination is enough to avoid undefined references in these cases.
11 years ago
Diego Biurrun
aba70bb538
Add missing headers to make template files compile (more) standalone
11 years ago
Anton Khirnov
1db03a6864
lavr: return an error if a avresample_open() is called on an open context
11 years ago
Anton Khirnov
7e86c27b4e
lavr: add a function for checking whether AVAudioResampleContext is open
11 years ago
Tim Walker
76a75c523c
lavr: mix front center channel as indicated in the ATSC A/52 specification.
...
When mixing 3 front channels into 2, the center channel is mixed into left and right with the center mix level, not -3dB.
11 years ago
Martin Storsjö
5bcbb516f2
arm: Add X() around all references to extern symbols
...
Don't rely on the fact that an unprefixed label currently exists.
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Janne Grunau
fe96769bed
aarch64: port neon clobber test from arm
11 years ago
Martin Storsjö
99e2012523
x86/arm: Add clobber tests to libavresample
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Anton Khirnov
cc976a75df
audio_mix: print (SKIP) instead of 0.0 for matrix columns removed along with output zeroing
11 years ago
Anton Khirnov
fc6a3ef40d
audio_mix: fix zeroing output channels in certain cases
...
Specifically, when the corresponding input channel exists and its matrix
column is all-zero (which is necessary for zeroing the output), the
matrix column must be removed from the matrix.
This is not done currently, so the mixing code would end up using
uninitialized pointers from stack.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
11 years ago
Anton Khirnov
3d95d27376
audio_mix: initialize the data pointers to NULL
...
This should make it easier to catch problems where some of those
pointers are used uninitialized, since reading from NULL should always
crash, while random numbers from stack can turn out to be valid
pointers, so random memory may be silently overwritten.
11 years ago
Diego Biurrun
b83d1ee3b4
avutil: Move library version related macros to version.h
...
This is a more sensible place for these macros.
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Justin Ruggles
211ca69b13
lavr: check that current_buffer is not NULL before using it
...
Fixes a segfault during resampling when compiled with -DDEBUG.
Fixes all fate-lavr-resample tests with -DDEBUG.
CC:libav-stable@libav.org
11 years ago
Derek Buitenhuis
206895708e
x86inc: Remove our FMA4 support
...
This is so we can sync to x264's version of FMA4 support.
This partialy reverts commit 79687079a9
.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Derek Buitenhuis
15748773bf
avresample/x86: Switch operand order for mulps
...
With the forthcoming VEX instruction emulation, mulps
must have only the third operand point to memory, as
this is what vmulps expects.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago