]> granicus.if.org Git - libvpx/commitdiff
adjust RDMULT for UV plane in quantization RDO
authorYaowu Xu <yaowu@google.com>
Mon, 6 Dec 2010 21:33:01 +0000 (13:33 -0800)
committerYaowu Xu <yaowu@google.com>
Tue, 7 Dec 2010 04:53:59 +0000 (20:53 -0800)
This patch adds a weighting factor on RDMULT for UV blocks. The change
has an overall gain about 0.5% based on ssim, between 0.1 and 0.2% by
psnr numbers.

Change-Id: I97781b077ce3bb7e34241b03268491917e8d1d72

vp8/encoder/encodemb.c

index e9753ac4837c3c95dd30b43250941ed5065b4999..5ee755942098cb357b2a072db52e09b31b447076 100644 (file)
@@ -243,9 +243,9 @@ struct vp8_token_state{
 };
 
 // TODO: experiments to find optimal multiple numbers
-#define Y1_RD_MULT 1
-#define UV_RD_MULT 1
-#define Y2_RD_MULT 4
+#define Y1_RD_MULT 4
+#define UV_RD_MULT 2
+#define Y2_RD_MULT 16
 
 static const int plane_rd_mult[4]=
 {
@@ -309,7 +309,7 @@ void vp8_optimize_b(MACROBLOCK *mb, int ib, int type,
     eob = d->eob;
 
     /* Now set up a Viterbi trellis to evaluate alternative roundings. */
-    rdmult = (mb->rdmult << 2)*err_mult;
+    rdmult = mb->rdmult * err_mult;
     if(mb->e_mbd.mode_info_context->mbmi.ref_frame==INTRA_FRAME)
         rdmult = (rdmult * 9)>>4;