From 7f4387f7f7f2272d63f0128722c3a0f7bebea92a Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Thu, 4 Apr 2019 18:09:40 -0700 Subject: [PATCH] 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 --- vp9/encoder/vp9_encoder.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 7849a10..292f2ee 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -6331,10 +6331,6 @@ static double get_mv_cost(int mv_mode, VP9_COMP *cpi, TplDepFrame *tpl_frame, 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 @@ static double eval_mv_mode(int mv_mode, VP9_COMP *cpi, MACROBLOCK *x, 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, -- 2.7.4