pl = partition_plane_context(cpi->above_seg_context, cpi->left_seg_context,
mi_row, mi_col, bsize);
- if (last_part_rate < INT_MAX)
+ if (last_part_rate < INT_MAX) {
last_part_rate += x->partition_cost[pl][partition];
+ last_part_rd = RDCOST(x->rdmult, x->rddiv, last_part_rate, last_part_dist);
+ }
if (cpi->sf.adjust_partitioning_from_last_frame
+ && cpi->sf.partition_search_type == SEARCH_PARTITION
&& partition != PARTITION_SPLIT && bsize > BLOCK_8X8
&& (mi_row + ms < cm->mi_rows || mi_row + (ms >> 1) == cm->mi_rows)
&& (mi_col + ms < cm->mi_cols || mi_col + (ms >> 1) == cm->mi_cols)) {