From 69e9d7abb1b28f3ff8a7b86d0fe5261b0adf974d Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Fri, 26 Aug 2016 17:58:44 -0700 Subject: [PATCH] Make ref_mv_idx syntax context dependent on block distance only This allows the hardware decoder to start decoding ref_mv_idx syntax prior to the sorting stage and hide the latency of entropy decoding. The compression performance change is about 0.01% level. Change-Id: I48d9878df337d053d597d96c153ef444399a5115 --- av1/common/mvref_common.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h index 2b9df4171..9f02edfd3 100644 --- a/av1/common/mvref_common.h +++ b/av1/common/mvref_common.h @@ -395,24 +395,16 @@ static INLINE int16_t av1_mode_context_analyzer( static INLINE uint8_t av1_drl_ctx(const CANDIDATE_MV *ref_mv_stack, int ref_idx) { if (ref_mv_stack[ref_idx].weight >= REF_CAT_LEVEL && - ref_mv_stack[ref_idx + 1].weight >= REF_CAT_LEVEL) { - if (ref_mv_stack[ref_idx].weight == ref_mv_stack[ref_idx + 1].weight) - return 0; - else - return 1; - } + ref_mv_stack[ref_idx + 1].weight >= REF_CAT_LEVEL) + return 0; if (ref_mv_stack[ref_idx].weight >= REF_CAT_LEVEL && ref_mv_stack[ref_idx + 1].weight < REF_CAT_LEVEL) return 2; if (ref_mv_stack[ref_idx].weight < REF_CAT_LEVEL && - ref_mv_stack[ref_idx + 1].weight < REF_CAT_LEVEL) { - if (ref_mv_stack[ref_idx].weight == ref_mv_stack[ref_idx + 1].weight) - return 3; - else - return 4; - } + ref_mv_stack[ref_idx + 1].weight < REF_CAT_LEVEL) + return 3; assert(0); return 0; -- GitLab