[FFmpeg-devel] [PATCH 2/3] x86: sbrdsp: implement SSE qmf_deint_neg
Christophe Gisquet
christophe.gisquet at gmail.com
Wed Apr 10 00:54:26 CEST 2013
No vector tests it.
---
libavcodec/x86/sbrdsp.asm | 20 ++++++++++++++++++++
libavcodec/x86/sbrdsp_init.c | 2 ++
2 files changed, 22 insertions(+)
diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm
index ecc9c71..099382a 100644
--- a/libavcodec/x86/sbrdsp.asm
+++ b/libavcodec/x86/sbrdsp.asm
@@ -314,3 +314,23 @@ cglobal sbr_qmf_pre_shuffle, 1,4,7,z
mova m2, [zq]
movq [r2q], m2
REP_RET
+
+INIT_XMM sse
+cglobal sbr_qmf_deint_neg, 2,3,3,v,src,vrev
+ lea vrevq, [vq + (64-4)*4]
+ add srcq, (64-8)*4
+ mova m2, [ps_neg]
+.loop:
+ mova m0, [srcq + 0]
+ mova m1, [srcq + 16]
+ shufps m0, m1, q3131
+ shufps m1, m1, q2020
+ xorps m0, m2
+ mova [vq], m1
+ mova [vrevq], m0
+ add vq, 16
+ sub vrevq, 16
+ sub srcq, 32
+ cmp vq, vrevq
+ jl .loop
+ REP_RET
diff --git a/libavcodec/x86/sbrdsp_init.c b/libavcodec/x86/sbrdsp_init.c
index f97479e..aade701 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -37,6 +37,7 @@ void ff_sbr_qmf_post_shuffle_sse(float W[32][2], const float *z);
void ff_sbr_qmf_deint_bfly_sse(float *v, const float *src0, const float *src1);
void ff_sbr_qmf_deint_bfly_sse2(float *v, const float *src0, const float *src1);
void ff_sbr_qmf_pre_shuffle_sse2(float *z);
+void ff_sbr_qmf_deint_neg_sse(float *v, const float *src);
av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s)
{
@@ -50,6 +51,7 @@ av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s)
s->hf_gen = ff_sbr_hf_gen_sse;
s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_sse;
s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_sse;
+ s->qmf_deint_neg = ff_sbr_qmf_deint_neg_sse;
}
if (EXTERNAL_SSE2(mm_flags)) {
--
1.8.0.msysgit.0
More information about the ffmpeg-devel
mailing list