Make motion vector search range scalable to mode info size
Replace hard coded numbers with mi_size table access.
Change-Id: Ia5b8802de9f0128edf2c71542c703f317c7f61da
diff --git a/av1/common/enums.h b/av1/common/enums.h
index ebea307..1e1c730 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -430,7 +430,7 @@
#if CONFIG_EXT_PARTITION
#define REF_CAT_LEVEL 640
#else
-#define REF_CAT_LEVEL 160
+#define REF_CAT_LEVEL 255
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_REF_MV
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index 080522e..b6c8438 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -185,7 +185,7 @@
xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col];
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
int len = AOMMIN(xd->n8_w, mi_size_wide[candidate->sb_type]);
- if (use_step_16) len = AOMMAX(2, len);
+ if (use_step_16) len = AOMMAX(mi_size_wide[BLOCK_16X16], len);
newmv_count += add_ref_mv_candidate(
candidate_mi, candidate, rf, refmv_count, ref_mv_stack,
cm->allow_high_precision_mv, len, block, mi_pos.col);
@@ -228,7 +228,7 @@
xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col];
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
int len = AOMMIN(xd->n8_h, mi_size_high[candidate->sb_type]);
- if (use_step_16) len = AOMMAX(2, len);
+ if (use_step_16) len = AOMMAX(mi_size_high[BLOCK_16X16], len);
newmv_count += add_ref_mv_candidate(
candidate_mi, candidate, rf, refmv_count, ref_mv_stack,
cm->allow_high_precision_mv, len, block, mi_pos.col);