Merge "Enable optimize_b for intra blocks" into nextgenv2
diff --git a/test/vp10_fwd_txfm1d_test.cc b/test/vp10_fwd_txfm1d_test.cc
index d6643e5..f8dc0b6 100644
--- a/test/vp10_fwd_txfm1d_test.cc
+++ b/test/vp10_fwd_txfm1d_test.cc
@@ -12,7 +12,7 @@
 #include "test/vp10_txfm_test.h"
 
 using libvpx_test::ACMRandom;
-using libvpx_test::base;
+using libvpx_test::input_base;
 using libvpx_test::reference_hybrid_1d;
 using libvpx_test::TYPE_TXFM;
 using libvpx_test::TYPE_DCT;
@@ -103,7 +103,7 @@
       if (fwd_txfm_func != NULL) {
         for (int ti = 0; ti < count_test_block; ++ti) {
           for (int ni = 0; ni < txfm_size; ++ni) {
-            input[ni] = rnd.Rand16() % base - rnd.Rand16() % base;
+            input[ni] = rnd.Rand16() % input_base - rnd.Rand16() % input_base;
             ref_input[ni] = static_cast<double>(input[ni]);
           }
 
diff --git a/test/vp10_fwd_txfm2d_sse4_test.cc b/test/vp10_fwd_txfm2d_sse4_test.cc
index ab9450b..84b1d0f 100644
--- a/test/vp10_fwd_txfm2d_sse4_test.cc
+++ b/test/vp10_fwd_txfm2d_sse4_test.cc
@@ -9,7 +9,7 @@
 
 using libvpx_test::ACMRandom;
 using libvpx_test::Fwd_Txfm2d_Func;
-using libvpx_test::base;
+using libvpx_test::input_base;
 using libvpx_test::bd;
 
 namespace {
@@ -57,7 +57,7 @@
     // init input
     for (int r = 0; r < txfm_size; r++) {
       for (int c = 0; c < txfm_size; c++) {
-        input[r * txfm_size + c] = rnd.Rand16() % base;
+        input[r * txfm_size + c] = rnd.Rand16() % input_base;
       }
     }
 
diff --git a/test/vp10_fwd_txfm2d_test.cc b/test/vp10_fwd_txfm2d_test.cc
index 668103b..8bbf706 100644
--- a/test/vp10_fwd_txfm2d_test.cc
+++ b/test/vp10_fwd_txfm2d_test.cc
@@ -18,7 +18,7 @@
 #include "./vp10_rtcd.h"
 
 using libvpx_test::ACMRandom;
-using libvpx_test::base;
+using libvpx_test::input_base;
 using libvpx_test::bd;
 using libvpx_test::compute_avg_abs_error;
 using libvpx_test::Fwd_Txfm2d_Func;
@@ -77,7 +77,7 @@
         double avg_abs_error = 0;
         for (int ci = 0; ci < count; ci++) {
           for (int ni = 0; ni < sqr_txfm_size; ++ni) {
-            input[ni] = rnd.Rand16() % base;
+            input[ni] = rnd.Rand16() % input_base;
             ref_input[ni] = static_cast<double>(input[ni]);
             output[ni] = 0;
             ref_output[ni] = 0;
diff --git a/test/vp10_inv_txfm1d_test.cc b/test/vp10_inv_txfm1d_test.cc
index 98b2777..c024f2c 100644
--- a/test/vp10_inv_txfm1d_test.cc
+++ b/test/vp10_inv_txfm1d_test.cc
@@ -13,7 +13,7 @@
 #include "vp10/common/vp10_inv_txfm1d.h"
 
 using libvpx_test::ACMRandom;
-using libvpx_test::base;
+using libvpx_test::input_base;
 
 namespace {
 const int txfm_type_num = 2;
@@ -53,7 +53,7 @@
         const int count_test_block = 5000;
         for (int ci = 0; ci < count_test_block; ++ci) {
           for (int ni = 0; ni < txfm_size; ++ni) {
-            input[ni] = rnd.Rand16() % base - rnd.Rand16() % base;
+            input[ni] = rnd.Rand16() % input_base - rnd.Rand16() % input_base;
           }
 
           fwd_txfm_func(input, output, cos_bit, range_bit);
diff --git a/test/vp10_inv_txfm2d_test.cc b/test/vp10_inv_txfm2d_test.cc
index 7acb329..81b86f1 100644
--- a/test/vp10_inv_txfm2d_test.cc
+++ b/test/vp10_inv_txfm2d_test.cc
@@ -19,7 +19,7 @@
 #include "vp10/common/vp10_inv_txfm2d_cfg.h"
 
 using libvpx_test::ACMRandom;
-using libvpx_test::base;
+using libvpx_test::input_base;
 using libvpx_test::bd;
 using libvpx_test::compute_avg_abs_error;
 using libvpx_test::Fwd_Txfm2d_Func;
@@ -85,11 +85,11 @@
         for (int ci = 0; ci < count; ci++) {
           for (int ni = 0; ni < sqr_txfm_size; ++ni) {
             if (ci == 0) {
-              int extreme_input = base - 1;
+              int extreme_input = input_base - 1;
               input[ni] = extreme_input;  // extreme case
               ref_input[ni] = 0;
             } else {
-              input[ni] = rnd.Rand16() % base;
+              input[ni] = rnd.Rand16() % input_base;
               ref_input[ni] = 0;
             }
           }
diff --git a/test/vp10_txfm_test.h b/test/vp10_txfm_test.h
index c5bbb48..6fcc3bb 100644
--- a/test/vp10_txfm_test.h
+++ b/test/vp10_txfm_test.h
@@ -109,6 +109,6 @@
                                 const TXFM_2D_CFG*, const int);
 
 static const int bd = 10;
-static const int base = (1 << bd);
+static const int input_base = (1 << bd);
 }  // namespace libvpx_test
 #endif  // VP10_TXFM_TEST_H_
diff --git a/vp10/common/reconinter.c b/vp10/common/reconinter.c
index 2be4cf6..674b037 100644
--- a/vp10/common/reconinter.c
+++ b/vp10/common/reconinter.c
@@ -1292,10 +1292,7 @@
     if (!is_neighbor_overlappable(above_mbmi))
       continue;
 
-    overlap = (above_mbmi->skip) ?
-              num_4x4_blocks_high_lookup[bsize] << 1 :
-              VPXMIN(num_4x4_blocks_high_lookup[bsize],
-                     num_4x4_blocks_high_lookup[above_mbmi->sb_type]) << 1;
+    overlap = num_4x4_blocks_high_lookup[bsize] << 1;
 
     for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
       const struct macroblockd_plane *pd = &xd->plane[plane];
@@ -1359,10 +1356,7 @@
     if (!is_neighbor_overlappable(left_mbmi))
       continue;
 
-    overlap = (left_mbmi->skip) ?
-              num_4x4_blocks_wide_lookup[bsize] << 1 :
-              VPXMIN(num_4x4_blocks_wide_lookup[bsize],
-                     num_4x4_blocks_wide_lookup[left_mbmi->sb_type]) << 1;
+    overlap = num_4x4_blocks_wide_lookup[bsize] << 1;
 
     for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
       const struct macroblockd_plane *pd = &xd->plane[plane];