diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-05-29 17:03:40 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-06-18 11:24:10 -0400 |
commit | 29f7490c461431b5c00e496f3e0253c170b3924c (patch) | |
tree | 96e95e3736366842f9895f3a8caab54e30cd0f9b /libavresample/x86/audio_mix.asm | |
parent | 3971be0eb5d382b85f1d8772c51f21cccdc68eab (diff) | |
download | ffmpeg-29f7490c461431b5c00e496f3e0253c170b3924c.tar.gz |
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
Diffstat (limited to 'libavresample/x86/audio_mix.asm')
-rw-r--r-- | libavresample/x86/audio_mix.asm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm index 8a4cf061cd..2bc89cac92 100644 --- a/libavresample/x86/audio_mix.asm +++ b/libavresample/x86/audio_mix.asm @@ -150,3 +150,37 @@ cglobal mix_2_to_1_s16p_q8, 3,4,6, src, matrix, len, src1 sub lend, mmsize/2 jg .loop REP_RET + +;----------------------------------------------------------------------------- +; void ff_mix_1_to_2_fltp_flt(float **src, float **matrix, int len, +; int out_ch, int in_ch); +;----------------------------------------------------------------------------- + +%macro MIX_1_TO_2_FLTP_FLT 0 +cglobal mix_1_to_2_fltp_flt, 3,5,4, src0, matrix0, len, src1, matrix1 + mov src1q, [src0q+gprsize] + mov src0q, [src0q] + sub src1q, src0q + mov matrix1q, [matrix0q+gprsize] + mov matrix0q, [matrix0q] + VBROADCASTSS m2, [matrix0q] + VBROADCASTSS m3, [matrix1q] + ALIGN 16 +.loop: + mova m0, [src0q] + mulps m1, m0, m3 + mulps m0, m0, m2 + mova [src0q ], m0 + mova [src0q+src1q], m1 + add src0q, mmsize + sub lend, mmsize/4 + jg .loop + REP_RET +%endmacro + +INIT_XMM sse +MIX_1_TO_2_FLTP_FLT +%if HAVE_AVX +INIT_YMM avx +MIX_1_TO_2_FLTP_FLT +%endif |