[FFmpeg-cvslog] r21463 - trunk/libavcodec/mathops.h
mru
subversion
Tue Jan 26 19:05:55 CET 2010
Author: mru
Date: Tue Jan 26 19:05:55 2010
New Revision: 21463
Log:
Add UMULH()
This function/macro returns the high half of the unsigned 64-bit
product of two unsigned 32-bit operands.
Modified:
trunk/libavcodec/mathops.h
Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h Tue Jan 26 18:17:48 2010 (r21462)
+++ trunk/libavcodec/mathops.h Tue Jan 26 19:05:55 2010 (r21463)
@@ -53,6 +53,12 @@ static av_always_inline int MULH(int a,
}
#endif
+#ifndef UMULH
+static av_always_inline unsigned UMULH(unsigned a, unsigned b){
+ return ((uint64_t)(a) * (uint64_t)(b))>>32;
+}
+#endif
+
#ifndef MUL64
# define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
#endif
More information about the ffmpeg-cvslog
mailing list