dct_partial_test,fwd_txfm: change << to *
left shift of a negative number is undefined in C; quiets a ubsan warning Change-Id: Ib1624ad5326ac8e0eead9348468ef7fe5d4df9a4
This commit is contained in:
parent
74dc640565
commit
bd77931421
@ -46,7 +46,7 @@ tran_low_t partial_fdct_ref(const Buffer<int16_t> &in, int size) {
|
||||
}
|
||||
|
||||
switch (size) {
|
||||
case 4: sum <<= 1; break;
|
||||
case 4: sum *= 2; break;
|
||||
case 8: /*sum = sum;*/ break;
|
||||
case 16: sum >>= 1; break;
|
||||
case 32: sum >>= 3; break;
|
||||
|
@ -84,7 +84,7 @@ void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) {
|
||||
for (r = 0; r < 4; ++r)
|
||||
for (c = 0; c < 4; ++c) sum += input[r * stride + c];
|
||||
|
||||
output[0] = sum << 1;
|
||||
output[0] = sum * 2;
|
||||
}
|
||||
|
||||
void vpx_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) {
|
||||
|
Loading…
Reference in New Issue
Block a user