ref: 71b7cb2006b26ba1d7c9d07bc427d28dbde06fb8
parent: 812bacc9199c158aac0cd1f8f571acefc78e7d83
author: Dmitry Kovalev <[email protected]>
date: Sat Feb 8 20:15:44 EST 2014
Fixing errorperbit calculation. Change-Id: I06e082a18dbcc6e126cf288ee769c1480e3f2f4d
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -285,7 +285,8 @@
cpi->RDDIV = RDDIV_BITS; // in bits (to multiply D by 128)
cpi->RDMULT = vp9_compute_rd_mult(cpi, qindex);
- x->errorperbit = cpi->RDMULT / RD_MULT_EPB_RATIO + (x->errorperbit == 0);
+ x->errorperbit = cpi->RDMULT / RD_MULT_EPB_RATIO;
+ x->errorperbit += (x->errorperbit == 0);
vp9_set_speed_features(cpi);