[SCM] libav/experimental: Add sign_extend() function to mathops.h
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:40:15 UTC 2013
The following commit has been merged in the experimental branch:
commit 101dfa7d0a15de14c599a9c5db9945419fd12fb9
Author: Måns Rullgård <mans at mansr.com>
Date: Tue Mar 3 00:03:55 2009 +0000
Add sign_extend() function to mathops.h
Originally committed as revision 17738 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 880e946..b92a6be 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -113,5 +113,12 @@ static inline av_const int mid_pred(int a, int b, int c)
}
#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 */
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list