Mercurial > libavcodec.hg
comparison mpegvideo_common.h @ 11925:c5e03082fd94 libavcodec
Use right-shift instead of division by two.
Patch by Dark Shikari
author | cehoyos |
---|---|
date | Tue, 22 Jun 2010 21:12:42 +0000 |
parents | 7dd2a45249a9 |
children | f0a87ee1f6a9 |
comparison
equal
deleted
inserted
replaced
11924:b3b2fd53617b | 11925:c5e03082fd94 |
---|---|
578 mx >>= 1; | 578 mx >>= 1; |
579 my >>= 1; | 579 my >>= 1; |
580 | 580 |
581 src_x = s->mb_x * 8 + mx; | 581 src_x = s->mb_x * 8 + mx; |
582 src_y = s->mb_y * 8 + my; | 582 src_y = s->mb_y * 8 + my; |
583 src_x = av_clip(src_x, -8, s->width/2); | 583 src_x = av_clip(src_x, -8, (s->width >> 1)); |
584 if (src_x == s->width/2) | 584 if (src_x == (s->width >> 1)) |
585 dxy &= ~1; | 585 dxy &= ~1; |
586 src_y = av_clip(src_y, -8, s->height/2); | 586 src_y = av_clip(src_y, -8, (s->height >> 1)); |
587 if (src_y == s->height/2) | 587 if (src_y == (s->height >> 1)) |
588 dxy &= ~2; | 588 dxy &= ~2; |
589 | 589 |
590 offset = (src_y * (s->uvlinesize)) + src_x; | 590 offset = (src_y * (s->uvlinesize)) + src_x; |
591 ptr = ref_picture[1] + offset; | 591 ptr = ref_picture[1] + offset; |
592 if(s->flags&CODEC_FLAG_EMU_EDGE){ | 592 if(s->flags&CODEC_FLAG_EMU_EDGE){ |