Commit 13754540 authored by Jonathan Matthews's avatar Jonathan Matthews Committed by Alex Converse

Bugfix: ensure for pareto coef that there are no zero range encodings

Introduced by change I98b33fab6b9f52690f6ad618ac55e725a97be056

BUG=aomedia:349

Change-Id: Ib6df52ac2442f60c159bae2271793b7570d53a19
parent 9aa9749d
......@@ -4410,7 +4410,7 @@ static void build_token_cdfs(const aom_prob *pdf_model,
scale = CDF_PROB_TOP - cdf_head[ZERO_TOKEN];
p = ROUND_POWER_OF_TWO(scale * (pdf_model[2] << (CDF_PROB_BITS - 8)),
CDF_PROB_BITS);
cdf_head[ONE_TOKEN] = cdf_head[ZERO_TOKEN] + AOMMAX(1, p);
cdf_head[ONE_TOKEN] = cdf_head[ZERO_TOKEN] + AOMMIN(AOMMAX(1, p), scale - 1);
assert(cdf_head[ONE_TOKEN] < CDF_PROB_TOP);
cdf_head[TWO_TOKEN] = CDF_PROB_TOP;
......
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