]> granicus.if.org Git - libvpx/commitdiff
Properly use chroma block object for chroma coefficient costing.
authorRonald S. Bultje <rbultje@google.com>
Mon, 15 Oct 2012 20:36:00 +0000 (13:36 -0700)
committerRonald S. Bultje <rbultje@google.com>
Mon, 15 Oct 2012 20:36:00 +0000 (13:36 -0700)
Change-Id: Ieb38c7aae91dbaca4a8add204fa84e1cfc459933

vp8/encoder/rdopt.c

index 6be2d35213813c509dc4da05d12ba49c58e1dac5..c13f112d12e92a754621f6242f648f412352cfbe 100644 (file)
@@ -647,11 +647,12 @@ static int cost_coeffs(MACROBLOCK *mb, BLOCKD *b, PLANE_TYPE type,
       {
         BLOCKD *bb;
         int ib = (b - xd->block);
-        if (ib >= 16) tx_type = DCT_DCT;
-        ib = (ib & 8) + ((ib & 4) >> 1);
-        bb = xd->block + ib;
-        if (mbmi->mode_rdopt == I8X8_PRED)
-          tx_type = bb->bmi.as_mode.tx_type;
+        if (ib < 16) {
+          ib = (ib & 8) + ((ib & 4) >> 1);
+          bb = xd->block + ib;
+          if (mbmi->mode_rdopt == I8X8_PRED)
+            tx_type = bb->bmi.as_mode.tx_type;
+        }
       }
 #endif
       break;