Commit 1c077a40 authored by Jingning Han's avatar Jingning Han

Use 7-bit precision for level-map probability model

Support higher hardware throughput. The coding performance loss
as compared to 15-bit precision is 0.05% for lowres. The loss is
smaller as frame size goes up.

Change-Id: I2e22b156f3178cf63689df306e9da13e0e4d205b
parent 8d0039c1
......@@ -207,8 +207,8 @@ 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;
aom_cdf_prob this_cdf[3] = { (aom_cdf_prob)((cdf[0] >> 7) << 7), 0, 0 };
this_cdf[0] = (aom_cdf_prob)clamp(this_cdf[0], 64, CDF_PROB_TOP - 64);
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);
update_bin(cdf, ret, nsymbs);
return ret;
......
......@@ -145,8 +145,8 @@ 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) {
aom_cdf_prob this_cdf[3] = { (aom_cdf_prob)((cdf[0] >> 7) << 7), 0, 0 };
this_cdf[0] = (aom_cdf_prob)clamp(this_cdf[0], 64, CDF_PROB_TOP - 64);
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);
update_bin(cdf, symb, nsymbs);
}
......
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