#define BLOCK_SIZE_GROUPS 4
#define SKIP_CONTEXTS 3
#define INTER_MODE_CONTEXTS 7
-#define TXFM_PARTITION_CONTEXTS 9
+#define TXFM_PARTITION_CONTEXTS 12
/* Segment Feature Masks */
#define MAX_MV_REF_CANDIDATES 2
}
static const vp9_prob default_txfm_partition_probs[TXFM_PARTITION_CONTEXTS] = {
- // 64, 128, 192, 64, 128, 192, 64, 128, 192,
- 192, 128, 64, 192, 128, 64, 192, 128, 64,
+ 141, 139, 175, 87, 196, 165, 177, 75, 220, 179, 205, 197
};
static const vp9_prob default_skip_probs[SKIP_CONTEXTS] = {
}
}
+static int max_tx_size_offset[TX_SIZES] = {0, 0, 2, 6};
+
static int txfm_partition_context(const TXFM_CONTEXT *above_ctx,
const TXFM_CONTEXT *left_ctx,
+ TX_SIZE max_tx_size,
TX_SIZE tx_size) {
int above = *above_ctx < tx_size;
int left = *left_ctx < tx_size;
- return (tx_size - 1) * 3 + above + left;
+ return max_tx_size_offset[max_tx_size] +
+ 2 * (max_tx_size - tx_size) + (above || left);
}
#ifdef __cplusplus
int i, j;
int ctx = txfm_partition_context(xd->above_txfm_context + (blk_col / 2),
xd->left_txfm_context + (blk_row / 2),
+ mbmi->max_tx_size,
tx_size);
if (xd->mb_to_bottom_edge < 0)
max_blocks_high += xd->mb_to_bottom_edge >> 5;
int max_blocks_wide = num_4x4_blocks_wide_lookup[mbmi->sb_type];
int ctx = txfm_partition_context(xd->above_txfm_context + (blk_col / 2),
xd->left_txfm_context + (blk_row / 2),
+ mbmi->max_tx_size,
tx_size);
if (xd->mb_to_bottom_edge < 0)
max_blocks_high += xd->mb_to_bottom_edge >> 5;
int max_blocks_wide = num_4x4_blocks_wide_lookup[mbmi->sb_type];
int ctx = txfm_partition_context(xd->above_txfm_context + (blk_col / 2),
xd->left_txfm_context + (blk_row / 2),
+ mbmi->max_tx_size,
tx_size);
TX_SIZE plane_tx_size = mbmi->inter_tx_size[tx_idx];
TXFM_CONTEXT stxa[8], stxl[8];
int ctx = txfm_partition_context(txa + (blk_col / 2),
txl + (blk_row / 2),
+ mbmi->max_tx_size,
tx_size);
int zero_blk_rate;