OSDN Git Service
(root)
/
coroid
/
ffmpeg_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94a5218
)
Add zero_extend() function
author
Måns Rullgård
<mans@mansr.com>
Sun, 21 Feb 2010 21:48:37 +0000
(21:48 +0000)
committer
Måns Rullgård
<mans@mansr.com>
Sun, 21 Feb 2010 21:48:37 +0000
(21:48 +0000)
Originally committed as revision 21947 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/mathops.h
patch
|
blob
|
history
diff --git
a/libavcodec/mathops.h
b/libavcodec/mathops.h
index
85eac48
..
149910b
100644
(file)
--- 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)) {\