From 1b46f315f696c48326ba125e0d5acac8f3313d77 Mon Sep 17 00:00:00 2001
From: Jingning Han <jingning@google.com>
Date: Mon, 24 Mar 2014 22:31:03 -0700
Subject: [PATCH] Always use adaptive motion search in non-RD coding mode

This commit takes out the if statements on using adaptive motion
search flag. This feature is automatically enabled in non-RD mode
decision flow for variable partition types search.

Change-Id: I5a25cf9109d84d07aa61b3e02c8d32dda1e90cb0
---
 vp9/encoder/vp9_encodeframe.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 110fe4906c..be815dbe7a 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2857,8 +2857,7 @@ static void nonrd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
   }
 
   // store estimated motion vector
-  if (cpi->sf.adaptive_motion_search)
-    store_pred_mv(x, ctx);
+  store_pred_mv(x, ctx);
 
   // PARTITION_SPLIT
   sum_rd = 0;
@@ -2876,8 +2875,7 @@ static void nonrd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
         continue;
 
       *get_sb_index(x, subsize) = i;
-      if (cpi->sf.adaptive_motion_search)
-        load_pred_mv(x, ctx);
+      load_pred_mv(x, ctx);
 
       nonrd_pick_partition(cpi, tile, tp, mi_row + y_idx, mi_col + x_idx,
                            subsize, &this_rate, &this_dist, 0, INT64_MAX);
@@ -2921,8 +2919,7 @@ static void nonrd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
     if (sum_rd < best_rd && mi_row + ms < cm->mi_rows) {
       *get_sb_index(x, subsize) = 1;
 
-      if (cpi->sf.adaptive_motion_search)
-        load_pred_mv(x, ctx);
+      load_pred_mv(x, ctx);
 
       nonrd_pick_sb_modes(cpi, tile, mi_row + ms, mi_col,
                           &this_rate, &this_dist, subsize);
@@ -2964,8 +2961,7 @@ static void nonrd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
     if (sum_rd < best_rd && mi_col + ms < cm->mi_cols) {
       *get_sb_index(x, subsize) = 1;
 
-      if (cpi->sf.adaptive_motion_search)
-        load_pred_mv(x, ctx);
+      load_pred_mv(x, ctx);
 
       nonrd_pick_sb_modes(cpi, tile, mi_row, mi_col + ms,
                           &this_rate, &this_dist, subsize);
-- 
GitLab