Commit db4c9ba3 authored by Jingning Han's avatar Jingning Han

Turn off trellis optimization in the lossless mode

The trellis optimization would incur information loss. It needs to
be disabled in the lossless mode.

Change-Id: I3e73f2f466631b61729cadc38a2ed74656f73529
parent 4629661c
......@@ -654,7 +654,7 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
}
#endif
#if !CONFIG_PVQ
if (p->eobs[block]) {
if (p->eobs[block] && !xd->lossless[xd->mi[0]->mbmi.segment_id]) {
*a = *l = av1_optimize_b(cm, x, plane, block, tx_size, ctx) > 0;
} else {
*a = *l = p->eobs[block] > 0;
......
......@@ -1230,7 +1230,7 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
coeff_ctx, AV1_XFORM_QUANT_FP);
#endif // CONFIG_NEW_QUANT
#if !CONFIG_PVQ
if (x->plane[plane].eobs[block])
if (x->plane[plane].eobs[block] && !xd->lossless[mbmi->segment_id])
av1_optimize_b(cm, x, plane, block, tx_size, coeff_ctx);
#endif
dist_block(args->cpi, x, plane, block, blk_row, blk_col, tx_size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment