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

mru subversion
Thu Jul 31 04:38:40 CEST 2008


Author: mru
Date: Thu Jul 31 04:38:40 2008
New Revision: 14481

Log:
fix ARMv6 FASTDIV for divisor <=2

Modified:
   trunk/libavutil/internal.h

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	(original)
+++ trunk/libavutil/internal.h	Thu Jul 31 04:38:40 2008
@@ -150,7 +150,10 @@ extern const uint32_t ff_inverse[256];
 static inline av_const int FASTDIV(int a, int b)
 {
     int r;
-    asm volatile("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(ff_inverse[b]));
+    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]));
     return r;
 }
 #elif defined(ARCH_ARMV4L)




More information about the ffmpeg-cvslog mailing list