Consistent names for inter mode probabilities and encodings.

Renaming vp9_sb_mv_ref_tree to vp9_inter_mode_tree, and
vp9_sb_mv_ref_encoding_array to vp9_inter_mode_encodings.

Change-Id: I0e91fbf81350d3ec5a2599064c74089b5d06133a
This commit is contained in:
Dmitry Kovalev 2013-07-19 10:40:04 -07:00
parent 561fb31d10
commit bc7acb134b
5 changed files with 11 additions and 12 deletions

View File

@ -238,7 +238,7 @@ const vp9_tree_index vp9_intra_mode_tree[VP9_INTRA_MODES * 2 - 2] = {
-D153_PRED, -D27_PRED /* 8 = D153_NODE */
};
const vp9_tree_index vp9_sb_mv_ref_tree[6] = {
const vp9_tree_index vp9_inter_mode_tree[6] = {
-ZEROMV, 2,
-NEARESTMV, 4,
-NEARMV, -NEWMV
@ -251,8 +251,7 @@ const vp9_tree_index vp9_partition_tree[6] = {
};
struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
struct vp9_token vp9_inter_mode_encodings[VP9_INTER_MODES];
struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
@ -356,8 +355,8 @@ void vp9_entropy_mode_init() {
vp9_tokens_from_tree(vp9_switchable_interp_encodings,
vp9_switchable_interp_tree);
vp9_tokens_from_tree(vp9_partition_encodings, vp9_partition_tree);
vp9_tokens_from_tree_offset(vp9_sb_mv_ref_encoding_array,
vp9_sb_mv_ref_tree, NEARESTMV);
vp9_tokens_from_tree_offset(vp9_inter_mode_encodings,
vp9_inter_mode_tree, NEARESTMV);
}
void vp9_init_mode_contexts(VP9_COMMON *pc) {

View File

@ -40,10 +40,10 @@ extern const vp9_prob vp9_kf_y_mode_prob[VP9_INTRA_MODES][VP9_INTRA_MODES]
[VP9_INTRA_MODES - 1];
extern const vp9_tree_index vp9_intra_mode_tree[];
extern const vp9_tree_index vp9_sb_mv_ref_tree[];
extern const vp9_tree_index vp9_inter_mode_tree[];
extern struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
extern struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
extern struct vp9_token vp9_inter_mode_encodings[VP9_INTER_MODES];
// probability models for partition information
extern const vp9_tree_index vp9_partition_tree[];

View File

@ -31,7 +31,7 @@ static MB_PREDICTION_MODE read_intra_mode(vp9_reader *r, const vp9_prob *p) {
}
static MB_PREDICTION_MODE read_inter_mode(vp9_reader *r, const vp9_prob *p) {
return (MB_PREDICTION_MODE)treed_read(r, vp9_sb_mv_ref_tree, p);
return (MB_PREDICTION_MODE)treed_read(r, vp9_inter_mode_tree, p);
}
static int read_segment_id(vp9_reader *r, const struct segmentation *seg) {

View File

@ -350,8 +350,8 @@ static void pack_mb_tokens(vp9_writer* const bc,
static void write_sb_mv_ref(vp9_writer *w, MB_PREDICTION_MODE mode,
const vp9_prob *p) {
assert(is_inter_mode(mode));
write_token(w, vp9_sb_mv_ref_tree, p,
&vp9_sb_mv_ref_encoding_array[mode - NEARESTMV]);
write_token(w, vp9_inter_mode_tree, p,
&vp9_inter_mode_encodings[mode - NEARESTMV]);
}

View File

@ -282,9 +282,9 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
for (m = NEARESTMV; m < MB_MODE_COUNT; m++)
cpi->mb.inter_mode_cost[i][m - NEARESTMV] =
cost_token(vp9_sb_mv_ref_tree,
cost_token(vp9_inter_mode_tree,
cpi->common.fc.inter_mode_probs[i],
vp9_sb_mv_ref_encoding_array - NEARESTMV + m);
vp9_inter_mode_encodings - NEARESTMV + m);
}
}
}