Commit 85108195 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/common: minor simplification in av_clip_intp2_c()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5c8f7470
......@@ -192,7 +192,7 @@ static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
*/
static av_always_inline av_const int av_clip_intp2_c(int a, int p)
{
if ((a + (1 << p)) & ~((1 << (p + 1)) - 1))
if ((a + (1 << p)) & ~((2 << p) - 1))
return (a >> 31) ^ ((1 << p) - 1);
else
return a;
......
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