idct.c: fix left shift of negative value This is undefined behaviour in C and might confuse the optimizer, leading to incorrect code. Change-Id: Ia4bb60478068da678f013bdd6ab6a49814d89ebe
diff --git a/av1/common/idct.c b/av1/common/idct.c index 3a3705a..878e9ed 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c
@@ -372,7 +372,7 @@ for (i = 0; i < 4; ++i) { #if CONFIG_DAALA_DCT4 tran_low_t temp_in[4]; - for (j = 0; j < 4; j++) temp_in[j] = input[j] << 1; + for (j = 0; j < 4; j++) temp_in[j] = input[j] * 2; IHT_4[tx_type].rows(temp_in, out[i]); #else #if CONFIG_LGT @@ -1285,7 +1285,7 @@ for (i = 0; i < 16; ++i) { #if CONFIG_DAALA_DCT16 tran_low_t temp_in[16]; - for (j = 0; j < 16; j++) temp_in[j] = input[j] << 1; + for (j = 0; j < 16; j++) temp_in[j] = input[j] * 2; IHT_16[tx_type].rows(temp_in, out[i]); #else IHT_16[tx_type].rows(input, out[i]);