Commit ed186c1c authored by mru's avatar mru

Add UMULH()

This function/macro returns the high half of the unsigned 64-bit
product of two unsigned 32-bit operands.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21463 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 39629e94
...@@ -53,6 +53,12 @@ static av_always_inline int MULH(int a, int b){ ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment