Move mv_cand initialization to better place

This commit is contained in:
Ari Lemmetti 2021-12-08 21:09:16 +02:00
parent f17a500b77
commit e87b12dec1

View file

@ -1602,6 +1602,9 @@ static void search_pu_inter(encoder_state_t * const state,
cur_pu->depth = depth; cur_pu->depth = depth;
cur_pu->qp = state->qp; cur_pu->qp = state->qp;
// Default to candidate 0
CU_SET_MV_CAND(cur_pu, 0, 0);
CU_SET_MV_CAND(cur_pu, 1, 0);
info->state = state; info->state = state;
info->pic = frame->source; info->pic = frame->source;
@ -1622,10 +1625,6 @@ static void search_pu_inter(encoder_state_t * const state,
lcu lcu
); );
// Default to candidate 0
CU_SET_MV_CAND(cur_pu, 0, 0);
CU_SET_MV_CAND(cur_pu, 1, 0);
// Merge Analysis starts here // Merge Analysis starts here
merge->size = 0; merge->size = 0;
for (int i = 0; i < MRG_MAX_NUM_CANDS; ++i) { for (int i = 0; i < MRG_MAX_NUM_CANDS; ++i) {