Fix mismtach with ref-mv and ext-partition-types

Change the list of search offsets searched when ext-partition-types
is on for square block_sizes. This is because the VERTICAL_A and
HORIZONTAL_A partitions are incompatible with the default list.

BUG=AOMEDIA:141

Change-Id: I884c45c3d11039b7dcb72336a928362f926473ed
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 6903906..b874a3a 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -571,10 +571,24 @@
   mv_ref_search[3].col = -1;
   mv_ref_search[4].row = -1;
   mv_ref_search[4].col = -1;
+#if CONFIG_EXT_PARTITION_TYPES
+  if (num_8x8_blocks_wide == num_8x8_blocks_high) {
+    mv_ref_search[5].row = -1;
+    mv_ref_search[5].col = 0;
+    mv_ref_search[6].row = 0;
+    mv_ref_search[6].col = -1;
+  } else {
+    mv_ref_search[5].row = -1;
+    mv_ref_search[5].col = num_8x8_blocks_wide;
+    mv_ref_search[6].row = num_8x8_blocks_high;
+    mv_ref_search[6].col = -1;
+  }
+#else
   mv_ref_search[5].row = -1;
   mv_ref_search[5].col = num_8x8_blocks_wide;
   mv_ref_search[6].row = num_8x8_blocks_high;
   mv_ref_search[6].col = -1;
+#endif  // CONFIG_EXT_PARTITION_TYPES
   mv_ref_search[7].row = -1;
   mv_ref_search[7].col = -3;
   mv_ref_search[8].row = num_8x8_blocks_high - 1;
@@ -748,10 +762,24 @@
   mv_ref_search[3].col = -1;
   mv_ref_search[4].row = -1;
   mv_ref_search[4].col = -1;
+#if CONFIG_EXT_PARTITION_TYPES
+  if (num_8x8_blocks_wide == num_8x8_blocks_high) {
+    mv_ref_search[5].row = -1;
+    mv_ref_search[5].col = 0;
+    mv_ref_search[6].row = 0;
+    mv_ref_search[6].col = -1;
+  } else {
+    mv_ref_search[5].row = -1;
+    mv_ref_search[5].col = num_8x8_blocks_wide;
+    mv_ref_search[6].row = num_8x8_blocks_high;
+    mv_ref_search[6].col = -1;
+  }
+#else
   mv_ref_search[5].row = -1;
   mv_ref_search[5].col = num_8x8_blocks_wide;
   mv_ref_search[6].row = num_8x8_blocks_high;
   mv_ref_search[6].col = -1;
+#endif  // CONFIG_EXT_PARTITION_TYPES
   mv_ref_search[7].row = -1;
   mv_ref_search[7].col = -3;
   mv_ref_search[8].row = num_8x8_blocks_high - 1;