shithub: libvpx

Download patch

ref: 4e4f4ba868eebb697a3e8a1fb23bb1894ef6c917
parent: 6924fddb0867bc2b8f10fb1ddeaafe304536f053
parent: cd228fcdb8deafe51ead715988d395e05f8eda17
author: Jingning Han <[email protected]>
date: Wed Aug 27 14:48:32 EDT 2014

Merge "Add an early termination check in handle_inter_mode"

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2238,6 +2238,10 @@
    * if the first is known */
   *rate2 += cost_mv_ref(cpi, this_mode, mbmi->mode_context[refs[0]]);
 
+  if (RDCOST(x->rdmult, x->rddiv, *rate2, 0) > ref_best_rd &&
+      mbmi->mode != NEARESTMV)
+    return INT64_MAX;
+
   pred_exists = 0;
   // Are all MVs integer pel for Y and UV
   intpel_mv = !mv_has_subpel(&mbmi->mv[0].as_mv);