summaryrefslogtreecommitdiff
path: root/libavresample/x86/audio_convert.asm
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-05-02 18:26:01 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-08-23 20:10:57 -0400
commite07c9705c82e031bd5fb5013822cd34d571897ff (patch)
tree920e0f7a073fbedad33650cf2712677291b53eb9 /libavresample/x86/audio_convert.asm
parent5245c9f3adf090fce7e102af714df5c5d20d34fe (diff)
lavr: x86: optimized 2-channel flt to fltp conversion
Diffstat (limited to 'libavresample/x86/audio_convert.asm')
-rw-r--r--libavresample/x86/audio_convert.asm32
1 files changed, 32 insertions, 0 deletions
diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
index 42644abd01..98bd06b4aa 100644
--- a/libavresample/x86/audio_convert.asm
+++ b/libavresample/x86/audio_convert.asm
@@ -1165,3 +1165,35 @@ CONV_FLT_TO_S16P_6CH
INIT_XMM avx
CONV_FLT_TO_S16P_6CH
%endif
+
+;------------------------------------------------------------------------------
+; void ff_conv_flt_to_fltp_2ch(float *const *dst, float *src, int len,
+; int channels);
+;------------------------------------------------------------------------------
+
+%macro CONV_FLT_TO_FLTP_2CH 0
+cglobal conv_flt_to_fltp_2ch, 3,4,3, dst0, src, len, dst1
+ lea lenq, [4*lend]
+ mov dst1q, [dst0q+gprsize]
+ mov dst0q, [dst0q ]
+ lea srcq, [srcq+2*lenq]
+ add dst0q, lenq
+ add dst1q, lenq
+ neg lenq
+.loop:
+ mova m0, [srcq+2*lenq ]
+ mova m1, [srcq+2*lenq+mmsize]
+ DEINT2_PS 0, 1, 2
+ mova [dst0q+lenq], m0
+ mova [dst1q+lenq], m1
+ add lenq, mmsize
+ jl .loop
+ REP_RET
+%endmacro
+
+INIT_XMM sse
+CONV_FLT_TO_FLTP_2CH
+%if HAVE_AVX
+INIT_XMM avx
+CONV_FLT_TO_FLTP_2CH
+%endif