Commit 901d622d authored by Yaowu Xu's avatar Yaowu Xu

Remove an unused parameter

Change-Id: I538948486e31a06e51156ce6f484c227e5c25249
parent d4a67a8f
......@@ -460,13 +460,11 @@ static void set_block_thresholds(const AV1_COMMON *cm, RD_OPT *rd) {
}
}
void av1_set_mvcost(MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame, int ref,
int ref_mv_idx) {
void av1_set_mvcost(MACROBLOCK *x, int ref, int ref_mv_idx) {
MB_MODE_INFO_EXT *mbmi_ext = x->mbmi_ext;
int8_t rf_type = av1_ref_frame_type(x->e_mbd.mi[0]->mbmi.ref_frame);
int nmv_ctx = av1_nmv_ctx(mbmi_ext->ref_mv_count[rf_type],
mbmi_ext->ref_mv_stack[rf_type], ref, ref_mv_idx);
(void)ref_frame;
x->mvcost = x->mv_cost_stack[nmv_ctx];
x->nmvjointcost = x->nmv_vec_cost[nmv_ctx];
}
......
......@@ -418,8 +418,7 @@ YV12_BUFFER_CONFIG *av1_get_scaled_ref_frame(const struct AV1_COMP *cpi,
void av1_init_me_luts(void);
void av1_set_mvcost(MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame, int ref,
int ref_mv_idx);
void av1_set_mvcost(MACROBLOCK *x, int ref, int ref_mv_idx);
void av1_get_entropy_contexts(BLOCK_SIZE bsize, TX_SIZE tx_size,
const struct macroblockd_plane *pd,
......
......@@ -5993,7 +5993,7 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
best_mv->row >>= 3;
av1_set_mvcost(
x, refs[id], id,
x, id,
mbmi->ref_mv_idx + (have_nearmv_in_inter_mode(mbmi->mode) ? 1 : 0));
// Small-range full-pixel motion search.
......@@ -6054,7 +6054,7 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
}
av1_set_mvcost(
x, refs[ref], ref,
x, ref,
mbmi->ref_mv_idx + (have_nearmv_in_inter_mode(mbmi->mode) ? 1 : 0));
*rate_mv += av1_mv_bit_cost(&frame_mv[refs[ref]].as_mv,
......@@ -6354,7 +6354,7 @@ static void single_motion_search(const AV1_COMP *const cpi, MACROBLOCK *x,
}
av1_set_mvcost(
x, ref, ref_idx,
x, ref_idx,
mbmi->ref_mv_idx + (have_nearmv_in_inter_mode(mbmi->mode) ? 1 : 0));
// Work out the size of the first step in the mv step search.
......@@ -6682,7 +6682,7 @@ static void compound_single_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
best_mv->row >>= 3;
av1_set_mvcost(
x, ref, ref_idx,
x, ref_idx,
mbmi->ref_mv_idx + (have_nearmv_in_inter_mode(mbmi->mode) ? 1 : 0));
// Small-range full-pixel motion search.
......@@ -6735,7 +6735,7 @@ static void compound_single_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
}
av1_set_mvcost(
x, ref, ref_idx,
x, ref_idx,
mbmi->ref_mv_idx + (have_nearmv_in_inter_mode(mbmi->mode) ? 1 : 0));
*rate_mv += av1_mv_bit_cost(this_mv, &ref_mv.as_mv, x->nmvjointcost,
x->mvcost, MV_COST_WEIGHT);
......@@ -7273,7 +7273,7 @@ static int64_t handle_newmv(const AV1_COMP *const cpi, MACROBLOCK *const x,
} else {
*rate_mv = 0;
for (i = 0; i < 2; ++i) {
av1_set_mvcost(x, refs[i], i, mbmi->ref_mv_idx);
av1_set_mvcost(x, i, mbmi->ref_mv_idx);
*rate_mv += av1_mv_bit_cost(
&frame_mv[refs[i]].as_mv, &mbmi_ext->ref_mvs[refs[i]][0].as_mv,
x->nmvjointcost, x->mvcost, MV_COST_WEIGHT);
......@@ -7287,7 +7287,7 @@ static int64_t handle_newmv(const AV1_COMP *const cpi, MACROBLOCK *const x,
compound_single_motion_search_interinter(
cpi, x, bsize, frame_mv, mi_row, mi_col, NULL, 0, rate_mv, 0, 1);
} else {
av1_set_mvcost(x, refs[1], 1,
av1_set_mvcost(x, 1,
mbmi->ref_mv_idx + (this_mode == NEAR_NEWMV ? 1 : 0));
*rate_mv = av1_mv_bit_cost(&frame_mv[refs[1]].as_mv,
&mbmi_ext->ref_mvs[refs[1]][0].as_mv,
......@@ -7302,7 +7302,7 @@ static int64_t handle_newmv(const AV1_COMP *const cpi, MACROBLOCK *const x,
compound_single_motion_search_interinter(
cpi, x, bsize, frame_mv, mi_row, mi_col, NULL, 0, rate_mv, 0, 0);
} else {
av1_set_mvcost(x, refs[0], 0,
av1_set_mvcost(x, 0,
mbmi->ref_mv_idx + (this_mode == NEW_NEARMV ? 1 : 0));
*rate_mv = av1_mv_bit_cost(&frame_mv[refs[0]].as_mv,
&mbmi_ext->ref_mvs[refs[0]][0].as_mv,
......
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