]> granicus.if.org Git - libvpx/commitdiff
Fix the denominator in tpl model
authorJingning Han <jingning@google.com>
Tue, 10 Jul 2018 21:40:56 +0000 (14:40 -0700)
committerJingning Han <jingning@google.com>
Wed, 11 Jul 2018 03:45:23 +0000 (20:45 -0700)
The factor mc_dep_cost includes intra_cost additiona already. Hence
no need to add it again in the denominator.

Change-Id: I750ae86e1d3019b4a3aebd03dec8db362589619e

vp9/encoder/vp9_encodeframe.c

index 25c5eb32c3c2e41dcba0cf96f6812838c22ef6cf..21f27b02203c3b341979c269a21c693a5aa24039 100644 (file)
@@ -3648,7 +3648,7 @@ int get_rdmult_delta(VP9_COMP *cpi, BLOCK_SIZE bsize, int mi_row, int mi_col,
     }
   }
 
-  rk = (double)intra_cost / (intra_cost + mc_dep_cost);
+  rk = (double)intra_cost / mc_dep_cost;
   beta = r0 / rk;
   dr = vp9_get_adaptive_rdmult(cpi, beta);
 
@@ -5460,8 +5460,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
     }
 
     if (tpl_frame->is_valid)
-      cpi->rd.r0 =
-          (double)intra_cost_base / (intra_cost_base + mc_dep_cost_base);
+      cpi->rd.r0 = (double)intra_cost_base / mc_dep_cost_base;
   }
 
   {