Revision af27aea9 libavcodec/motion_est.c

View differences:

libavcodec/motion_est.c
1135 1135
    
1136 1136
    sum = pix_sum(pix, s->linesize);
1137 1137
    
1138
    sum= (sum+8)>>4;
1139
    varc = (pix_norm1(pix, s->linesize) - sum*sum + 500 + 128)>>8;
1138
    varc = (pix_norm1(pix, s->linesize) - (((unsigned)(sum*sum))>>8) + 500 + 128)>>8;
1140 1139
    vard = (pix_norm(pix, ppix, s->linesize)+128)>>8;
1141 1140

  
1142 1141
//printf("%d %d %d %X %X %X\n", s->mb_width, mb_x, mb_y,(int)s, (int)s->mb_var, (int)s->mc_mb_var); fflush(stdout);
1143 1142
    s->mb_var   [s->mb_width * mb_y + mb_x] = varc;
1144 1143
    s->mc_mb_var[s->mb_width * mb_y + mb_x] = vard;
1145
    s->mb_mean  [s->mb_width * mb_y + mb_x] = (sum+7)>>4;
1144
    s->mb_mean  [s->mb_width * mb_y + mb_x] = (sum+128)>>8;
1146 1145
    s->mb_var_sum    += varc;
1147 1146
    s->mc_mb_var_sum += vard;
1148 1147
//printf("E%d %d %d %X %X %X\n", s->mb_width, mb_x, mb_y,(int)s, (int)s->mb_var, (int)s->mc_mb_var); fflush(stdout);

Also available in: Unified diff