From e8cc2d8f6a93bc7b836cfd5b25552386cc8392d4 Mon Sep 17 00:00:00 2001 From: Miika Metsoila Date: Fri, 7 Jul 2017 13:58:19 +0300 Subject: [PATCH] Small fixes --- src/encoderstate.c | 4 ++-- src/inter.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/encoderstate.c b/src/encoderstate.c index 2728f7c2..c54a7c51 100644 --- a/src/encoderstate.c +++ b/src/encoderstate.c @@ -790,8 +790,8 @@ static void encoder_state_encode(encoder_state_t * const main_state) { static void encoder_ref_insertion_sort(const encoder_state_t *const state, uint8_t reflist[16], uint8_t length) { for (uint8_t i = 1; i < length; ++i) { - const int32_t cur_poc = state->frame->ref->pocs[reflist[i]]; - uint8_t cur_idx = reflist[i]; + const uint8_t cur_idx = reflist[i]; + const int32_t cur_poc = state->frame->ref->pocs[cur_idx]; int8_t j = i; while (j > 0 && cur_poc < state->frame->ref->pocs[reflist[j - 1]]) { reflist[j] = reflist[j - 1]; diff --git a/src/inter.c b/src/inter.c index 11c3c81f..6ea10f85 100644 --- a/src/inter.c +++ b/src/inter.c @@ -943,7 +943,7 @@ static INLINE void apply_mv_scaling(const encoder_state_t *state, current_cu->inter.mv_ref[current_reflist]]], state->frame->poc, state->frame->ref->pocs[ - state->frame->ref_LX[current_reflist][ + state->frame->ref_LX[neighbor_reflist][ neighbor_cu->inter.mv_ref[neighbor_reflist]]], mv_cand); }