summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_idctllm.c
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2012-12-12 15:49:39 -0800
committerScott LaVarnway <slavarnway@google.com>2012-12-12 15:49:39 -0800
commitb575394e215ea46c9885992d85c3047de5171f4c (patch)
tree218751930146b341518524af1e2c13e0e7be4cb6 /vp9/common/vp9_idctllm.c
parentb192d99f7367871908551ca940e06b7cb94e760b (diff)
downloadlibvpx-b575394e215ea46c9885992d85c3047de5171f4c.tar
libvpx-b575394e215ea46c9885992d85c3047de5171f4c.tar.gz
libvpx-b575394e215ea46c9885992d85c3047de5171f4c.tar.bz2
libvpx-b575394e215ea46c9885992d85c3047de5171f4c.zip
Improved vp9_ihtllm_c
As suggested by Yaowu, we can use eob to reduce the complexity of the vp9_ihtllm_c function. For the 1080p test clip used, the decoder performance improved by 17%. Change-Id: I32486f2f06f9b8f60467d2a574209aa3a3daa435
Diffstat (limited to 'vp9/common/vp9_idctllm.c')
-rw-r--r--vp9/common/vp9_idctllm.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/vp9/common/vp9_idctllm.c b/vp9/common/vp9_idctllm.c
index 9622dfdee..897514ee1 100644
--- a/vp9/common/vp9_idctllm.c
+++ b/vp9/common/vp9_idctllm.c
@@ -404,8 +404,9 @@ void vp9_ihtllm_float_c(const int16_t *input, int16_t *output, int pitch,
#define HORIZONTAL_SHIFT 17 // 15
#define HORIZONTAL_ROUNDING ((1 << (HORIZONTAL_SHIFT - 1)) - 1)
void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
- TX_TYPE tx_type, int tx_dim) {
+ TX_TYPE tx_type, int tx_dim, uint16_t eobs) {
int i, j, k;
+ int nz_dim;
int16_t imbuf[256];
const int16_t *ip = input;
@@ -444,12 +445,25 @@ void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
break;
}
+ nz_dim = tx_dim;
+ if(tx_dim > 4) {
+ if(eobs < 36) {
+ vpx_memset(im, 0, 512);
+ nz_dim = 8;
+ if(eobs < 3) {
+ nz_dim = 2;
+ } else if(eobs < 10) {
+ nz_dim = 4;
+ }
+ }
+ }
+
/* vertical transformation */
for (j = 0; j < tx_dim; j++) {
- for (i = 0; i < tx_dim; i++) {
+ for (i = 0; i < nz_dim; i++) {
int temp = 0;
- for (k = 0; k < tx_dim; k++) {
+ for (k = 0; k < nz_dim; k++) {
temp += ptv[k] * ip[(k * tx_dim)];
}
@@ -470,7 +484,7 @@ void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
for (i = 0; i < tx_dim; i++) {
int temp = 0;
- for (k = 0; k < tx_dim; k++) {
+ for (k = 0; k < nz_dim; k++) {
temp += im[k] * pthc[k];
}