aboutsummaryrefslogtreecommitdiff
path: root/libswresample/x86
AgeCommit message (Collapse)Author
2017-06-21build: Generalize yasm/nasm-related variable namesDiego Biurrun
None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-19swresample/x86/resample: extend resample_double to support avx and fma3Muhammad Faiz
benchmark: sse2 10.670s avx 8.763s fma3 8.380s Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-11-25swresample/resample: optimize exact_rational=on:linear_interp=on caseMuhammad Faiz
separate dsp.resample to dsp.resample_common and dsp.resample_linear and choose to call faster resample_common even when linear_interp=on when c->frac and c->dst_incr_mod are both zero speed up resampling when exact_rational and linear_interp are both enabled because exact_rational force c->frac and c->dst_incr_mod to be zero when soft compensation does not happen benchmark on exact_rational=on:linear_interp=on old new real 8.432s 5.097s user 7.679s 4.989s sys 0.125s 0.107s Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-06-21swresample/x86: add support for exact_rationalMuhammad Faiz
phase_shift and phase_mask is removed generally exact_rational=on is faster than exact_rational=off Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-06-13swresample: add exact_rational optionMuhammad Faiz
give high quality resampling as good as with linear_interp=on as fast as without linear_interp=on tested visually with ffplay ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000, showcqt=gamma=5" ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000:linear_interp=on, showcqt=gamma=5" ffplay -f lavfi "aevalsrc='sin(10000*t*t)', aresample=osr=48000:exact_rational=on, showcqt=gamma=5" slightly speed improvement for fair comparison with -cpuflags 0 audio.wav is ~ 1 hour 44100 stereo 16bit wav file ffmpeg -i audio.wav -af aresample=osr=48000 -f null - old new real 13.498s 13.121s user 13.364s 12.987s sys 0.131s 0.129s linear_interp=on old new real 23.035s 23.050s user 22.907s 22.917s sys 0.119s 0.125s exact_rational=on real 12.418s user 12.298s sys 0.114s possibility to decrease memory usage if soft compensation is ignored Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-02-14x86: use the new helper macros where usefulJames Almer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-01x86/audio_convert: fix clobbering of xmm registersJames Almer
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2015-08-03x86: move XOP emulation code back to x86incJames Almer
Only two functions that use xop multiply-accumulate instructions where the first operand is the same as the fourth actually took advantage of the macros. This further reduces differences with x264's x86inc. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2015-07-26swresample/x86: add missing colon to labelsJames Almer
Silences warnings with Nasm Signed-off-by: James Almer <jamrial@gmail.com>
2015-06-01x86: check for AV_CPU_FLAG_AVXSLOW where usefulJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21swresample: add av_cold to init functionsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-15x86/swr: make pack_8ch functions work with compilers without aligned stackJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2015-02-09swresample/x86/rematrix_init: Check av_malloc* return codes, forward errorsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-09swresample/x86/rematrix_init: Use av_mallocz_array()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12x86/swr: add SSE/AVX unpack_6ch functionsJames Almer
int32/float only Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2015-01-11x86/swr: load constants outside the loop in pack_6ch functionsJames Almer
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2014-12-31x86/swr: disable pack_8ch functions on msvc/icl x86_32James Almer
Until a proper fix is committed. Signed-off-by: James Almer <jamrial@gmail.com>
2014-12-31x86/swr: add missing alignment check to pack_6ch functionsJames Almer
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2014-12-30x86/swr: add SSE2/AVX pack_8ch functionsJames Almer
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2014-11-07x86/swr: add ff_float_to_int32_a_avx2James Almer
13797 decicycles in ff_float_to_int32_a_sse2, 32768 runs, 0 skips 8603 decicycles in ff_float_to_int32_a_avx2, 32766 runs, 2 skips Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2014-11-06x86/swr: replace sse4 instructions in pack_6ch with sse onesJames Almer
There's no benefit from using blendps here except on CPUs with AVX, where it's faster than shufps according to Intel's documentation. As such, rename the sse4 functions to sse/sse2 and use shufps instead. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
2014-07-04x86/swr: use lavu helper macros to check CPU extensionsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04x86/swr: split audioconvert and rematrix DSP into separate filesJames Almer
Also rename resample_x86_dsp.c to resample_init.c Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-04swr: initialize only the necessary resample dsp functionsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02swr: rename swresample_dsp init functions to swri_resample_dspJames Almer
The swresample_ prefix is not for internal functions Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02x86/swr: add ff_resample_{common, linear}_int16_xopJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-02x86/swr: add ff_resample_{common, linear}_float_fmaJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01x86/swr: convert resample_{common, linear}_double_sse2 to yasmJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> 312531 -> 311528 dezicycles Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-30swr: convert resample_common/linear_int16_mmx2/sse2 to yasm.Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-28swr: rewrite resample_common/linear_float_sse/avx in yasm.Ronald S. Bultje
Linear interpolation goes from 63 (llvm) or 58 (gcc) to 48 (yasm) cycles/sample on 64bit, or from 66 (llvm/gcc) to 52 (yasm) cycles/ sample on 32bit. Bon-linear goes from 43 (llvm) or 38 (gcc) to 32 (yasm) cycles/sample on 64bit, or from 46 (llvm) or 44 (gcc) to 38 (yasm) cycles/sample on 32bit (all testing on OSX 10.9.2, llvm 5.1 and gcc 4.8/9). Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15swr: compile mmx2 s16p functions only on x86-32.Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15swr: add prototypes for resample dsp functionsJames Almer
Should fix compilation failures with MSVC and any other compiler without inline asm support. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-15swr: remove obsolete function prototypes.Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-14swr: split out DSP functions.Ronald S. Bultje
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>
2014-05-16swresample: add swri_resample_float_avxJames Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-07inline asm: fix arrays as named constraints.Matt Oliver
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-07swresample/resample: add missing xmm clobbersJames Almer
Might fix fate-swr on ICL Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-25swresample: add swri_resample_double_sse2James Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24swresample/resample: sse float linear interpolationJames Almer
About two times faster Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24swresample/resample: mmx2/sse2 int16 linear interpolationJames Almer
About three times faster Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-20swresample: add swri_resample_float_sseJames Almer
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>
2014-03-18Automatically change MANGLE() into named inline asm operands when direct ↵Matt Oliver
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>
2014-03-18swresample: change COMMON_CORE_INT16 asm from SSSE3 to SSE2James Almer
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>
2014-01-18swresample: Add arm&x86 clobber testsMartin Storsjö
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-31Avoid using empty macro arguments.Reimar Döffinger
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>
2013-10-08x86: Fix compilation with nasm on PPC & OS/2Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18swresample/x86/audio_convert: add emms to CONVMichael Niedermayer
Might fix Ticket1874 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-04swr: add native_simd_oneMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-31Merge commit '6860b4081d046558c44b1b42f22022ea341a2a73'Michael Niedermayer
* commit '6860b4081d046558c44b1b42f22022ea341a2a73': x86: include x86inc.asm in x86util.asm cng: Reindent some incorrectly indented lines cngdec: Allow flushing the decoder cngdec: Make the dbov variable have the right unit cngdec: Fix the memset size to cover the full array cngdec: Update the LPC coefficients after averaging the reflection coefficients configure: fix print_config() with broke awks Conflicts: libavcodec/x86/ac3dsp.asm libavcodec/x86/dct32.asm libavcodec/x86/deinterlace.asm libavcodec/x86/dsputil.asm libavcodec/x86/dsputilenc.asm libavcodec/x86/fft.asm libavcodec/x86/fmtconvert.asm libavcodec/x86/h264_chromamc.asm libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264_idct.asm libavcodec/x86/h264_idct_10bit.asm libavcodec/x86/h264_intrapred.asm libavcodec/x86/h264_intrapred_10bit.asm libavcodec/x86/h264_weight.asm libavcodec/x86/vc1dsp.asm libavcodec/x86/vp3dsp.asm libavcodec/x86/vp56dsp.asm libavcodec/x86/vp8dsp.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-09swr: add av_cold to init/free functionsMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>