• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/openzfs/module/zstd/lib/

Lines Matching defs:opt

10061     optState_t opt;         /* optimal parser state */
11133 /* small ? don't even attempt compression (speed opt) */
11798 /* small ? don't even attempt compression (speed opt) */
14387 ms->opt.litLengthSum = 0; /* force reset of btopt stats */
14469 /* opt parser space */
14472 ms->opt.litFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (1<<Litbits) * sizeof(unsigned));
14473 ms->opt.litLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxLL+1) * sizeof(unsigned));
14474 ms->opt.matchLengthFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxML+1) * sizeof(unsigned));
14475 ms->opt.offCodeFreq = (unsigned*)ZSTD_cwksp_reserve_aligned(ws, (MaxOff+1) * sizeof(unsigned));
14476 ms->opt.matchTable = (ZSTD_match_t*)ZSTD_cwksp_reserve_aligned(ws, (ZSTD_OPT_NUM+1) * sizeof(ZSTD_match_t));
14477 ms->opt.priceTable = (ZSTD_optimal_t*)ZSTD_cwksp_reserve_aligned(ws, (ZSTD_OPT_NUM+1) * sizeof(ZSTD_optimal_t));
15339 ms->opt.symbolCosts = &zc->blockState.prevCBlock->entropy;
15341 ms->opt.literalCompressionMode = zc->appliedParams.literalCompressionMode;
20176 # define WEIGHT(stat) ((void)opt, ZSTD_bitWeight(stat))
20180 # define WEIGHT(stat,opt) ((void)opt, ZSTD_fracWeight(stat))
20181 #else /* opt==approx, ultra==accurate */
20184 # define WEIGHT(stat,opt) (opt ? ZSTD_fracWeight(stat) : ZSTD_bitWeight(stat))
20949 optState_t* const optStatePtr = &ms->opt;
20963 ZSTD_optimal_t* const opt = optStatePtr->priceTable;
20984 /* initialize opt[0] */
20985 { U32 i ; for (i=0; i<ZSTD_REP_NUM; i++) opt[0].rep[i] = rep[i]; }
20986 opt[0].mlen = 0; /* means is_a_literal */
20987 opt[0].litlen = litlen;
20993 opt[0].price = ZSTD_litLengthPrice(litlen, optStatePtr, optLevel);
21013 { U32 const literalsPrice = opt[0].price + ZSTD_litLengthPrice(0, optStatePtr, optLevel);
21017 opt[pos].price = ZSTD_MAX_PRICE; /* mlen, litlen and price will be fixed during forward scanning */
21027 opt[pos].mlen = pos;
21028 opt[pos].off = offset;
21029 opt[pos].litlen = litlen;
21030 opt[pos].price = sequencePrice;
21043 { U32 const litlen = (opt[cur-1].mlen == 0) ? opt[cur-1].litlen + 1 : 1;
21044 int const price = opt[cur-1].price
21049 if (price <= opt[cur].price) {
21051 inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen,
21052 opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]);
21053 opt[cur].mlen = 0;
21054 opt[cur].off = 0;
21055 opt[cur].litlen = litlen;
21056 opt[cur].price = price;
21059 inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price),
21060 opt[cur].rep[0], opt[cur].rep[1], opt[cur].rep[2]);
21069 ZSTD_STATIC_ASSERT(sizeof(opt[cur].rep) == sizeof(repcodes_t));
21070 assert(cur >= opt[cur].mlen);
21071 if (opt[cur].mlen != 0) {
21072 U32 const prev = cur - opt[cur].mlen;
21073 repcodes_t newReps = ZSTD_updateRep(opt[prev].rep, opt[cur].off, opt[cur].litlen==0);
21074 memcpy(opt[cur].rep, &newReps, sizeof(repcodes_t));
21076 memcpy(opt[cur].rep, opt[cur - 1].rep, sizeof(repcodes_t));
21085 && (opt[cur+1].price <= opt[cur].price + (BITCOST_MULTIPLIER/2)) ) {
21090 { U32 const ll0 = (opt[cur].mlen != 0);
21091 U32 const litlen = (opt[cur].mlen == 0) ? opt[cur].litlen : 0;
21092 U32 const previousPrice = opt[cur].price;
21094 U32 const nbMatches = ZSTD_BtGetAllMatches(matches, ms, &nextToUpdate3, inr, iend, dictMode, opt[cur].rep, ll0, minMatch);
21110 cur -= (opt[cur].mlen==0) ? opt[cur].litlen : 0; /* last sequence is actually only literals, fix cur to last match - note : may underflow, in which case, it's first sequence, and it's okay */
21130 if ((pos > last_pos) || (price < opt[pos].price)) {
21132 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price));
21133 while (last_pos < pos) { opt[last_pos+1].price = ZSTD_MAX_PRICE; last_pos++; } /* fill empty positions */
21134 opt[pos].mlen = mlen;
21135 opt[pos].off = offset;
21136 opt[pos].litlen = litlen;
21137 opt[pos].price = price;
21140 pos, mlen, ZSTD_fCost(price), ZSTD_fCost(opt[pos].price));
21146 lastSequence = opt[last_pos];
21151 assert(opt[0].mlen == 0);
21158 repcodes_t reps = ZSTD_updateRep(opt[cur].rep, lastSequence.off, lastSequence.litlen==0);
21161 memcpy(rep, opt[cur].rep, sizeof(repcodes_t));
21173 opt[storeEnd] = lastSequence;
21175 U32 const backDist = ZSTD_totalLen(opt[seqPos]);
21178 seqPos, storeStart, opt[seqPos].litlen, opt[seqPos].mlen, opt[seqPos].off);
21179 opt[storeStart] = opt[seqPos];
21187 U32 const llen = opt[storePos].litlen;
21188 U32 const mlen = opt[storePos].mlen;
21189 U32 const offCode = opt[storePos].off;
21262 assert(ms->opt.litLengthSum == 0); /* first block */
21267 ZSTD_compressBlock_opt_generic(ms, seqStore, tmpRep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict); /* generate stats into ms->opt*/
21277 ZSTD_upscaleStats(&ms->opt);
21304 if ( (ms->opt.litLengthSum==0) /* first block */