summaryrefslogtreecommitdiff
path: root/libswresample/resample.c
Commit message (Collapse)AuthorAge
* swr: initialize only the necessary resample dsp functionsJames Almer2014-07-04
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: rename swresample_dsp init functions to swri_resample_dspJames Almer2014-07-02
| | | | | | | The swresample_ prefix is not for internal functions Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move dst_size == 0 handling outside DSP function.Ronald S. Bultje2014-06-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: remove div/mod from DSP functions.Ronald S. Bultje2014-06-18
| | | | | | Also fix a bug with resample_compensation resetting dst_incr. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: split out DSP functions.Ronald S. Bultje2014-06-14
| | | | | | | | | | DSP bits of swri_resample go into their own mini-DSP functions; DSP init goes from a per-call branch in multiple_resample to a proper DSP init routine; x86 bits go into x86/; swri_resample() moves out of resample_template.c into resample.c because it's independent of DSP code or sample type; multiple_resample() is simplified. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: replace assert by av_assertMichael Niedermayer2014-06-14
| | | | 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>
* swr: handle 64bit overflow check in multiple_resample().Ronald S. Bultje2014-06-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move compensation_distance handling to swri_resample caller.Ronald S. Bultje2014-06-02
| | | | | | | | | | | I think there's an off-by-one in terms of the switchpoint where we switch from dst_incr to ideal_dst_incr, I don't think that's a massive issue, but just be aware of that. It's probably trivial to prevent but I don't care. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> I could not reproduce any off by 1 error, results are bit exact (michael)
* swresample: add swri_resample_float_avxJames Almer2014-05-16
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: add swri_resample_double_sse2James Almer2014-04-25
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: use av_malloc_array() where appropriateMichael Niedermayer2014-04-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: Limit filter lengthMichael Niedermayer2014-04-08
| | | | | | | | | Related to CID1197063 The limit choosen is arbitrary and much larger than what makes sense. It avoids the need for checking arithmetic operations with the length for overflow Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: add swri_resample_float_sseJames Almer2014-03-20
| | | | | | | At least two times faster than the C version. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: change COMMON_CORE_INT16 asm from SSSE3 to SSE2James Almer2014-03-18
| | | | | | | | | pshuf+paddd is slightly faster than phaddd. The real gain is in pre-ssse3 processors like AMD K8 and K10, which get a big boost in performance compared to the mmxext version Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 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>
* swr/resample: fix filter rounding and cliping for s32Michael Niedermayer2013-02-04
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr/ build_filter: use av_calloc() fix buffer overflowMichael Niedermayer2013-01-27
| | | | | | | Fixes integer & buffer overflow Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lswr: Improve default resampler's default parametersAlexander Strasser2013-01-04
| | | | | | | | | | | | | | After making some blind tests on a small collection of music samples for home usage. It turned out that the default cutoff was too low. The impact of filter_size was not clearly distinguishable (the results were on the edge) with the music samples but turned out to be clearly audible in some synthetic samples. Thanks to Daniel for helping out with the listening tests. Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
* swr: Add SOX resampler supportRob Sykes2012-12-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add a lowpass default so that each Resampler can have its own default.Rob Sykes2012-12-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: move flush into ResamplerMichael Niedermayer2012-12-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: Add API to make resample engine selectable.Rob Sykes2012-12-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr/resample: fix SSSE3 included unconditionally.Clément Bœsch2012-11-15
| | | | 10l Regression since 8ea88339.
* swr/resample: move templating parameters to template itself.Clément Bœsch2012-11-15
| | | | | | | | | It has various benefits such as allowing some refactoring, clarifying the code in the inclusion part, and making the template understandable in standalone. This commit is based on the templating method used by Justin Ruggles for libavresample.
* swri_resample_init: unsupported sample formats are an internal error.Michael Niedermayer2012-10-11
| | | | | | | This condition cannot happen. Fixes CID733802 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr/resample: mark mm_flags as potentially unusedMichael Niedermayer2012-09-13
| | | | | | They are unused when asm is disabled Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libswr: remove redundant ARCH_X86, MMX* implicates X86Michael Niedermayer2012-09-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swsresample: Fix unprotected inline asmDerek Buitenhuis2012-09-07
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr/resample: update SSSE3 flag to new nameMichael Niedermayer2012-09-01
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* bessel: check that the function terminates as expected by av_assert2().Michael Niedermayer2012-08-09
| | | | | | A clear abort is better than wrong output and a possible crash. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: resampling: add filter type and Kaiser window beta to AVOptionsJustin Ruggles2012-07-23
|
* swr: fix MMX resample code, add emmsMichael Niedermayer2012-06-30
| | | | | | Fixes Ticket1495 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix compilation with ancient toolchain that doesnt support SSSE3Michael Niedermayer2012-06-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: MMX2 & SSSE3 int16 resample coreMichael Niedermayer2012-06-28
| | | | | | about 4 times faster Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: introduce filter_alloc in preparation of SIMD resample optimisationsMichael Niedermayer2012-06-19
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: add swr_get_delay() to find the exact delay the swresampler introduces.Michael Niedermayer2012-05-18
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: change sample format representation so as to maintain the planer/packed ↵Michael Niedermayer2012-04-28
| | | | | | distinction. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: simplify code by using av_get_bytes_per_sample()Michael Niedermayer2012-04-11
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* resample: support double precission resamplingMichael Niedermayer2012-04-10
| | | | | | | This commit is dedicated to the audiophiles who can hear it when a needle is dropped on the moon. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: support float & int32 in the resamplerMichael Niedermayer2012-04-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* resample: update copyright years, they where incorrect.Michael Niedermayer2012-04-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* resample: Fix boundary handling with fragments.Michael Niedermayer2012-03-25
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libswresample: introduce int swr_set_compensation() instead of void ↵Marton Balint2012-01-09
| | | | | | | | | | swr_compensate() The new version returns AVERROR(EINVAL) is the specified paramters are invalid, and also creates the resampler if none was used so far. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: use int16_t instead of short for resampling.Clément Bœsch2011-11-17
|
* swr: use "swri_" prefix instead of "swr_" for the private API.Clément Bœsch2011-11-17
|
* swr: drop 'AV' prefix from ResampleContext.Clément Bœsch2011-11-17
| | | | This type/struct is not part of the public API.
* swr: rename resample2 to resample.Clément Bœsch2011-11-16