Mercurial > libavcodec.hg
diff armv4l/mathops.h @ 8201:c6e2ffef3797 libavcodec
Add shift argument to MULL() macro
This replaces use of FRAC_BITS in the MULL() definition with a third
argument specifying the shift amount. All uses of this macro are
updated to pass FRAC_BITS as third argument.
| author | mru |
|---|---|
| date | Mon, 24 Nov 2008 09:28:55 +0000 |
| parents | e61cc20bad68 |
| children |
line wrap: on
line diff
--- a/armv4l/mathops.h Mon Nov 24 00:14:33 2008 +0000 +++ b/armv4l/mathops.h Mon Nov 24 09:28:55 2008 +0000 @@ -25,19 +25,17 @@ #include <stdint.h> #include "libavutil/common.h" -#ifdef FRAC_BITS # define MULL MULL -static inline av_const int MULL(int a, int b) +static inline av_const int MULL(int a, int b, unsigned shift) { 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)); + : "r"(b), "r"(a), "i"(shift), "i"(32-shift)); return hi; } -#endif #define MULH MULH #ifdef HAVE_ARMV6
