changeset 3487:26d3704e12c0 libavcodec

use RSHIFT
author michael
date Sun, 16 Jul 2006 21:09:32 +0000
parents 5ee0e924432f
children a647bf3a7fa8
files vp3.c
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/vp3.c	Sun Jul 16 21:00:38 2006 +0000
+++ b/vp3.c	Sun Jul 16 21:09:32 2006 +0000
@@ -1145,17 +1145,10 @@
                         motion_y[4] += motion_y[k];
                     }
 
-                    if (motion_x[4] >= 0)
-                        motion_x[4] = (motion_x[4] + 2) / 4;
-                    else
-                        motion_x[4] = (motion_x[4] - 2) / 4;
-                    motion_x[5] = motion_x[4];
-
-                    if (motion_y[4] >= 0)
-                        motion_y[4] = (motion_y[4] + 2) / 4;
-                    else
-                        motion_y[4] = (motion_y[4] - 2) / 4;
-                    motion_y[5] = motion_y[4];
+                    motion_x[5]=
+                    motion_x[4]= RSHIFT(motion_x[4], 2);
+                    motion_y[5]=
+                    motion_y[4]= RSHIFT(motion_y[4], 2);
 
                     /* vector maintenance; vector[3] is treated as the
                      * last vector in this case */