Commit ac186fca authored by gpoirier's avatar gpoirier

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6366 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 53915a8f
...@@ -114,6 +114,17 @@ extern const uint32_t inverse[256]; ...@@ -114,6 +114,17 @@ extern const uint32_t inverse[256];
);\ );\
ret;\ 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) #elif defined(CONFIG_FASTDIV)
# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*inverse[b])>>32)) # define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*inverse[b])>>32))
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment