[FFmpeg-cvslog] r20063 - in trunk/libavcodec/arm: dsputil_neon.c dsputil_neon_s.S

mru subversion
Sun Sep 27 18:52:05 CEST 2009


Author: mru
Date: Sun Sep 27 18:52:05 2009
New Revision: 20063

Log:
ARM: NEON optimised vector_fmul_add

Modified:
   trunk/libavcodec/arm/dsputil_neon.c
   trunk/libavcodec/arm/dsputil_neon_s.S

Modified: trunk/libavcodec/arm/dsputil_neon.c
==============================================================================
--- trunk/libavcodec/arm/dsputil_neon.c	Sun Sep 27 18:52:00 2009	(r20062)
+++ trunk/libavcodec/arm/dsputil_neon.c	Sun Sep 27 18:52:05 2009	(r20063)
@@ -173,6 +173,8 @@ void ff_int32_to_float_fmul_scalar_neon(
                                         float mul, int len);
 void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
                                  const float *src1, int len);
+void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1,
+                             const float *src2, int len);
 
 void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
                           int len);
@@ -292,6 +294,7 @@ void ff_dsputil_init_neon(DSPContext *c,
     c->scalarproduct_float = ff_scalarproduct_float_neon;
     c->int32_to_float_fmul_scalar = ff_int32_to_float_fmul_scalar_neon;
     c->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
+    c->vector_fmul_add = ff_vector_fmul_add_neon;
 
     c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon;
     c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon;

Modified: trunk/libavcodec/arm/dsputil_neon_s.S
==============================================================================
--- trunk/libavcodec/arm/dsputil_neon_s.S	Sun Sep 27 18:52:00 2009	(r20062)
+++ trunk/libavcodec/arm/dsputil_neon_s.S	Sun Sep 27 18:52:05 2009	(r20063)
@@ -1076,6 +1076,33 @@ function ff_vector_fmul_reverse_neon, ex
         bx              lr
         .endfunc
 
+function ff_vector_fmul_add_neon, export=1
+        ldr             r12, [sp]
+        vld1.32         {q0-q1},  [r1,:128]!
+        vld1.32         {q8-q9},  [r2,:128]!
+        vld1.32         {q2-q3},  [r3,:128]!
+        vmul.f32        q10, q0,  q8
+        vmul.f32        q11, q1,  q9
+1:      vadd.f32        q12, q2,  q10
+        vadd.f32        q13, q3,  q11
+        pld             [r1, #16]
+        pld             [r2, #16]
+        pld             [r3, #16]
+        subs            r12, r12, #8
+        beq             2f
+        vld1.32         {q0},     [r1,:128]!
+        vld1.32         {q8},     [r2,:128]!
+        vmul.f32        q10, q0,  q8
+        vld1.32         {q1},     [r1,:128]!
+        vld1.32         {q9},     [r2,:128]!
+        vmul.f32        q11, q1,  q9
+        vld1.32         {q2-q3},  [r3,:128]!
+        vst1.32         {q12-q13},[r0,:128]!
+        b               1b
+2:      vst1.32         {q12-q13},[r0,:128]!
+        bx              lr
+        .endfunc
+
 function ff_vector_clipf_neon, export=1
 VFP     vdup.32         q1,  d0[1]
 VFP     vdup.32         q0,  d0[0]



More information about the ffmpeg-cvslog mailing list