summaryrefslogtreecommitdiff
path: root/libswresample/swresample.c
Commit message (Collapse)AuthorAge
* swresample/swresample: Fix integer overflow in seed calculationMichael Niedermayer2015-09-03
| | | | | | Fixes CID1322333 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swr: Remember previously set int_sample_format from userMichael Niedermayer2015-06-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: Clear delayed_samples_fixup in clear_context()Michael Niedermayer2015-06-22
| | | | | | This probably makes no difference but its more proper Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: Print used int_sample_fmtMichael Niedermayer2015-06-21
| | | | | Suggested-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Choose 16bit internally only if input and output is 16bit or lessMichael Niedermayer2015-06-21
| | | | | | | | | | | | | or if no rematrix and no resampling is performed and the input is 16bit note reampling and rematrix itself always use more than 16bit internally the "internal" sampling format is the format between these steps Its unlikely the difference from this commit is audible in any case unless there is some bug either before or after the change. but multiple people prefer this and it slightly improves the precission of computations. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Fix ASSERT_LEVEL warningMichael Niedermayer2015-06-08
| | | | | Found-by: cehoyos Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: fix initilaize/initialize typoClément Bœsch2015-06-06
|
* swresample/swresample: Cleanup on init failure.Michael Niedermayer2015-06-04
| | | | | | | | This avoids leaks if the user doest call swr_close() after a failed init Found-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Add swr_get_out_samples()Michael Niedermayer2015-06-04
| | | | | | Previous version reviewed-by: Pavel Koshevoy <pkoshevoy@gmail.com> Previous version reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/dither: check memory allocationGanesh Ajjanagadde2015-06-03
| | | | | | check memory allocation in swri_get_dither() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Check the return value of resampler->init()Michael Niedermayer2015-06-03
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix alignment issue caused by 8ch sse functionsRainer Hochecker2015-05-13
| | | | | | | | | Fix crash when doing 8 ch conversion from apps compiled with MSVS Thanks to Ronald for giving this hint: https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Check channel layouts and channels against each other and print ↵Michael Niedermayer2015-04-12
| | | | | | human readable error messages Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Allow reinitialization without ever setting channel layoutsMichael Niedermayer2015-04-12
|
* swresample: Allow reinitialization without ever setting channel countsMichael Niedermayer2015-04-12
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: Use av_mallocz_array()Michael Niedermayer2015-03-30
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Add prefix to soxr_resamplerMichael Niedermayer2015-02-27
| | | | | | also move declaration to header Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add FFMPEG_VERSION into the binary libsMichael Niedermayer2014-12-19
| | | | | | This simplifies identifying from which revision a binary of a lib came from Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Fix swr_drop_output so it does not flush the buffersMichael Niedermayer2014-11-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: do not put multiple statements in one lineMichael Niedermayer2014-10-16
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: replace always true if() by av_assert0()Michael Niedermayer2014-10-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: fix sample drop loop end conditionMichael Niedermayer2014-10-06
| | | | | | Fixes Ticket3985 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: check av_opt_set for failure in swr_alloc_set_opts()Michael Niedermayer2014-08-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/swresample: Treat mono as planarMichael Niedermayer2014-08-04
| | | | | | | This might in some cases improve performance. Idea from: fbc0b8659967ea54a8472b5f795270d38bb085dd Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: split option table to a separate fileTimothy Gu2014-07-06
| | | | | Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: handle initial negative sample index outside DSP function.Ronald S. Bultje2014-06-14
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: swr_close()Michael Niedermayer2014-05-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: check that the context for swr_convert() has been initializedMichael Niedermayer2014-02-24
| | | | | Reviewed-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: add swr_is_initialized()Michael Niedermayer2014-02-24
| | | | | | Idea-from/based-on: 7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731 Reviewed-by: ubitux Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: factorize clear_context() outMichael Niedermayer2014-02-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample ↵Stefano Sabatini2013-12-26
| | | | | | | | | | | | format max value The constant may change in libavutil but the library may be compiled against an older version, thus rejecting a value which is otherwise supported by the new libavutil. INT_MAX is used here to denote the max allowed value for a sample format. The opt-test code is changed to provide a valid reference example.
* swresample: use the internal buffer for resampling the last few samplesMichael Niedermayer2013-12-04
| | | | | | | Fixes out of array read Fixes Ticket3193 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lswr/swresample: convert ocl and icl options to AV_OPT_TYPE_CHANNEL_LAYOUTStefano Sabatini2013-10-17
| | | | | Improve interface flexibility. In particular makes it possible to set channel layout through symbolic names using the av_opt_set() interface.
* swresample: replace 2 av_free() by av_freep()Michael Niedermayer2013-09-16
| | | | | | avoids leaving stale pointers in memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: Make rematrix maxvalue user settableMichael Niedermayer2013-07-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* cosmetics: Fix "dont" "wont" "doesnt" typosTimothy Gu2013-06-29
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: dont treat 32 and 24 as equal in simple copy checkMichael Niedermayer2013-06-05
| | | | | | Fixes dithering from 32 to 24 bit Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: set flags & description and add documentation for output_sample_bitsPaul B Mahol2013-06-04
| | | | | | Allows users to actually use such option. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* swr: Fix dithering of s16 with SIMDMichael Niedermayer2013-06-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: make the default of nopts for first_pts actually workMichael Niedermayer2013-02-25
| | | | | | Fixes Ticket2210 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: support a seperate output sample bits.Michael Niedermayer2013-02-24
| | | | | | This avoids user apps having to mangle dither scale. for pcm24 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add duplicate cutoff for compatibilityMichael Niedermayer2013-02-24
| | | | | | | | Based on commit 50f4337a2fd3b571b38c9475981e36405d1ca1e1 Author: Justin Ruggles <justin.ruggles@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: check channel layouts before using them.Michael Niedermayer2013-02-13
| | | | | | | Fixes out of array accesses Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Dont use floats for S32->S32 when possibleMichael Niedermayer2013-02-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: reorder init code to make rematrix status available earlierMichael Niedermayer2013-02-04
| | | | | | | This also makes some other fields available earlier which may be usefull one day Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: limit phase_shift to a less insane value.Michael Niedermayer2013-01-27
| | | | | | | This prevents potential crashes and out of memory issues if the user manually sets such insane values. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: support first_ptsMichael Niedermayer2013-01-21
| | | | | Trolled-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix handling of timestamps that cause multiple drops or silence injectionsMichael Niedermayer2013-01-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: limit buffer size for silence injectionMichael Niedermayer2013-01-13
| | | | | | This reduces memory usage for unreasonable large silence injections Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: limit buffer size for discarding.Michael Niedermayer2013-01-13
| | | | | | | This prevents insane memory usage in case of insane input values. Untested due to lack of a testcase that causes such insane allocation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>