]> granicus.if.org Git - libvpx/commit
fixed the wrong rounding in inverse haar transform
authorYaowu Xu <yaowu@google.com>
Wed, 12 Oct 2011 17:49:49 +0000 (10:49 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 14 Oct 2011 16:33:54 +0000 (09:33 -0700)
commit152ce6b2b901279d1154ef45e8b387eb23cad3a0
treee1286b731c1b69f25c842bdb93b3496a8090bc96
parent3ca849691cf09d4b4e0561f334e9a4247cc9f06a
fixed the wrong rounding in inverse haar transform

Given the current forward haar transform:
 f0 = I0 + I1 + I2 + I3
 f1 = I0 + I1 - I2 - I3
 f2 = I0 - I1 + I2 - I3
 f3 = I0 - I1 - I2 + I3
the output of the inverse haar prior rounding:
 i0 = f0 + f1 + f2 + f3 = I0 * 4;
 i1 = f0 + f1 - f2 - f3 = I1 * 4;
 i2 = f0 - f1 + f2 - f3 = I2 * 4;
 i3 = f0 - f1 - f2 + f3 = I3 * 4;
As all the numbers are 4 multiples, simply >>2 always produces prefect
results in term of forward-inverse transform round trip error.

Change-Id: Id6658b00ea819ee61cfeef8c5985d4cd3e77f44e
vp8/common/idctllm.c