summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-26 09:00:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-26 09:00:37 +0000
commit6aeb03d887b37cc20d0744200742a6fffcbbf99a (patch)
tree81fb7c00364029b99df1186dc273e3d5e26820ac /libavcodec/mjpeg.c
parent9ca358b9511a412a4b45880ce78cd7479087ad92 (diff)
low resolution decoding fix
Originally committed as revision 3510 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c4
1 files 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);