mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add UMULH()
This function/macro returns the high half of the unsigned 64-bit product of two unsigned 32-bit operands. Originally committed as revision 21463 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
900479bb74
commit
f2c694af28
@ -53,6 +53,12 @@ static av_always_inline int MULH(int a, int b){
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef UMULH
|
||||||
|
static av_always_inline unsigned UMULH(unsigned a, unsigned b){
|
||||||
|
return ((uint64_t)(a) * (uint64_t)(b))>>32;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MUL64
|
#ifndef MUL64
|
||||||
# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
|
# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user