1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

mathops: use MUL64 macro where it forms part of other ops

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard 2011-06-04 17:52:30 +01:00
parent 8346f60afb
commit 95912731c2

View File

@ -41,13 +41,17 @@
/* generic implementation */ /* generic implementation */
#ifndef MUL64
# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
#endif
#ifndef MULL #ifndef MULL
# define MULL(a,b,s) (((int64_t)(a) * (int64_t)(b)) >> (s)) # define MULL(a,b,s) (MUL64(a, b) >> (s))
#endif #endif
#ifndef MULH #ifndef MULH
static av_always_inline int MULH(int a, int b){ static av_always_inline int MULH(int a, int b){
return ((int64_t)(a) * (int64_t)(b))>>32; return MUL64(a, b) >> 32;
} }
#endif #endif
@ -57,10 +61,6 @@ static av_always_inline unsigned UMULH(unsigned a, unsigned b){
} }
#endif #endif
#ifndef MUL64
# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
#endif
#ifndef MAC64 #ifndef MAC64
# define MAC64(d, a, b) ((d) += MUL64(a, b)) # define MAC64(d, a, b) ((d) += MUL64(a, b))
#endif #endif