static INLINE void range_check(const tran_low_t *input, const int size,
const int bit) {
-#if CONFIG_COEFFICIENT_RANGE_CHECKING
+#if 0 // CONFIG_COEFFICIENT_RANGE_CHECKING
+// TODO(angiebird): the range_check is not used because the bit range
+// in fdct# is not correct. Since we are going to merge in a new version
+// of fdct# from nextgenv2, we won't fix the incorrect bit range now.
int i;
for (i = 0; i < size; ++i) {
assert(abs(input[i]) < (1 << bit));
tran_low_t step[4];
// stage 0
- range_check(input, 4, 11);
+ range_check(input, 4, 14);
// stage 1
output[0] = input[0] + input[3];
output[2] = input[1] - input[2];
output[3] = input[0] - input[3];
- range_check(output, 4, 12);
+ range_check(output, 4, 15);
// stage 2
temp = output[0] * cospi_16_64 + output[1] * cospi_16_64;
temp = output[3] * cospi_24_64 + output[2] * -cospi_8_64;
step[3] = (tran_low_t)fdct_round_shift(temp);
- range_check(step, 4, 13);
+ range_check(step, 4, 16);
// stage 3
output[0] = step[0];
output[2] = step[1];
output[3] = step[3];
- range_check(output, 4, 13);
+ range_check(output, 4, 16);
}
static void fdct8(const tran_low_t *input, tran_low_t *output) {
tran_low_t step[8];
// stage 0
- range_check(input, 8, 12);
+ range_check(input, 8, 13);
// stage 1
output[0] = input[0] + input[7];
output[6] = input[1] - input[6];
output[7] = input[0] - input[7];
- range_check(output, 8, 13);
+ range_check(output, 8, 14);
// stage 2
step[0] = output[0] + output[3];
step[6] = (tran_low_t)fdct_round_shift(temp);
step[7] = output[7];
- range_check(step, 8, 14);
+ range_check(step, 8, 15);
// stage 3
temp = step[0] * cospi_16_64 + step[1] * cospi_16_64;
output[6] = step[7] - step[6];
output[7] = step[7] + step[6];
- range_check(output, 8, 14);
+ range_check(output, 8, 16);
// stage 4
step[0] = output[0];
temp = output[7] * cospi_28_64 + output[4] * -cospi_4_64;
step[7] = (tran_low_t)fdct_round_shift(temp);
- range_check(step, 8, 14);
+ range_check(step, 8, 16);
// stage 5
output[0] = step[0];
output[6] = step[3];
output[7] = step[7];
- range_check(output, 8, 14);
+ range_check(output, 8, 16);
}
static void fdct16(const tran_low_t *input, tran_low_t *output) {
range_check(output, 16, 16);
}
-/* #TODO(angiebird): Unify this with vp10_fwd_txfm.c: vp10_fdct32
+/* TODO(angiebird): Unify this with vp10_fwd_txfm.c: vp10_fdct32
static void fdct32(const tran_low_t *input, tran_low_t *output) {
tran_high_t temp;
tran_low_t step[32];