Mercurial > libavcodec.hg
comparison mpegvideo.c @ 2168:f3f5dabef677 libavcodec
minor optimization
author | michael |
---|---|
date | Fri, 13 Aug 2004 14:40:33 +0000 |
parents | 5ca07515a309 |
children | c17d0cbbdf66 |
comparison
equal
deleted
inserted
replaced
2167:76334bbb5038 | 2168:f3f5dabef677 |
---|---|
3482 s->block_index[3]= s->b8_stride*(s->mb_y*2 + 1) - 1 + s->mb_x*2; | 3482 s->block_index[3]= s->b8_stride*(s->mb_y*2 + 1) - 1 + s->mb_x*2; |
3483 s->block_index[4]= s->mb_stride*(s->mb_y + 1) + s->b8_stride*s->mb_height*2 + s->mb_x - 1; | 3483 s->block_index[4]= s->mb_stride*(s->mb_y + 1) + s->b8_stride*s->mb_height*2 + s->mb_x - 1; |
3484 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; | 3484 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; |
3485 //block_index is not used by mpeg2, so it is not affected by chroma_format | 3485 //block_index is not used by mpeg2, so it is not affected by chroma_format |
3486 | 3486 |
3487 s->dest[0] = s->current_picture.data[0] + (s->mb_x - 1)*16; | 3487 s->dest[0] = s->current_picture.data[0] + ((s->mb_x - 1) << 4); |
3488 s->dest[1] = s->current_picture.data[1] + (s->mb_x - 1)*(16 >> s->chroma_x_shift); | 3488 s->dest[1] = s->current_picture.data[1] + ((s->mb_x - 1) << (4 - s->chroma_x_shift)); |
3489 s->dest[2] = s->current_picture.data[2] + (s->mb_x - 1)*(16 >> s->chroma_x_shift); | 3489 s->dest[2] = s->current_picture.data[2] + ((s->mb_x - 1) << (4 - s->chroma_x_shift)); |
3490 | 3490 |
3491 if(!(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME)) | 3491 if(!(s->pict_type==B_TYPE && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME)) |
3492 { | 3492 { |
3493 s->dest[0] += s->mb_y * linesize * 16; | 3493 s->dest[0] += s->mb_y * linesize << 4; |
3494 s->dest[1] += s->mb_y * uvlinesize * (16 >> s->chroma_y_shift); | 3494 s->dest[1] += s->mb_y * uvlinesize << (4 - s->chroma_y_shift); |
3495 s->dest[2] += s->mb_y * uvlinesize * (16 >> s->chroma_y_shift); | 3495 s->dest[2] += s->mb_y * uvlinesize << (4 - s->chroma_y_shift); |
3496 } | 3496 } |
3497 } | 3497 } |
3498 | 3498 |
3499 #ifdef CONFIG_ENCODERS | 3499 #ifdef CONFIG_ENCODERS |
3500 | 3500 |