summaryrefslogtreecommitdiff
path: root/vp8/encoder/treewriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/encoder/treewriter.h')
-rw-r--r--vp8/encoder/treewriter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/vp8/encoder/treewriter.h b/vp8/encoder/treewriter.h
index c28a0fa37..42612a2e5 100644
--- a/vp8/encoder/treewriter.h
+++ b/vp8/encoder/treewriter.h
@@ -50,6 +50,14 @@ static __inline unsigned int vp8_cost_branch(const unsigned int ct[2], vp8_prob
+ (ct[1] * vp8_cost_one(p))) >> 8;
}
+static __inline unsigned int vp8_cost_branch256(const unsigned int ct[2], vp8_prob p)
+{
+ /* Imitate existing calculation */
+
+ return ((ct[0] * vp8_cost_zero(p))
+ + (ct[1] * vp8_cost_one(p)));
+}
+
/* Small functions to write explicit values and tokens, as well as
estimate their lengths. */