Commit 26d2496e authored by mru's avatar mru

Add sign_extend() function to mathops.h

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17738 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 94defe8e
......@@ -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 */
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