Commit 9751aa12 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Add range checking for decoded coefficients.

The coefficient range checking is enabled when configured with
--enable-debug --enable-coefficient-range-checking
for vpxdec to detect ill-formed input stream. This addresses the
problem raised by issue #792.

Change-Id: I3f9ea541de4dc742dd64389d6c5f543fb1c4f052
parent a7555158
......@@ -190,7 +190,11 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type,
v = (val * dqv) >> dq_shift;
dqcoeff[scan[c]] = check_range(vp9_read_bit(r) ? -v : v);
dqcoeff[scan[c]] = vp9_read_bit(r) ? -v : v;
token_cache[scan[c]] = vp9_pt_energy_class[token];
ctx = get_coef_context(nb, token_cache, c);
Supports Markdown
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