aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-07 16:31:02 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-09 16:59:42 +0200
commit570d63eef3f911869672cd20fa9c2abedb11093d (patch)
tree2b993b08de62362e2e59e8049e28a92e6c2bb0af /libavcodec/mjpegdec.c
parentd9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff)
downloadffmpeg-570d63eef3f911869672cd20fa9c2abedb11093d.tar.gz
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b439547836..5619c36fab 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1847,8 +1847,8 @@ the_end:
int w = s->width;
int h = s->height;
if(index && index<3){
- w = -((-w) >> hshift);
- h = -((-h) >> vshift);
+ w = FF_CEIL_RSHIFT(w, hshift);
+ h = FF_CEIL_RSHIFT(h, vshift);
}
if(dst){
uint8_t *dst2 = dst + s->linesize[index]*(h-1);