summaryrefslogtreecommitdiff
path: root/libavcodec/arm/ac3dsp_neon.S
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-03-29 03:09:00 +0100
committerMans Rullgard <mans@mansr.com>2011-07-06 00:29:59 +0100
commit4a28e26ea412a370fb4285f9eb66d8cbbb582420 (patch)
tree8d5ae84ebb5d171cba9a3cacabcbaf1d778e1292 /libavcodec/arm/ac3dsp_neon.S
parenta4928cf380634fd75761405169ac73e696caaf11 (diff)
ac3enc: NEON optimised sum_square_butterfly_float
Diffstat (limited to 'libavcodec/arm/ac3dsp_neon.S')
-rw-r--r--libavcodec/arm/ac3dsp_neon.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/arm/ac3dsp_neon.S b/libavcodec/arm/ac3dsp_neon.S
index a15fbbcfa1..152afbfd3c 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