diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2006-09-28 08:04:16 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2006-09-28 08:04:16 +0000 |
commit | eeebe6ad1fe61fc0be2e63658abb6441ab38c916 (patch) | |
tree | f4bdc3358ac867d48d54b67fa75526dc3b3cad02 /libavutil | |
parent | 8db0c25d9582065f208d8da1ccd28fb40c4c32e7 (diff) | |
download | ffmpeg-eeebe6ad1fe61fc0be2e63658abb6441ab38c916.tar.gz |
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
Originally committed as revision 6366 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 83f776cc2e..96a6d29d8a 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -114,6 +114,17 @@ extern const uint32_t inverse[256]; );\ 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 |