[FFmpeg-cvslog] avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width

Michael Niedermayer git at videolan.org
Wed Oct 22 02:47:37 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Oct 22 02:28:54 2014 +0200| [c5ffd7aee5a6d60b29721046f94507dcaaae966c] | committer: Michael Niedermayer

avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width

No testcase known

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5ffd7aee5a6d60b29721046f94507dcaaae966c
---

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 17421dd..cdb75af 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2101,7 +2101,7 @@ the_end:
             if (!(s->upscale_h & (1<<p)))
                 continue;
             if (p==1 || p==2) {
-                w >>= hshift;
+                w = FF_CEIL_RSHIFT(w, hshift);
                 h = FF_CEIL_RSHIFT(h, vshift);
             }
             if (s->upscale_v & (1<<p))



More information about the ffmpeg-cvslog mailing list