]> granicus.if.org Git - libvpx/commitdiff
Remove redundant intra mode penalty from vp9_pick_inter_mode
authorJingning Han <jingning@google.com>
Mon, 24 Nov 2014 17:31:10 +0000 (09:31 -0800)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Mon, 24 Nov 2014 22:55:59 +0000 (14:55 -0800)
The intra mode penalty is covered by intra_cost_penalty. This
commit removes the other intra cost threshold, provided that the
constant 50 is negligible in normal rate-distortion cost.

Change-Id: I9b8b7483c43b9a41741622e7057def1f7d51bb72

vp9/encoder/vp9_pickmode.c

index fb078666943ec9f41f83e4e1470db60d0591e432..65658413dfc3538b2f54da67e1e3d4fcd54b8814 100644 (file)
@@ -548,8 +548,6 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
       cm->base_qindex, cm->y_dc_delta_q, cm->bit_depth) / reduction_fac;
   const int64_t inter_mode_thresh = RDCOST(x->rdmult, x->rddiv,
                                            intra_cost_penalty, 0);
-  const int intra_mode_cost = 50;
-
   const int8_t segment_id = mbmi->segment_id;
   const int *const rd_threshes = cpi->rd.threshes[segment_id][bsize];
   const int *const rd_thresh_freq_fact = tile_data->thresh_freq_fact[bsize];
@@ -887,7 +885,7 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
       this_rdc.rdcost = RDCOST(x->rdmult, x->rddiv,
                                this_rdc.rate, this_rdc.dist);
 
-      if (this_rdc.rdcost + intra_mode_cost < best_rdc.rdcost) {
+      if (this_rdc.rdcost < best_rdc.rdcost) {
         best_rdc = this_rdc;
         mbmi->mode = this_mode;
         mbmi->tx_size = intra_tx_size;