From 6aeb03d887b37cc20d0744200742a6fffcbbf99a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 26 Sep 2004 09:00:37 +0000 Subject: [PATCH] low resolution decoding fix Originally committed as revision 3510 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mjpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index 54374dea65..cb90b410f5 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1338,8 +1338,8 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s){ } // dprintf("mb: %d %d processed\n", mb_y, mb_x); ptr = s->picture.data[c] + - (s->linesize[c] * (v * mb_y + y) * 8) + - (h * mb_x + x) * 8; + (((s->linesize[c] * (v * mb_y + y) * 8) + + (h * mb_x + x) * 8) >> s->avctx->lowres); if (s->interlaced && s->bottom_field) ptr += s->linesize[c] >> 1; //av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d %d %d %d %d \n", mb_x, mb_y, x, y, c, s->bottom_field, (v * mb_y + y) * 8, (h * mb_x + x) * 8);