Commit 2d4ac634 authored by Urvang Joshi's avatar Urvang Joshi
Browse files

TX64x64: zero the coeffs after top-left 32x32 block.

This is to get an approximation of 64x64, 32x64 and 64x32 transforms.
Compression performance is neutral for lowres and midres sets.

Change-Id: I6faaca02170bfef802a6294410fd691f73914173
parent 87278292
......@@ -2933,6 +2933,13 @@ void av1_fht64x64_c(const int16_t *input, tran_low_t *output, int stride,
(tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2);
#endif
}
// Zero out top-right 32x32 area.
for (int row = 0; row < 32; ++row) {
memset(output + row * 64 + 32, 0, 32 * sizeof(*output));
}
// Zero out the bottom 64x32 area.
memset(output + 32 * 64, 0, 32 * 64 * sizeof(*output));
}
void av1_fht64x32_c(const int16_t *input, tran_low_t *output, int stride,
......@@ -2992,6 +2999,11 @@ void av1_fht64x32_c(const int16_t *input, tran_low_t *output, int stride,
output[j + i * n2] =
(tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2);
}
// Zero out right 32x32 area.
for (int row = 0; row < n; ++row) {
memset(output + row * n2 + n, 0, n * sizeof(*output));
}
}
void av1_fht32x64_c(const int16_t *input, tran_low_t *output, int stride,
......@@ -3050,6 +3062,9 @@ void av1_fht32x64_c(const int16_t *input, tran_low_t *output, int stride,
for (j = 0; j < n2; ++j)
output[i + j * n] = (tran_low_t)ROUND_POWER_OF_TWO_SIGNED(temp_out[j], 2);
}
// Zero out the bottom 32x32 area.
memset(output + n * n, 0, n * n * sizeof(*output));
}
#endif // CONFIG_TX64X64
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment