]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mjpegdec.c
Merge commit '9cacdabd1c8cd257a942d8289349c37d992989b7'
[ffmpeg] / libavcodec / mjpegdec.c
index b439547836258306d669fa665921c6ae717c2302..5619c36fab8bb97d4c916ad3db0d83f9683fe193 100644 (file)
@@ -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);