Commit 8e5b39a1 authored by Rupert Swarbrick's avatar Rupert Swarbrick
Browse files

Use block_signals_txsize() in two more places

The change in encodeframe.c has no effect (it's the same test), but
the change in rdopt.c fixes a miscalculated rate for (say) 8x4 blocks
which must signal whether to use TX_8X4 or TX_4X4.

Change-Id: I1dd2556bb90e86e690dd1fabaad278813ba73ea6
parent 083ca72d
......@@ -4785,8 +4785,9 @@ static void encode_superblock(const AV1_COMP *const cpi, TileDataEnc *tile_data,
#endif
}
if (cm->tx_mode == TX_MODE_SELECT && mbmi->sb_type > BLOCK_4X4 && is_inter &&
!(mbmi->skip || seg_skip) && !xd->lossless[mbmi->segment_id]) {
if (cm->tx_mode == TX_MODE_SELECT && block_signals_txsize(mbmi->sb_type) &&
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;
......
......@@ -2381,7 +2381,7 @@ static int64_t txfm_yrd(const AV1_COMP *const cpi, MACROBLOCK *x,
int s0, s1;
const int is_inter = is_inter_block(mbmi);
const int tx_select =
cm->tx_mode == TX_MODE_SELECT && mbmi->sb_type >= BLOCK_8X8;
cm->tx_mode == TX_MODE_SELECT && block_signals_txsize(mbmi->sb_type);
const int r_tx_size = tx_size_cost(cm, x, bs, tx_size);
......
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