]> granicus.if.org Git - libvpx/commitdiff
Move lambda into TplDepFrame
authorAngie Chiang <angiebird@google.com>
Mon, 8 Oct 2018 21:35:26 +0000 (14:35 -0700)
committerAngie Chiang <angiebird@google.com>
Mon, 8 Oct 2018 21:35:26 +0000 (14:35 -0700)
Change-Id: Id93565cca41e00d4ab5de4c6de30accabf2adc52

vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_encoder.h

index ca10512c67a1dbf823923c7ff401349e8b1d0b4a..09a5f504ee393a6f18cb0d1b124194661dec049b 100644 (file)
@@ -5497,7 +5497,7 @@ uint32_t motion_compensated_prediction(VP9_COMP *cpi, ThreadData *td,
 #if CONFIG_NON_GREEDY_MV
   // lambda is used to adjust the importance of motion vector consitency.
   // TODO(angiebird): Figure out lambda's proper value.
-  double lambda = 10000;
+  double lambda = cpi->tpl_stats[frame_idx].lambda;
   int_mv nb_full_mvs[NB_MVS_NUM];
 #endif
 
@@ -5998,6 +5998,7 @@ void mc_flow_dispenser(VP9_COMP *cpi, GF_PICTURE *gf_picture, int frame_idx,
   vp9_frame_init_quantizer(cpi);
 
 #if CONFIG_NON_GREEDY_MV
+  tpl_frame->lambda = 250;
   for (rf_idx = 0; rf_idx < 3; ++rf_idx) {
     tpl_frame->mv_dist_sum[rf_idx] = 0;
     tpl_frame->mv_cost_sum[rf_idx] = 0;
index b8922dc56e2c7813adf400499bffaec43313ee64..25396bc7a1c5ccb87d6157b1b1bb9850a93990b9 100644 (file)
@@ -312,6 +312,7 @@ typedef struct TplDepFrame {
   int mi_cols;
   int base_qindex;
 #if CONFIG_NON_GREEDY_MV
+  double lambda;
   double mv_dist_sum[3];
   double mv_cost_sum[3];
 #endif