ref: bc7acb134b40d0358f4035854384614d3368489c
parent: 561fb31d10695b71d6d03a8369e68c4cebc18836
author: Dmitry Kovalev <[email protected]>
date: Fri Jul 19 06:40:04 EDT 2013
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
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -238,7 +238,7 @@
-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,9 +251,8 @@
};
struct vp9_token vp9_intra_mode_encodings[VP9_INTRA_MODES];
+struct vp9_token vp9_inter_mode_encodings[VP9_INTER_MODES];
-struct vp9_token vp9_sb_mv_ref_encoding_array[VP9_INTER_MODES];
-
struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
static const vp9_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = {
@@ -356,8 +355,8 @@
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) {
--- a/vp9/common/vp9_entropymode.h
+++ b/vp9/common/vp9_entropymode.h
@@ -40,10 +40,10 @@
[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[];
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -31,7 +31,7 @@
}
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) {
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -350,8 +350,8 @@
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]);
}
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -282,9 +282,9 @@
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);
}
}
}