ref: 77440d508b54619c0220d33bd857f9f248d51ab0
parent: fb4b533da9ebf03b443ec4e8f310e0b31ec49c31
parent: 5780c4cbd592c92da567609f737dbf823b055cd6
author: Scott LaVarnway <slavarnway@google.com>
date: Tue Feb 5 03:56:05 EST 2013
Merge "Added vp9_short_idct1_32x32_c" into experimental
--- a/vp9/common/vp9_idctllm.c
+++ b/vp9/common/vp9_idctllm.c
@@ -1644,6 +1644,16 @@
}
}
+void vp9_short_idct1_32x32_c(int16_t *input, int16_t *output) {
+ int tmp;
+ int16_t out;
+ tmp = input[0] * cospi_16_64;
+ out = dct_const_round_shift(tmp);
+ tmp = out * cospi_16_64;
+ out = dct_const_round_shift(tmp);
+ *output = (out + 32) >> 6;
+}
+
#else // !CONFIG_DWTDCTHYBRID
#if DWT_TYPE == 53
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -408,6 +408,9 @@
prototype void vp9_short_idct32x32 "int16_t *input, int16_t *output, int pitch"
specialize vp9_short_idct32x32
+prototype void vp9_short_idct1_32x32 "int16_t *input, int16_t *output"
+specialize vp9_short_idct1_32x32
+
prototype void vp9_ihtllm "const int16_t *input, int16_t *output, int pitch, int tx_type, int tx_dim, int16_t eobs"
specialize vp9_ihtllm
--- a/vp9/decoder/vp9_dequantize.c
+++ b/vp9/decoder/vp9_dequantize.c
@@ -349,13 +349,22 @@
int i;
if (eob) {
- input[0]= input[0] * dq[0] / 2;
- for (i = 1; i < 1024; i++)
- input[i] = input[i] * dq[1] / 2;
- vp9_short_idct32x32_c(input, output, 64);
- vpx_memset(input, 0, 2048);
-
- add_residual(output, pred, pitch, dest, stride, 32, 32);
+ input[0] = input[0] * dq[0] / 2;
+#if !CONFIG_DWTDCTHYBRID
+ if (eob == 1) {
+ vp9_short_idct1_32x32_c(input, output);
+ add_constant_residual(output[0], pred, pitch, dest, stride, 32, 32);
+ input[0] = 0;
+ } else {
+#endif
+ for (i = 1; i < 1024; i++)
+ input[i] = input[i] * dq[1] / 2;
+ vp9_short_idct32x32_c(input, output, 64);
+ vpx_memset(input, 0, 2048);
+ add_residual(output, pred, pitch, dest, stride, 32, 32);
+#if !CONFIG_DWTDCTHYBRID
+ }
+#endif
}
}
--
⑨