Skip to content
Snippets Groups Projects
Commit 69e9d7ab 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: I48d9878df337d053d597d96c153ef444399a5115
parent cefcfa1b
No related branches found
No related tags found
2 merge requests!6Rav1e 11 yushin 1,!3Rav1e 10 yushin
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment