aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-07-15 19:06:32 +0000
committerMåns Rullgård <mans@mansr.com>2008-07-15 19:06:32 +0000
commitb0367ef00afe74f4fae1ff930ea53e88c46c3d52 (patch)
tree3f3d0f2028e3252d47953f5d8cee5a13f7f0331e
parent6865e04620fa14eada30866cd8efbcbd9157537b (diff)
downloadffmpeg-b0367ef00afe74f4fae1ff930ea53e88c46c3d52.tar.gz
ARM: optimised MAC64 and MLS64
Originally committed as revision 14245 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/armv4l/mathops.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h
index e42cefb430..ff12aef8c9 100644
--- a/libavcodec/armv4l/mathops.h
+++ b/libavcodec/armv4l/mathops.h
@@ -57,6 +57,16 @@ static inline av_const int64_t MUL64(int a, int b)
}
#define MUL64 MUL64
+static inline av_const int64_t MAC64(int64_t d, int a, int b)
+{
+ union { uint64_t x; unsigned hl[2]; } x = { d };
+ asm ("smlal %0, %1, %2, %3"
+ : "+r"(x.hl[0]), "+r"(x.hl[1]) : "r"(a), "r"(b));
+ return x.x;
+}
+#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
+#define MLS64(d, a, b) MAC64(d, -(a), b)
+
#if defined(HAVE_ARMV5TE)
/* signed 16x16 -> 32 multiply add accumulate */