PARTITION_CONTEXT sl[8], sa[8];
int last_part_rate = INT_MAX;
int64_t last_part_dist = INT_MAX;
- int split_rate = INT_MAX;
- int64_t split_dist = INT_MAX;
int none_rate = INT_MAX;
int64_t none_dist = INT_MAX;
int chosen_rate = INT_MAX;
&& (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)) {
BLOCK_SIZE split_subsize = get_subsize(bsize, PARTITION_SPLIT);
- split_rate = 0;
- split_dist = 0;
+ chosen_rate = 0;
+ chosen_dist = 0;
restore_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);
// Split partition.
restore_context(cpi, mi_row, mi_col, a, l, sa, sl, bsize);
if (rt == INT_MAX || dt == INT_MAX) {
- split_rate = INT_MAX;
- split_dist = INT_MAX;
+ chosen_rate = INT_MAX;
+ chosen_dist = INT_MAX;
break;
}
+ chosen_rate += rt;
+ chosen_dist += dt;
+
if (i != 3)
encode_sb(cpi, tile, tp, mi_row + y_idx, mi_col + x_idx, 0,
split_subsize);
- split_rate += rt;
- split_dist += dt;
pl = partition_plane_context(cpi->above_seg_context,
cpi->left_seg_context,
mi_row + y_idx, mi_col + x_idx,
split_subsize);
- split_rate += x->partition_cost[pl][PARTITION_NONE];
+ chosen_rate += x->partition_cost[pl][PARTITION_NONE];
}
pl = partition_plane_context(cpi->above_seg_context, cpi->left_seg_context,
mi_row, mi_col, bsize);
- if (split_rate < INT_MAX) {
- split_rate += x->partition_cost[pl][PARTITION_SPLIT];
-
- chosen_rate = split_rate;
- chosen_dist = split_dist;
+ if (chosen_rate < INT_MAX) {
+ chosen_rate += x->partition_cost[pl][PARTITION_SPLIT];
}
}