[tmvp] Remove check for duplicate candidates since it's not used in VVC

This commit is contained in:
Marko Viitanen 2021-11-24 19:57:46 +02:00
parent cfd9b46328
commit 37405ffdee

View file

@ -1652,22 +1652,8 @@ uint8_t kvz_inter_get_merge_cand(const encoder_state_t * const state,
} }
} }
if (mv_cand[candidates].dir != 0) { if (mv_cand[candidates].dir != 0) {
bool add_tmvp = true; candidates++;
// Check for duplicate entries
for (int i = 0; i < candidates; i++) {
if (mv_cand[i].dir == mv_cand[candidates].dir &&
(!(mv_cand[i].dir & 1) || (mv_cand[i].mv[0][0] == mv_cand[candidates].mv[0][0] &&
mv_cand[i].mv[0][1] == mv_cand[candidates].mv[0][1])) &&
(!(mv_cand[i].dir & 2) || (mv_cand[i].mv[1][0] == mv_cand[candidates].mv[1][0] &&
mv_cand[i].mv[1][1] == mv_cand[candidates].mv[1][1]))) {
add_tmvp = false;
break;
}
}
// No duplicates found, continue adding the candidate
if(add_tmvp) candidates++;
} }
} }