Commit 8205b785 authored by Jingning Han's avatar Jingning Han
Browse files

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
parent 42bc3a9e
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment