[FFmpeg-cvslog] r22968 - trunk/libavutil/common.h
rbultje
subversion
Mon Apr 26 23:00:33 CEST 2010
Author: rbultje
Date: Mon Apr 26 23:00:33 2010
New Revision: 22968
Log:
Write clip-related decimal numbers into hex, where they make more sense.
Modified:
trunk/libavutil/common.h
Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h Mon Apr 26 22:30:02 2010 (r22967)
+++ trunk/libavutil/common.h Mon Apr 26 23:00:33 2010 (r22968)
@@ -118,7 +118,7 @@ static inline av_const int av_clip(int a
*/
static inline av_const uint8_t av_clip_uint8(int a)
{
- if (a&(~255)) return (-a)>>31;
+ if (a&(~0xFF)) return (-a)>>31;
else return a;
}
@@ -129,7 +129,7 @@ static inline av_const uint8_t av_clip_u
*/
static inline av_const uint16_t av_clip_uint16(int a)
{
- if (a&(~65535)) return (-a)>>31;
+ if (a&(~0xFFFF)) return (-a)>>31;
else return a;
}
@@ -140,7 +140,7 @@ static inline av_const uint16_t av_clip_
*/
static inline av_const int16_t av_clip_int16(int a)
{
- if ((a+32768) & ~65535) return (a>>31) ^ 32767;
+ if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
else return a;
}
More information about the ffmpeg-cvslog
mailing list