[1.5] fixed int_ceildivpow2 implementation (backport from trunk)
Update issue 388
This commit is contained in:
parent
2eebb05ca2
commit
0ec0b2594c
|
@ -91,7 +91,7 @@ Divide an integer by a power of 2 and round upwards
|
||||||
@return Returns a divided by 2^b
|
@return Returns a divided by 2^b
|
||||||
*/
|
*/
|
||||||
static INLINE int int_ceildivpow2(int a, int 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
|
Divide an integer by a power of 2 and round downwards
|
||||||
|
|
Loading…
Reference in New Issue