Skip to content

Commit

Permalink
[avmr] fix mvp_candidate rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovasa committed Jun 13, 2022
1 parent be90897 commit 7a22b94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,11 @@ static void get_mv_cand_from_candidates(const encoder_state_t * const state,

candidates += b_candidates;

if (candidates > 0)
uvg_round_precision(INTERNAL_MV_PREC, 2, &mv_cand[0][0], &mv_cand[0][1]);
if (candidates > 1)
uvg_round_precision(INTERNAL_MV_PREC, 2, &mv_cand[1][0], &mv_cand[1][1]);

// Remove identical candidate
if (candidates == 2 && mv_cand[0][0] == mv_cand[1][0] && mv_cand[0][1] == mv_cand[1][1]) {
candidates = 1;
Expand Down

0 comments on commit 7a22b94

Please sign in to comment.