Lines Matching refs:opts
230 uint32_t pos_mem = coder->opts[cur].pos_prev;
231 uint32_t back_mem = coder->opts[cur].back_prev;
234 if (coder->opts[cur].prev_1_is_literal) {
235 make_literal(&coder->opts[pos_mem]);
236 coder->opts[pos_mem].pos_prev = pos_mem - 1;
238 if (coder->opts[cur].prev_2) {
239 coder->opts[pos_mem - 1].prev_1_is_literal
241 coder->opts[pos_mem - 1].pos_prev
242 = coder->opts[cur].pos_prev_2;
243 coder->opts[pos_mem - 1].back_prev
244 = coder->opts[cur].back_prev_2;
251 back_mem = coder->opts[pos_prev].back_prev;
252 pos_mem = coder->opts[pos_prev].pos_prev;
254 coder->opts[pos_prev].back_prev = back_cur;
255 coder->opts[pos_prev].pos_prev = cur;
260 coder->opts_current_index = coder->opts[0].pos_prev;
261 *len_res = coder->opts[0].pos_prev;
262 *back_res = coder->opts[0].back_prev;
346 coder->opts[0].state = coder->state;
350 coder->opts[1].price = rc_bit_0_price(
356 make_literal(&coder->opts[1]);
368 if (short_rep_price < coder->opts[1].price) {
369 coder->opts[1].price = short_rep_price;
370 make_short_rep(&coder->opts[1]);
377 *back_res = coder->opts[1].back_prev;
382 coder->opts[1].pos_prev = 0;
385 coder->opts[0].backs[i] = coder->reps[i];
389 coder->opts[len].price = RC_INFINITY_PRICE;
407 if (cur_and_len_price < coder->opts[rep_len].price) {
408 coder->opts[rep_len].price = cur_and_len_price;
409 coder->opts[rep_len].pos_prev = 0;
410 coder->opts[rep_len].back_prev = i;
411 coder->opts[rep_len].prev_1_is_literal = false;
432 if (cur_and_len_price < coder->opts[len].price) {
433 coder->opts[len].price = cur_and_len_price;
434 coder->opts[len].pos_prev = 0;
435 coder->opts[len].back_prev
437 coder->opts[len].prev_1_is_literal = false;
457 uint32_t pos_prev = coder->opts[cur].pos_prev;
460 if (coder->opts[cur].prev_1_is_literal) {
463 if (coder->opts[cur].prev_2) {
464 state = coder->opts[coder->opts[cur].pos_prev_2].state;
466 if (coder->opts[cur].back_prev_2 < REP_DISTANCES)
472 state = coder->opts[pos_prev].state;
478 state = coder->opts[pos_prev].state;
482 if (is_short_rep(coder->opts[cur]))
488 if (coder->opts[cur].prev_1_is_literal
489 && coder->opts[cur].prev_2) {
490 pos_prev = coder->opts[cur].pos_prev_2;
491 pos = coder->opts[cur].back_prev_2;
494 pos = coder->opts[cur].back_prev;
502 reps[0] = coder->opts[pos_prev].backs[pos];
506 reps[i] = coder->opts[pos_prev].backs[i - 1];
509 reps[i] = coder->opts[pos_prev].backs[i];
515 reps[i] = coder->opts[pos_prev].backs[i - 1];
519 coder->opts[cur].state = state;
522 coder->opts[cur].backs[i] = reps[i];
524 const uint32_t cur_price = coder->opts[cur].price;
538 if (cur_and_1_price < coder->opts[cur + 1].price) {
539 coder->opts[cur + 1].price = cur_and_1_price;
540 coder->opts[cur + 1].pos_prev = cur;
541 make_literal(&coder->opts[cur + 1]);
551 && !(coder->opts[cur + 1].pos_prev < cur
552 && coder->opts[cur + 1].back_prev == 0)) {
557 if (short_rep_price <= coder->opts[cur + 1].price) {
558 coder->opts[cur + 1].price = short_rep_price;
559 coder->opts[cur + 1].pos_prev = cur;
560 make_short_rep(&coder->opts[cur + 1]);
594 coder->opts[++len_end].price = RC_INFINITY_PRICE;
600 if (cur_and_len_price < coder->opts[offset].price) {
601 coder->opts[offset].price = cur_and_len_price;
602 coder->opts[offset].pos_prev = cur + 1;
603 coder->opts[offset].back_prev = 0;
604 coder->opts[offset].prev_1_is_literal = true;
605 coder->opts[offset].prev_2 = false;
625 coder->opts[++len_end].price = RC_INFINITY_PRICE;
636 if (cur_and_len_price < coder->opts[cur + len_test].price) {
637 coder->opts[cur + len_test].price = cur_and_len_price;
638 coder->opts[cur + len_test].pos_prev = cur;
639 coder->opts[cur + len_test].back_prev = rep_index;
640 coder->opts[cur + len_test].prev_1_is_literal = false;
685 coder->opts[++len_end].price = RC_INFINITY_PRICE;
691 if (cur_and_len_price < coder->opts[offset].price) {
692 coder->opts[offset].price = cur_and_len_price;
693 coder->opts[offset].pos_prev = cur + len_test + 1;
694 coder->opts[offset].back_prev = 0;
695 coder->opts[offset].prev_1_is_literal = true;
696 coder->opts[offset].prev_2 = true;
697 coder->opts[offset].pos_prev_2 = cur;
698 coder->opts[offset].back_prev_2 = rep_index;
722 coder->opts[++len_end].price = RC_INFINITY_PRICE;
734 if (cur_and_len_price < coder->opts[cur + len_test].price) {
735 coder->opts[cur + len_test].price = cur_and_len_price;
736 coder->opts[cur + len_test].pos_prev = cur;
737 coder->opts[cur + len_test].back_prev
739 coder->opts[cur + len_test].prev_1_is_literal = false;
784 coder->opts[++len_end].price = RC_INFINITY_PRICE;
790 if (cur_and_len_price < coder->opts[offset].price) {
791 coder->opts[offset].price = cur_and_len_price;
792 coder->opts[offset].pos_prev = cur + len_test + 1;
793 coder->opts[offset].back_prev = 0;
794 coder->opts[offset].prev_1_is_literal = true;
795 coder->opts[offset].prev_2 = true;
796 coder->opts[offset].pos_prev_2 = cur;
797 coder->opts[offset].back_prev_2
821 *len_res = coder->opts[coder->opts_current_index].pos_prev
823 *back_res = coder->opts[coder->opts_current_index].back_prev;
824 coder->opts_current_index = coder->opts[