summaryrefslogtreecommitdiff
path: root/libavresample/utils.c
Commit message (Collapse)AuthorAge
* avresample: Mark avresample_buffer() as pointer to constKip Warner2015-12-14
| | | | | | | | 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>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* avresample: prevent theoretical division by zeroVittorio Giovara2014-10-18
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1231986
* avresample: Introduce AVFrame-based APILuca Barbato2014-08-10
|
* lavr: Do not change the sample format for mono audioJustin Ruggles2014-08-03
| | | | | | | This treats mono as planar internally within libavresample rather than changing the sample format. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avresample: Add avresample_get_out_samplesLuca Barbato2014-05-28
| | | | | Utility function to get the upper bound on the number of samples the resampler would output.
* lavr: allocate the resampling buffer with a positive sizeAnton Khirnov2014-04-13
| | | | | | 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
* lavr: return an error if a avresample_open() is called on an open contextAnton Khirnov2014-02-22
|
* lavr: add a function for checking whether AVAudioResampleContext is openAnton Khirnov2014-02-22
|
* lavr: check that current_buffer is not NULL before using itJustin Ruggles2013-10-27
| | | | | | | Fixes a segfault during resampling when compiled with -DDEBUG. Fixes all fate-lavr-resample tests with -DDEBUG. CC:libav-stable@libav.org
* lavr: add a public function for setting a custom channel mapJustin Ruggles2013-01-07
| | | | This allows reordering, duplication, and silencing of input channels.
* lavr: typedef internal structs in internal.hJustin Ruggles2013-01-07
| | | | | Simplifies header dependencies by not including all other internal headers in internal.h.
* lavr: add option for dithering during sample format conversion to s16Justin Ruggles2012-12-19
|
* lavr: fix segfault due to overlooked change needed in 14758e3Justin Ruggles2012-12-12
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavr: temporarily store custom matrix in AVAudioResampleContextJustin Ruggles2012-12-11
| | | | | | | | | 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.
* lavr: do not pass consumed samples as a parameter to ff_audio_resample()Justin Ruggles2012-11-27
| | | | | Since the resampler handles buffering of unconsumed samples internally, the caller does not need this information.
* lavr: do not pass sample count as a parameter to ff_audio_convert()Justin Ruggles2012-11-27
| | | | | 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.
* lavr: fix the decision for writing directly to the output bufferJustin Ruggles2012-11-17
| | | | | | 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.
* lavr: change the type of the data buffers to uint8_t**.Anton Khirnov2012-10-05
| | | | | | This is more consistent with what the rest of Libav does. This breaks API.
* Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavr: fix handling of custom mix matricesJustin Ruggles2012-08-04
| | | | | Adds some validation for changing parameters after setting the matrix and fixes a bug in the conversion path setup.
* lavr: add x86-optimized mixing functionsJustin Ruggles2012-07-27
| | | | | Adds optimized functions for mixing 3 through 8 input channels to 1 and 2 output channels in fltp or s16p format with flt coeffs.
* lavr: resampling: add support for s32p, fltp, and dblp internal sample formatsJustin Ruggles2012-07-08
| | | | | | | Based partially on implementation by Michael Niedermayer <michaelni@gmx.at> in libswresample in FFmpeg. See commits: 7f1ae79d38c4edba9dbd31d7bf797e525298ac55 24ab1abfb6d55bf330022df4b10d7aec80b3f116
* lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample formatJustin Ruggles2012-07-08
| | | | Also make this the default value.
* lavr: do not try to copy to uninitialized output audio data.Anton Khirnov2012-05-09
| | | | | This would happen at least when lavr is used as a fifo with no conversion.
* lavr: make avresample_read() with NULL output discard samples.Anton Khirnov2012-05-09
|
* Add libavresampleJustin Ruggles2012-04-24
This is a new library for audio sample format, channel layout, and sample rate conversion.