return RDCOST(mb->rdmult, mb->rddiv, cost, total_distortion);
}
+// This function is used only for intra_only frames
static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi, MACROBLOCK *x,
int *rate, int *rate_tokenonly,
int64_t *distortion, int *skippable,
int64_t this_distortion, this_rd;
TX_SIZE best_tx = TX_4X4;
int i;
- int *bmode_costs = cpi->mbmode_cost;
+ int *bmode_costs;
+ const MODE_INFO *above_mi = xd->mi[-xd->mi_stride].src_mi;
+ const MODE_INFO *left_mi = xd->left_available ? xd->mi[-1].src_mi : NULL;
+ const PREDICTION_MODE A = vp9_above_block_mode(mic, above_mi, 0);
+ const PREDICTION_MODE L = vp9_left_block_mode(mic, left_mi, 0);
+ bmode_costs = cpi->y_mode_costs[A][L];
if (cpi->sf.tx_size_search_method == USE_FULL_RD)
for (i = 0; i < TX_MODES; i++)
/* Y Search for intra prediction mode */
for (mode = DC_PRED; mode <= TM_PRED; mode++) {
int64_t local_tx_cache[TX_MODES];
- MODE_INFO *above_mi = xd->mi[-xd->mi_stride].src_mi;
- MODE_INFO *left_mi = xd->left_available ? xd->mi[-1].src_mi : NULL;
-
- if (cpi->common.frame_type == KEY_FRAME) {
- const PREDICTION_MODE A = vp9_above_block_mode(mic, above_mi, 0);
- const PREDICTION_MODE L = vp9_left_block_mode(mic, left_mi, 0);
-
- bmode_costs = cpi->y_mode_costs[A][L];
- }
mic->mbmi.mode = mode;
super_block_yrd(cpi, x, &this_rate_tokenonly, &this_distortion,