ref: 7f4387f7f7f2272d63f0128722c3a0f7bebea92a
parent: 62d33725ec0f2a46baa2e6a6c331de36b5e11033
author: Angie Chiang <angiebird@google.com>
date: Thu Apr 4 14:09:40 EDT 2019
Use log-based sse in eval_mv_mode Up to this point, non_greedy_mv's BDRate change lowres -0.397% midres -0.776% hdres -0.637% Change-Id: I5eb2f03d067d172350dad6ba9a9f4dffef5143cd
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6331,10 +6331,6 @@
return mv_cost;
}
-static double rd_cost(int rdmult, int rddiv, double rate, double dist) {
- return (rate * rdmult) / (1 << 9) + dist * (1 << rddiv);
-}
-
static double eval_mv_mode(int mv_mode, VP9_COMP *cpi, MACROBLOCK *x,
GF_PICTURE *gf_picture, int frame_idx,
TplDepFrame *tpl_frame, int rf_idx, BLOCK_SIZE bsize,
@@ -6344,8 +6340,9 @@
tpl_frame, rf_idx, bsize, mi_row, mi_col, mv);
double mv_cost =
get_mv_cost(mv_mode, cpi, tpl_frame, rf_idx, bsize, mi_row, mi_col);
+ double mult = 180;
- return rd_cost(x->rdmult, x->rddiv, mv_cost, mv_dist);
+ return mv_cost + mult * log2f(1 + mv_dist);
}
static int find_best_ref_mv_mode(VP9_COMP *cpi, MACROBLOCK *x,