diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2013-04-09 22:54:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-10 02:42:22 +0200 |
commit | 2383068cbfac11aedd2f133b2d00b0c1cb58b5f9 (patch) | |
tree | 3a9754795267c8f407ba3e672b321c7828a69d19 /libavcodec/x86/sbrdsp.asm | |
parent | d2e051e30c0ffc1e80a7e7e76ccdfbeb2956daa6 (diff) | |
download | ffmpeg-2383068cbfac11aedd2f133b2d00b0c1cb58b5f9.tar.gz |
x86: sbrdsp: implement SSE2 qmf_pre_shuffle
From 253 to 51 cycles on Arrandale and Win64.
44 cycles on SandyBridge.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/sbrdsp.asm')
-rw-r--r-- | libavcodec/x86/sbrdsp.asm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm index 273e950563..ecc9c71104 100644 --- a/libavcodec/x86/sbrdsp.asm +++ b/libavcodec/x86/sbrdsp.asm @@ -284,3 +284,33 @@ SBR_QMF_DEINT_BFLY INIT_XMM sse2 SBR_QMF_DEINT_BFLY + +INIT_XMM sse2 +cglobal sbr_qmf_pre_shuffle, 1,4,7,z +%define OFFSET (32*4-2*mmsize) + mov r3q, OFFSET + lea r1q, [zq + (32+1)*4] + lea r2q, [zq + 64*4] + mova m6, [ps_neg] +.loop: + movu m0, [r1q] + movu m2, [r1q + mmsize] + movu m1, [zq + r3q + 4 + mmsize] + movu m3, [zq + r3q + 4] + + pxor m2, m6 + pxor m0, m6 + pshufd m2, m2, q0123 + pshufd m0, m0, q0123 + SBUTTERFLY dq, 2, 3, 5 + SBUTTERFLY dq, 0, 1, 4 + mova [r2q + 2*r3q + 0*mmsize], m2 + mova [r2q + 2*r3q + 1*mmsize], m3 + mova [r2q + 2*r3q + 2*mmsize], m0 + mova [r2q + 2*r3q + 3*mmsize], m1 + add r1q, 2*mmsize + sub r3q, 2*mmsize + jge .loop + mova m2, [zq] + movq [r2q], m2 + REP_RET |