[FFmpeg-cvslog] r15712 - trunk/libavutil/internal.h

mru subversion
Sat Oct 25 20:54:23 CEST 2008


Author: mru
Date: Sat Oct 25 20:54:23 2008
New Revision: 15712

Log:
ARM: faster ARMv6 FASTDIV()

Modified:
   trunk/libavutil/internal.h

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	(original)
+++ trunk/libavutil/internal.h	Sat Oct 25 20:54:23 2008
@@ -140,11 +140,12 @@ extern const uint32_t ff_inverse[256];
 #elif defined(HAVE_ARMV6)
 static inline av_const int FASTDIV(int a, int b)
 {
-    int r;
-    __asm__ volatile("cmp   %2, #0        \n\t"
-                 "smmul %0, %1, %2    \n\t"
-                 "rsblt %0, %0, #0    \n\t"
-                 : "=r"(r) : "r"(a), "r"(ff_inverse[b]));
+    int r, t;
+    __asm__ volatile("cmp     %3, #2               \n\t"
+                     "ldr     %1, [%4, %3, lsl #2] \n\t"
+                     "lsrle   %0, %2, #1           \n\t"
+                     "smmulgt %0, %1, %2           \n\t"
+                     : "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
     return r;
 }
 #elif defined(ARCH_ARMV4L)




More information about the ffmpeg-cvslog mailing list