[NORMATIVE, spatial-segmentation] Undo unintended change Patch cff20b9 accientally made a normative change to the spatial-segmentation experiment while applying some refactoring. Undo the normative part of the change, while keeping the overall refactoring. BUG=aomedia:1625 Change-Id: I01278da2a35b9b9fdca8bb9a3fe56910a6471eda
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h index c06571b..905b485 100644 --- a/av1/common/pred_common.h +++ b/av1/common/pred_common.h
@@ -64,11 +64,14 @@ } // Pick CDF index based on number of matching/out-of-bounds segment IDs. - *cdf_index = 0; - if ((prev_ul == prev_u) && (prev_ul == prev_l)) + if (prev_ul < 0 || prev_u < 0 || prev_l < 0) /* Edge case */ + *cdf_index = 0; + else if ((prev_ul == prev_u) && (prev_ul == prev_l)) *cdf_index = 2; else if ((prev_ul == prev_u) || (prev_ul == prev_l) || (prev_u == prev_l)) *cdf_index = 1; + else + *cdf_index = 0; // If 2 or more are identical returns that as predictor, otherwise prev_l. if (prev_u == -1) // edge case