ref: 81e03394d676d686fc1d7838bf064513639040f4
parent: 0249531bb90a59439d4f72f38ce184beefd8732e
author: Dmitry Kovalev <dkovalev@google.com>
date: Mon May 19 07:43:07 EDT 2014
Replacing int_mv with MV. Change-Id: Icd7eea20e944e3e28e5eb20cdc088866a54d53b4
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -106,7 +106,7 @@
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);
};
--- a/vp9/encoder/vp9_context_tree.h
+++ b/vp9/encoder/vp9_context_tree.h
@@ -42,7 +42,7 @@
// 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;
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -79,7 +79,7 @@
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 @@
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,
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1850,8 +1850,8 @@
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 @@
}
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 @@
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 @@
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 @@
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 @@
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;
--
⑨