summaryrefslogtreecommitdiff
path: root/libswresample
Commit message (Collapse)AuthorAge
* swr: handle 64bit overflow check in multiple_resample().Ronald S. Bultje2014-06-09
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* fix various typosLou Logan2014-06-03
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> 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)
* swr/resample_template: prevent end_index from overflowing and add check for ↵Michael Niedermayer2014-06-02
| | | | | | delta_frac overflow Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Rewrite main resampling loop (common and linear).Ronald S. Bultje2014-06-02
| | | | | | | | | | | | | | | | | This removes a branch at a performance-sensitive point (in the middle of the loop). In fate-swr-resample-s32p-8000-2626, this makes the code about 10% faster. It also simplifies the loops, allowing us to rewrite it in yasm at some later point. The compensation_distance != 0 code and index < 0 code are still kind of hairy. For compensation_distance != 0, this should likely be handled in the caller, so that it calls swri_resample twice (once until the dst_incr switch-point, and once with the remainder of the samples). For index < 0, the code should probably be rewritten to break out of the loop once sample_index >= 0, and then resume (e.g. as a tail-call) to the common or linear resampling loops. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 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: swr_close()Michael Niedermayer2014-05-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* inline asm: fix arrays as named constraints.Matt Oliver2014-05-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: add missing xmm clobbersJames Almer2014-05-07
| | | | | | | Might fix fate-swr on ICL Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Fix convertion typosMichael Niedermayer2014-04-29
| | | | 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: fix AV_CH_LAYOUT_STEREO_DOWNMIX inputMichael Niedermayer2014-04-24
| | | | | | Fixes Ticket 3542 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample_template: try to consider src_size more exactlyMichael Niedermayer2014-04-15
| | | | | | | This should avoid slight differences in the output causes by input size alignment differences between archs Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: simplify index/consumed calculation for the filter = 1 caseMichael Niedermayer2014-04-14
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: Fix fractional part of index in the filter_size = 1 ↵Michael Niedermayer2014-04-14
| | | | | | filters = 1 case 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/dither: use av_malloc_array()Michael 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/resample: sse float linear interpolationJames Almer2014-03-24
| | | | | | | About two times faster Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/resample: mmx2/sse2 int16 linear interpolationJames Almer2014-03-24
| | | | | | | About three times faster Signed-off-by: James Almer <jamrial@gmail.com> 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>
* Automatically change MANGLE() into named inline asm operands when direct ↵Matt Oliver2014-03-18
| | | | | | | | symbol reference in inline asm are not supported. This is part of the patch-set for intel C inline asm on windows support Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: reuse COMMON_CORE asm where possibleJames Almer2014-03-18
| | | | | 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>
* 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>
* Fix libswresample compilation with Apple Neon assembler.Reimar Döffinger2014-02-17
| | | | Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
* swresample: Add arm&x86 clobber testsMartin Storsjö2014-01-18
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Avoid using empty macro arguments.Reimar Döffinger2013-12-31
| | | | | | | | | These are not supported by all compilers (gcc 2.95 but also older SPARC compilers, see gcc bug #33304 for example), and there is no real need for them. One use of this feature remains in libavdevice/v4l2.c which can't be replaced quite as easily. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* 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.
* Add Windows resource file support for shared librariesJames Almer2013-12-05
| | | | | | | | | | | | | | | | | | Originally written by James Almer <jamrial@gmail.com> With the following contributions by Timothy Gu <timothygu99@gmail.com> * Use descriptions of libraries from the pkg-config file generation function * Use "FFmpeg Project" as CompanyName (suggested by Alexander Strasser) * Use "FFmpeg" for ProductName as MSDN says "name of the product with which the file is distributed" [1]. * Use FFmpeg's version (N-xxxxx-gxxxxxxx) for ProductVersion per MSDN [1]. * Only build the .rc files when --enable-small is not enabled. [1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* 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: fix assert failure on unknown layouts.Nicolas George2013-11-03
|
* 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.
* x86: Fix compilation with nasm on PPC & OS/2Ronald S. Bultje2013-10-08
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: fix example code and doxy indent.Clément Bœsch2013-09-29
|
* 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/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX outputMichael Niedermayer2013-08-20
| | | | | | | | | | Fixes Ticket2859 Note, testcases related to the downmix channels are welcome. (id like to make sure this is working correctly now, as obviously it didnt work before ...) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swr: clean layouts before checking sanityMichael Niedermayer2013-08-20
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample: fix negative rematrix volumnsMichael Niedermayer2013-07-22
| | | | 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>
* swresample/x86/audio_convert: add emms to CONVMichael Niedermayer2013-06-18
| | | | | | Might fix Ticket1874 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/rematrix_template: Fix integer overflow in mix8to2Michael Niedermayer2013-06-10
| | | | | Fixes: CID1030352 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swresample/rematrix_template: Fix integer overflow in mix6to2Michael Niedermayer2013-06-10
| | | | | Fixes: CID1030351 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>
* swr: set scale for 32->32/24 ditherMichael Niedermayer2013-06-05
| | | | 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>