Search the same set of neighbouring positions
This patch prepares for removing of av1_update_mv_context(). In
av1_update_mv_context() and av1_find_mv_refs(), the neighbouring
positions searched are not exactly the same. This patch fixes it.
This causes bitstream chamges, but shouldn't affect the coding
quality.
Change-Id: I59d2f8c318df388f2d06634cd96802b773c8bb13
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index cdf96be..c3617e7 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -1226,14 +1226,19 @@
const int bh = block_size_high[mi->mbmi.sb_type];
const TileInfo *const tile = &xd->tile;
POSITION mv_ref_search[2];
- const int num_8x8_blocks_wide = mi_size_wide[mi->mbmi.sb_type];
- const int num_8x8_blocks_high = mi_size_high[mi->mbmi.sb_type];
+ const int num_8x8_blocks_wide = num_8x8_blocks_wide_lookup[mi->mbmi.sb_type];
+ const int num_8x8_blocks_high = num_8x8_blocks_high_lookup[mi->mbmi.sb_type];
mv_ref_search[0].row = num_8x8_blocks_high - 1;
mv_ref_search[0].col = -1;
mv_ref_search[1].row = -1;
mv_ref_search[1].col = num_8x8_blocks_wide - 1;
+ for (i = 0; i < 2; ++i) {
+ mv_ref_search[i].row *= 2;
+ mv_ref_search[i].col *= 2;
+ }
+
// Blank the reference vector list
memset(mv_ref_list, 0, sizeof(*mv_ref_list) * MAX_MV_REF_CANDIDATES);