Commit fa1ac00a authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Making get_tx_counts() similar to get_tx_probs().

Change-Id: I5b17f40e515c4bcf9ebef5380270a214af4e0115
parent 19cf72ed
......@@ -127,14 +127,14 @@ static const vp9_prob *get_tx_probs2(const MACROBLOCKD *xd,
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)
else if (bsize >= BLOCK_16X16)
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];
return tx_counts->p32x32[context];
......@@ -72,7 +72,7 @@ static TX_SIZE read_selected_tx_size(VP9_COMMON *cm, MACROBLOCKD *xd,
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;
......@@ -2493,7 +2493,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
(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];
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