summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2013-06-11 09:31:33 -0700
committerDeb Mukherjee <debargha@google.com>2013-06-11 10:33:07 -0700
commita4d906c13228ac79ed83c4c55b18df4698224db9 (patch)
tree47028b8aedf7a57ba17e9aa4ff5a56e2660f26a1 /vp9/encoder/vp9_bitstream.c
parent551f37d63d508d24dfe071454ca9f38df01c29e9 (diff)
downloadlibvpx-a4d906c13228ac79ed83c4c55b18df4698224db9.tar
libvpx-a4d906c13228ac79ed83c4c55b18df4698224db9.tar.gz
libvpx-a4d906c13228ac79ed83c4c55b18df4698224db9.tar.bz2
libvpx-a4d906c13228ac79ed83c4c55b18df4698224db9.zip
Minor change in forward updates
Removes the case of coding prob = 0 for forward updates, since that is not an allowed probability to code. Slightly improves efficiency but may not matter in practice. Change-Id: I3b4caf82e8f0891992f0706d4089cc5a27568dba
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r--vp9/encoder/vp9_bitstream.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index 2808571e8..86cd81031 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -265,7 +265,7 @@ int count_term_subexp(int word, int k, int num_syms) {
static void compute_update_table() {
int i;
- for (i = 0; i < 255; i++)
+ for (i = 0; i < 254; i++)
update_bits[i] = count_term_subexp(i, SUBEXP_PARAM, 255);
}
@@ -277,9 +277,11 @@ static int split_index(int i, int n, int modulus) {
}
static int remap_prob(int v, int m) {
- const int n = 256;
+ const int n = 255;
const int modulus = MODULUS_PARAM;
int i;
+ v--;
+ m--;
if ((m << 1) <= n)
i = recenter_nonneg(v, m) - 1;
else