shithub: libvpx

Download patch

ref: d2059b0d2de0d43f1a1938c546e72847215b008c
parent: 02509024750ea8f637d6334308620a6cd32e405a
author: Jingning Han <jingning@google.com>
date: Fri Mar 7 09:06:20 EST 2014

Skip mode check when mv has been tested

This commit allows the non-RD mode decision to skip mode RD modelling
check, if the motion vector associated with the current mode is
same as that of NEARESTMV mode. This makes speed -7 about 2% faster.
Previous change that converts cost metric from SAD to model based RD
value makes the codec 6% slower at speed -7.

Change-Id: I30cfec5452f606a671b8432a2f7f0c94fbb49fc8

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -305,6 +305,11 @@
                                 &frame_mv[NEWMV][ref_frame].as_mv);
       }
 
+      if (this_mode != NEARESTMV)
+        if (frame_mv[this_mode][ref_frame].as_int ==
+            frame_mv[NEARESTMV][ref_frame].as_int)
+          continue;
+
       mbmi->mode = this_mode;
       mbmi->mv[0].as_int = frame_mv[this_mode][ref_frame].as_int;
       vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);