Mercurial > libavcodec.hg
changeset 2168:f3f5dabef677 libavcodec
minor optimization
author | michael |
---|---|
date | Fri, 13 Aug 2004 14:40:33 +0000 |
parents | 76334bbb5038 |
children | db8baace74d8 |
files | mpegvideo.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo.c Fri Aug 13 13:59:28 2004 +0000 +++ b/mpegvideo.c Fri Aug 13 14:40:33 2004 +0000 @@ -3484,15 +3484,15 @@ 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); } }