diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-28 02:27:43 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-28 02:27:43 +0200 |
commit | f01028bf58b89a80132bda409167e39779de8835 (patch) | |
tree | 37bc5f22bb8f53e062c1308756eb9ba20c742614 /libavcodec/jpeg2000.h | |
parent | 86fb20324690a80f763b7de6d78749c17ad3f482 (diff) | |
download | ffmpeg-f01028bf58b89a80132bda409167e39779de8835.tar.gz |
avcodec/jpeg2000: Avoid one shift in ff_jpeg2000_ceildivpow2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000.h')
-rw-r--r-- | libavcodec/jpeg2000.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.h b/libavcodec/jpeg2000.h index 9bf6186176..a99c210bc8 100644 --- a/libavcodec/jpeg2000.h +++ b/libavcodec/jpeg2000.h @@ -215,7 +215,7 @@ typedef struct Jpeg2000Component { /* misc tools */ 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) |