Commit 03dc6799 authored by Yaowu Xu's avatar Yaowu Xu

Revert "Prevent access of array using -1 index"

This reverts commit 38cdce8e.

Reason for revert: <INSERT REASONING HERE>

It is reported that this introduced a segment fault, revert now to investigate. 

Change-Id: I229dcdc09462ae4eb9cf2a3da4ce59aa9eafe65e
parent 811bba79
......@@ -2135,7 +2135,7 @@ static PARTITION_TYPE read_partition(AV1_COMMON *cm, MACROBLOCKD *xd,
partition_plane_context(xd, mi_row, mi_col, has_rows, has_cols, bsize);
const aom_prob *const probs =
ctx < PARTITION_CONTEXTS ? cm->fc->partition_prob[ctx] : NULL;
FRAME_COUNTS *const counts = ctx >= 0 ? xd->counts : NULL;
FRAME_COUNTS *const counts = ctx < PARTITION_CONTEXTS ? xd->counts : NULL;
#else
const int ctx = partition_plane_context(xd, mi_row, mi_col, bsize);
const aom_prob *const probs = cm->fc->partition_prob[ctx];
......
......@@ -3304,7 +3304,7 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
#endif
bsize);
#endif // CONFIG_CB4X4
const int *partition_cost = pl >= 0 ? x->partition_cost[pl] : NULL;
const int *partition_cost = x->partition_cost[pl];
#if CONFIG_SUPERTX
int this_rate_nocoef, sum_rate_nocoef = 0, best_rate_nocoef = INT_MAX;
int abort_flag;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment