Replacing int_mv with MV.
Change-Id: Icd7eea20e944e3e28e5eb20cdc088866a54d53b4
This commit is contained in:
parent
0249531bb9
commit
81e03394d6
@ -106,7 +106,7 @@ struct macroblock {
|
||||
int skip_encode;
|
||||
|
||||
// Used to store sub partition's choices.
|
||||
int_mv pred_mv[MAX_REF_FRAMES];
|
||||
MV pred_mv[MAX_REF_FRAMES];
|
||||
|
||||
void (*fwd_txm4x4)(const int16_t *input, int16_t *output, int stride);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ typedef struct {
|
||||
|
||||
// motion vector cache for adaptive motion search control in partition
|
||||
// search loop
|
||||
int_mv pred_mv[MAX_REF_FRAMES];
|
||||
MV pred_mv[MAX_REF_FRAMES];
|
||||
INTERP_FILTER pred_interp_filter;
|
||||
} PICK_MODE_CONTEXT;
|
||||
|
||||
|
@ -79,7 +79,7 @@ static void full_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
if (x->mv_best_ref_index[ref] < 2)
|
||||
mvp_full = mbmi->ref_mvs[ref][x->mv_best_ref_index[ref]].as_mv;
|
||||
else
|
||||
mvp_full = x->pred_mv[ref].as_mv;
|
||||
mvp_full = x->pred_mv[ref];
|
||||
|
||||
mvp_full.col >>= 3;
|
||||
mvp_full.row >>= 3;
|
||||
@ -143,7 +143,7 @@ static void sub_pixel_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
xd->plane[i].pre[0] = backup_yv12[i];
|
||||
}
|
||||
|
||||
x->pred_mv[ref].as_mv = *tmp_mv;
|
||||
x->pred_mv[ref] = *tmp_mv;
|
||||
}
|
||||
|
||||
static void model_rd_for_sb_y(VP9_COMP *cpi, BLOCK_SIZE bsize,
|
||||
|
@ -1850,8 +1850,8 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
mvp_full.col = bsi->mvp.as_mv.col >> 3;
|
||||
|
||||
if (cpi->sf.adaptive_motion_search && cm->show_frame) {
|
||||
mvp_full.row = x->pred_mv[mbmi->ref_frame[0]].as_mv.row >> 3;
|
||||
mvp_full.col = x->pred_mv[mbmi->ref_frame[0]].as_mv.col >> 3;
|
||||
mvp_full.row = x->pred_mv[mbmi->ref_frame[0]].row >> 3;
|
||||
mvp_full.col = x->pred_mv[mbmi->ref_frame[0]].col >> 3;
|
||||
step_param = MAX(step_param, 8);
|
||||
}
|
||||
|
||||
@ -1902,7 +1902,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
}
|
||||
|
||||
if (cpi->sf.adaptive_motion_search)
|
||||
x->pred_mv[mbmi->ref_frame[0]].as_mv = *new_mv;
|
||||
x->pred_mv[mbmi->ref_frame[0]] = *new_mv;
|
||||
|
||||
// restore src pointers
|
||||
mi_buf_restore(x, orig_src, orig_pre);
|
||||
@ -2108,14 +2108,14 @@ static void mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
cpi->common.show_frame &&
|
||||
block_size < cpi->sf.max_partition_size);
|
||||
|
||||
int_mv pred_mv[3];
|
||||
pred_mv[0] = mbmi->ref_mvs[ref_frame][0];
|
||||
pred_mv[1] = mbmi->ref_mvs[ref_frame][1];
|
||||
MV pred_mv[3];
|
||||
pred_mv[0] = mbmi->ref_mvs[ref_frame][0].as_mv;
|
||||
pred_mv[1] = mbmi->ref_mvs[ref_frame][1].as_mv;
|
||||
pred_mv[2] = x->pred_mv[ref_frame];
|
||||
|
||||
// Get the sad for each candidate reference mv
|
||||
for (i = 0; i < num_mv_refs; i++) {
|
||||
this_mv.as_int = pred_mv[i].as_int;
|
||||
this_mv.as_mv = pred_mv[i];
|
||||
|
||||
max_mv = MAX(max_mv,
|
||||
MAX(abs(this_mv.as_mv.row), abs(this_mv.as_mv.col)) >> 3);
|
||||
@ -2334,7 +2334,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
MV pred_mv[3];
|
||||
pred_mv[0] = mbmi->ref_mvs[ref][0].as_mv;
|
||||
pred_mv[1] = mbmi->ref_mvs[ref][1].as_mv;
|
||||
pred_mv[2] = x->pred_mv[ref].as_mv;
|
||||
pred_mv[2] = x->pred_mv[ref];
|
||||
|
||||
if (scaled_ref_frame) {
|
||||
int i;
|
||||
@ -2379,7 +2379,8 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
|
||||
for (i = LAST_FRAME; i <= ALTREF_FRAME && cm->show_frame; ++i) {
|
||||
if ((x->pred_mv_sad[ref] >> 3) > x->pred_mv_sad[i]) {
|
||||
x->pred_mv[ref].as_int = 0;
|
||||
x->pred_mv[ref].row = 0;
|
||||
x->pred_mv[ref].col = 0;
|
||||
tmp_mv->as_int = INVALID_MV;
|
||||
|
||||
if (scaled_ref_frame) {
|
||||
@ -2420,7 +2421,7 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
|
||||
|
||||
if (cpi->sf.adaptive_motion_search && cm->show_frame)
|
||||
x->pred_mv[ref].as_int = tmp_mv->as_int;
|
||||
x->pred_mv[ref] = tmp_mv->as_mv;
|
||||
|
||||
if (scaled_ref_frame) {
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user