Commit 0eb767b8 authored by Angie Chiang's avatar Angie Chiang

Change exit(0) to assert(0) in txb_common.h

This will provide better indication of abnormal code flow.

Change-Id: I7e6cdcf77f13c709137e6524c94b0911cd5216ed
parent bb100e27
......@@ -173,8 +173,7 @@ static INLINE int get_nz_map_ctx(const tran_low_t *tcoeffs,
ctx = (ctx + 1) >> 1;
// unit test purpose
if (5 + ctx > 7) exit(0);
assert(5 + ctx <= 7);
return 5 + ctx;
}
......@@ -195,20 +194,20 @@ static INLINE int get_nz_map_ctx(const tran_low_t *tcoeffs,
if (row == 0) {
ctx = (ctx + 1) >> 1;
if (ctx >= 3) exit(0);
assert(ctx < 3);
return 8 + ctx;
}
if (col == 0) {
ctx = (ctx + 1) >> 1;
if (ctx >= 3) exit(0);
assert(ctx < 3);
return 11 + ctx;
}
ctx >>= 1;
if (14 + ctx >= 20) exit(0);
assert(14 + ctx < 20);
return 14 + ctx;
}
......@@ -222,7 +221,8 @@ static INLINE int get_eob_ctx(const tran_low_t *tcoeffs,
if (bwl == 4) return av1_coeff_band_16x16[c];
if (bwl == 5) return av1_coeff_band_32x32[c];
exit(0);
assert(0);
return 0;
}
static INLINE void set_dc_sign(int *cul_level, tran_low_t v) {
......
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