band = vp8_coef_bands[i + 1];
pt = vp8_prev_token_class[t0];
rate0 +=
- mb->token_costs[type][band][pt][tokens[next][0].token];
+ mb->token_costs[TX_4X4][type][band][pt][tokens[next][0].token];
rate1 +=
- mb->token_costs[type][band][pt][tokens[next][1].token];
+ mb->token_costs[TX_4X4][type][band][pt][tokens[next][1].token];
}
rd_cost0 = RDCOST(rdmult, rddiv, rate0, error0);
rd_cost1 = RDCOST(rdmult, rddiv, rate1, error1);
band = vp8_coef_bands[i + 1];
if (t0 != DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t0];
- rate0 += mb->token_costs[type][band][pt][
- tokens[next][0].token];
+ rate0 += mb->token_costs[TX_4X4][type][band][pt]
+ [tokens[next][0].token];
}
if (t1 != DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t1];
- rate1 += mb->token_costs[type][band][pt][
- tokens[next][1].token];
+ rate1 += mb->token_costs[TX_4X4][type][band][pt]
+ [tokens[next][1].token];
}
}
t1 = tokens[next][1].token;
/* Update the cost of each path if we're past the EOB token. */
if (t0 != DCT_EOB_TOKEN) {
- tokens[next][0].rate += mb->token_costs[type][band][0][t0];
+ tokens[next][0].rate += mb->token_costs[TX_4X4][type][band][0][t0];
tokens[next][0].token = ZERO_TOKEN;
}
if (t1 != DCT_EOB_TOKEN) {
- tokens[next][1].rate += mb->token_costs[type][band][0][t1];
+ tokens[next][1].rate += mb->token_costs[TX_4X4][type][band][0][t1];
tokens[next][1].token = ZERO_TOKEN;
}
/* Don't update next, because we didn't add a new node. */
error1 = tokens[next][1].error;
t0 = tokens[next][0].token;
t1 = tokens[next][1].token;
- rate0 += mb->token_costs[type][band][pt][t0];
- rate1 += mb->token_costs[type][band][pt][t1];
+ rate0 += mb->token_costs[TX_4X4][type][band][pt][t0];
+ rate1 += mb->token_costs[TX_4X4][type][band][pt][t1];
rd_cost0 = RDCOST(rdmult, rddiv, rate0, error0);
rd_cost1 = RDCOST(rdmult, rddiv, rate1, error1);
if (rd_cost0 == rd_cost1) {
band = vp8_coef_bands_8x8[i + 1];
pt = vp8_prev_token_class[t0];
rate0 +=
- mb->token_costs_8x8[type][band][pt][tokens[next][0].token];
+ mb->token_costs[TX_8X8][type][band][pt][tokens[next][0].token];
rate1 +=
- mb->token_costs_8x8[type][band][pt][tokens[next][1].token];
+ mb->token_costs[TX_8X8][type][band][pt][tokens[next][1].token];
}
rd_cost0 = RDCOST_8x8(rdmult, rddiv, rate0, error0);
rd_cost1 = RDCOST_8x8(rdmult, rddiv, rate1, error1);
band = vp8_coef_bands_8x8[i + 1];
if (t0 != DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t0];
- rate0 += mb->token_costs_8x8[type][band][pt][
- tokens[next][0].token];
+ rate0 += mb->token_costs[TX_8X8][type][band][pt][
+ tokens[next][0].token];
}
if (t1 != DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t1];
- rate1 += mb->token_costs_8x8[type][band][pt][
- tokens[next][1].token];
+ rate1 += mb->token_costs[TX_8X8][type][band][pt][
+ tokens[next][1].token];
}
}
t1 = tokens[next][1].token;
/* Update the cost of each path if we're past the EOB token. */
if (t0 != DCT_EOB_TOKEN) {
- tokens[next][0].rate += mb->token_costs_8x8[type][band][0][t0];
+ tokens[next][0].rate += mb->token_costs[TX_8X8][type][band][0][t0];
tokens[next][0].token = ZERO_TOKEN;
}
if (t1 != DCT_EOB_TOKEN) {
- tokens[next][1].rate += mb->token_costs_8x8[type][band][0][t1];
+ tokens[next][1].rate += mb->token_costs[TX_8X8][type][band][0][t1];
tokens[next][1].token = ZERO_TOKEN;
}
/* Don't update next, because we didn't add a new node. */
error1 = tokens[next][1].error;
t0 = tokens[next][0].token;
t1 = tokens[next][1].token;
- rate0 += mb->token_costs_8x8[type][band][pt][t0];
- rate1 += mb->token_costs_8x8[type][band][pt][t1];
+ rate0 += mb->token_costs[TX_8X8][type][band][pt][t0];
+ rate1 += mb->token_costs[TX_8X8][type][band][pt][t1];
rd_cost0 = RDCOST_8x8(rdmult, rddiv, rate0, error0);
rd_cost1 = RDCOST_8x8(rdmult, rddiv, rate1, error1);
if (rd_cost0 == rd_cost1) {
if (next < 256) {
band = vp8_coef_bands_16x16[i + 1];
pt = vp8_prev_token_class[t0];
- rate0 += mb->token_costs_16x16[type][band][pt][tokens[next][0].token];
- rate1 += mb->token_costs_16x16[type][band][pt][tokens[next][1].token];
+ rate0 += mb->token_costs[TX_16X16][type][band][pt][tokens[next][0].token];
+ rate1 += mb->token_costs[TX_16X16][type][band][pt][tokens[next][1].token];
}
UPDATE_RD_COST();
/* And pick the best. */
band = vp8_coef_bands_16x16[i + 1];
if (t0 != DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t0];
- rate0 += mb->token_costs_16x16[type][band][pt]
+ rate0 += mb->token_costs[TX_16X16][type][band][pt]
[tokens[next][0].token];
}
if (t1!=DCT_EOB_TOKEN) {
pt = vp8_prev_token_class[t1];
- rate1 += mb->token_costs_16x16[type][band][pt]
+ rate1 += mb->token_costs[TX_16X16][type][band][pt]
[tokens[next][1].token];
}
}
t1 = tokens[next][1].token;
/* Update the cost of each path if we're past the EOB token. */
if (t0 != DCT_EOB_TOKEN) {
- tokens[next][0].rate += mb->token_costs_16x16[type][band][0][t0];
+ tokens[next][0].rate += mb->token_costs[TX_16X16][type][band][0][t0];
tokens[next][0].token = ZERO_TOKEN;
}
if (t1 != DCT_EOB_TOKEN) {
- tokens[next][1].rate += mb->token_costs_16x16[type][band][0][t1];
+ tokens[next][1].rate += mb->token_costs[TX_16X16][type][band][0][t1];
tokens[next][1].token = ZERO_TOKEN;
}
/* Don't update next, because we didn't add a new node. */
error1 = tokens[next][1].error;
t0 = tokens[next][0].token;
t1 = tokens[next][1].token;
- rate0 += mb->token_costs_16x16[type][band][pt][t0];
- rate1 += mb->token_costs_16x16[type][band][pt][t1];
+ rate0 += mb->token_costs[TX_16X16][type][band][pt][t0];
+ rate1 += mb->token_costs[TX_16X16][type][band][pt][t1];
UPDATE_RD_COST();
best = rd_cost1 < rd_cost0;
final_eob = -1;
}
fill_token_costs(
- cpi->mb.token_costs,
+ cpi->mb.token_costs[TX_4X4],
(const vp8_prob( *)[8][PREV_COEF_CONTEXTS][11]) cpi->common.fc.coef_probs,
BLOCK_TYPES);
fill_token_costs(
- cpi->mb.token_costs_8x8,
+ cpi->mb.token_costs[TX_8X8],
(const vp8_prob( *)[8][PREV_COEF_CONTEXTS][11]) cpi->common.fc.coef_probs_8x8,
BLOCK_TYPES_8X8);
#if CONFIG_TX16X16
fill_token_costs(
- cpi->mb.token_costs_16x16,
+ cpi->mb.token_costs[TX_16X16],
(const vp8_prob(*)[8][PREV_COEF_CONTEXTS][11]) cpi->common.fc.coef_probs_16x16,
BLOCK_TYPES_16X16);
#endif
for (; c < eob; c++) {
int v = qcoeff_ptr[vp8_default_zig_zag1d[c]];
int t = vp8_dct_value_tokens_ptr[v].Token;
- cost += mb->token_costs_8x8[type] [vp8_coef_bands[c]] [pt] [t];
+ cost += mb->token_costs[TX_8X8][type][vp8_coef_bands[c]][pt][t];
cost += vp8_dct_value_cost_ptr[v];
pt = vp8_prev_token_class[t];
}
if (c < 4)
- cost += mb->token_costs_8x8 [type][vp8_coef_bands[c]]
+ cost += mb->token_costs[TX_8X8][type][vp8_coef_bands[c]]
[pt] [DCT_EOB_TOKEN];
pt = (c != !type); // is eob first coefficient;
for (; c < eob; c++) {
int v = QC(c);
int t = vp8_dct_value_tokens_ptr[v].Token;
- cost += mb->token_costs [type] [vp8_coef_bands[c]] [pt] [t];
+ cost += mb->token_costs[TX_4X4][type][vp8_coef_bands[c]][pt][t];
cost += vp8_dct_value_cost_ptr[v];
pt = vp8_prev_token_class[t];
}
# undef QC
if (c < 16)
- cost += mb->token_costs [type] [vp8_coef_bands[c]] [pt] [DCT_EOB_TOKEN];
+ cost += mb->token_costs[TX_4X4][type][vp8_coef_bands[c]]
+ [pt][DCT_EOB_TOKEN];
pt = (c != !type); // is eob first coefficient;
*a = *l = pt;
for (; c < eob; c++) {
int v = qcoeff_ptr[vp8_default_zig_zag1d_8x8[c]];
int t = vp8_dct_value_tokens_ptr[v].Token;
- cost += mb->token_costs_8x8[type] [vp8_coef_bands_8x8[c]] [pt] [t];
+ cost += mb->token_costs[TX_8X8][type][vp8_coef_bands_8x8[c]][pt][t];
cost += vp8_dct_value_cost_ptr[v];
pt = vp8_prev_token_class[t];
}
if (c < 64)
- cost += mb->token_costs_8x8 [type][vp8_coef_bands_8x8[c]]
- [pt] [DCT_EOB_TOKEN];
+ cost += mb->token_costs[TX_8X8][type][vp8_coef_bands_8x8[c]]
+ [pt][DCT_EOB_TOKEN];
pt = (c != !type); // is eob first coefficient;
*a = *l = pt;
for (; c < eob; c++) {
int v = qcoeff_ptr[vp8_default_zig_zag1d_16x16[c]];
int t = vp8_dct_value_tokens_ptr[v].Token;
- cost += mb->token_costs_16x16[type][vp8_coef_bands_16x16[c]][pt][t];
+ cost += mb->token_costs[TX_16X16][type][vp8_coef_bands_16x16[c]][pt][t];
cost += vp8_dct_value_cost_ptr[v];
pt = vp8_prev_token_class[t];
}
if (c < 256)
- cost += mb->token_costs_16x16[type][vp8_coef_bands_16x16[c]]
+ cost += mb->token_costs[TX_16X16][type][vp8_coef_bands_16x16[c]]
[pt][DCT_EOB_TOKEN];
pt = (c != !type); // is eob first coefficient;