Lines Matching refs:opt
42 # define WEIGHT(stat) ((void)opt, ZSTD_bitWeight(stat))
46 # define WEIGHT(stat,opt) ((void)opt, ZSTD_fracWeight(stat)) argument
50 # define WEIGHT(stat,opt) (opt ? ZSTD_fracWeight(stat) : ZSTD_bitWeight(stat)) argument
950 optState_t* const optStatePtr = &ms->opt; in ZSTD_compressBlock_opt_generic()
964 ZSTD_optimal_t* const opt = optStatePtr->priceTable; in ZSTD_compressBlock_opt_generic() local
993 { U32 i ; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; } in ZSTD_compressBlock_opt_generic()
994 opt[0].mlen = 0; /* means is_a_literal */ in ZSTD_compressBlock_opt_generic()
995 opt[0].litlen = litlen; in ZSTD_compressBlock_opt_generic()
1001 opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1021 … { U32 const literalsPrice = opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel); in ZSTD_compressBlock_opt_generic()
1025 …opt[pos].price = ZSTD_MAX_PRICE; /* mlen, litlen and price will be fixed during forward scanning… in ZSTD_compressBlock_opt_generic()
1035 opt[pos].mlen = pos; in ZSTD_compressBlock_opt_generic()
1036 opt[pos].off = offset; in ZSTD_compressBlock_opt_generic()
1037 opt[pos].litlen = litlen; in ZSTD_compressBlock_opt_generic()
1038 opt[pos].price = sequencePrice; in ZSTD_compressBlock_opt_generic()
1051 { U32 const litlen = (opt[cur-1].mlen == 0) ? opt[cur-1].litlen + 1 : 1; in ZSTD_compressBlock_opt_generic()
1052 int const price = opt[cur-1].price in ZSTD_compressBlock_opt_generic()
1057 if (price <= opt[cur].price) { in ZSTD_compressBlock_opt_generic()
1059 … inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen, in ZSTD_compressBlock_opt_generic()
1060 opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]); in ZSTD_compressBlock_opt_generic()
1061 opt[cur].mlen = 0; in ZSTD_compressBlock_opt_generic()
1062 opt[cur].off = 0; in ZSTD_compressBlock_opt_generic()
1063 opt[cur].litlen = litlen; in ZSTD_compressBlock_opt_generic()
1064 opt[cur].price = price; in ZSTD_compressBlock_opt_generic()
1067 inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), in ZSTD_compressBlock_opt_generic()
1068 opt[cur].rep[0], opt[cur].rep[1], opt[cur].rep[2]); in ZSTD_compressBlock_opt_generic()
1077 ZSTD_STATIC_ASSERT(sizeof(opt[cur].rep) == sizeof(repcodes_t)); in ZSTD_compressBlock_opt_generic()
1078 assert(cur >= opt[cur].mlen); in ZSTD_compressBlock_opt_generic()
1079 if (opt[cur].mlen != 0) { in ZSTD_compressBlock_opt_generic()
1080 U32 const prev = cur - opt[cur].mlen; in ZSTD_compressBlock_opt_generic()
1081 … repcodes_t newReps = ZSTD_updateRep(opt[prev].rep, opt[cur].off, opt[cur].litlen==0); in ZSTD_compressBlock_opt_generic()
1082 ZSTD_memcpy(opt[cur].rep, &newReps, sizeof(repcodes_t)); in ZSTD_compressBlock_opt_generic()
1084 ZSTD_memcpy(opt[cur].rep, opt[cur - 1].rep, sizeof(repcodes_t)); in ZSTD_compressBlock_opt_generic()
1093 && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) { in ZSTD_compressBlock_opt_generic()
1098 { U32 const ll0 = (opt[cur].mlen != 0); in ZSTD_compressBlock_opt_generic()
1099 U32 const litlen = (opt[cur].mlen == 0) ? opt[cur].litlen : 0; in ZSTD_compressBlock_opt_generic()
1100 U32 const previousPrice = opt[cur].price; in ZSTD_compressBlock_opt_generic()
1102 …s = ZSTD_BtGetAllMatches(matches, ms, &nextToUpdate3, inr, iend, dictMode, opt[cur].rep, ll0, minM… in ZSTD_compressBlock_opt_generic()
1122 …cur -= (opt[cur].mlen==0) ? opt[cur].litlen : 0; /* last sequence is actually only literals, fix … in ZSTD_compressBlock_opt_generic()
1142 if ((pos > last_pos) || (price < opt[pos].price)) { in ZSTD_compressBlock_opt_generic()
1144 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1145 …while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty pos… in ZSTD_compressBlock_opt_generic()
1146 opt[pos].mlen = mlen; in ZSTD_compressBlock_opt_generic()
1147 opt[pos].off = offset; in ZSTD_compressBlock_opt_generic()
1148 opt[pos].litlen = litlen; in ZSTD_compressBlock_opt_generic()
1149 opt[pos].price = price; in ZSTD_compressBlock_opt_generic()
1152 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price)); in ZSTD_compressBlock_opt_generic()
1158 lastSequence = opt[last_pos]; in ZSTD_compressBlock_opt_generic()
1163 assert(opt[0].mlen == 0); in ZSTD_compressBlock_opt_generic()
1170 … repcodes_t reps = ZSTD_updateRep(opt[cur].rep, lastSequence.off, lastSequence.litlen==0); in ZSTD_compressBlock_opt_generic()
1173 ZSTD_memcpy(rep, opt[cur].rep, sizeof(repcodes_t)); in ZSTD_compressBlock_opt_generic()
1185 opt[storeEnd] = lastSequence; in ZSTD_compressBlock_opt_generic()
1187 U32 const backDist = ZSTD_totalLen(opt[seqPos]); in ZSTD_compressBlock_opt_generic()
1190 … seqPos, storeStart, opt[seqPos].litlen, opt[seqPos].mlen, opt[seqPos].off); in ZSTD_compressBlock_opt_generic()
1191 opt[storeStart] = opt[seqPos]; in ZSTD_compressBlock_opt_generic()
1199 U32 const llen = opt[storePos].litlen; in ZSTD_compressBlock_opt_generic()
1200 U32 const mlen = opt[storePos].mlen; in ZSTD_compressBlock_opt_generic()
1201 U32 const offCode = opt[storePos].off; in ZSTD_compressBlock_opt_generic()
1274 assert(ms->opt.litLengthSum == 0); /* first block */ in ZSTD_initStats_ultra()
1289 ZSTD_upscaleStats(&ms->opt); in ZSTD_initStats_ultra()
1316 if ( (ms->opt.litLengthSum==0) /* first block */ in ZSTD_compressBlock_btultra2()