shithub: libvpx

Download patch

ref: 28f46aa633f10a1dd7fb1b48f79b4696d08baec5
parent: c6574f4daf2dc31ceab6aa715cc92e23c34efc8c
parent: 71b7cb2006b26ba1d7c9d07bc427d28dbde06fb8
author: Dmitry Kovalev <[email protected]>
date: Tue Feb 11 05:19:59 EST 2014

Merge "Fixing errorperbit calculation."

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