Properly use chroma block object for chroma coefficient costing.

Change-Id: Ieb38c7aae91dbaca4a8add204fa84e1cfc459933
This commit is contained in:
Ronald S. Bultje
2012-10-15 13:36:00 -07:00
parent e788146247
commit 1d87f9c142

View File

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