[FFmpeg-cvslog] r22965 - trunk/libavutil/common.h
rbultje
subversion
Mon Apr 26 15:36:17 CEST 2010
Author: rbultje
Date: Mon Apr 26 15:36:17 2010
New Revision: 22965
Log:
Fix broken 32-bit clipping, and write numbers in hex instead of decimal so
they are easier to understand. Also give the add a 'u' postfix to silence
a pre-c99 compiler warning.
Modified:
trunk/libavutil/common.h
Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h Mon Apr 26 01:35:56 2010 (r22964)
+++ trunk/libavutil/common.h Mon Apr 26 15:36:17 2010 (r22965)
@@ -151,7 +151,7 @@ static inline av_const int16_t av_clip_i
*/
static inline av_const int32_t av_clipl_int32(int64_t a)
{
- if ((a+2147483648) & ~2147483647) return (a>>63) ^ 2147483647;
+ if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
else return a;
}
More information about the ffmpeg-cvslog
mailing list