diff --git a/src/strategies/avx2/dct-avx2.c b/src/strategies/avx2/dct-avx2.c index e79a1176..1e79cce8 100644 --- a/src/strategies/avx2/dct-avx2.c +++ b/src/strategies/avx2/dct-avx2.c @@ -411,9 +411,9 @@ static void partial_butterfly_inverse_32_avx2(int16_t *src, int16_t *dst, #define DCT_NXN_AVX2(n) \ static void dct_ ## n ## x ## n ## _avx2(int8_t bitdepth, int16_t *block, int16_t *coeff) { \ \ - int16_t tmp[ ## n ## * ## n ##]; \ - int32_t shift_1st = g_convert_to_bit[ ## n ## ] + 1 + (bitdepth - 8); \ - int32_t shift_2nd = g_convert_to_bit[ ## n ## ] + 8; \ + int16_t tmp[ n * n ]; \ + int32_t shift_1st = g_convert_to_bit[ n ] + 1 + (bitdepth - 8); \ + int32_t shift_2nd = g_convert_to_bit[ n ] + 8; \ \ partial_butterfly_ ## n ## _avx2(block, tmp, shift_1st); \ partial_butterfly_ ## n ## _avx2(tmp, coeff, shift_2nd); \ @@ -422,7 +422,7 @@ static void dct_ ## n ## x ## n ## _avx2(int8_t bitdepth, int16_t *block, int16_ #define IDCT_NXN_AVX2(n) \ static void idct_ ## n ## x ## n ## _avx2(int8_t bitdepth, int16_t *block, int16_t *coeff) { \ \ - int16_t tmp[ ## n ## * ## n ##]; \ + int16_t tmp[ n * n ]; \ int32_t shift_1st = 7; \ int32_t shift_2nd = 12 - (bitdepth - 8); \ \ diff --git a/src/strategies/generic/dct-generic.c b/src/strategies/generic/dct-generic.c index 3313eb27..cf581c13 100644 --- a/src/strategies/generic/dct-generic.c +++ b/src/strategies/generic/dct-generic.c @@ -407,9 +407,9 @@ static void partial_butterfly_inverse_32_generic(int16_t *src, int16_t *dst, #define DCT_NXN_GENERIC(n) \ static void dct_ ## n ## x ## n ## _generic(int8_t bitdepth, int16_t *block, int16_t *coeff) { \ \ - int16_t tmp[ ## n ## * ## n ##]; \ - int32_t shift_1st = g_convert_to_bit[ ## n ## ] + 1 + (bitdepth - 8); \ - int32_t shift_2nd = g_convert_to_bit[ ## n ## ] + 8; \ + int16_t tmp[ n * n ]; \ + int32_t shift_1st = g_convert_to_bit[ n ] + 1 + (bitdepth - 8); \ + int32_t shift_2nd = g_convert_to_bit[ n ] + 8; \ \ partial_butterfly_ ## n ## _generic(block, tmp, shift_1st); \ partial_butterfly_ ## n ## _generic(tmp, coeff, shift_2nd); \ @@ -418,7 +418,7 @@ static void dct_ ## n ## x ## n ## _generic(int8_t bitdepth, int16_t *block, int #define IDCT_NXN_GENERIC(n) \ static void idct_ ## n ## x ## n ## _generic(int8_t bitdepth, int16_t *block, int16_t *coeff) { \ \ - int16_t tmp[ ## n ## * ## n ##]; \ + int16_t tmp[ n * n ]; \ int32_t shift_1st = 7; \ int32_t shift_2nd = 12 - (bitdepth - 8); \ \