[FFmpeg-devel] [PATCH 2/9] SBR DSP x86: implement SSE qmf_deint_neg

Christophe Gisquet christophe.gisquet at gmail.com
Thu Apr 4 21:45:46 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 2029b45..85e197a 100644
--- a/libavcodec/x86/sbrdsp.asm
+++ b/libavcodec/x86/sbrdsp.asm
@@ -253,3 +253,23 @@ cglobal sbr_qmf_pre_shuffle, 1,4,7,z
     mova       m2, [zq]
     movlps  [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 5f87cf4..416cfc1 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -34,6 +34,7 @@ void ff_sbr_hf_gen_sse(float (*X_high)[2], const float (*X_low)[2],
                        float bw, int start, int end);
 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_deint_neg_sse(float *v, const float *src);
 
 av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s)
 {
@@ -46,5 +47,6 @@ 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;
     }
 }
-- 
1.8.0.msysgit.0



More information about the ffmpeg-devel mailing list