summaryrefslogtreecommitdiff
path: root/libavcodec/arm/dsputil_armv6.S
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-09 16:13:52 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-09 16:13:52 +0000
commit41c2bd0a26545aa79b71000b75f2f2c5380361d3 (patch)
treeaa1e5566e7c1c37338dec4056dd072c824493fcf /libavcodec/arm/dsputil_armv6.S
parent66ec243d95e971903d26764916991fa0c36a9481 (diff)
downloadffmpeg-41c2bd0a26545aa79b71000b75f2f2c5380361d3.tar.gz
ARMv6 optimised pix_sum
Originally committed as revision 21705 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/arm/dsputil_armv6.S')
-rw-r--r--libavcodec/arm/dsputil_armv6.S25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavcodec/arm/dsputil_armv6.S b/libavcodec/arm/dsputil_armv6.S
index ffe6c42252..acdfa12fdc 100644
--- a/libavcodec/arm/dsputil_armv6.S
+++ b/libavcodec/arm/dsputil_armv6.S
@@ -594,3 +594,28 @@ function ff_pix_norm1_armv6, export=1
mov r0, lr
pop {r4-r6, pc}
.endfunc
+
+function ff_pix_sum_armv6, export=1
+ push {r4-r7, lr}
+ mov r12, #16
+ mov r2, #0
+ mov r3, #0
+ mov lr, #0
+ ldr r4, [r0]
+1:
+ subs r12, r12, #1
+ ldr r5, [r0, #4]
+ usada8 r2, r4, lr, r2
+ ldr r6, [r0, #8]
+ usada8 r3, r5, lr, r3
+ ldr r7, [r0, #12]
+ usada8 r2, r6, lr, r2
+ beq 2f
+ ldr r4, [r0, r1]!
+ usada8 r3, r7, lr, r3
+ bgt 1b
+2:
+ usada8 r3, r7, lr, r3
+ add r0, r2, r3
+ pop {r4-r7, pc}
+.endfunc