Lines Matching refs:s
123 U32 s; in FSE_buildCTable_wksp() local
124 for (s=0; s<maxSV1; ++s, sv += add) { in FSE_buildCTable_wksp()
126 int const n = normalizedCounter[s]; in FSE_buildCTable_wksp()
140 size_t s; in FSE_buildCTable_wksp() local
143 for (s = 0; s < (size_t)tableSize; s += unroll) { in FSE_buildCTable_wksp()
147 tableSymbol[uPosition] = spread[s + u]; in FSE_buildCTable_wksp()
170 …FSE_FUNCTION_TYPE s = tableSymbol[u]; /* note : static analyzer may not understand tableSymbol i… in FSE_buildCTable_wksp() local
171 …tableU16[cumul[s]++] = (U16) (tableSize+u); /* TableU16 : sorted by symbol order; gives next sta… in FSE_buildCTable_wksp()
176 unsigned s; in FSE_buildCTable_wksp() local
177 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_wksp()
178 switch (normalizedCounter[s]) in FSE_buildCTable_wksp()
182 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
187 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
189 symbolTT[s].deltaFindState = (int)(total - 1); in FSE_buildCTable_wksp()
193 assert(normalizedCounter[s] > 1); in FSE_buildCTable_wksp()
194 { U32 const maxBitsOut = tableLog - BIT_highbit32 ((U32)normalizedCounter[s]-1); in FSE_buildCTable_wksp()
195 U32 const minStatePlus = (U32)normalizedCounter[s] << maxBitsOut; in FSE_buildCTable_wksp()
196 symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; in FSE_buildCTable_wksp()
197 symbolTT[s].deltaFindState = (int)(total - (unsigned)normalizedCounter[s]); in FSE_buildCTable_wksp()
198 total += (unsigned)normalizedCounter[s]; in FSE_buildCTable_wksp()
390 U32 s; in FSE_normalizeM2() local
398 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
399 if (count[s] == 0) { in FSE_normalizeM2()
400 norm[s]=0; in FSE_normalizeM2()
403 if (count[s] <= lowThreshold) { in FSE_normalizeM2()
404 norm[s] = lowProbCount; in FSE_normalizeM2()
406 total -= count[s]; in FSE_normalizeM2()
409 if (count[s] <= lowOne) { in FSE_normalizeM2()
410 norm[s] = 1; in FSE_normalizeM2()
412 total -= count[s]; in FSE_normalizeM2()
416 norm[s]=NOT_YET_ASSIGNED; in FSE_normalizeM2()
426 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
427 if ((norm[s] == NOT_YET_ASSIGNED) && (count[s] <= lowOne)) { in FSE_normalizeM2()
428 norm[s] = 1; in FSE_normalizeM2()
430 total -= count[s]; in FSE_normalizeM2()
441 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeM2()
442 if (count[s] > maxC) { maxV=s; maxC=count[s]; } in FSE_normalizeM2()
449 for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1)) in FSE_normalizeM2()
450 if (norm[s] > 0) { ToDistribute--; norm[s]++; } in FSE_normalizeM2()
458 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
459 if (norm[s]==NOT_YET_ASSIGNED) { in FSE_normalizeM2()
460 U64 const end = tmpTotal + (count[s] * rStep); in FSE_normalizeM2()
466 norm[s] = (short)weight; in FSE_normalizeM2()
489 unsigned s; in FSE_normalizeCount() local
494 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeCount()
495 if (count[s] == total) return 0; /* rle special case */ in FSE_normalizeCount()
496 if (count[s] == 0) { normalizedCounter[s]=0; continue; } in FSE_normalizeCount()
497 if (count[s] <= lowThreshold) { in FSE_normalizeCount()
498 normalizedCounter[s] = lowProbCount; in FSE_normalizeCount()
501 short proba = (short)((count[s]*step) >> scale); in FSE_normalizeCount()
504 proba += (count[s]*step) - ((U64)proba<<scale) > restToBeat; in FSE_normalizeCount()
506 if (proba > largestP) { largestP=proba; largest=s; } in FSE_normalizeCount()
507 normalizedCounter[s] = proba; in FSE_normalizeCount()
520 U32 s; in FSE_normalizeCount()
522 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
523 RAWLOG(2, "%3i: %4i \n", s, normalizedCounter[s]); in FSE_normalizeCount()
524 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
525 nTotal += abs(normalizedCounter[s]); in FSE_normalizeCount()
546 unsigned s; in FSE_buildCTable_raw() local
556 for (s=0; s<tableSize; s++) in FSE_buildCTable_raw()
557 tableU16[s] = (U16)(tableSize + s); in FSE_buildCTable_raw()
561 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_raw()
562 symbolTT[s].deltaNbBits = deltaNbBits; in FSE_buildCTable_raw()
563 symbolTT[s].deltaFindState = s-1; in FSE_buildCTable_raw()
609 #define FSE_FLUSHBITS(s) (fast ? BIT_flushBitsFast(s) : BIT_flushBits(s)) in FSE_compress_usingCTable_generic() argument