[FFmpeg-devel] [PATCH 3/5] x86: sbrdsp: implement SSE qmf_deint_neg
Christophe Gisquet
christophe.gisquet at gmail.com
Sun Apr 7 22:20:32 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 b14e189..dccfedb 100644
--- a/libavcodec/x86/sbrdsp.asm
+++ b/libavcodec/x86/sbrdsp.asm
@@ -288,3 +288,23 @@ SBR_QMF_PRE_SHUFFLE
INIT_XMM sse2
SBR_QMF_PRE_SHUFFLE
+
+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 4da4a4b..3a84b81 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -36,6 +36,7 @@ void ff_sbr_neg_odd_64_sse(float *z);
void ff_sbr_qmf_post_shuffle_sse(float W[32][2], const float *z);
void ff_sbr_qmf_pre_shuffle_sse(float *z);
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)
{
@@ -49,6 +50,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_pre_shuffle = ff_sbr_qmf_pre_shuffle_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