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
Vittorio Giovara
088eca2816
avresample: prevent theoretical division by zero
...
CC: libav-stable@libav.org
Bug-Id: CID 1231986
10 years ago
Luca Barbato
fb1ddcdc8f
avresample: Introduce AVFrame-based API
10 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>
10 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
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
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
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
Thilo Borgmann
d814a839ac
Reinstate proper FFmpeg license for all files.
11 years ago
Justin Ruggles
074a00d192
lavr: add a public function for setting a custom channel map
...
This allows reordering, duplication, and silencing of input channels.
12 years ago
Justin Ruggles
4d68269d58
lavr: typedef internal structs in internal.h
...
Simplifies header dependencies by not including all other internal headers
in internal.h.
12 years ago
Justin Ruggles
b2fe6756e3
lavr: add option for dithering during sample format conversion to s16
12 years ago
Justin Ruggles
42b5688d5e
lavr: fix segfault due to overlooked change needed in 14758e3
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Justin Ruggles
14758e3211
lavr: temporarily store custom matrix in AVAudioResampleContext
...
This allows AudioMix to be treated the same way as other conversion contexts
and removes the requirement to allocate it at the same time as the
AVAudioResampleContext.
The current matrix get/set functions are split between the public interface
and AudioMix private functions.
12 years ago
Justin Ruggles
1d86aa8b0f
lavr: do not pass consumed samples as a parameter to ff_audio_resample()
...
Since the resampler handles buffering of unconsumed samples internally, the
caller does not need this information.
12 years ago
Justin Ruggles
7f534d11ed
lavr: do not pass sample count as a parameter to ff_audio_convert()
...
It will always be the number of samples in the input buffer, so just use that
directly instead of passing it as a separate parameter.
12 years ago
Justin Ruggles
02738792c5
lavr: fix the decision for writing directly to the output buffer
...
If there are any samples remaining in the output fifo from previous conversion
calls, we have to output those samples first instead of doing direct output
of the current samples.
12 years ago
Anton Khirnov
e7ba5b1de0
lavr: change the type of the data buffers to uint8_t**.
...
This is more consistent with what the rest of Libav does.
This breaks API.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Justin Ruggles
8821ae649e
lavr: fix handling of custom mix matrices
...
Adds some validation for changing parameters after setting the matrix and
fixes a bug in the conversion path setup.
12 years ago
Justin Ruggles
2f096bb10e
lavr: add x86-optimized mixing functions
...
Adds optimized functions for mixing 3 through 8 input channels to 1 and 2
output channels in fltp or s16p format with flt coeffs.
12 years ago
Justin Ruggles
6410397600
lavr: resampling: add support for s32p, fltp, and dblp internal sample formats
...
Based partially on implementation by Michael Niedermayer <michaelni@gmx.at> in
libswresample in FFmpeg. See commits:
7f1ae79d38
24ab1abfb6
13 years ago
Justin Ruggles
8ca08066fc
lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format
...
Also make this the default value.
13 years ago
Anton Khirnov
9684341346
lavr: do not try to copy to uninitialized output audio data.
...
This would happen at least when lavr is used as a fifo with no
conversion.
13 years ago
Anton Khirnov
0982b0a431
lavr: make avresample_read() with NULL output discard samples.
13 years ago
Justin Ruggles
c8af852b97
Add libavresample
...
This is a new library for audio sample format, channel layout, and sample rate
conversion.
13 years ago