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 коммит произвёл Gerrit Code Review
Родитель 30d7b79572 ee808e52bd
Коммит 842c573e04
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;