Commit 7e21ef2c authored by Cheng Chen's avatar Cheng Chen

Fix a potential assertion failure

Change-Id: I24d129aceb66e00388bedf98bc8e46524c0812eb
parent ad667d90
......@@ -46,10 +46,11 @@ int av1_is_segfeature_signed(SEG_LVL_FEATURES feature_id) {
void av1_set_segdata(struct segmentation *seg, int segment_id,
SEG_LVL_FEATURES feature_id, int seg_data) {
assert(seg_data <= seg_feature_data_max[feature_id]);
if (seg_data < 0) {
assert(seg_feature_data_signed[feature_id]);
assert(-seg_data <= seg_feature_data_max[feature_id]);
} else {
assert(seg_data <= seg_feature_data_max[feature_id]);
}
seg->feature_data[segment_id][feature_id] = seg_data;
......
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