diff options
author | Deb Mukherjee <debargha@google.com> | 2012-04-12 09:24:03 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2012-04-23 23:02:52 -0700 |
commit | c6f1bf43210f93dafbae4a2744cadd6f18924255 (patch) | |
tree | 4eeea793d58fef41007a91527f64ed5eda003dce /vp8/encoder/treewriter.h | |
parent | 2210767c3f7ce179ea9b352c8de2790b23487bca (diff) | |
download | libvpx-c6f1bf43210f93dafbae4a2744cadd6f18924255.tar libvpx-c6f1bf43210f93dafbae4a2744cadd6f18924255.tar.gz libvpx-c6f1bf43210f93dafbae4a2744cadd6f18924255.tar.bz2 libvpx-c6f1bf43210f93dafbae4a2744cadd6f18924255.zip |
Differential encoding of probability updates
Adds differential encoding of prob updates using a subexponential
code centered around the previous probability value.
Also searches for the most cost-effective update, and breaks
up the coefficient updates into smaller groups.
Small gain on Derf: 0.2%
Change-Id: Ie0071e3dc113e3d0d7ab95b6442bb07a89970030
Diffstat (limited to 'vp8/encoder/treewriter.h')
-rw-r--r-- | vp8/encoder/treewriter.h | 8 |
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. */ |