floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
[ffmpeg.git] / libavutil / arm / float_dsp_neon.S
index 4acc406..559b565 100644 (file)
@@ -256,3 +256,16 @@ function ff_butterflies_float_neon, export=1
         bgt             1b
         bx              lr
 endfunc
+
+function ff_scalarproduct_float_neon, export=1
+        vmov.f32        q2,  #0.0
+1:      vld1.32         {q0},[r0,:128]!
+        vld1.32         {q1},[r1,:128]!
+        vmla.f32        q2,  q0,  q1
+        subs            r2,  r2,  #4
+        bgt             1b
+        vadd.f32        d0,  d4,  d5
+        vpadd.f32       d0,  d0,  d0
+NOVFP   vmov.32         r0,  d0[0]
+        bx              lr
+endfunc