[lv_map_multi] simplify update_cdf remove tmp0 in update_cdf due to the use of EC_MIN_PROB introduced by Thomas Davies. further changes to update_cdf include: 1. Start the rate at 3+get_msb(nsymbs) and increase the rate by one at counts 16 and 32. 2. Check if tmp is less than cdf[i] to avoid shifting a negative number. Change-Id: I5088ebd450d6e57ec6c3e92bb2f47a078489b947
diff --git a/av1/encoder/cost.c b/av1/encoder/cost.c index 240a16c..a983105 100644 --- a/av1/encoder/cost.c +++ b/av1/encoder/cost.c
@@ -71,7 +71,12 @@ int i; aom_cdf_prob prev_cdf = 0; for (i = 0;; ++i) { +#if CONFIG_LV_MAP_MULTI aom_cdf_prob p15 = AOM_ICDF(cdf[i]) - prev_cdf; + p15 = (p15 < EC_MIN_PROB) ? EC_MIN_PROB : p15; +#else + aom_cdf_prob p15 = AOM_ICDF(cdf[i]) - prev_cdf; +#endif prev_cdf = AOM_ICDF(cdf[i]); if (inv_map)