diff options
author | Yunqing Wang <yunqingwang@google.com> | 2013-02-28 16:32:05 -0800 |
---|---|---|
committer | Yunqing Wang <yunqingwang@google.com> | 2013-02-28 16:40:29 -0800 |
commit | c550bb3b09e516fdb4ec574d2f5b9b803a7cd19d (patch) | |
tree | 9f0ee009c8048a4cb934eb95be016e4c6b954ba8 /vp9/decoder/vp9_dequantize.c | |
parent | 72b146690a148b8eca13f6e07946cee62fd03b0b (diff) | |
download | libvpx-c550bb3b09e516fdb4ec574d2f5b9b803a7cd19d.tar libvpx-c550bb3b09e516fdb4ec574d2f5b9b803a7cd19d.tar.gz libvpx-c550bb3b09e516fdb4ec574d2f5b9b803a7cd19d.tar.bz2 libvpx-c550bb3b09e516fdb4ec574d2f5b9b803a7cd19d.zip |
Add eob<=10 case in idct32x32
Simplified idct32x32 calculation when there are only 10 or less
non-zero coefficients in 32x32 block. This helps the decoder
performance.
Change-Id: If7f8893d27b64a9892b4b2621a37fdf4ac0c2a6d
Diffstat (limited to 'vp9/decoder/vp9_dequantize.c')
-rw-r--r-- | vp9/decoder/vp9_dequantize.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/vp9/decoder/vp9_dequantize.c b/vp9/decoder/vp9_dequantize.c index 46e5656bd..5a98b1150 100644 --- a/vp9/decoder/vp9_dequantize.c +++ b/vp9/decoder/vp9_dequantize.c @@ -314,14 +314,34 @@ void vp9_dequant_idct_add_32x32_c(int16_t *input, const int16_t *dq, if (eob) { input[0] = input[0] * dq[0] / 2; if (eob == 1) { - vp9_short_idct1_32x32_c(input, output); + vp9_short_idct1_32x32(input, output); add_constant_residual(output[0], pred, pitch, dest, stride, 32, 32); input[0] = 0; + } else if (eob <= 10) { + input[1] = input[1] * dq[1] / 2; + input[2] = input[2] * dq[1] / 2; + input[3] = input[3] * dq[1] / 2; + input[32] = input[32] * dq[1] / 2; + input[33] = input[33] * dq[1] / 2; + input[34] = input[34] * dq[1] / 2; + input[64] = input[64] * dq[1] / 2; + input[65] = input[65] * dq[1] / 2; + input[96] = input[96] * dq[1] / 2; + + // the idct halves ( >> 1) the pitch + vp9_short_idct10_32x32(input, output, 64); + + input[0] = input[1] = input[2] = input[3] = 0; + input[32] = input[33] = input[34] = 0; + input[64] = input[65] = 0; + input[96] = 0; + + add_residual(output, pred, pitch, dest, stride, 32, 32); } else { int i; for (i = 1; i < 1024; i++) input[i] = input[i] * dq[1] / 2; - vp9_short_idct32x32_c(input, output, 64); + vp9_short_idct32x32(input, output, 64); vpx_memset(input, 0, 2048); add_residual(output, pred, pitch, dest, stride, 32, 32); } |