Commit e5f5e276 authored by Ola Hugosson's avatar Ola Hugosson Committed by Ola Hugosson

lv_map_multi: remove prob precision reduction in aom_read_bin

Previously lv_map bins (cdf2) were treated specially in that the probability
was rounded to 7bit before passed to the arithmetic engine.

Change-Id: I75d8437a6185e529e42e9867e3df18384447f2fd
parent 1699b50e
......@@ -207,9 +207,13 @@ static INLINE int aom_read_symbol_(aom_reader *r, aom_cdf_prob *cdf,
static INLINE int aom_read_bin_(aom_reader *r, aom_cdf_prob *cdf,
int nsymbs ACCT_STR_PARAM) {
int ret;
#if CONFIG_LV_MAP_MULTI
ret = aom_read_cdf(r, cdf, nsymbs, ACCT_STR_NAME);
#else
aom_cdf_prob this_cdf[3] = { (aom_cdf_prob)((cdf[0] >> 8) << 8), 0, 0 };
this_cdf[0] = clamp(this_cdf[0], (1 << 8), (127 << 8));
ret = aom_read_cdf(r, this_cdf, nsymbs, ACCT_STR_NAME);
#endif
if (r->allow_update_cdf) update_bin(cdf, ret, nsymbs);
// printf("bin: %d\n", this_cdf[0]);
return ret;
......
......@@ -138,9 +138,13 @@ static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
#if CONFIG_LV_MAP
static INLINE void aom_write_bin(aom_writer *w, int symb, aom_cdf_prob *cdf,
int nsymbs) {
#if CONFIG_LV_MAP_MULTI
aom_write_cdf(w, symb, cdf, nsymbs);
#else
aom_cdf_prob this_cdf[3] = { (aom_cdf_prob)((cdf[0] >> 8) << 8), 0, 0 };
this_cdf[0] = clamp(this_cdf[0], (1 << 8), (127 << 8));
aom_write_cdf(w, symb, this_cdf, nsymbs);
#endif
if (w->allow_update_cdf) update_bin(cdf, symb, nsymbs);
// printf("bin: %d\n", this_cdf[0]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment