Commit e728678c authored by Jingning Han's avatar Jingning Han
Browse files

Refactor update_state_rt

Update the frame motion vector only if previous frame motion vector
is needed for next frame reference motion vector.

Change-Id: Ica50f9d7b46ad4f815bba0d9e30f5546df29546f
parent 225cdef6
......@@ -1356,11 +1356,8 @@ static void update_state_rt(VP9_COMP *cpi, ThreadData *td,
const int bh = num_8x8_blocks_high_lookup[mi->mbmi.sb_type];
const int x_mis = MIN(bw, cm->mi_cols - mi_col);
const int y_mis = MIN(bh, cm->mi_rows - mi_row);
MV_REF *const frame_mvs =
cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
int w, h;
*(xd->mi[0].src_mi) = ctx->mic;
xd->mi[0] = ctx->mic;
xd->mi[0].src_mi = &xd->mi[0];
if (seg->enabled && cpi->oxcf.aq_mode) {
......@@ -1381,13 +1378,17 @@ static void update_state_rt(VP9_COMP *cpi, ThreadData *td,
if (is_inter_block(mbmi)) {
vp9_update_mv_count(td);
if (cm->interp_filter == SWITCHABLE) {
const int pred_ctx = vp9_get_pred_context_switchable_interp(xd);
++td->counts->switchable_interp[pred_ctx][mbmi->interp_filter];
}
}
if (cm->use_prev_frame_mvs) {
MV_REF *const frame_mvs =
cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
int w, h;
for (h = 0; h < y_mis; ++h) {
MV_REF *const frame_mv = frame_mvs + h * cm->mi_cols;
for (w = 0; w < x_mis; ++w) {
......@@ -1398,6 +1399,7 @@ static void update_state_rt(VP9_COMP *cpi, ThreadData *td,
mv->mv[1].as_int = mi->src_mi->mbmi.mv[1].as_int;
}
}
}
x->skip = ctx->skip;
x->skip_txfm[0] = mbmi->segment_id ? 0 : ctx->skip_txfm[0];
......
Supports Markdown
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