aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-05-24 15:46:28 +0100
committerMans Rullgard <mans@mansr.com>2011-05-26 20:13:00 +0100
commitca7d8256e32e4dbafadc54a65b441945ac759ca9 (patch)
tree57fde4cf9537550fd78fa5f3aeb0565acf615427
parent77cd6efc33f45a5f7dbb37e10f49f55e9fe3c479 (diff)
downloadffmpeg-ca7d8256e32e4dbafadc54a65b441945ac759ca9.tar.gz
ARM: add ARMv6 optimised av_clip_uintp2
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--libavutil/arm/intmath.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 5f85bfa603..cc3de90f04 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -74,6 +74,15 @@ static av_always_inline av_const int16_t av_clip_int16_arm(int a)
return x;
}
+#define av_clip_uintp2 av_clip_uintp2_arm
+static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
+{
+ unsigned x;
+ __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p));
+ return x;
+}
+
+
#else /* HAVE_ARMV6 */
#define FASTDIV FASTDIV