summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymode.c
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-10-11 16:25:50 -0700
committerDmitry Kovalev <dkovalev@google.com>2013-10-11 16:25:50 -0700
commit860e46764332ca90cf4b2b6eb21ab5a64ba9031e (patch)
tree6daec234c7f2dfebe41502f3a7597edda79f5caf /vp9/common/vp9_entropymode.c
parent107897cf052a653f6c5ccd048a2be70d6140cc79 (diff)
downloadlibvpx-860e46764332ca90cf4b2b6eb21ab5a64ba9031e.tar
libvpx-860e46764332ca90cf4b2b6eb21ab5a64ba9031e.tar.gz
libvpx-860e46764332ca90cf4b2b6eb21ab5a64ba9031e.tar.bz2
libvpx-860e46764332ca90cf4b2b6eb21ab5a64ba9031e.zip
Adding TREE_SIZE macro + cleanup.
Using TREE_SIZE for the following trees: vp9_intra_mode_tree vp9_inter_mode_tree vp9_partition_tree vp9_switchable_interp_tree vp9_mv_joint_tree vp9_mv_class_tree vp9_mv_class0_tree vp9_mv_fp_tree Change-Id: I0212bb4c1ee6648249f68517e28a67a56591ee1b
Diffstat (limited to 'vp9/common/vp9_entropymode.c')
-rw-r--r--vp9/common/vp9_entropymode.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c
index e17679616..56e644460 100644
--- a/vp9/common/vp9_entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -226,7 +226,7 @@ static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS]
};
/* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */
-const vp9_tree_index vp9_intra_mode_tree[INTRA_MODES * 2 - 2] = {
+const vp9_tree_index vp9_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = {
-DC_PRED, 2, /* 0 = DC_NODE */
-TM_PRED, 4, /* 1 = TM_NODE */
-V_PRED, 6, /* 2 = V_NODE */
@@ -237,22 +237,20 @@ const vp9_tree_index vp9_intra_mode_tree[INTRA_MODES * 2 - 2] = {
-D63_PRED, 16, /* 7 = D63_NODE */
-D153_PRED, -D207_PRED /* 8 = D153_NODE */
};
+struct vp9_token vp9_intra_mode_encodings[INTRA_MODES];
-const vp9_tree_index vp9_inter_mode_tree[6] = {
+const vp9_tree_index vp9_inter_mode_tree[TREE_SIZE(INTER_MODES)] = {
-ZEROMV, 2,
-NEARESTMV, 4,
-NEARMV, -NEWMV
};
+struct vp9_token vp9_inter_mode_encodings[INTER_MODES];
-const vp9_tree_index vp9_partition_tree[6] = {
+const vp9_tree_index vp9_partition_tree[TREE_SIZE(PARTITION_TYPES)] = {
-PARTITION_NONE, 2,
-PARTITION_HORZ, 4,
-PARTITION_VERT, -PARTITION_SPLIT
};
-
-struct vp9_token vp9_intra_mode_encodings[INTRA_MODES];
-struct vp9_token vp9_inter_mode_encodings[INTER_MODES];
-
struct vp9_token vp9_partition_encodings[PARTITION_TYPES];
static const vp9_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = {
@@ -338,7 +336,8 @@ void vp9_init_mbmode_probs(VP9_COMMON *cm) {
vp9_copy(cm->fc.mbskip_probs, default_mbskip_probs);
}
-const vp9_tree_index vp9_switchable_interp_tree[SWITCHABLE_FILTERS*2-2] = {
+const vp9_tree_index vp9_switchable_interp_tree
+ [TREE_SIZE(SWITCHABLE_FILTERS)] = {
-EIGHTTAP, 2,
-EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP
};