函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zstd\fse_compress.c Create Date:2022-07-27 07:59:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:FSE_normalizeCount

函数原型:size_t FSE_normalizeCount(short *normalizedCounter, unsigned tableLog, const unsigned *count, size_t total, unsigned maxSymbolValue)

返回类型:size_t

参数:

类型参数名称
short *normalizedCounter
unsignedtableLog
const unsigned *count
size_ttotal
unsignedmaxSymbolValue
611  如果tableLog恒等于0则tableLog等于FSE_DEFAULT_TABLELOG
613  如果tableLog小于FSE_MIN_TABLELOG则返回:-***************************************** Error codes handling(GENERIC)
615  如果tableLog大于Constants则返回:-***************************************** Error codes handling(tableLog_tooLarge)
617  如果tableLog小于provides the minimum logSize to safely represent a distribution 则返回:-***************************************** Error codes handling(GENERIC)
621  U32 const rtbTable[] = {0, 473195, 504333, 520860, 550000, 700000, 750000, 830000}
622  scale等于62减tableLog
623  step等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
624  vStep等于1ULL左移scale减20位
625  stillToDistribute等于1左移tableLog
627  largest等于0
628  largestP等于0
629  lowThreshold等于total右移tableLog
631 s小于等于maxSymbolValue循环
632  如果count[s]恒等于total则返回:0
634  如果count[s]恒等于0则
635  normalizedCounter[s]等于0
636  继续下一循环
638  如果count[s]小于等于lowThreshold
639  normalizedCounter[s]等于负1
640  stillToDistribute自减
641  否则
642  proba等于count[s]乘step右移scale
643  如果proba小于8则
644  restToBeat等于vSteprtbTable[proba]
645  proba加等于count[s]乘stepproba左移scale位的值大于restToBeat
647  如果proba大于largestPlargestP等于proba, largest等于s
649  normalizedCounter[s]等于proba
650  stillToDistribute减等于proba
653  如果负stillToDistribute大于等于normalizedCounter[largest]右移1位则
656  如果Error Management 则返回:errorCode
658  否则normalizedCounter[largest]加等于stillToDistribute
662  返回:tableLog
调用者
名称描述
HUF_compressWeights_wksp
ZSTD_compressSequences_internal