]> granicus.if.org Git - libvpx/commitdiff
Fixing errorperbit calculation.
authorDmitry Kovalev <dkovalev@google.com>
Sun, 9 Feb 2014 09:15:44 +0000 (01:15 -0800)
committerDmitry Kovalev <dkovalev@google.com>
Mon, 10 Feb 2014 19:06:42 +0000 (11:06 -0800)
Change-Id: I06e082a18dbcc6e126cf288ee769c1480e3f2f4d

vp9/encoder/vp9_rdopt.c

index 7b17b8582d3fed24bcc8f828a9dc4eaca1625e72..b7000cc05dd6c054ab5d2c7df0b04b7682d65399 100644 (file)
@@ -285,7 +285,8 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi) {
   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);