Commit 6aeb03d8 authored by Michael Niedermayer's avatar Michael Niedermayer

low resolution decoding fix

Originally committed as revision 3510 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 9ca358b9
...@@ -1338,8 +1338,8 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s){ ...@@ -1338,8 +1338,8 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s){
} }
// dprintf("mb: %d %d processed\n", mb_y, mb_x); // dprintf("mb: %d %d processed\n", mb_y, mb_x);
ptr = s->picture.data[c] + ptr = s->picture.data[c] +
(s->linesize[c] * (v * mb_y + y) * 8) + (((s->linesize[c] * (v * mb_y + y) * 8) +
(h * mb_x + x) * 8; (h * mb_x + x) * 8) >> s->avctx->lowres);
if (s->interlaced && s->bottom_field) if (s->interlaced && s->bottom_field)
ptr += s->linesize[c] >> 1; 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); //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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment