*/
t0 = tokens[next][0].token;
t1 = tokens[next][1].token;
+ pt = get_coef_context(nb, token_cache, i + 1);
/* Update the cost of each path if we're past the EOB token. */
if (t0 != EOB_TOKEN) {
- tokens[next][0].rate += (*token_costs)[1][0][t0];
+ tokens[next][0].rate += (*token_costs)[1][pt][t0];
tokens[next][0].token = ZERO_TOKEN;
}
if (t1 != EOB_TOKEN) {
- tokens[next][1].rate += (*token_costs)[1][0][t1];
+ tokens[next][1].rate += (*token_costs)[1][pt][t1];
tokens[next][1].token = ZERO_TOKEN;
}
best_index[i][0] = best_index[i][1] = 0;