diff options
author | Yaowu Xu <yaowu@google.com> | 2012-02-28 14:19:38 -0800 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2012-02-28 17:17:47 -0800 |
commit | af5c774b5c8a4cdf6d6792e63ce09d2702909de5 (patch) | |
tree | fa7252a725854524a11c8dad77f7533d131bff2e | |
parent | dc825f1e2b9885acec0d725d43cb471a31ec2e4f (diff) | |
download | libvpx-af5c774b5c8a4cdf6d6792e63ce09d2702909de5.tar libvpx-af5c774b5c8a4cdf6d6792e63ce09d2702909de5.tar.gz libvpx-af5c774b5c8a4cdf6d6792e63ce09d2702909de5.tar.bz2 libvpx-af5c774b5c8a4cdf6d6792e63ce09d2702909de5.zip |
Correct zbinboost lookup for 8x8 quantizer
The commit fixed a problem where 8x8 regular quantizer was using the
4x4 zbinboost lookup table that only has 16 entries at each Q. The
commit assigned a uniform zbin boost value for all cases that there
are more than 16 consective zeros. The change only affects MBs using
8x8 transform. The fix has a slightly positive impact on quality.
Test results:
http://www.corp.google.com/~yaowu/no_crawl/hd_fixzbinb.html
(avg psnr: .26% glb psnr: .21% ssim: .28%)
Results on cif size clip are also positive even though gain is smaller
http://www.corp.google.com/~yaowu/no_crawl/derf_fixzbinb.html
Change-Id: Ibe8f6da181d1fb377fbd0d3b5feb15be0cfa2017
-rw-r--r-- | vp8/encoder/quantize.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vp8/encoder/quantize.c b/vp8/encoder/quantize.c index b14f8c4cc..3d1c2ff35 100644 --- a/vp8/encoder/quantize.c +++ b/vp8/encoder/quantize.c @@ -609,8 +609,10 @@ void vp8_regular_quantize_b_8x8(BLOCK *b, BLOCKD *d) //zbin = (zbin_ptr[rc!=0] + *zbin_boost_ptr + zbin_oq_value)/q1st; zbin = (zbin_ptr[rc!=0] + *zbin_boost_ptr + zbin_oq_value); + //TODO: 8x8 zbin boost needs be done properly + if(zbin_boost_ptr < &b->zrun_zbin_boost[15]) + zbin_boost_ptr ++; - zbin_boost_ptr ++; sz = (z >> 31); // sign of z x = (z ^ sz) - sz; // x = abs(z) @@ -693,7 +695,6 @@ void vp8_strict_quantize_b_2x2(BLOCK *b, BLOCKD *d) eob = i; } } - d->eob = eob + 1; } |