return get_tx_probs(bsize, context, tx_probs);
}
-static void update_tx_counts(BLOCK_SIZE bsize, uint8_t context,
- TX_SIZE tx_size, struct tx_counts *tx_counts) {
- if (bsize >= BLOCK_32X32)
- tx_counts->p32x32[context][tx_size]++;
- else if (bsize >= BLOCK_16X16)
- tx_counts->p16x16[context][tx_size]++;
+static unsigned int *get_tx_counts(BLOCK_SIZE bsize, uint8_t context,
+ struct tx_counts *tx_counts) {
+ if (bsize < BLOCK_16X16)
+ return tx_counts->p8x8[context];
+ else if (bsize < BLOCK_32X32)
+ return tx_counts->p16x16[context];
else
- tx_counts->p8x8[context][tx_size]++;
+ return tx_counts->p32x32[context];
}
#endif // VP9_COMMON_VP9_PRED_COMMON_H_
}
if (!cm->frame_parallel_decoding_mode)
- update_tx_counts(bsize, context, tx_size, &cm->counts.tx);
+ ++get_tx_counts(bsize, context, &cm->counts.tx)[tx_size];
return tx_size;
}
(mbmi->skip_coeff ||
vp9_segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)))) {
const uint8_t context = vp9_get_pred_context_tx_size(xd);
- update_tx_counts(bsize, context, mbmi->tx_size, &cm->counts.tx);
+ ++get_tx_counts(bsize, context, &cm->counts.tx)[mbmi->tx_size];
} else {
int x, y;
TX_SIZE sz = tx_mode_to_biggest_tx_size[cm->tx_mode];