[SCM] libav/experimental: ARM: optimised mid_pred()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:36:13 UTC 2013


The following commit has been merged in the experimental branch:
commit 4f928a4d2d10110fe386c3512d22797a3f85502c
Author: Måns Rullgård <mans at mansr.com>
Date:   Tue Jan 27 16:06:38 2009 +0000

    ARM: optimised mid_pred()
    
    Originally committed as revision 16819 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/arm/mathops.h b/libavcodec/arm/mathops.h
index 0027918..de2d530 100644
--- a/libavcodec/arm/mathops.h
+++ b/libavcodec/arm/mathops.h
@@ -90,4 +90,22 @@ static inline av_const MUL16(int ra, int rb)
 
 #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 */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list