ref: 83b285e546fcf25433df395d71acc8ef9b7dce7d
parent: 8d3ef287a254104b91341f9a34a194d349881494
parent: 6594ca8897ea0293d44b825f7c7fe81a7eb540a4
author: Jingning Han <[email protected]>
date: Tue Oct 8 08:30:48 EDT 2013
Merge "All zero coeff skip in IDCT 32x32"
--- a/vp9/common/vp9_idct.c
+++ b/vp9/common/vp9_idct.c
@@ -1253,7 +1253,20 @@
// Rows
for (i = 0; i < 32; ++i) {
- idct32_1d(input, outptr);
+ int16_t zero_coeff[16];
+ for (j = 0; j < 16; ++j)
+ zero_coeff[j] = input[2 * j] | input[2 * j + 1];
+ for (j = 0; j < 8; ++j)
+ zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1];
+ for (j = 0; j < 4; ++j)
+ zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1];
+ for (j = 0; j < 2; ++j)
+ zero_coeff[j] = zero_coeff[2 * j] | zero_coeff[2 * j + 1];
+
+ if (zero_coeff[0] | zero_coeff[1])
+ idct32_1d(input, outptr);
+ else
+ vpx_memset(outptr, 0, sizeof(int16_t) * 32);
input += 32;
outptr += 32;
}