From 37405ffdee87e57480640c2e3c50a2798a4d736d Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Wed, 24 Nov 2021 19:57:46 +0200 Subject: [PATCH] [tmvp] Remove check for duplicate candidates since it's not used in VVC --- src/inter.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/inter.c b/src/inter.c index a37a03c6..24dac4e8 100644 --- a/src/inter.c +++ b/src/inter.c @@ -1651,23 +1651,9 @@ uint8_t kvz_inter_get_merge_cand(const encoder_state_t * const state, mv_cand[candidates].dir |= (1 << reflist); } } - if (mv_cand[candidates].dir != 0) { - bool add_tmvp = true; - // 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++; + candidates++; } }