Commit ba070c55 authored by Jingning Han's avatar Jingning Han

Use 8x8 block resolution to store motion vectors

Store the reference frame motion vectors in 8x8 block resolution.

Change-Id: I5afde20c40f09b44e943034232359bdaac4a2b64
parent b74a72bf
......@@ -2929,7 +2929,10 @@ void av1_read_mode_info(AV1Decoder *const pbi, MACROBLOCKD *xd,
int y_mis) {
AV1_COMMON *const cm = &pbi->common;
MODE_INFO *const mi = xd->mi[0];
MV_REF *frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
MV_REF *frame_mvs =
cm->cur_frame->mvs + (mi_row & 0xfffe) * cm->mi_cols + (mi_col & 0xfffe);
x_mis = AOMMAX(x_mis, 2);
y_mis = AOMMAX(y_mis, 2);
int w, h;
#if CONFIG_INTRABC
......
......@@ -591,9 +591,8 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td,
const struct segmentation *const seg = &cm->seg;
const int bw = mi_size_wide[mi->mbmi.sb_type];
const int bh = mi_size_high[mi->mbmi.sb_type];
const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
MV_REF *const frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
int w, h;
const int mis = cm->mi_stride;
......@@ -757,6 +756,10 @@ static void update_state(const AV1_COMP *const cpi, ThreadData *td,
rdc->comp_pred_diff[REFERENCE_MODE_SELECT] += ctx->hybrid_pred_diff;
}
MV_REF *const frame_mvs =
cm->cur_frame->mvs + (mi_row & 0xfffe) * cm->mi_cols + (mi_col & 0xfffe);
x_mis = AOMMAX(2, x_mis);
y_mis = AOMMAX(2, y_mis);
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) {
......
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