]> granicus.if.org Git - libvpx/commitdiff
Fix intra dist model of skip_encode feature
authorJingning Han <jingning@google.com>
Wed, 9 Oct 2013 21:36:48 +0000 (14:36 -0700)
committerJingning Han <jingning@google.com>
Wed, 9 Oct 2013 23:05:50 +0000 (16:05 -0700)
The intra mode distortion adjustment for skip_encode feature was
broken in the refactoring cc91851. This commit fixes it and tunes
the distortion models used therein.

Change-Id: I0d676e82f8e855536a90cf9b3e3fdefafcd886c6

vp9/encoder/vp9_rdopt.c

index 89d367059f4c74b4cc851369319c1568f2b1683b..22280aa7ca7dc451b2b60ee640fab8671e609b19 100644 (file)
@@ -565,9 +565,9 @@ static void dist_block(int plane, int block, TX_SIZE tx_size, void *arg) {
       xd->this_mi->mbmi.ref_frame[0] == INTRA_FRAME) {
     // TODO(jingning): tune the model to better capture the distortion.
     int64_t p = (pd->dequant[1] * pd->dequant[1] *
-                    (1 << ss_txfrm_size)) >> shift;
-    args->dist[block] = p;
-    args->sse[block]  = p;
+                    (1 << ss_txfrm_size)) >> (shift + 2);
+    args->dist[block] += (p >> 4);
+    args->sse[block]  += p;
   }
 }