summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2012-02-16 15:32:33 +0000
committerOn2 (Google) Code Review <on2-gerrit@google.com>2012-02-16 15:32:33 +0000
commita96bf2038cd55f762d6468bdc61a0c946a7fefa1 (patch)
tree96b4b357512f231e18a1477cadc667b7710e5aeb /vp8
parenta78a4b4551294395d25cf0e07e78241562779483 (diff)
parent62a78f0342ca45fc295aa63bbc4d6974b0c57da7 (diff)
downloadlibvpx-a96bf2038cd55f762d6468bdc61a0c946a7fefa1.tar
libvpx-a96bf2038cd55f762d6468bdc61a0c946a7fefa1.tar.gz
libvpx-a96bf2038cd55f762d6468bdc61a0c946a7fefa1.tar.bz2
libvpx-a96bf2038cd55f762d6468bdc61a0c946a7fefa1.zip
Merge "re-scaled 2nd order haar transform" into experimental
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/idctllm.c8
-rw-r--r--vp8/encoder/dct.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/vp8/common/idctllm.c b/vp8/common/idctllm.c
index 22c9baa46..e21af6871 100644
--- a/vp8/common/idctllm.c
+++ b/vp8/common/idctllm.c
@@ -487,10 +487,10 @@ void vp8_short_ihaar2x2_c(short *input, short *output, int pitch)
op[i] = 0;
}
- op[0] = (ip[0] + ip[1] + ip[4] + ip[8])>>2;
- op[1] = (ip[0] - ip[1] + ip[4] - ip[8])>>2;
- op[4] = (ip[0] + ip[1] - ip[4] - ip[8])>>2;
- op[8] = (ip[0] - ip[1] - ip[4] + ip[8])>>2;
+ op[0] = (ip[0] + ip[1] + ip[4] + ip[8])>>1;
+ op[1] = (ip[0] - ip[1] + ip[4] - ip[8])>>1;
+ op[4] = (ip[0] + ip[1] - ip[4] - ip[8])>>1;
+ op[8] = (ip[0] - ip[1] - ip[4] + ip[8])>>1;
}
void vp8_short_ihaar2x2_1_c(short *input, short *output, int pitch)
diff --git a/vp8/encoder/dct.c b/vp8/encoder/dct.c
index d6b3e77c5..b537835da 100644
--- a/vp8/encoder/dct.c
+++ b/vp8/encoder/dct.c
@@ -120,10 +120,10 @@ void vp8_short_fhaar2x2_c(short *input, short *output, int pitch) //pitch = 8
op1[i] = 0;
}
- op1[0]=ip1[0] + ip1[1] + ip1[4] + ip1[8];
- op1[1]=ip1[0] - ip1[1] + ip1[4] - ip1[8];
- op1[4]=ip1[0] + ip1[1] - ip1[4] - ip1[8];
- op1[8]=ip1[0] - ip1[1] - ip1[4] + ip1[8];
+ op1[0]=(ip1[0] + ip1[1] + ip1[4] + ip1[8])>>1;
+ op1[1]=(ip1[0] - ip1[1] + ip1[4] - ip1[8])>>1;
+ op1[4]=(ip1[0] + ip1[1] - ip1[4] - ip1[8])>>1;
+ op1[8]=(ip1[0] - ip1[1] - ip1[4] + ip1[8])>>1;
}
#endif