Commit 8c05e590 authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Calling is_inter_mode() instead of custom code.

Change-Id: Iccd4ab95ea51a6d57ed43947f2fd7ad92e8979cf
parent b55ecafd
......@@ -348,11 +348,11 @@ static void pack_mb_tokens(vp9_writer* const bc,
*tp = p;
}
static void write_sb_mv_ref(vp9_writer *w, MB_PREDICTION_MODE m,
static void write_sb_mv_ref(vp9_writer *w, MB_PREDICTION_MODE mode,
const vp9_prob *p) {
assert(NEARESTMV <= m && m <= NEWMV);
assert(is_inter_mode(mode));
write_token(w, vp9_sb_mv_ref_tree, p,
vp9_sb_mv_ref_encoding_array - NEARESTMV + m);
&vp9_sb_mv_ref_encoding_array[mode - NEARESTMV]);
}
......
......@@ -1556,19 +1556,19 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi, MACROBLOCK *x,
return best_rd;
}
static int cost_mv_ref(VP9_COMP *cpi,
MB_PREDICTION_MODE m,
const int mode_context) {
static int cost_mv_ref(VP9_COMP *cpi, MB_PREDICTION_MODE mode,
int mode_context) {
MACROBLOCK *const x = &cpi->mb;
MACROBLOCKD *const xd = &x->e_mbd;
int segment_id = xd->mode_info_context->mbmi.segment_id;
const int segment_id = xd->mode_info_context->mbmi.segment_id;
// Dont account for mode here if segment skip is enabled.
// Don't account for mode here if segment skip is enabled.
if (!vp9_segfeature_active(&xd->seg, segment_id, SEG_LVL_SKIP)) {
assert(NEARESTMV <= m && m <= NEWMV);
return x->inter_mode_cost[mode_context][m - NEARESTMV];
} else
assert(is_inter_mode(mode));
return x->inter_mode_cost[mode_context][mode - NEARESTMV];
} else {
return 0;
}
}
void vp9_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *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