Commit 24ea91d1 authored by Jingning Han's avatar Jingning Han

Make motion vector search range scalable to mode info size

Replace hard coded numbers with mi_size table access.

Change-Id: Ia5b8802de9f0128edf2c71542c703f317c7f61da
parent fab62243
......@@ -430,7 +430,7 @@ typedef enum {
#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
......
......@@ -185,7 +185,7 @@ static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
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 @@ static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment