[FFmpeg-cvslog] r23723 - trunk/libavcodec/mpegvideo_common.h

cehoyos subversion
Tue Jun 22 23:12:42 CEST 2010


Author: cehoyos
Date: Tue Jun 22 23:12:42 2010
New Revision: 23723

Log:
Use right-shift instead of division by two.

Patch by Dark Shikari

Modified:
   trunk/libavcodec/mpegvideo_common.h

Modified: trunk/libavcodec/mpegvideo_common.h
==============================================================================
--- trunk/libavcodec/mpegvideo_common.h	Tue Jun 22 22:57:37 2010	(r23722)
+++ trunk/libavcodec/mpegvideo_common.h	Tue Jun 22 23:12:42 2010	(r23723)
@@ -580,11 +580,11 @@ static inline void chroma_4mv_motion(Mpe
 
     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;



More information about the ffmpeg-cvslog mailing list