[SCM] libav/experimental: Add zero_extend() function
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:00:54 UTC 2013
The following commit has been merged in the experimental branch:
commit 48960b8f2496c03600e9d139521a1cf8f4a07e55
Author: Måns Rullgård <mans at mansr.com>
Date: Sun Feb 21 21:48:37 2010 +0000
Add zero_extend() function
Originally committed as revision 21947 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 85eac48..149910b 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -122,6 +122,13 @@ static inline av_const int sign_extend(int val, unsigned bits)
}
#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)) {\
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list