diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-05-02 16:32:08 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-08-23 20:10:56 -0400 |
commit | b66e20d2aab58689f33af38a3ef5570c99f86295 (patch) | |
tree | f5c0a718b658eaad357a916a6e4a718cb8090a4e /libavresample/x86/audio_convert.asm | |
parent | d5b4e50c47276c6058fb779e1935c6ceaec5ed6a (diff) | |
download | ffmpeg-b66e20d2aab58689f33af38a3ef5570c99f86295.tar.gz |
lavr: x86: optimized 2-channel fltp to flt conversion
Diffstat (limited to 'libavresample/x86/audio_convert.asm')
-rw-r--r-- | libavresample/x86/audio_convert.asm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm index acc6bb0dc1..48508af81c 100644 --- a/libavresample/x86/audio_convert.asm +++ b/libavresample/x86/audio_convert.asm @@ -695,6 +695,43 @@ INIT_XMM avx CONV_FLTP_TO_S16_6CH %endif +;------------------------------------------------------------------------------ +; void ff_conv_fltp_to_flt_2ch(float *dst, float *const *src, int len, +; int channels); +;------------------------------------------------------------------------------ + +%macro CONV_FLTP_TO_FLT_2CH 0 +cglobal conv_fltp_to_flt_2ch, 3,4,5, dst, src0, len, src1 + mov src1q, [src0q+gprsize] + mov src0q, [src0q] + lea lenq, [4*lend] + add src0q, lenq + add src1q, lenq + lea dstq, [dstq+2*lenq] + neg lenq +.loop + mova m0, [src0q+lenq ] + mova m1, [src1q+lenq ] + mova m2, [src0q+lenq+mmsize] + mova m3, [src1q+lenq+mmsize] + SBUTTERFLYPS 0, 1, 4 + SBUTTERFLYPS 2, 3, 4 + mova [dstq+2*lenq+0*mmsize], m0 + mova [dstq+2*lenq+1*mmsize], m1 + mova [dstq+2*lenq+2*mmsize], m2 + mova [dstq+2*lenq+3*mmsize], m3 + add lenq, 2*mmsize + jl .loop + REP_RET +%endmacro + +INIT_XMM sse +CONV_FLTP_TO_FLT_2CH +%if HAVE_AVX +INIT_XMM avx +CONV_FLTP_TO_FLT_2CH +%endif + ;----------------------------------------------------------------------------- ; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len, ; int channels); |