From: Jingning Han Date: Wed, 5 Oct 2016 16:08:44 +0000 (-0700) Subject: Make ref_mv_idx syntax context dependent on block distance only X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8205b78552739c7c4c088830330a0d80402f2dd8;p=libvpx 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: I86b34f31f6c99a36ae2780416175cc0bd90ff492 --- diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h index b6a5e2276..b5e7094c2 100644 --- a/av1/common/mvref_common.h +++ b/av1/common/mvref_common.h @@ -431,24 +431,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; return 0; }