From: Jingning Han Date: Mon, 15 Jun 2015 17:04:27 +0000 (-0700) Subject: Update transform block partition information for intra blocks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cbea06386ef5f42e6757d8f02611130c67188a5;p=libvpx Update transform block partition information for intra blocks If a block is coded in the intra modes, update the transform block partition information as maximum block size. Change-Id: I5ea440c700fc887ff2fe84fabde77a9d896d16f4 --- diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c index e04e0c0ae..3a15dd0f1 100644 --- a/vp9/decoder/vp9_decodemv.c +++ b/vp9/decoder/vp9_decodemv.c @@ -671,6 +671,17 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi, xd->left_txfm_context + (idy / 2), max_tx_size); } + } else { + TX_SIZE max_tx_size = max_txsize_lookup[bsize]; + BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size]; + int bh = num_4x4_blocks_wide_lookup[txb_size]; + int width = num_4x4_blocks_wide_lookup[bsize]; + int height = num_4x4_blocks_high_lookup[bsize]; + int idx, idy; + for (idy = 0; idy < height; idy += bh) + for (idx = 0; idx < width; idx += bh) + txfm_partition_update(xd->above_txfm_context + (idx / 2), + xd->left_txfm_context + (idy / 2), mbmi->tx_size); } if (inter_block) diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 91154e4c2..04e94c35e 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -354,6 +354,17 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi, xd->left_txfm_context + (idy / 2), max_tx_size); } + } else { + TX_SIZE max_tx_size = max_txsize_lookup[bsize]; + BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size]; + int bh = num_4x4_blocks_wide_lookup[txb_size]; + int width = num_4x4_blocks_wide_lookup[bsize]; + int height = num_4x4_blocks_high_lookup[bsize]; + int idx, idy; + for (idy = 0; idy < height; idy += bh) + for (idx = 0; idx < width; idx += bh) + txfm_partition_update(xd->above_txfm_context + (idx / 2), + xd->left_txfm_context + (idy / 2), mbmi->tx_size); } if (!is_inter) { diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 94720427e..7f002d987 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -4224,6 +4224,17 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td, update_txfm_count(xd, td->counts, max_txsize_lookup[mbmi->sb_type], idy, idx, !output_enabled); } + } else { + TX_SIZE max_tx_size = max_txsize_lookup[bsize]; + BLOCK_SIZE txb_size = txsize_to_bsize[max_tx_size]; + int bh = num_4x4_blocks_wide_lookup[txb_size]; + int width = num_4x4_blocks_wide_lookup[bsize]; + int height = num_4x4_blocks_high_lookup[bsize]; + int idx, idy; + for (idy = 0; idy < height; idy += bh) + for (idx = 0; idx < width; idx += bh) + txfm_partition_update(xd->above_txfm_context + (idx / 2), + xd->left_txfm_context + (idy / 2), mbmi->tx_size); } if (mbmi->sb_type < BLOCK_8X8)