[FFmpeg-cvslog] r21947 - trunk/libavcodec/mathops.h
mru
subversion
Sun Feb 21 22:48:38 CET 2010
Author: mru
Date: Sun Feb 21 22:48:37 2010
New Revision: 21947
Log:
Add zero_extend() function
Modified:
trunk/libavcodec/mathops.h
Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h Sun Feb 21 21:47:10 2010 (r21946)
+++ trunk/libavcodec/mathops.h Sun Feb 21 22:48:37 2010 (r21947)
@@ -122,6 +122,13 @@ static inline av_const int sign_extend(i
}
#endif
+#ifndef zero_extend
+static inline av_const unsigned zero_extend(unsigned val, unsigned bits)
+{
+ return (val << (INT_BIT - bits)) >> (INT_BIT - bits);
+}
+#endif
+
#ifndef COPY3_IF_LT
#define COPY3_IF_LT(x, y, a, b, c, d)\
if ((y) < (x)) {\
More information about the ffmpeg-cvslog
mailing list