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