comparison 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 c4a4495715dd
children 9281a8a9387a
comparison
equal deleted inserted replaced
8200:843d82925adf 8201:c6e2ffef3797
43 #endif 43 #endif
44 44
45 /* generic implementation */ 45 /* generic implementation */
46 46
47 #ifndef MULL 47 #ifndef MULL
48 # define MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) 48 # define MULL(a,b,s) (((int64_t)(a) * (int64_t)(b)) >> (s))
49 #endif 49 #endif
50 50
51 #ifndef MULH 51 #ifndef MULH
52 //gcc 3.4 creates an incredibly bloated mess out of this 52 //gcc 3.4 creates an incredibly bloated mess out of this
53 //# define MULH(a,b) (((int64_t)(a) * (int64_t)(b))>>32) 53 //# define MULH(a,b) (((int64_t)(a) * (int64_t)(b))>>32)