Commit 06795c59 authored by Jingning Han's avatar Jingning Han

Expand the motion vector context set

Increase the number of context from 2 to 3.

Change-Id: I2327c59da958e9376cd632ae390f0cc57979f000
parent 604a5462
......@@ -132,7 +132,7 @@ typedef uint8_t PREDICTION_MODE;
#define SKIP_CONTEXTS 3
#if CONFIG_REF_MV
#define NMV_CONTEXTS 2
#define NMV_CONTEXTS 3
#define NEWMV_MODE_CONTEXTS 7
#define ZEROMV_MODE_CONTEXTS 2
......
......@@ -329,9 +329,11 @@ static INLINE int av1_nmv_ctx(const uint8_t ref_mv_count,
if (ref_mv_stack[0].weight >= REF_CAT_LEVEL &&
ref_mv_count > 0) {
if (abs(ref_mv_stack[0].this_mv.as_mv.row -
ref_mv_stack[0].pred_mv.as_mv.row) < 8 &&
ref_mv_stack[0].pred_mv.as_mv.row) <= 4 &&
abs(ref_mv_stack[0].this_mv.as_mv.col -
ref_mv_stack[0].pred_mv.as_mv.col) < 8)
ref_mv_stack[0].pred_mv.as_mv.col) <= 4)
return 2;
else
return 1;
}
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