Commit f436b12e authored by Luc Trudeau's avatar Luc Trudeau

[CFL] Check for uninitialized signs

To avoid writting out uninitialized signs for CfL alpha, checks are
added in the write_cfl_alphas function.

Change-Id: I832875e496a6318132c82bc1e5406dc95ae9c055
parent 367da993
......@@ -1703,6 +1703,12 @@ static void write_cfl_alphas(FRAME_CONTEXT *const frame_ctx, int skip, int ind,
assert(signs[CFL_PRED_U] == CFL_SIGN_POS);
assert(signs[CFL_PRED_V] == CFL_SIGN_POS);
} else {
// Check for uninitialized signs
if (cfl_alpha_codes[ind][CFL_PRED_U] == 0)
assert(signs[CFL_PRED_U] == CFL_SIGN_POS);
if (cfl_alpha_codes[ind][CFL_PRED_V] == 0)
assert(signs[CFL_PRED_V] == CFL_SIGN_POS);
// Write a symbol representing a combination of alpha Cb and alpha Cr.
aom_write_symbol(w, ind, frame_ctx->cfl_alpha_cdf, CFL_ALPHABET_SIZE);
......
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