From d9439fdc3685bcd40b21ffe85302a06481697f43 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 4 Jan 2016 15:20:50 -0500 Subject: [PATCH] vp10: skip coding of txsz for lossless-segment blocks. Change-Id: Ic23c10b6d2a9fed3abe69c6bf10e910832444f2c --- vp10/decoder/decodemv.c | 2 ++ vp10/encoder/bitstream.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vp10/decoder/decodemv.c b/vp10/decoder/decodemv.c index b516333e0..2bad07a51 100644 --- a/vp10/decoder/decodemv.c +++ b/vp10/decoder/decodemv.c @@ -100,6 +100,8 @@ static TX_SIZE read_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd, TX_MODE tx_mode = cm->tx_mode; BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; const TX_SIZE max_tx_size = max_txsize_lookup[bsize]; + if (xd->lossless[xd->mi[0]->mbmi.segment_id]) + return TX_4X4; if (allow_select && tx_mode == TX_MODE_SELECT && bsize >= BLOCK_8X8) return read_selected_tx_size(cm, xd, max_tx_size, r); else diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index 361ac9962..477752aa7 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -303,7 +303,7 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, vpx_write(w, is_inter, vp10_get_intra_inter_prob(cm, xd)); if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT && - !(is_inter && skip)) { + !(is_inter && skip) && !xd->lossless[segment_id]) { write_selected_tx_size(cm, xd, w); } @@ -391,7 +391,8 @@ static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd, write_skip(cm, xd, mbmi->segment_id, mi, w); - if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT) + if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT && + !xd->lossless[mbmi->segment_id]) write_selected_tx_size(cm, xd, w); if (bsize >= BLOCK_8X8) {