diff options
author | Yaowu Xu <yaowu@google.com> | 2010-11-10 21:16:17 -0800 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2010-11-11 11:33:35 -0800 |
commit | ef2f27f10e39bc21254effe1083773c9b761d487 (patch) | |
tree | 388c8e3bb64956a675e04f07a5521cb90d3db385 /vp8 | |
parent | 6adbe09058f05a42ff1360ab55e3916f45e39a0c (diff) | |
download | libvpx-ef2f27f10e39bc21254effe1083773c9b761d487.tar libvpx-ef2f27f10e39bc21254effe1083773c9b761d487.tar.gz libvpx-ef2f27f10e39bc21254effe1083773c9b761d487.tar.bz2 libvpx-ef2f27f10e39bc21254effe1083773c9b761d487.zip |
make rdmult adaptive for intra in quantizer RDO
This intends to correct the tendency that VP8 aggressively favors rate
on intra coded frames. Experiments tested different numbers in [0, 1]
and found 9/16 overall provided about 2-4% gains for all-intra coded
clips based on vpx-ssim metric. The impact on regular encoded clips
is much smaller but positive overall. Overall impact on psnr is also
positive even though very small.
Change-Id: If808553aaaa87fdd44691f9787820ac9856d9f8a
Diffstat (limited to 'vp8')
-rw-r--r-- | vp8/encoder/encodemb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vp8/encoder/encodemb.c b/vp8/encoder/encodemb.c index 043eac219..e9753ac48 100644 --- a/vp8/encoder/encodemb.c +++ b/vp8/encoder/encodemb.c @@ -309,8 +309,10 @@ void vp8_optimize_b(MACROBLOCK *mb, int ib, int type, eob = d->eob; /* Now set up a Viterbi trellis to evaluate alternative roundings. */ - /* TODO: These should vary with the block type, since the quantizer does. */ rdmult = (mb->rdmult << 2)*err_mult; + if(mb->e_mbd.mode_info_context->mbmi.ref_frame==INTRA_FRAME) + rdmult = (rdmult * 9)>>4; + rddiv = mb->rddiv; best_mask[0] = best_mask[1] = 0; /* Initialize the sentinel node of the trellis. */ |