ref: 828119d6ab81f6d3373b0ceebb55ee4495b4973f
parent: 730a34416f4023647403b7ada03401dbdeced1e6
author: Dmitry Kovalev <[email protected]>
date: Mon Jul 29 10:35:55 EDT 2013
Renaming txfm to tx for consistency in some places. Change-Id: I2a6a646570e2af66315e7c658d00d99f80c4b127
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -609,16 +609,16 @@
#define COEF_COUNT_SAT_AFTER_KEY 24
#define COEF_MAX_UPDATE_FACTOR_AFTER_KEY 128
-static void adapt_coef_probs(VP9_COMMON *cm, TX_SIZE txfm_size,
+static void adapt_coef_probs(VP9_COMMON *cm, TX_SIZE tx_size,
unsigned int count_sat,
unsigned int update_factor) {
FRAME_CONTEXT *pre_fc = &cm->frame_contexts[cm->frame_context_idx];
- vp9_coeff_probs_model *dst_coef_probs = cm->fc.coef_probs[txfm_size];
- vp9_coeff_probs_model *pre_coef_probs = pre_fc->coef_probs[txfm_size];
- vp9_coeff_count_model *coef_counts = cm->counts.coef[txfm_size];
+ vp9_coeff_probs_model *dst_coef_probs = cm->fc.coef_probs[tx_size];
+ vp9_coeff_probs_model *pre_coef_probs = pre_fc->coef_probs[tx_size];
+ vp9_coeff_count_model *coef_counts = cm->counts.coef[tx_size];
unsigned int (*eob_branch_count)[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS] =
- cm->counts.eob_branch[txfm_size];
+ cm->counts.eob_branch[tx_size];
int t, i, j, k, l;
unsigned int branch_ct[UNCONSTRAINED_NODES][2];
vp9_prob coef_probs[UNCONSTRAINED_NODES];
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -75,7 +75,7 @@
#define WRITE_COEF_CONTINUE(val, token) \
{ \
qcoeff_ptr[scan[c]] = vp9_read_and_apply_sign(r, val) * \
- dq[c > 0] / (1 + (txfm_size == TX_32X32)); \
+ dq[c > 0] / (1 + (tx_size == TX_32X32)); \
INCREMENT_COUNT(token); \
c++; \
continue; \
@@ -90,7 +90,7 @@
static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
vp9_reader *r, int block_idx,
PLANE_TYPE type, int seg_eob, int16_t *qcoeff_ptr,
- TX_SIZE txfm_size, const int16_t *dq,
+ TX_SIZE tx_size, const int16_t *dq,
ENTROPY_CONTEXT *A, ENTROPY_CONTEXT *L) {
FRAME_CONTEXT *const fc = &cm->fc;
FRAME_COUNTS *const counts = &cm->counts;
@@ -98,16 +98,16 @@
const int ref = xd->mode_info_context->mbmi.ref_frame[0] != INTRA_FRAME;
int band, pt, c = 0;
vp9_prob (*coef_probs)[PREV_COEF_CONTEXTS][UNCONSTRAINED_NODES] =
- fc->coef_probs[txfm_size][type][ref];
+ fc->coef_probs[tx_size][type][ref];
vp9_prob coef_probs_full[COEF_BANDS][PREV_COEF_CONTEXTS][ENTROPY_NODES];
uint8_t load_map[COEF_BANDS][PREV_COEF_CONTEXTS] = { { 0 } };
vp9_prob *prob;
- vp9_coeff_count_model *coef_counts = counts->coef[txfm_size];
+ vp9_coeff_count_model *coef_counts = counts->coef[tx_size];
const int16_t *scan, *nb;
uint8_t token_cache[1024];
const uint8_t * band_translate;
- switch (txfm_size) {
+ switch (tx_size) {
default:
case TX_4X4: {
scan = get_scan_4x4(get_tx_type_4x4(type, xd, block_idx));
@@ -150,7 +150,7 @@
pt = get_coef_context(nb, token_cache, c);
band = get_coef_band(band_translate, c);
prob = coef_probs[band][pt];
- counts->eob_branch[txfm_size][type][ref][band][pt]++;
+ counts->eob_branch[tx_size][type][ref][band][pt]++;
if (!vp9_read(r, prob[EOB_CONTEXT_NODE]))
break;
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -200,8 +200,8 @@
(unsigned int *)cpi->y_mode_count[j]);
}
-static void write_selected_txfm_size(const VP9_COMP *cpi, TX_SIZE tx_size,
- BLOCK_SIZE_TYPE bsize, vp9_writer *w) {
+static void write_selected_tx_size(const VP9_COMP *cpi, TX_SIZE tx_size,
+ BLOCK_SIZE_TYPE bsize, vp9_writer *w) {
const MACROBLOCKD *const xd = &cpi->mb.e_mbd;
const vp9_prob *tx_probs = get_tx_probs2(xd, &cpi->common.fc.tx_probs);
vp9_write(w, tx_size != TX_4X4, tx_probs[0]);
@@ -434,7 +434,7 @@
if (bsize >= BLOCK_SIZE_SB8X8 && pc->tx_mode == TX_MODE_SELECT &&
!(rf != INTRA_FRAME &&
(skip_coeff || vp9_segfeature_active(seg, segment_id, SEG_LVL_SKIP)))) {
- write_selected_txfm_size(cpi, mi->txfm_size, bsize, bc);
+ write_selected_tx_size(cpi, mi->txfm_size, bsize, bc);
}
if (rf == INTRA_FRAME) {
@@ -541,7 +541,7 @@
write_skip_coeff(cpi, segment_id, m, bc);
if (m->mbmi.sb_type >= BLOCK_SIZE_SB8X8 && c->tx_mode == TX_MODE_SELECT)
- write_selected_txfm_size(cpi, m->mbmi.txfm_size, m->mbmi.sb_type, bc);
+ write_selected_tx_size(cpi, m->mbmi.txfm_size, m->mbmi.sb_type, bc);
if (m->mbmi.sb_type >= BLOCK_SIZE_SB8X8) {
const MB_PREDICTION_MODE A = above_block_mode(m, 0, mis);
@@ -724,12 +724,12 @@
fclose(f);
}
-static void build_tree_distribution(VP9_COMP *cpi, TX_SIZE txfm_size) {
- vp9_coeff_probs_model *coef_probs = cpi->frame_coef_probs[txfm_size];
- vp9_coeff_count *coef_counts = cpi->coef_counts[txfm_size];
+static void build_tree_distribution(VP9_COMP *cpi, TX_SIZE tx_size) {
+ vp9_coeff_probs_model *coef_probs = cpi->frame_coef_probs[tx_size];
+ vp9_coeff_count *coef_counts = cpi->coef_counts[tx_size];
unsigned int (*eob_branch_ct)[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS] =
- cpi->common.counts.eob_branch[txfm_size];
- vp9_coeff_stats *coef_branch_ct = cpi->frame_branch_ct[txfm_size];
+ cpi->common.counts.eob_branch[tx_size];
+ vp9_coeff_stats *coef_branch_ct = cpi->frame_branch_ct[tx_size];
vp9_prob full_probs[ENTROPY_NODES];
int i, j, k, l;
@@ -754,9 +754,9 @@
if (!cpi->dummy_packing) {
int t;
for (t = 0; t < MAX_ENTROPY_TOKENS; ++t)
- context_counters[txfm_size][i][j][k][l][t] +=
+ context_counters[tx_size][i][j][k][l][t] +=
coef_counts[i][j][k][l][t];
- context_counters[txfm_size][i][j][k][l][MAX_ENTROPY_TOKENS] +=
+ context_counters[tx_size][i][j][k][l][MAX_ENTROPY_TOKENS] +=
eob_branch_ct[i][j][k][l];
}
#endif
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -257,8 +257,7 @@
const int mb_skip_context = vp9_get_pred_context_mbskip(xd);
const int skip_inc = !vp9_segfeature_active(&xd->seg, mbmi->segment_id,
SEG_LVL_SKIP);
- const TX_SIZE txfm_size = mbmi->txfm_size;
- struct tokenize_b_args arg = { cpi, xd, t, txfm_size, dry_run };
+ struct tokenize_b_args arg = { cpi, xd, t, mbmi->txfm_size, dry_run };
mbmi->mb_skip_coeff = vp9_sb_is_skippable(xd, bsize);
if (mbmi->mb_skip_coeff) {