From: Jingning Han Date: Thu, 22 Oct 2015 00:38:00 +0000 (-0700) Subject: Fix compiler error with high bit-depth and var-tx X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20484048a996121d96b368cfaf5d1dc8a898fe01;p=libvpx Fix compiler error with high bit-depth and var-tx Clear the compiler errors when both high bit-depth and recursive transform block partition experiments are enabled. Change-Id: If0b6396851f10c28b4f26350322ccd1ba2fc9aff --- diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 672c73e64..dfec9b4e8 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -943,9 +943,19 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, if (xd->lossless) { TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block, TX_4X4); const scan_order *so = get_scan(TX_4X4, tx_type, 0); +#if CONFIG_VAR_TX + const int coeff_ctx = combine_entropy_contexts(*(tempa + idx), + *(templ + idy)); +#endif vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT, 1); vp10_regular_quantize_b_4x4(x, 0, block, so->scan, so->iscan); - ratey += cost_coeffs(x, 0, block, tempa + idx, templ + idy, TX_4X4, + ratey += cost_coeffs(x, 0, block, +#if CONFIG_VAR_TX + coeff_ctx, +#else + tempa + idx, templ + idy, +#endif + TX_4X4, so->scan, so->neighbors, cpi->sf.use_fast_coef_costing); if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) @@ -957,9 +967,19 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, int64_t unused; TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block, TX_4X4); const scan_order *so = get_scan(TX_4X4, tx_type, 0); +#if CONFIG_VAR_TX + const int coeff_ctx = combine_entropy_contexts(*(tempa + idx), + *(templ + idy)); +#endif vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, tx_type, 0); vp10_regular_quantize_b_4x4(x, 0, block, so->scan, so->iscan); - ratey += cost_coeffs(x, 0, block, tempa + idx, templ + idy, TX_4X4, + ratey += cost_coeffs(x, 0, block, +#if CONFIG_VAR_TX + coeff_ctx, +#else + tempa + idx, templ + idy, +#endif + TX_4X4, so->scan, so->neighbors, cpi->sf.use_fast_coef_costing); distortion += vp10_highbd_block_error(