Commit 253a200d authored by Jingning Han's avatar Jingning Han

Refactor ref mv stack system

This commit re-works the reference motion vector stack process
and make it support extended context set. It unifies reference
motion vector checking process for row and column scan, as well as
for single block scan.

Change-Id: I68c05cde93cf8b0ca2ef4d1523399f405bd0a337
parent 387a10e3
......@@ -83,6 +83,10 @@ typedef struct {
typedef int8_t MV_REFERENCE_FRAME;
#if CONFIG_REF_MV
#define MODE_CTX_REF_FRAMES (MAX_REF_FRAMES + (ALTREF_FRAME - LAST_FRAME))
#endif
typedef struct {
// Number of base colors for Y (0) and UV (1)
uint8_t palette_size[2];
......
......@@ -37,6 +37,7 @@ typedef struct mv32 {
#if CONFIG_REF_MV
typedef struct candidate_mv {
int_mv this_mv;
int_mv comp_mv;
int weight;
} CANDIDATE_MV;
#endif
......
This diff is collapsed.
......@@ -196,6 +196,24 @@ static INLINE int is_inside(const TileInfo *const tile,
}
#if CONFIG_REF_MV
static int8_t vp10_ref_frame_type(const MV_REFERENCE_FRAME *const rf) {
if (rf[1] > INTRA_FRAME)
return rf[0] + ALTREF_FRAME;
return rf[0];
}
static void vp10_set_ref_frame(MV_REFERENCE_FRAME *rf, int8_t ref_frame_type) {
if (ref_frame_type > ALTREF_FRAME) {
rf[0] = ref_frame_type - ALTREF_FRAME;
rf[1] = ALTREF_FRAME;
} else {
rf[0] = ref_frame_type;
rf[1] = NONE;
assert(ref_frame_type > INTRA_FRAME && ref_frame_type < MAX_REF_FRAMES);
}
}
static int16_t vp10_mode_context_analyzer(const int16_t *const mode_context,
const MV_REFERENCE_FRAME *const rf,
BLOCK_SIZE bsize, int block) {
......
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