Commit 3af6966a authored by mru's avatar mru

Add zero_extend() function

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21947 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c3820378
...@@ -122,6 +122,13 @@ static inline av_const int sign_extend(int val, unsigned bits) ...@@ -122,6 +122,13 @@ static inline av_const int sign_extend(int val, unsigned bits)
} }
#endif #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 #ifndef COPY3_IF_LT
#define COPY3_IF_LT(x, y, a, b, c, d)\ #define COPY3_IF_LT(x, y, a, b, c, d)\
if ((y) < (x)) {\ if ((y) < (x)) {\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment