[FFmpeg-cvslog] ac3enc: NEON optimised sum_square_butterfly_float

Mans Rullgard git at videolan.org
Sat Oct 22 11:21:06 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Tue Mar 29 03:09:00 2011 +0100| [4a28e26ea412a370fb4285f9eb66d8cbbb582420] | committer: Mans Rullgard

ac3enc: NEON optimised sum_square_butterfly_float

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a28e26ea412a370fb4285f9eb66d8cbbb582420
---

 libavcodec/arm/ac3dsp_init_arm.c |    5 +++++
 libavcodec/arm/ac3dsp_neon.S     |   20 ++++++++++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/libavcodec/arm/ac3dsp_init_arm.c b/libavcodec/arm/ac3dsp_init_arm.c
index 2a100a7..de29f27 100644
--- a/libavcodec/arm/ac3dsp_init_arm.c
+++ b/libavcodec/arm/ac3dsp_init_arm.c
@@ -33,6 +33,10 @@ void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
                                             const int32_t *coef0,
                                             const int32_t *coef1,
                                             int len);
+void ff_ac3_sum_square_butterfly_float_neon(float sum[4],
+                                            const float *coef0,
+                                            const float *coef1,
+                                            int len);
 
 void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
                                      int start, int end,
@@ -57,5 +61,6 @@ av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
         c->float_to_fixed24      = ff_float_to_fixed24_neon;
         c->extract_exponents     = ff_ac3_extract_exponents_neon;
         c->sum_square_butterfly_int32 = ff_ac3_sum_square_butterfly_int32_neon;
+        c->sum_square_butterfly_float = ff_ac3_sum_square_butterfly_float_neon;
     }
 }
diff --git a/libavcodec/arm/ac3dsp_neon.S b/libavcodec/arm/ac3dsp_neon.S
index a15fbbc..152afbf 100644
--- a/libavcodec/arm/ac3dsp_neon.S
+++ b/libavcodec/arm/ac3dsp_neon.S
@@ -132,3 +132,23 @@ function ff_ac3_sum_square_butterfly_int32_neon, export=1
         vst1.64         {q0-q1},  [r0]
         bx              lr
 endfunc
+
+function ff_ac3_sum_square_butterfly_float_neon, export=1
+        vmov.f32        q0,  #0.0
+        vmov.f32        q1,  #0.0
+1:
+        vld1.32         {d16},    [r1]!
+        vld1.32         {d17},    [r2]!
+        vadd.f32        d18, d16, d17
+        vsub.f32        d19, d16, d17
+        vmla.f32        d0,  d16, d16
+        vmla.f32        d1,  d17, d17
+        vmla.f32        d2,  d18, d18
+        vmla.f32        d3,  d19, d19
+        subs            r3,  r3,  #2
+        bgt             1b
+        vpadd.f32       d0,  d0,  d1
+        vpadd.f32       d1,  d2,  d3
+        vst1.32         {q0},     [r0]
+        bx              lr
+endfunc



More information about the ffmpeg-cvslog mailing list