Merge "Fix overflow in RD error calculation code." into experimental

This commit is contained in:
Ronald S. Bultje 2013-05-03 18:03:06 -07:00 committed by Gerrit Code Review
commit 842c573e04

View File

@ -602,7 +602,7 @@ static int block_error(int16_t *coeff, int16_t *dqcoeff,
for (i = 0; i < block_size; i++) {
int this_diff = coeff[i] - dqcoeff[i];
error += this_diff * this_diff;
error += (unsigned)this_diff * this_diff;
}
error >>= shift;