Avoid left shift of negative numbers Change-Id: I21f956a83687ebaeab81577aabdbfed2ea2b4dd2
diff --git a/av1/common/cfl.c b/av1/common/cfl.c index fc15a7a..78f55e3 100644 --- a/av1/common/cfl.c +++ b/av1/common/cfl.c
@@ -245,7 +245,8 @@ } int avg_q3 = (sum_q3 + (1 << (num_pel_log2 - 1))) >> num_pel_log2; // Loss is never more than 1/2 (in Q3) - assert(abs((avg_q3 << num_pel_log2) - sum_q3) <= 1 << num_pel_log2 >> 1); + assert(abs((avg_q3 * (1 << num_pel_log2)) - sum_q3) <= + 1 << num_pel_log2 >> 1); tx_pred_buf_q3 = pred_buf_q3; for (int t_j = 0; t_j < tx_height; t_j++) {