1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Siarhei Siamashka 2006-09-28 08:04:16 +00:00 committed by Guillaume Poirier
parent 8db0c25d95
commit eeebe6ad1f

View File

@ -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