mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
Add zero_extend() function
Originally committed as revision 21947 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
94a5218c10
commit
48960b8f24
@ -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)) {\
|
||||||
|
Loading…
Reference in New Issue
Block a user