aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/armv4l/mathops.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-07-15 19:06:25 +0000
committerMåns Rullgård <mans@mansr.com>2008-07-15 19:06:25 +0000
commit7995962d4b23619e4cc52b4466f85488749bc718 (patch)
tree8bff93998618ccd6d3107c7d2868589cb1885c63 /libavcodec/armv4l/mathops.h
parent6651ce17b82a800e20e18b38d006c47a07413464 (diff)
downloadffmpeg-7995962d4b23619e4cc52b4466f85488749bc718.tar.gz
ARM: ARMv6 optimised MULH
Originally committed as revision 14243 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l/mathops.h')
-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 cc097c3fff..dd53310683 100644
--- a/libavcodec/armv4l/mathops.h
+++ b/libavcodec/armv4l/mathops.h
@@ -33,10 +33,20 @@
hi; })
#endif
+#ifdef HAVE_ARMV6
+static inline av_const int MULH(int a, int b)
+{
+ int r;
+ asm ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
+ return r;
+}
+#define MULH MULH
+#else
#define MULH(a, b) \
({ int lo, hi;\
asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\
hi; })
+#endif
#if defined(HAVE_ARMV5TE)