From 23d3633f4064c5a4e1fe719af75d517a300a5845 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Mon, 8 Oct 2018 14:35:26 -0700 Subject: [PATCH] Move lambda into TplDepFrame Change-Id: Id93565cca41e00d4ab5de4c6de30accabf2adc52 --- vp9/encoder/vp9_encoder.c | 3 ++- vp9/encoder/vp9_encoder.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index ca10512c6..09a5f504e 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -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; diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index b8922dc56..25396bc7a 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -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 -- 2.49.0