diff options
Diffstat (limited to 'vp9/encoder/vp9_mbgraph.c')
-rw-r--r-- | vp9/encoder/vp9_mbgraph.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/vp9/encoder/vp9_mbgraph.c b/vp9/encoder/vp9_mbgraph.c index d254211a5..e000220b9 100644 --- a/vp9/encoder/vp9_mbgraph.c +++ b/vp9/encoder/vp9_mbgraph.c @@ -30,11 +30,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, const MV *ref_mv, MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; const SEARCH_METHODS old_search_method = mv_sf->search_method; const vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; - - const int tmp_col_min = x->mv_col_min; - const int tmp_col_max = x->mv_col_max; - const int tmp_row_min = x->mv_row_min; - const int tmp_row_max = x->mv_row_max; + const MvLimits tmp_mv_limits = x->mv_limits; MV ref_full; int cost_list[5]; @@ -42,7 +38,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, const MV *ref_mv, int step_param = mv_sf->reduce_first_step_size; step_param = VPXMIN(step_param, MAX_MVSEARCH_STEPS - 2); - vp9_set_mv_search_range(x, ref_mv); + vp9_set_mv_search_range(&x->mv_limits, ref_mv); ref_full.col = ref_mv->col >> 3; ref_full.row = ref_mv->row >> 3; @@ -71,10 +67,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, const MV *ref_mv, vp9_build_inter_predictors_sby(xd, mb_row, mb_col, BLOCK_16X16); /* restore UMV window */ - x->mv_col_min = tmp_col_min; - x->mv_col_max = tmp_col_max; - x->mv_row_min = tmp_row_min; - x->mv_row_max = tmp_row_max; + x->mv_limits = tmp_mv_limits; return vpx_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride); @@ -233,8 +226,8 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, vp9_zero(mi_local); // Set up limit values for motion vectors to prevent them extending outside // the UMV borders. - x->mv_row_min = -BORDER_MV_PIXELS_B16; - x->mv_row_max = (cm->mb_rows - 1) * 8 + BORDER_MV_PIXELS_B16; + x->mv_limits.row_min = -BORDER_MV_PIXELS_B16; + x->mv_limits.row_max = (cm->mb_rows - 1) * 8 + BORDER_MV_PIXELS_B16; // Signal to vp9_predict_intra_block() that above is not available xd->above_mi = NULL; @@ -254,8 +247,8 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, // Set up limit values for motion vectors to prevent them extending outside // the UMV borders. - x->mv_col_min = -BORDER_MV_PIXELS_B16; - x->mv_col_max = (cm->mb_cols - 1) * 8 + BORDER_MV_PIXELS_B16; + x->mv_limits.col_min = -BORDER_MV_PIXELS_B16; + x->mv_limits.col_max = (cm->mb_cols - 1) * 8 + BORDER_MV_PIXELS_B16; // Signal to vp9_predict_intra_block() that left is not available xd->left_mi = NULL; @@ -274,8 +267,8 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, mb_y_in_offset += 16; gld_y_in_offset += 16; arf_y_in_offset += 16; - x->mv_col_min -= 16; - x->mv_col_max -= 16; + x->mv_limits.col_min -= 16; + x->mv_limits.col_max -= 16; } // Signal to vp9_predict_intra_block() that above is available @@ -284,8 +277,8 @@ static void update_mbgraph_frame_stats(VP9_COMP *cpi, mb_y_offset += buf->y_stride * 16; gld_y_offset += golden_ref->y_stride * 16; if (alt_ref) arf_y_offset += alt_ref->y_stride * 16; - x->mv_row_min -= 16; - x->mv_row_max -= 16; + x->mv_limits.row_min -= 16; + x->mv_limits.row_max -= 16; offset += cm->mb_cols; } } |