[Ffmpeg-cvslog] CVS: ffmpeg/libavutil common.h,1.164,1.165
Aurelien Jacobs CVS
aurel
Mon May 1 02:27:26 CEST 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavutil
In directory mail:/var2/tmp/cvs-serv11761/libavutil
Modified Files:
common.h
Log Message:
document clip functions
Index: common.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavutil/common.h,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- common.h 30 Apr 2006 17:49:11 -0000 1.164
+++ common.h 1 May 2006 00:27:24 -0000 1.165
@@ -427,6 +427,13 @@
#endif
}
+/**
+ * clip a signed integer value into the amin-amax range
+ * @param a value to clip
+ * @param amin minimum value of the clip range
+ * @param amax maximum value of the clip range
+ * @return cliped value
+ */
static inline int clip(int a, int amin, int amax)
{
if (a < amin)
@@ -437,6 +444,11 @@
return a;
}
+/**
+ * clip a signed integer value into the 0-255 range
+ * @param a value to clip
+ * @return cliped value
+ */
static inline uint8_t clip_uint8(int a)
{
if (a&(~255)) return (-a)>>31;
More information about the ffmpeg-cvslog
mailing list