diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2012-12-21 18:11:06 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-04-05 22:47:04 +0200 |
commit | f4b0d12f5b3fb2fe825fb2ac9b2d9d9374baa5c5 (patch) | |
tree | 7f56bf15889ec8966b927790735ab81f4d684159 /libavcodec/x86/sbrdsp.asm | |
parent | a862c7d3368241e72a465ab944afa38ea62a6640 (diff) | |
download | ffmpeg-f4b0d12f5b3fb2fe825fb2ac9b2d9d9374baa5c5.tar.gz |
x86: sbrdsp: Implement SSE neg_odd_64
Timing on Arrandale:
C SSE
Win32: 57 44
Win64: 47 38
Unrolling and not storing mask both save some cycles.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/x86/sbrdsp.asm')
-rw-r--r-- | libavcodec/x86/sbrdsp.asm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm index ae8449065c..5e545055a7 100644 --- a/libavcodec/x86/sbrdsp.asm +++ b/libavcodec/x86/sbrdsp.asm @@ -24,6 +24,7 @@ SECTION_RODATA ; mask equivalent for multiply by -1.0 1.0 ps_mask times 2 dd 1<<31, 0 +ps_mask2 times 2 dd 0, 1<<31 ps_neg times 4 dd 1<<31 SECTION_TEXT @@ -223,3 +224,24 @@ cglobal sbr_qmf_post_shuffle, 2,3,4,W,z cmp zq, r2q jl .loop REP_RET + +INIT_XMM sse +cglobal sbr_neg_odd_64, 1,2,4,z + lea r1q, [zq+256] +.loop: + mova m0, [zq+ 0] + mova m1, [zq+16] + mova m2, [zq+32] + mova m3, [zq+48] + xorps m0, [ps_mask2] + xorps m1, [ps_mask2] + xorps m2, [ps_mask2] + xorps m3, [ps_mask2] + mova [zq+ 0], m0 + mova [zq+16], m1 + mova [zq+32], m2 + mova [zq+48], m3 + add zq, 64 + cmp zq, r1q + jne .loop + REP_RET |