On derflr, +0.1% for VP10; however, -0.03% on VP9.
Change-Id: I09c724232ede74254043d61d3cadc506256af0af
int mbmode_cost[INTRA_MODES];
unsigned int inter_mode_cost[INTER_MODE_CONTEXTS][INTER_MODES];
- int intra_uv_mode_cost[INTRA_MODES];
+ int intra_uv_mode_cost[INTRA_MODES][INTRA_MODES];
int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES];
int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
int partition_cost[PARTITION_CONTEXTS][PARTITION_TYPES];
vp10_intra_mode_tree);
vp10_cost_tokens(cpi->mbmode_cost, fc->y_mode_prob[1], vp10_intra_mode_tree);
- vp10_cost_tokens(cpi->intra_uv_mode_cost,
- fc->uv_mode_prob[TM_PRED], vp10_intra_mode_tree);
+ for (i = 0; i < INTRA_MODES; ++i)
+ vp10_cost_tokens(cpi->intra_uv_mode_cost[i],
+ fc->uv_mode_prob[i], vp10_intra_mode_tree);
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
vp10_cost_tokens(cpi->switchable_interp_costs[i],
if (!super_block_uvrd(cpi, x, &this_rate_tokenonly,
&this_distortion, &s, &this_sse, bsize, best_rd))
continue;
- this_rate = this_rate_tokenonly + cpi->intra_uv_mode_cost[mode];
+ this_rate = this_rate_tokenonly +
+ cpi->intra_uv_mode_cost[xd->mi[0]->mbmi.mode][mode];
this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
if (this_rd < best_rd) {
memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
super_block_uvrd(cpi, x, rate_tokenonly, distortion,
skippable, &unused, bsize, INT64_MAX);
- *rate = *rate_tokenonly + cpi->intra_uv_mode_cost[DC_PRED];
+ *rate = *rate_tokenonly +
+ cpi->intra_uv_mode_cost[x->e_mbd.mi[0]->mbmi.mode][DC_PRED];
return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
}
int mbmode_cost[INTRA_MODES];
unsigned int inter_mode_cost[INTER_MODE_CONTEXTS][INTER_MODES];
- int intra_uv_mode_cost[FRAME_TYPES][INTRA_MODES];
+ int intra_uv_mode_cost[FRAME_TYPES][INTRA_MODES][INTRA_MODES];
int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES];
int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
int partition_cost[PARTITION_CONTEXTS][PARTITION_TYPES];
vp9_intra_mode_tree);
vp9_cost_tokens(cpi->mbmode_cost, fc->y_mode_prob[1], vp9_intra_mode_tree);
- vp9_cost_tokens(cpi->intra_uv_mode_cost[KEY_FRAME],
- vp9_kf_uv_mode_prob[TM_PRED], vp9_intra_mode_tree);
- vp9_cost_tokens(cpi->intra_uv_mode_cost[INTER_FRAME],
- fc->uv_mode_prob[TM_PRED], vp9_intra_mode_tree);
+ for (i = 0; i < INTRA_MODES; ++i) {
+ vp9_cost_tokens(cpi->intra_uv_mode_cost[KEY_FRAME][i],
+ vp9_kf_uv_mode_prob[i], vp9_intra_mode_tree);
+ vp9_cost_tokens(cpi->intra_uv_mode_cost[INTER_FRAME][i],
+ fc->uv_mode_prob[i], vp9_intra_mode_tree);
+ }
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
vp9_cost_tokens(cpi->switchable_interp_costs[i],
&this_distortion, &s, &this_sse, bsize, best_rd))
continue;
this_rate = this_rate_tokenonly +
- cpi->intra_uv_mode_cost[cpi->common.frame_type][mode];
+ cpi->intra_uv_mode_cost[cpi->common.frame_type]
+ [xd->mi[0]->mbmi.mode][mode];
this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
if (this_rd < best_rd) {
memset(x->skip_txfm, SKIP_TXFM_NONE, sizeof(x->skip_txfm));
super_block_uvrd(cpi, x, rate_tokenonly, distortion,
skippable, &unused, bsize, INT64_MAX);
- *rate = *rate_tokenonly + cpi->intra_uv_mode_cost[cm->frame_type][DC_PRED];
+ *rate = *rate_tokenonly +
+ cpi->intra_uv_mode_cost[cm->frame_type]
+ [x->e_mbd.mi[0]->mbmi.mode][DC_PRED];
return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
}