Add sign_extend() function to mathops.h
Originally committed as revision 17738 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
edd532db64
commit
101dfa7d0a
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user