[FFmpeg-cvslog] r16819 - trunk/libavcodec/arm/mathops.h
mru
subversion
Tue Jan 27 17:06:38 CET 2009
Author: mru
Date: Tue Jan 27 17:06:38 2009
New Revision: 16819
Log:
ARM: optimised mid_pred()
Modified:
trunk/libavcodec/arm/mathops.h
Modified: trunk/libavcodec/arm/mathops.h
==============================================================================
--- trunk/libavcodec/arm/mathops.h Tue Jan 27 17:06:34 2009 (r16818)
+++ trunk/libavcodec/arm/mathops.h Tue Jan 27 17:06:38 2009 (r16819)
@@ -90,4 +90,22 @@ static inline av_const MUL16(int ra, int
#endif
+#define mid_pred mid_pred
+static inline av_const int mid_pred(int a, int b, int c)
+{
+ int m;
+ __asm__ volatile (
+ "mov %0, %2 \n\t"
+ "cmp %1, %2 \n\t"
+ "movgt %0, %1 \n\t"
+ "movgt %1, %2 \n\t"
+ "cmp %1, %3 \n\t"
+ "movle %1, %3 \n\t"
+ "cmp %0, %1 \n\t"
+ "movgt %0, %1 \n\t"
+ : "=&r"(m), "+r"(a)
+ : "r"(b), "r"(c));
+ return m;
+}
+
#endif /* AVCODEC_ARM_MATHOPS_H */
More information about the ffmpeg-cvslog
mailing list