shithub: libvpx

Download patch

ref: 07507c830b3bea3b71cb30aeef569e6528a44cab
parent: f130666dcf49a24cf1a0b4534390f86119448893
author: Jingning Han <jingning@google.com>
date: Fri Jul 13 12:24:12 EDT 2018

Use the estimate qp to set motion search control

Set the multiplier for motion estimation using the estimate frame
quantization paramter in the temporal dependency model.

Change-Id: Ia9a843111c1504d7ae8b12113374831ee79c85b8

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5504,6 +5504,7 @@
   int alt_index = -1;
   int lst_index = -1;
   int extend_frame_count = 0;
+  int pframe_qindex = cpi->tpl_stats[2].base_qindex;
 
   *tpl_group_frames = 0;
 
@@ -5550,6 +5551,8 @@
 
     if (buf == NULL) break;
 
+    cpi->tpl_stats[frame_idx].base_qindex = pframe_qindex;
+
     gf_picture[frame_idx].frame = &buf->img;
     gf_picture[frame_idx].ref_frame[0] = gld_index;
     gf_picture[frame_idx].ref_frame[1] = lst_index;
@@ -5767,12 +5770,14 @@
   xd->mi[0] = cm->mi;
 
   // Get rd multiplier set up.
-  rdmult = (int)vp9_compute_rd_mult_based_on_qindex(cpi, ARNR_FILT_QINDEX);
+  rdmult =
+      (int)vp9_compute_rd_mult_based_on_qindex(cpi, tpl_frame->base_qindex);
   if (rdmult < 1) rdmult = 1;
   set_error_per_bit(&cpi->td.mb, rdmult);
-  vp9_initialize_me_consts(cpi, &cpi->td.mb, ARNR_FILT_QINDEX);
+  vp9_initialize_me_consts(cpi, &cpi->td.mb, tpl_frame->base_qindex);
 
   tpl_frame->is_valid = 1;
+
   for (mi_row = 0; mi_row < cm->mi_rows; mi_row += mi_height) {
     // Motion estimation row boundary
     x->mv_limits.row_min = -((mi_row * MI_SIZE) + (17 - 2 * VP9_INTERP_EXTEND));