diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-08-22 13:25:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-08-22 13:25:09 +0000 |
commit | 69fd15f87149304be95bd2ea684aeb75dfb68490 (patch) | |
tree | 938d99ac5cd37b9f164f3c3e6e5227de6c90ce54 | |
parent | f617adedc8766ad7bccb4b996a943ef7fcb7796f (diff) | |
download | ffmpeg-69fd15f87149304be95bd2ea684aeb75dfb68490.tar.gz |
MUL* for ARM code based on a patch by Siarhei Siamashka
untested
Originally committed as revision 6050 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegaudiodec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 55276e3b58..4d10ad4a06 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -55,6 +55,17 @@ ({ int64_t rt; asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb)); rt; }) # define MULH(ra, rb) \ ({ int rt, dummy; asm ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" (ra), "rm" (rb)); rt; }) +#elif defined(ARCH_ARMV4L) +# define MULL(a, b) \ + ({ int lo, hi;\ + asm("smull %0, %1, %2, %3 \n\t"\ + "mov %0, %0, lsr #%4\n\t"\ + "add %1, %0, %1, lsl #%5\n\t"\ + : "=r"(lo), "=r"(hi)\ + : "r"(b), "r"(a), "i"(FRAC_BITS), "i"(32-FRAC_BITS));\ + hi; }) +# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b)) +# define MULH(a, b) ({ int lo, hi; asm ("smull %0, %1, %2, %3" : "=r"(lo), "=r"(hi) : "r"(b),"r"(a)); hi; }) #else # define MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) # define MUL64(a,b) ((int64_t)(a) * (int64_t)(b)) |