[1.5] fixed int_ceildivpow2 implementation (backport from trunk)

Update issue 388
This commit is contained in:
Antonin Descampe 2015-01-08 23:18:52 +00:00
parent 2eebb05ca2
commit 0ec0b2594c
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ Divide an integer by a power of 2 and round upwards
@return Returns a divided by 2^b
*/
static INLINE int int_ceildivpow2(int a, int b) {
return (a + (1 << b) - 1) >> b;
return (int)((a + (int64_t)(1 << b) - 1) >> b);
}
/**
Divide an integer by a power of 2 and round downwards