Lines Matching refs:s
125 U32 s; in FSE_buildCTable_wksp() local
126 for (s=0; s<maxSV1; ++s, sv += add) { in FSE_buildCTable_wksp()
128 int const n = normalizedCounter[s]; in FSE_buildCTable_wksp()
142 size_t s; in FSE_buildCTable_wksp() local
145 for (s = 0; s < (size_t)tableSize; s += unroll) { in FSE_buildCTable_wksp()
149 tableSymbol[uPosition] = spread[s + u]; in FSE_buildCTable_wksp()
172 …FSE_FUNCTION_TYPE s = tableSymbol[u]; /* note : static analyzer may not understand tableSymbol i… in FSE_buildCTable_wksp() local
173 …tableU16[cumul[s]++] = (U16) (tableSize+u); /* TableU16 : sorted by symbol order; gives next sta… in FSE_buildCTable_wksp()
178 unsigned s; in FSE_buildCTable_wksp() local
179 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_wksp()
180 switch (normalizedCounter[s]) in FSE_buildCTable_wksp()
184 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
189 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
191 symbolTT[s].deltaFindState = (int)(total - 1); in FSE_buildCTable_wksp()
195 assert(normalizedCounter[s] > 1); in FSE_buildCTable_wksp()
196 { U32 const maxBitsOut = tableLog - ZSTD_highbit32 ((U32)normalizedCounter[s]-1); in FSE_buildCTable_wksp()
197 U32 const minStatePlus = (U32)normalizedCounter[s] << maxBitsOut; in FSE_buildCTable_wksp()
198 symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; in FSE_buildCTable_wksp()
199 symbolTT[s].deltaFindState = (int)(total - (unsigned)normalizedCounter[s]); in FSE_buildCTable_wksp()
200 total += (unsigned)normalizedCounter[s]; in FSE_buildCTable_wksp()
383 U32 s; in FSE_normalizeM2() local
391 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
392 if (count[s] == 0) { in FSE_normalizeM2()
393 norm[s]=0; in FSE_normalizeM2()
396 if (count[s] <= lowThreshold) { in FSE_normalizeM2()
397 norm[s] = lowProbCount; in FSE_normalizeM2()
399 total -= count[s]; in FSE_normalizeM2()
402 if (count[s] <= lowOne) { in FSE_normalizeM2()
403 norm[s] = 1; in FSE_normalizeM2()
405 total -= count[s]; in FSE_normalizeM2()
409 norm[s]=NOT_YET_ASSIGNED; in FSE_normalizeM2()
419 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
420 if ((norm[s] == NOT_YET_ASSIGNED) && (count[s] <= lowOne)) { in FSE_normalizeM2()
421 norm[s] = 1; in FSE_normalizeM2()
423 total -= count[s]; in FSE_normalizeM2()
434 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeM2()
435 if (count[s] > maxC) { maxV=s; maxC=count[s]; } in FSE_normalizeM2()
442 for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1)) in FSE_normalizeM2()
443 if (norm[s] > 0) { ToDistribute--; norm[s]++; } in FSE_normalizeM2()
451 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
452 if (norm[s]==NOT_YET_ASSIGNED) { in FSE_normalizeM2()
453 U64 const end = tmpTotal + (count[s] * rStep); in FSE_normalizeM2()
459 norm[s] = (short)weight; in FSE_normalizeM2()
482 unsigned s; in FSE_normalizeCount() local
487 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeCount()
488 if (count[s] == total) return 0; /* rle special case */ in FSE_normalizeCount()
489 if (count[s] == 0) { normalizedCounter[s]=0; continue; } in FSE_normalizeCount()
490 if (count[s] <= lowThreshold) { in FSE_normalizeCount()
491 normalizedCounter[s] = lowProbCount; in FSE_normalizeCount()
494 short proba = (short)((count[s]*step) >> scale); in FSE_normalizeCount()
497 proba += (count[s]*step) - ((U64)proba<<scale) > restToBeat; in FSE_normalizeCount()
499 if (proba > largestP) { largestP=proba; largest=s; } in FSE_normalizeCount()
500 normalizedCounter[s] = proba; in FSE_normalizeCount()
513 U32 s; in FSE_normalizeCount()
515 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
516 RAWLOG(2, "%3i: %4i \n", s, normalizedCounter[s]); in FSE_normalizeCount()
517 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
518 nTotal += abs(normalizedCounter[s]); in FSE_normalizeCount()
568 #define FSE_FLUSHBITS(s) (fast ? BIT_flushBitsFast(s) : BIT_flushBits(s)) in FSE_compress_usingCTable_generic() argument