[FFmpeg-cvslog] r17738 - trunk/libavcodec/mathops.h
mru
subversion
Tue Mar 3 01:03:56 CET 2009
Author: mru
Date: Tue Mar 3 01:03:55 2009
New Revision: 17738
Log:
Add sign_extend() function to mathops.h
Modified:
trunk/libavcodec/mathops.h
Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h Mon Mar 2 21:32:24 2009 (r17737)
+++ trunk/libavcodec/mathops.h Tue Mar 3 01:03:55 2009 (r17738)
@@ -113,5 +113,12 @@ static inline av_const int mid_pred(int
}
#endif
+#ifndef sign_extend
+static inline av_const int sign_extend(int val, unsigned bits)
+{
+ return (val << (INT_BIT - bits)) >> (INT_BIT - bits);
+}
+#endif
+
#endif /* AVCODEC_MATHOPS_H */
More information about the ffmpeg-cvslog
mailing list