Remove deprecated find_mv_refs_idx() function This function is deprecated when opt-ref-mv is merged in. Change-Id: I7881ed695d5e87cd3351d4ffb3be7d1fd26d2dcc
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c index 7b64cbb..fe757cc 100644 --- a/av1/common/mvref_common.c +++ b/av1/common/mvref_common.c
@@ -988,108 +988,6 @@ (void)nearest_match; } -// This function searches the neighbourhood of a given MB/SB -// to try and find candidate reference vectors. -static void find_mv_refs_idx(const AV1_COMMON *cm, const MACROBLOCKD *xd, - MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, - int_mv *mv_ref_list, int mi_row, int mi_col, - find_mv_refs_sync sync, void *const data, - int16_t *mode_context, int_mv zeromv, - uint8_t refmv_count) { - const int *ref_sign_bias = cm->ref_frame_sign_bias; - const int sb_mi_size = mi_size_wide[cm->seq_params.sb_size]; - int i; - int context_counter = 0; - - (void)sync; - (void)data; - - assert(IMPLIES(ref_frame == INTRA_FRAME, cm->use_prev_frame_mvs == 0)); - const TileInfo *const tile = &xd->tile; - const BLOCK_SIZE bsize = mi->mbmi.sb_type; - const int bw = block_size_wide[AOMMAX(bsize, BLOCK_8X8)]; - const int bh = block_size_high[AOMMAX(bsize, BLOCK_8X8)]; - POSITION mv_ref_search[MVREF_NEIGHBOURS]; - const int num_8x8_blocks_wide = num_8x8_blocks_wide_lookup[bsize]; - const int num_8x8_blocks_high = num_8x8_blocks_high_lookup[bsize]; - 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; - mv_ref_search[2].row = -1; - mv_ref_search[2].col = (num_8x8_blocks_wide - 1) >> 1; - mv_ref_search[3].row = (num_8x8_blocks_high - 1) >> 1; - mv_ref_search[3].col = -1; - mv_ref_search[4].row = -1; - mv_ref_search[4].col = -1; - 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; - } - mv_ref_search[7].row = -1; - mv_ref_search[7].col = -3; - mv_ref_search[8].row = num_8x8_blocks_high - 1; - mv_ref_search[8].col = -3; - - for (i = 0; i < MVREF_NEIGHBOURS; ++i) { - mv_ref_search[i].row *= 2; - mv_ref_search[i].col *= 2; - } - - // The nearest 2 blocks are treated differently - // if the size < 8x8 we get the mv from the bmi substructure, - // and we also need to keep a mode count. - for (i = 0; i < 2; ++i) { - const POSITION *const mv_ref = &mv_ref_search[i]; - if (is_inside(tile, mi_col, mi_row, cm->mi_rows, cm, mv_ref)) { - const MODE_INFO *const candidate_mi = - xd->mi[mv_ref->col + mv_ref->row * xd->mi_stride]; - const MB_MODE_INFO *const candidate = &candidate_mi->mbmi; - if (ref_frame == INTRA_FRAME && !is_intrabc_block(candidate)) continue; - // Keep counts for entropy encoding. - context_counter += mode_2_counter[candidate->mode]; - } - } - - if (refmv_count >= MAX_MV_REF_CANDIDATES) goto Done; - - // Since we couldn't find 2 mvs from the same reference frame - // go back through the neighbors and find motion vectors from - // different reference frames. - if (ref_frame != INTRA_FRAME) { - for (i = 0; i < MVREF_NEIGHBOURS; ++i) { - const POSITION *mv_ref = &mv_ref_search[i]; - if (is_inside(tile, mi_col, mi_row, cm->mi_rows, cm, mv_ref)) { - const MB_MODE_INFO *const candidate = - !xd->mi[mv_ref->col + mv_ref->row * xd->mi_stride] - ? NULL - : &xd->mi[mv_ref->col + mv_ref->row * xd->mi_stride]->mbmi; - if (candidate == NULL) continue; - if ((mi_row & (sb_mi_size - 1)) + mv_ref->row >= sb_mi_size || - (mi_col & (sb_mi_size - 1)) + mv_ref->col >= sb_mi_size) - continue; - - // If the candidate is INTRA we don't want to consider its mv. - IF_DIFF_REF_FRAME_ADD_MV(candidate, ref_frame, ref_sign_bias, - refmv_count, mv_ref_list, bw, bh, xd, Done); - } - } - } - -Done: - if (mode_context) - mode_context[ref_frame] = counter_to_context[context_counter]; - for (i = refmv_count; i < MAX_MV_REF_CANDIDATES; ++i) - mv_ref_list[i].as_int = zeromv.as_int; -} - void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd, MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, uint8_t ref_mv_count[MODE_CTX_REF_FRAMES],