aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/x86/float_dsp.asm
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-09-22 18:41:25 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2012-11-26 11:30:19 -0500
commit947f933687b9fd4d80b6cad468ddc2b5b20a9c38 (patch)
tree64f58493f3abc3690267f77899289ccfbe49734a /libavutil/x86/float_dsp.asm
parent284ea790d89441fa1e6b2d72d3c1ed6d61972f0b (diff)
downloadffmpeg-947f933687b9fd4d80b6cad468ddc2b5b20a9c38.tar.gz
x86: float_dsp: add SSE version of vector_fmul_scalar()
Diffstat (limited to 'libavutil/x86/float_dsp.asm')
-rw-r--r--libavutil/x86/float_dsp.asm29
1 files changed, 29 insertions, 0 deletions
diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm
index a8857b937c..317df9c3c1 100644
--- a/libavutil/x86/float_dsp.asm
+++ b/libavutil/x86/float_dsp.asm
@@ -85,3 +85,32 @@ INIT_XMM sse
VECTOR_FMAC_SCALAR
INIT_YMM avx
VECTOR_FMAC_SCALAR
+
+;------------------------------------------------------------------------------
+; void ff_vector_fmul_scalar(float *dst, const float *src, float mul, int len)
+;------------------------------------------------------------------------------
+
+%macro VECTOR_FMUL_SCALAR 0
+%if UNIX64
+cglobal vector_fmul_scalar, 3,3,2, dst, src, len
+%else
+cglobal vector_fmul_scalar, 4,4,3, dst, src, mul, len
+%endif
+%if ARCH_X86_32
+ movss m0, mulm
+%elif WIN64
+ SWAP 0, 2
+%endif
+ shufps m0, m0, 0
+ lea lenq, [lend*4-mmsize]
+.loop:
+ mova m1, [srcq+lenq]
+ mulps m1, m0
+ mova [dstq+lenq], m1
+ sub lenq, mmsize
+ jge .loop
+ REP_RET
+%endmacro
+
+INIT_XMM sse
+VECTOR_FMUL_SCALAR