Assign largest transform block size to skip block
If a block has all coefficients quantized to zero, the codec will assume that it uses largest transform block size. Change-Id: I1a32527e50026e8e4759ad8de474189cd20e89c8
This commit is contained in:
parent
9ce132ac37
commit
63c0d8df9f
@ -657,6 +657,22 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi,
|
||||
txfm_partition_update(xd->above_txfm_context, xd->left_txfm_context,
|
||||
TX_4X4);
|
||||
|
||||
if (inter_block) {
|
||||
if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT && mbmi->skip) {
|
||||
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),
|
||||
max_tx_size);
|
||||
}
|
||||
}
|
||||
|
||||
if (inter_block)
|
||||
read_inter_block_mode_info(pbi, xd, counts, tile, mi, mi_row, mi_col, r);
|
||||
else
|
||||
|
@ -340,6 +340,22 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, const MODE_INFO *mi,
|
||||
txfm_partition_update(xd->above_txfm_context,
|
||||
xd->left_txfm_context, TX_4X4);
|
||||
|
||||
if (is_inter) {
|
||||
if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT && skip) {
|
||||
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),
|
||||
max_tx_size);
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_inter) {
|
||||
if (bsize >= BLOCK_8X8) {
|
||||
write_intra_mode(w, mode, cm->fc->y_mode_prob[size_group_lookup[bsize]]);
|
||||
|
@ -4202,10 +4202,8 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
|
||||
++td->counts->tx.tx_totals[get_uv_tx_size(mbmi, &xd->plane[1])];
|
||||
}
|
||||
|
||||
if (cm->tx_mode == TX_MODE_SELECT &&
|
||||
mbmi->sb_type >= BLOCK_8X8 &&
|
||||
!(is_inter_block(mbmi) && (mbmi->skip || seg_skip))) {
|
||||
if (is_inter_block(mbmi)) {
|
||||
if (is_inter_block(mbmi)) {
|
||||
if (cm->tx_mode == TX_MODE_SELECT && mbmi->sb_type >= BLOCK_8X8) {
|
||||
BLOCK_SIZE txb_size = txsize_to_bsize[max_txsize_lookup[bsize]];
|
||||
int bh = num_4x4_blocks_wide_lookup[txb_size];
|
||||
int width = num_4x4_blocks_wide_lookup[bsize];
|
||||
@ -4213,8 +4211,13 @@ static void encode_superblock(VP9_COMP *cpi, ThreadData *td,
|
||||
int idx, idy;
|
||||
for (idy = 0; idy < height; idy += bh)
|
||||
for (idx = 0; idx < width; idx += bh)
|
||||
update_txfm_count(xd, td->counts, max_txsize_lookup[mbmi->sb_type],
|
||||
idy, idx, !output_enabled);
|
||||
if (mbmi->skip || seg_skip)
|
||||
txfm_partition_update(xd->above_txfm_context + (idx / 2),
|
||||
xd->left_txfm_context + (idy / 2),
|
||||
max_txsize_lookup[bsize]);
|
||||
else
|
||||
update_txfm_count(xd, td->counts, max_txsize_lookup[mbmi->sb_type],
|
||||
idy, idx, !output_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user