Commit 346358a5 authored by Scott LaVarnway's avatar Scott LaVarnway Committed by Code Review
Browse files

Merge "Wrapped asserts in critical code with CONFIG_DEBUG"

parents afb84bb1 0e3bcc6f
...@@ -776,9 +776,9 @@ static void write_mv_ref ...@@ -776,9 +776,9 @@ static void write_mv_ref
vp8_writer *w, MB_PREDICTION_MODE m, const vp8_prob *p vp8_writer *w, MB_PREDICTION_MODE m, const vp8_prob *p
) )
{ {
#if CONFIG_DEBUG
assert(NEARESTMV <= m && m <= SPLITMV); assert(NEARESTMV <= m && m <= SPLITMV);
#endif
vp8_write_token(w, vp8_mv_ref_tree, p, vp8_write_token(w, vp8_mv_ref_tree, p,
vp8_mv_ref_encoding_array - NEARESTMV + m); vp8_mv_ref_encoding_array - NEARESTMV + m);
} }
...@@ -788,8 +788,9 @@ static void write_sub_mv_ref ...@@ -788,8 +788,9 @@ static void write_sub_mv_ref
vp8_writer *w, B_PREDICTION_MODE m, const vp8_prob *p vp8_writer *w, B_PREDICTION_MODE m, const vp8_prob *p
) )
{ {
#if CONFIG_DEBUG
assert(LEFT4X4 <= m && m <= NEW4X4); assert(LEFT4X4 <= m && m <= NEW4X4);
#endif
vp8_write_token(w, vp8_sub_mv_ref_tree, p, vp8_write_token(w, vp8_sub_mv_ref_tree, p,
vp8_sub_mv_ref_encoding_array - LEFT4X4 + m); vp8_sub_mv_ref_encoding_array - LEFT4X4 + m);
} }
...@@ -1017,11 +1018,13 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi) ...@@ -1017,11 +1018,13 @@ static void pack_inter_mode_mvs(VP8_COMP *const cpi)
blockmode = cpi->mb.partition_info->bmi[j].mode; blockmode = cpi->mb.partition_info->bmi[j].mode;
blockmv = cpi->mb.partition_info->bmi[j].mv; blockmv = cpi->mb.partition_info->bmi[j].mv;
#if CONFIG_DEBUG
while (j != L[++k]) while (j != L[++k])
if (k >= 16) if (k >= 16)
assert(0); assert(0);
#else
while (j != L[++k]);
#endif
leftmv.as_int = left_block_mv(m, k); leftmv.as_int = left_block_mv(m, k);
abovemv.as_int = above_block_mv(m, k, mis); abovemv.as_int = above_block_mv(m, k, mis);
mv_contz = vp8_mv_cont(&leftmv, &abovemv); mv_contz = vp8_mv_cont(&leftmv, &abovemv);
......
...@@ -120,9 +120,9 @@ static void tokenize2nd_order_b ...@@ -120,9 +120,9 @@ static void tokenize2nd_order_b
{ {
int rc = vp8_default_zig_zag1d[c]; int rc = vp8_default_zig_zag1d[c];
const int v = qcoeff_ptr[rc]; const int v = qcoeff_ptr[rc];
#if CONFIG_DEBUG
assert(-DCT_MAX_VALUE <= v && v < (DCT_MAX_VALUE)); assert(-DCT_MAX_VALUE <= v && v < (DCT_MAX_VALUE));
#endif
t->Extra = vp8_dct_value_tokens_ptr[v].Extra; t->Extra = vp8_dct_value_tokens_ptr[v].Extra;
x = vp8_dct_value_tokens_ptr[v].Token; x = vp8_dct_value_tokens_ptr[v].Token;
} }
...@@ -173,9 +173,9 @@ static void tokenize1st_order_b ...@@ -173,9 +173,9 @@ static void tokenize1st_order_b
{ {
int rc = vp8_default_zig_zag1d[c]; int rc = vp8_default_zig_zag1d[c];
const int v = qcoeff_ptr[rc]; const int v = qcoeff_ptr[rc];
#if CONFIG_DEBUG
assert(-DCT_MAX_VALUE <= v && v < (DCT_MAX_VALUE)); assert(-DCT_MAX_VALUE <= v && v < (DCT_MAX_VALUE));
#endif
t->Extra = vp8_dct_value_tokens_ptr[v].Extra; t->Extra = vp8_dct_value_tokens_ptr[v].Extra;
x = vp8_dct_value_tokens_ptr[v].Token; x = vp8_dct_value_tokens_ptr[v].Token;
} }
......
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