Commit e37eb0ad authored by Adrian Grange's avatar Adrian Grange
Browse files

Rename set_scale_factors as set_ref_ptrs

New name better describes what the function does.

Change-Id: I33be1366a81f058a9854b804bcde211061187dc7
parent 82f6af60
......@@ -90,8 +90,7 @@ static void setup_pre_planes(MACROBLOCKD *xd, int idx,
}
}
static void set_scale_factors(VP9_COMMON *cm, MACROBLOCKD *xd,
int ref0, int ref1) {
static void set_ref_ptrs(VP9_COMMON *cm, MACROBLOCKD *xd, int ref0, int ref1) {
xd->block_refs[0] = &cm->frame_refs[ref0 >= 0 ? ref0 : 0];
xd->block_refs[1] = &cm->frame_refs[ref1 >= 0 ? ref1 : 0];
}
......
......@@ -31,11 +31,11 @@ void vp9_setup_interp_filters(MACROBLOCKD *xd,
if (xd->mi_8x8 && xd->mi_8x8[0]) {
MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
set_scale_factors(cm, xd, mbmi->ref_frame[0] - LAST_FRAME,
mbmi->ref_frame[1] - LAST_FRAME);
set_ref_ptrs(cm, xd, mbmi->ref_frame[0] - LAST_FRAME,
mbmi->ref_frame[1] - LAST_FRAME);
} else {
set_scale_factors(cm, xd, -1, -1);
set_ref_ptrs(cm, xd, -1, -1);
}
xd->subpix.filter_x = xd->subpix.filter_y =
......
......@@ -3277,7 +3277,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
continue;
}
set_scale_factors(cm, xd, ref_frame - 1, second_ref_frame - 1);
set_ref_ptrs(cm, xd, ref_frame - 1, second_ref_frame - 1);
mbmi->uv_mode = DC_PRED;
// Evaluate all sub-pel filters irrespective of whether we can use
......@@ -3709,7 +3709,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
vp9_zero(best_tx_diff);
}
set_scale_factors(cm, xd, mbmi->ref_frame[0] - 1, mbmi->ref_frame[1] - 1);
set_ref_ptrs(cm, xd, mbmi->ref_frame[0] - 1, mbmi->ref_frame[1] - 1);
store_coding_context(x, ctx, best_mode_index,
&mbmi->ref_mvs[mbmi->ref_frame[0]][0],
&mbmi->ref_mvs[mbmi->ref_frame[1] < 0 ? 0 :
......@@ -3902,7 +3902,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
vp9_is_scaled(&cm->frame_refs[second_ref_frame - 1].sf))
continue;
set_scale_factors(cm, xd, ref_frame - 1, second_ref_frame - 1);
set_ref_ptrs(cm, xd, ref_frame - 1, second_ref_frame - 1);
mbmi->uv_mode = DC_PRED;
// Evaluate all sub-pel filters irrespective of whether we can use
......@@ -4442,7 +4442,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
vp9_zero(best_tx_diff);
}
set_scale_factors(cm, xd, mbmi->ref_frame[0] - 1, mbmi->ref_frame[1] - 1);
set_ref_ptrs(cm, xd, mbmi->ref_frame[0] - 1, mbmi->ref_frame[1] - 1);
store_coding_context(x, ctx, best_mode_index,
&mbmi->ref_mvs[mbmi->ref_frame[0]][0],
&mbmi->ref_mvs[mbmi->ref_frame[1] < 0 ? 0 :
......
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