Commit 84a6f201 authored by Ryan's avatar Ryan Committed by Ryan Lei

this change fix the bug reported in issue 819

inside the encode_super_block function, the tx_size decision logic is
different in the dry_run==0 and dry_run==1 case when segment is
lossless. this change fix the inconsistence.

BUG=aomedia:819

Change-Id: I2f4c5434d8c4ef722ac885a1ffd2d253863ae6d9
parent ea3dd3aa
......@@ -6328,15 +6328,21 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
#else
mbmi->sb_type >= BLOCK_8X8 &&
#endif
is_inter && !(mbmi->skip || seg_skip)) {
is_inter && !(mbmi->skip || seg_skip) &&
!xd->lossless[mbmi->segment_id]) {
if (dry_run) tx_partition_set_contexts(cm, xd, bsize, mi_row, mi_col);
} else {
TX_SIZE tx_size = mbmi->tx_size;
// The new intra coding scheme requires no change of transform size
if (is_inter)
tx_size = tx_size_from_tx_mode(bsize, cm->tx_mode, is_inter);
else
if (is_inter) {
if (xd->lossless[mbmi->segment_id]) {
tx_size = TX_4X4;
} else {
tx_size = tx_size_from_tx_mode(bsize, cm->tx_mode, is_inter);
}
} else {
tx_size = (bsize > BLOCK_4X4) ? tx_size : TX_4X4;
}
mbmi->tx_size = tx_size;
set_txfm_ctxs(tx_size, xd->n8_w, xd->n8_h, (mbmi->skip || seg_skip), xd);
}
......
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