summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/mathops.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 5782459080..e33f3bf303 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -53,6 +53,12 @@ static av_always_inline int MULH(int a, int b){
}
#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