mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-01 04:13:57 +00:00
avcodec/jpeg2000: Avoid one shift in ff_jpeg2000_ceildivpow2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
86fb203246
commit
f01028bf58
@ -215,7 +215,7 @@ typedef struct Jpeg2000Component {
|
|||||||
/* misc tools */
|
/* misc tools */
|
||||||
static inline int ff_jpeg2000_ceildivpow2(int a, int b)
|
static inline int ff_jpeg2000_ceildivpow2(int a, int b)
|
||||||
{
|
{
|
||||||
return (a + (1 << b) - 1) >> b;
|
return -((-a) >> b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int ff_jpeg2000_ceildiv(int a, int b)
|
static inline int ff_jpeg2000_ceildiv(int a, int b)
|
||||||
|
Loading…
Reference in New Issue
Block a user