Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2010-06-23 01:12:42 +0400
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-06-23 01:12:42 +0400
commitc31a25e79c1fa034a1a528d93796e2fc98a6adda (patch)
tree6b31b5cb661c79fff0581e2d859808cb482e6a59 /libavcodec/mpegvideo_common.h
parent2b6a950361d8d0346216fc75f012ad97a19f7856 (diff)
Use right-shift instead of division by two.
Patch by Dark Shikari Originally committed as revision 23723 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_common.h')
-rw-r--r--libavcodec/mpegvideo_common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index 73106664f9..24cfa78849 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -580,11 +580,11 @@ static inline void chroma_4mv_motion(MpegEncContext *s,
src_x = s->mb_x * 8 + mx;
src_y = s->mb_y * 8 + my;
- src_x = av_clip(src_x, -8, s->width/2);
- if (src_x == s->width/2)
+ src_x = av_clip(src_x, -8, (s->width >> 1));
+ if (src_x == (s->width >> 1))
dxy &= ~1;
- src_y = av_clip(src_y, -8, s->height/2);
- if (src_y == s->height/2)
+ src_y = av_clip(src_y, -8, (s->height >> 1));
+ if (src_y == (s->height >> 1))
dxy &= ~2;
offset = (src_y * (s->uvlinesize)) + src_x;