[FFmpeg-cvslog] x86: sbrdsp: Implement SSE sum64x5
Christophe Gisquet
git at videolan.org
Mon Jan 7 01:50:46 CET 2013
ffmpeg | branch: master | Christophe Gisquet <christophe.gisquet at gmail.com> | Sat Nov 24 23:15:07 2012 +0100| [44a0036d10579ed91e48df24859e54b08a582742] | committer: Diego Biurrun
x86: sbrdsp: Implement SSE sum64x5
698 to 174 cycles on Arrandale. Unrolling is a 6 cycles gain.
Signed-off-by: Diego Biurrun <diego at biurrun.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44a0036d10579ed91e48df24859e54b08a582742
---
libavcodec/x86/sbrdsp.asm | 22 ++++++++++++++++++++++
libavcodec/x86/sbrdsp_init.c | 2 ++
2 files changed, 24 insertions(+)
diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm
index b87da4a..063c24f 100644
--- a/libavcodec/x86/sbrdsp.asm
+++ b/libavcodec/x86/sbrdsp.asm
@@ -181,3 +181,25 @@ cglobal sbr_hf_gen, 4,4,8, X_high, X_low, alpha0, alpha1, BW, S, E
add start, 16
jnz .loop2
RET
+
+cglobal sbr_sum64x5, 1,2,4,z
+ lea r1q, [zq+ 256]
+.loop:
+ mova m0, [zq+ 0]
+ mova m2, [zq+ 16]
+ mova m1, [zq+ 256]
+ mova m3, [zq+ 272]
+ addps m0, [zq+ 512]
+ addps m2, [zq+ 528]
+ addps m1, [zq+ 768]
+ addps m3, [zq+ 784]
+ addps m0, [zq+1024]
+ addps m2, [zq+1040]
+ addps m0, m1
+ addps m2, m3
+ mova [zq], m0
+ mova [zq+16], m2
+ add zq, 32
+ cmp zq, r1q
+ jne .loop
+ REP_RET
diff --git a/libavcodec/x86/sbrdsp_init.c b/libavcodec/x86/sbrdsp_init.c
index 51c4bd4..264b455 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -25,6 +25,7 @@
#include "libavcodec/sbrdsp.h"
float ff_sbr_sum_square_sse(float (*x)[2], int n);
+void ff_sbr_sum64x5_sse(float *z);
void ff_sbr_hf_g_filt_sse(float (*Y)[2], const float (*X_high)[40][2],
const float *g_filt, int m_max, intptr_t ixh);
void ff_sbr_hf_gen_sse(float (*X_high)[2], const float (*X_low)[2],
@@ -37,6 +38,7 @@ void ff_sbrdsp_init_x86(SBRDSPContext *s)
if (EXTERNAL_SSE(mm_flags)) {
s->sum_square = ff_sbr_sum_square_sse;
+ s->sum64x5 = ff_sbr_sum64x5_sse;
s->hf_g_filt = ff_sbr_hf_g_filt_sse;
s->hf_gen = ff_sbr_hf_gen_sse;
}
More information about the ffmpeg-cvslog
mailing list