From 62aa642d71bbbdc72dc01da4fb0416be550cd2e2 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Wed, 6 Jul 2016 10:05:51 -0700 Subject: Enable uniform quantization with trellis optimization in speed 0 This commit allows the inter prediction residual to use uniform quantization followed by trellis coefficient optimization in speed 0. It improves the coding performance by lowres 0.79% midres 1.07% hdres 1.44% Change-Id: I46ef8cfe042a4ccc7a0055515012cd6cbf5c9619 --- vp9/encoder/vp9_rdopt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vp9/encoder/vp9_rdopt.c') diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 18f51bfd1..b866dad7c 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -602,9 +602,9 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, return; if (!is_inter_block(mi)) { - struct encode_b_args arg = {x, NULL, &mi->skip}; + struct encode_b_args intra_arg = {x, NULL, &mi->skip}; vp9_encode_block_intra(plane, block, blk_row, blk_col, plane_bsize, tx_size, - &arg); + &intra_arg); if (args->cpi->sf.txfm_domain_distortion) { dist_block(args->cpi, x, plane, block, blk_row, blk_col, tx_size, &dist, &sse); @@ -635,6 +635,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, SKIP_TXFM_NONE) { // full forward transform and quantization vp9_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, tx_size); + if (args->cpi->sf.quant_coeff_opt) + vp9_optimize_b(x, plane, block, tx_size, coeff_ctx); dist_block(args->cpi, x, plane, block, blk_row, blk_col, tx_size, &dist, &sse); } else if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] == @@ -668,6 +670,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, } else { // full forward transform and quantization vp9_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, tx_size); + if (args->cpi->sf.quant_coeff_opt) + vp9_optimize_b(x, plane, block, tx_size, coeff_ctx); dist_block(args->cpi, x, plane, block, blk_row, blk_col, tx_size, &dist, &sse); } -- cgit v1.2.3