Use inter_block_yrd as rate-distortion optimization for lossless
coding. This fixes transform coefficient buffer swap use case and
resolves the unit test failure related to lossless coding.
Change-Id: I1512dab5ed5760c31f7de21a06e8d9ed1eb081fa
// Y cost and distortion
vp10_subtract_plane(x, bsize, 0);
#if CONFIG_VAR_TX
- if (cm->tx_mode == TX_MODE_SELECT) {
+ if (cm->tx_mode == TX_MODE_SELECT || xd->lossless[mbmi->segment_id]) {
inter_block_yrd(cpi, x, rate_y, &distortion_y, &skippable_y, psse,
bsize, ref_best_rd);
} else {