[FFmpeg-cvslog] mathops: use MUL64 macro where it forms part of other ops

Mans Rullgard git at videolan.org
Sun Jun 5 03:21:59 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Jun  4 17:52:30 2011 +0100| [95912731c2eb37b538a767b2ff2b8149b16f0bde] | committer: Mans Rullgard

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

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95912731c2eb37b538a767b2ff2b8149b16f0bde
---

 libavcodec/mathops.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 98c9acf..ec76eaa 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -41,13 +41,17 @@
 
 /* generic implementation */
 
+#ifndef MUL64
+#   define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
+#endif
+
 #ifndef MULL
-#   define MULL(a,b,s) (((int64_t)(a) * (int64_t)(b)) >> (s))
+#   define MULL(a,b,s) (MUL64(a, b) >> (s))
 #endif
 
 #ifndef MULH
 static av_always_inline int MULH(int a, int b){
-    return ((int64_t)(a) * (int64_t)(b))>>32;
+    return MUL64(a, b) >> 32;
 }
 #endif
 
@@ -57,10 +61,6 @@ static av_always_inline unsigned UMULH(unsigned a, unsigned b){
 }
 #endif
 
-#ifndef MUL64
-#   define MUL64(a,b) ((int64_t)(a) * (int64_t)(b))
-#endif
-
 #ifndef MAC64
 #   define MAC64(d, a, b) ((d) += MUL64(a, b))
 #endif



More information about the ffmpeg-cvslog mailing list