diff options
author | Ronald S. Bultje <rbultje@google.com> | 2012-10-15 13:36:00 -0700 |
---|---|---|
committer | Ronald S. Bultje <rbultje@google.com> | 2012-10-15 13:36:00 -0700 |
commit | 1d87f9c14286cf47388d95670cf8355af50e6e6f (patch) | |
tree | b075317e83ce14c101529eabc2247aa1750e6c47 /vp8/encoder | |
parent | e788146247d47e0e24ad92259f6f016ffcf7b55a (diff) | |
download | libvpx-1d87f9c14286cf47388d95670cf8355af50e6e6f.tar libvpx-1d87f9c14286cf47388d95670cf8355af50e6e6f.tar.gz libvpx-1d87f9c14286cf47388d95670cf8355af50e6e6f.tar.bz2 libvpx-1d87f9c14286cf47388d95670cf8355af50e6e6f.zip |
Properly use chroma block object for chroma coefficient costing.
Change-Id: Ieb38c7aae91dbaca4a8add204fa84e1cfc459933
Diffstat (limited to 'vp8/encoder')
-rw-r--r-- | vp8/encoder/rdopt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 6be2d3521..c13f112d1 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -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; |