Lines Matching defs:opt
1345 LZ4HC_optimal_t* const opt = (LZ4HC_optimal_t*)ALLOC(sizeof(LZ4HC_optimal_t) * (LZ4_OPT_NUM + TRAILING_LITERALS));
1347 LZ4HC_optimal_t opt[LZ4_OPT_NUM + TRAILING_LITERALS]; /* ~64 KB, which is a bit large for stack... */
1363 if (opt == NULL) goto _return_label;
1396 opt[rPos].mlen = 1;
1397 opt[rPos].off = 0;
1398 opt[rPos].litlen = llen + rPos;
1399 opt[rPos].price = cost;
1401 rPos, cost, opt[rPos].litlen);
1410 opt[mlen].mlen = mlen;
1411 opt[mlen].off = offset;
1412 opt[mlen].litlen = llen;
1413 opt[mlen].price = cost;
1420 opt[last_match_pos+addLit].mlen = 1; /* literal */
1421 opt[last_match_pos+addLit].off = 0;
1422 opt[last_match_pos+addLit].litlen = addLit;
1423 opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit);
1425 last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit);
1435 cur, opt[cur].price, opt[cur+1].price, cur+1);
1438 if ( (opt[cur+1].price <= opt[cur].price)
1440 && (opt[cur+MINMATCH].price < opt[cur].price + 3/*min seq price*/) )
1444 if (opt[cur+1].price <= opt[cur].price) continue;
1465 { int const baseLitlen = opt[cur].litlen;
1468 int const price = opt[cur].price - LZ4HC_literalsPrice(baseLitlen) + LZ4HC_literalsPrice(baseLitlen+litlen);
1470 if (price < opt[pos].price) {
1471 opt[pos].mlen = 1; /* literal */
1472 opt[pos].off = 0;
1473 opt[pos].litlen = baseLitlen+litlen;
1474 opt[pos].price = price;
1476 pos, price, opt[pos].litlen);
1491 if (opt[cur].mlen == 1) {
1492 ll = opt[cur].litlen;
1493 price = ((cur > ll) ? opt[cur - ll].price : 0)
1497 price = opt[cur].price + LZ4HC_sequencePrice(0, ml);
1502 || price <= opt[pos].price - (int)favorDecSpeed) {
1509 opt[pos].mlen = ml;
1510 opt[pos].off = offset;
1511 opt[pos].litlen = ll;
1512 opt[pos].price = price;
1517 opt[last_match_pos+addLit].mlen = 1; /* literal */
1518 opt[last_match_pos+addLit].off = 0;
1519 opt[last_match_pos+addLit].litlen = addLit;
1520 opt[last_match_pos+addLit].price = opt[last_match_pos].price + LZ4HC_literalsPrice(addLit);
1521 DEBUGLOG(7, "rPos:%3i => price:%3i (litlen=%i)", last_match_pos+addLit, opt[last_match_pos+addLit].price, addLit);
1526 best_mlen = opt[last_match_pos].mlen;
1527 best_off = opt[last_match_pos].off;
1538 int const next_matchLength = opt[candidate_pos].mlen; /* can be 1, means literal */
1539 int const next_offset = opt[candidate_pos].off;
1541 opt[candidate_pos].mlen = selected_matchLength;
1542 opt[candidate_pos].off = selected_offset;
1553 int const ml = opt[rPos].mlen;
1554 int const offset = opt[rPos].off;
1628 FREEMEM(opt);