Commit 25b46da3 authored by michael's avatar michael

minor optimization


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3386 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e4f83f11
......@@ -3484,15 +3484,15 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename
s->block_index[5]= s->mb_stride*(s->mb_y + s->mb_height + 2) + s->b8_stride*s->mb_height*2 + s->mb_x - 1;
//block_index is not used by mpeg2, so it is not affected by chroma_format
s->dest[0] = s->current_picture.data[0] + (s->mb_x - 1)*16;
s->dest[1] = s->current_picture.data[1] + (s->mb_x - 1)*(16 >> s->chroma_x_shift);
s->dest[2] = s->current_picture.data[2] + (s->mb_x - 1)*(16 >> s->chroma_x_shift);
s->dest[0] = s->current_picture.data[0] + ((s->mb_x - 1) << 4);
s->dest[1] = s->current_picture.data[1] + ((s->mb_x - 1) << (4 - s->chroma_x_shift));
s->dest[2] = s->current_picture.data[2] + ((s->mb_x - 1) << (4 - s->chroma_x_shift));
if(!(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME))
{
s->dest[0] += s->mb_y * linesize * 16;
s->dest[1] += s->mb_y * uvlinesize * (16 >> s->chroma_y_shift);
s->dest[2] += s->mb_y * uvlinesize * (16 >> s->chroma_y_shift);
s->dest[0] += s->mb_y * linesize << 4;
s->dest[1] += s->mb_y * uvlinesize << (4 - s->chroma_y_shift);
s->dest[2] += s->mb_y * uvlinesize << (4 - s->chroma_y_shift);
}
}
......
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