Lines Matching refs:count

71 static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max,  in ZSTD_NCountCost()  argument
77 …FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)… in ZSTD_NCountCost()
85 static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max, size_t const total) in ZSTD_entropyCost() argument
92 unsigned norm = (unsigned)((256 * count[s]) / total); in ZSTD_entropyCost()
93 if (count[s] != 0 && norm == 0) in ZSTD_entropyCost()
95 assert(count[s] < total); in ZSTD_entropyCost()
96 cost += count[s] * kInverseProbabilityLog256[norm]; in ZSTD_entropyCost()
107 unsigned const* count, in ZSTD_fseBitCost() argument
124 if (count[s] == 0) in ZSTD_fseBitCost()
130 cost += (size_t)count[s] * bitCost; in ZSTD_fseBitCost()
141 unsigned const* count, unsigned const max) in ZSTD_crossEntropyCost() argument
152 cost += count[s] * kInverseProbabilityLog256[norm256]; in ZSTD_crossEntropyCost()
159 FSE_repeat* repeatMode, unsigned const* count, unsigned const max, in ZSTD_selectEncodingType() argument
207 …t = isDefaultAllowed ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, count, max) : ERROR(GENE… in ZSTD_selectEncodingType()
208 …repeatCost = *repeatMode != FSE_repeat_none ? ZSTD_fseBitCost(prevCTable, count, max) : ERROR(GENE… in ZSTD_selectEncodingType()
209 size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog); in ZSTD_selectEncodingType()
210 size_t const compressedCost = (NCountCost << 3) + ZSTD_entropyCost(count, max, nbSeq); in ZSTD_selectEncodingType()
246 unsigned* count, U32 max, in ZSTD_buildCTable() argument
272 if (count[codeTable[nbSeq-1]] > 1) { in ZSTD_buildCTable()
273 count[codeTable[nbSeq-1]]--; in ZSTD_buildCTable()
279 …FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCoun… in ZSTD_buildCTable()