comparison vp3.c @ 3487:26d3704e12c0 libavcodec

use RSHIFT
author michael
date Sun, 16 Jul 2006 21:09:32 +0000
parents 5ee0e924432f
children a647bf3a7fa8
comparison
equal deleted inserted replaced
3486:5ee0e924432f 3487:26d3704e12c0
1143 } 1143 }
1144 motion_x[4] += motion_x[k]; 1144 motion_x[4] += motion_x[k];
1145 motion_y[4] += motion_y[k]; 1145 motion_y[4] += motion_y[k];
1146 } 1146 }
1147 1147
1148 if (motion_x[4] >= 0) 1148 motion_x[5]=
1149 motion_x[4] = (motion_x[4] + 2) / 4; 1149 motion_x[4]= RSHIFT(motion_x[4], 2);
1150 else 1150 motion_y[5]=
1151 motion_x[4] = (motion_x[4] - 2) / 4; 1151 motion_y[4]= RSHIFT(motion_y[4], 2);
1152 motion_x[5] = motion_x[4];
1153
1154 if (motion_y[4] >= 0)
1155 motion_y[4] = (motion_y[4] + 2) / 4;
1156 else
1157 motion_y[4] = (motion_y[4] - 2) / 4;
1158 motion_y[5] = motion_y[4];
1159 1152
1160 /* vector maintenance; vector[3] is treated as the 1153 /* vector maintenance; vector[3] is treated as the
1161 * last vector in this case */ 1154 * last vector in this case */
1162 prior_last_motion_x = last_motion_x; 1155 prior_last_motion_x = last_motion_x;
1163 prior_last_motion_y = last_motion_y; 1156 prior_last_motion_y = last_motion_y;