Lines Matching refs:s
129 …FSE_FUNCTION_TYPE s = tableSymbol[u]; /* note : static analyzer may not understand tableSymbol i… in FSE_buildCTable_wksp() local
130 …tableU16[cumul[s]++] = (U16) (tableSize+u); /* TableU16 : sorted by symbol order; gives next sta… in FSE_buildCTable_wksp()
135 unsigned s; in FSE_buildCTable_wksp() local
136 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_wksp()
137 switch (normalizedCounter[s]) in FSE_buildCTable_wksp()
141 symbolTT[s].deltaNbBits = ((tableLog+1) << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
146 symbolTT[s].deltaNbBits = (tableLog << 16) - (1<<tableLog); in FSE_buildCTable_wksp()
147 symbolTT[s].deltaFindState = total - 1; in FSE_buildCTable_wksp()
152 U32 const maxBitsOut = tableLog - BIT_highbit32 (normalizedCounter[s]-1); in FSE_buildCTable_wksp()
153 U32 const minStatePlus = normalizedCounter[s] << maxBitsOut; in FSE_buildCTable_wksp()
154 symbolTT[s].deltaNbBits = (maxBitsOut << 16) - minStatePlus; in FSE_buildCTable_wksp()
155 symbolTT[s].deltaFindState = total - normalizedCounter[s]; in FSE_buildCTable_wksp()
156 total += normalizedCounter[s]; in FSE_buildCTable_wksp()
347 U32 s; in FSE_normalizeM2() local
355 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
356 if (count[s] == 0) { in FSE_normalizeM2()
357 norm[s]=0; in FSE_normalizeM2()
360 if (count[s] <= lowThreshold) { in FSE_normalizeM2()
361 norm[s] = lowProbCount; in FSE_normalizeM2()
363 total -= count[s]; in FSE_normalizeM2()
366 if (count[s] <= lowOne) { in FSE_normalizeM2()
367 norm[s] = 1; in FSE_normalizeM2()
369 total -= count[s]; in FSE_normalizeM2()
373 norm[s]=NOT_YET_ASSIGNED; in FSE_normalizeM2()
383 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
384 if ((norm[s] == NOT_YET_ASSIGNED) && (count[s] <= lowOne)) { in FSE_normalizeM2()
385 norm[s] = 1; in FSE_normalizeM2()
387 total -= count[s]; in FSE_normalizeM2()
398 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeM2()
399 if (count[s] > maxC) { maxV=s; maxC=count[s]; } in FSE_normalizeM2()
406 for (s=0; ToDistribute > 0; s = (s+1)%(maxSymbolValue+1)) in FSE_normalizeM2()
407 if (norm[s] > 0) { ToDistribute--; norm[s]++; } in FSE_normalizeM2()
415 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeM2()
416 if (norm[s]==NOT_YET_ASSIGNED) { in FSE_normalizeM2()
417 U64 const end = tmpTotal + (count[s] * rStep); in FSE_normalizeM2()
423 norm[s] = (short)weight; in FSE_normalizeM2()
446 unsigned s; in FSE_normalizeCount() local
451 for (s=0; s<=maxSymbolValue; s++) { in FSE_normalizeCount()
452 if (count[s] == total) return 0; /* rle special case */ in FSE_normalizeCount()
453 if (count[s] == 0) { normalizedCounter[s]=0; continue; } in FSE_normalizeCount()
454 if (count[s] <= lowThreshold) { in FSE_normalizeCount()
455 normalizedCounter[s] = lowProbCount; in FSE_normalizeCount()
458 short proba = (short)((count[s]*step) >> scale); in FSE_normalizeCount()
461 proba += (count[s]*step) - ((U64)proba<<scale) > restToBeat; in FSE_normalizeCount()
463 if (proba > largestP) { largestP=proba; largest=s; } in FSE_normalizeCount()
464 normalizedCounter[s] = proba; in FSE_normalizeCount()
477 U32 s; in FSE_normalizeCount()
479 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
480 RAWLOG(2, "%3i: %4i \n", s, normalizedCounter[s]); in FSE_normalizeCount()
481 for (s=0; s<=maxSymbolValue; s++) in FSE_normalizeCount()
482 nTotal += abs(normalizedCounter[s]); in FSE_normalizeCount()
503 unsigned s; in FSE_buildCTable_raw() local
513 for (s=0; s<tableSize; s++) in FSE_buildCTable_raw()
514 tableU16[s] = (U16)(tableSize + s); in FSE_buildCTable_raw()
518 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_raw()
519 symbolTT[s].deltaNbBits = deltaNbBits; in FSE_buildCTable_raw()
520 symbolTT[s].deltaFindState = s-1; in FSE_buildCTable_raw()
566 #define FSE_FLUSHBITS(s) (fast ? BIT_flushBitsFast(s) : BIT_flushBits(s)) in FSE_compress_usingCTable_generic() argument