changeset 114:37779851c665 libavutil

add FASTDIV macro for ARM. Reported speed-up on MPEG-4 decoding: 1.8% Patch by Siarhei Siamashka %siarhei P siamashka A gmail P com% Original thread: Date: Sep 28, 2006 2:26 AM Subject: [Ffmpeg-devel] [PATCH] ARM implementation of FASTDIV
author gpoirier
date Thu, 28 Sep 2006 08:04:16 +0000
parents 8fc54918226e
children 8ab8a42ba196
files internal.h
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/internal.h	Mon Sep 25 15:23:40 2006 +0000
+++ b/internal.h	Thu Sep 28 08:04:16 2006 +0000
@@ -114,6 +114,17 @@
             );\
         ret;\
     })
+#elif defined(ARCH_ARMV4L)
+#    define FASTDIV(a,b) \
+    ({\
+        int ret,dmy;\
+        asm volatile(\
+            "umull %1, %0, %2, %3"\
+            :"=&r"(ret),"=&r"(dmy)\
+            :"r"(a),"r"(inverse[b])\
+            );\
+        ret;\
+    })
 #elif defined(CONFIG_FASTDIV)
 #    define FASTDIV(a,b)   ((uint32_t)((((uint64_t)a)*inverse[b])>>32))
 #else