diff options
Diffstat (limited to 'vp10/encoder/rdopt.c')
-rw-r--r-- | vp10/encoder/rdopt.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c index 20b7d50ec..e3bbdd346 100644 --- a/vp10/encoder/rdopt.c +++ b/vp10/encoder/rdopt.c @@ -798,8 +798,7 @@ 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); const scan_order *so = get_scan(TX_4X4, tx_type); - vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT, - vp10_highbd_fwht4x4); + 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, so->scan, so->neighbors, @@ -808,14 +807,12 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, goto next_highbd; vp10_highbd_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, dst_stride, p->eobs[block], - xd->bd, DCT_DCT, - vp10_highbd_iwht4x4_add); + xd->bd, DCT_DCT, 1); } else { int64_t unused; TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); const scan_order *so = get_scan(TX_4X4, tx_type); - vp10_highbd_fwd_txfm_4x4(src_diff, coeff, 8, tx_type, - vpx_highbd_fdct4x4); + 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, so->scan, so->neighbors, @@ -827,8 +824,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, goto next_highbd; vp10_highbd_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, dst_stride, p->eobs[block], - xd->bd, tx_type, - vp10_highbd_idct4x4_add); + xd->bd, tx_type, 0); } } } @@ -901,7 +897,7 @@ 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); const scan_order *so = get_scan(TX_4X4, tx_type); - vp10_fwd_txfm_4x4(src_diff, coeff, 8, DCT_DCT, vp10_fwht4x4); + vp10_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, so->scan, so->neighbors, @@ -909,13 +905,12 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next; vp10_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), - dst, dst_stride, p->eobs[block], DCT_DCT, - vp10_iwht4x4_add); + dst, dst_stride, p->eobs[block], DCT_DCT, 1); } else { int64_t unused; TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); const scan_order *so = get_scan(TX_4X4, tx_type); - vp10_fwd_txfm_4x4(src_diff, coeff, 8, tx_type, vpx_fdct4x4); + vp10_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, so->scan, so->neighbors, @@ -925,8 +920,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next; vp10_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), - dst, dst_stride, p->eobs[block], tx_type, - vp10_idct4x4_add); + dst, dst_stride, p->eobs[block], tx_type, 0); } } } @@ -1290,6 +1284,8 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi, const int width = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; const int height = 4 * num_4x4_blocks_high_lookup[plane_bsize]; int idx, idy; + void (*fwd_txm4x4)(const int16_t *input, tran_low_t *output, int stride); + const uint8_t *const src = &p->src.buf[vp10_raster_block_offset(BLOCK_8X8, i, p->src.stride)]; uint8_t *const dst = &pd->dst.buf[vp10_raster_block_offset(BLOCK_8X8, i, @@ -1303,6 +1299,16 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi, #if CONFIG_VP9_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { + fwd_txm4x4 = xd->lossless ? vp10_highbd_fwht4x4 : vpx_highbd_fdct4x4; + } else { + fwd_txm4x4 = xd->lossless ? vp10_fwht4x4 : vpx_fdct4x4; + } +#else + fwd_txm4x4 = xd->lossless ? vp10_fwht4x4 : vpx_fdct4x4; +#endif // CONFIG_VP9_HIGHBITDEPTH + +#if CONFIG_VP9_HIGHBITDEPTH + if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { vpx_highbd_subtract_block( height, width, vp10_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), 8, src, p->src.stride, dst, pd->dst.stride, xd->bd); @@ -1325,8 +1331,8 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi, k += (idy * 2 + idx); coeff = BLOCK_OFFSET(p->coeff, k); - x->fwd_txm4x4(vp10_raster_block_offset_int16(BLOCK_8X8, k, p->src_diff), - coeff, 8); + fwd_txm4x4(vp10_raster_block_offset_int16(BLOCK_8X8, k, p->src_diff), + coeff, 8); vp10_regular_quantize_b_4x4(x, 0, k, so->scan, so->iscan); #if CONFIG_VP9_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { |