shithub: libvpx

Download patch

ref: 5bcc0017dfac1ca3777cf49b8139213acfb185bc
parent: c46694c1d93ccfa40cb1c3b7c04c167be59fded4
parent: 7f4387f7f7f2272d63f0128722c3a0f7bebea92a
author: Angie Chiang <angiebird@google.com>
date: Thu Apr 11 13:25:40 EDT 2019

Merge "Use log-based sse in eval_mv_mode"

--- 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,