Remove the starting zero from ANS CDFs.
This brings it in line with the Daala CDFs and will make it easier to
share code.
Change-Id: Idfd2d2b33c3b9b2c4e72ce72fb3d8039013448b9
(cherry picked from aom/master commit af98507ca928afe33e9f88fdd2ca168379528d6a)
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 4aa7f88..d6937aa 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -92,8 +92,8 @@
struct rans_sym s;
(void)nsymbs;
assert(cdf);
- s.cum_prob = cdf[symb];
- s.prob = cdf[symb + 1] - s.cum_prob;
+ s.cum_prob = symb > 0 ? cdf[symb - 1] : 0;
+ s.prob = cdf[symb] - s.cum_prob;
buf_rans_write(w, &s);
#else
(void)w;