(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);
static int mjpeg_decode_scan(MJpegDecodeContext *s){    int i, mb_x, mb_y;    const int nb_components=3;    for(mb_y = 0; mb_y < s->mb_height; mb_y++) {        for(mb_x = 0; mb_x < s->mb_width; mb_x++) {            if (s->restart_interval && !s->restart_count)                s->restart_count = s->restart_interval;            for(i=0;i<nb_components;i++) {                uint8_t *ptr;                int n, h, v, x, y, c, j;                n = s->nb_blocks[i];                c = s->comp_index[i];                h = s->h_scount[i];                v = s->v_scount[i];                x = 0;                y = 0;                for(j=0;j<n;j++) {                    memset(s->block, 0, sizeof(s->block));                    if (decode_block(s, s->block, i,                                      s->dc_index[i], s->ac_index[i],                                      s->quant_index[c]) < 0) {                        dprintf("error y=%d x=%d\n", mb_y, mb_x);                        return -1;                    }//		    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;                    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);                    s->idct_put(ptr, s->linesize[c], s->block);                    if (++x == h) {                        x = 0;                        y++;                    }                }            }            /* (< 1350) buggy workaround for Spectralfan.mov, should be fixed */            if (s->restart_interval && (s->restart_interval < 1350) &&                !--s->restart_count) {                align_get_bits(&s->gb);                skip_bits(&s->gb, 16); /* skip RSTn */                for (i=0; i<nb_components; i++) /* reset dc */                    s->last_dc[i] = 1024;            }        }    }    return 0;}