Using single struct to represent scale factors.

Moving back to scale_factors struct. We don't need anymore x_offset_q4 and
y_offset_q4 because both values are calculated locally inside vp9_scale_mv
function.

Change-Id: I78a2122ba253c428a14558bda0e78ece738d2b5b
This commit is contained in:
Dmitry Kovalev
2013-12-19 16:06:33 -08:00
parent 40e173ac42
commit a3fbcc88bb
12 changed files with 135 additions and 200 deletions

View File

@@ -380,15 +380,15 @@ static void set_ref(VP9_COMMON *const cm, MACROBLOCKD *const xd,
MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
const int ref = mbmi->ref_frame[idx] - LAST_FRAME;
const YV12_BUFFER_CONFIG *cfg = get_frame_ref_buffer(cm, ref);
const struct scale_factors_common *sfc = &cm->active_ref_scale_comm[ref];
const struct scale_factors *sf = &cm->active_ref_scale[ref];
xd->ref_buf[idx] = cfg;
if (!vp9_is_valid_scale(sfc))
if (!vp9_is_valid_scale(sf))
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
"Invalid scale factors");
xd->scale_factor[idx].sfc = sfc;
setup_pre_planes(xd, idx, cfg, mi_row, mi_col, &xd->scale_factor[idx]);
xd->scale_factors[idx] = sf;
setup_pre_planes(xd, idx, cfg, mi_row, mi_col, xd->scale_factors[idx]);
xd->corrupted |= cfg->corrupted;
}
@@ -1201,7 +1201,7 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
for (i = 0; i < REFS_PER_FRAME; ++i) {
vp9_setup_scale_factors(cm, i);
if (vp9_is_scaled(&cm->active_ref_scale_comm[i]))
if (vp9_is_scaled(&cm->active_ref_scale[i]))
vp9_extend_frame_borders(&cm->yv12_fb[cm->active_ref_idx[i]],
cm->subsampling_x, cm->subsampling_y);
}