Lines Matching +full:step +full:- +full:down
6 * - FSE source repository : https://github.com/Cyan4973/FiniteStateEntropy
7 * - Public forum : https://groups.google.com/forum/#!forum/lz4c
9 * This source code is licensed under both the BSD-style license (found in the
12 * You may select, at your option, one of the above-listed licenses.
41 for type-specific functions (template emulation in C)
73 void* const tdPtr = dt+1; /* because *dt is unsigned, 32-bits aligned on 32-bits */ in FSE_buildDTable_internal()
80 U32 highThreshold = tableSize-1; in FSE_buildDTable_internal()
87 /* Init, lay down lowprob symbols */ in FSE_buildDTable_internal()
91 { S16 const largeLimit= (S16)(1 << (tableLog-1)); in FSE_buildDTable_internal()
94 if (normalizedCounter[s]==-1) { in FSE_buildDTable_internal()
95 tableDecode[highThreshold--].symbol = (FSE_FUNCTION_TYPE)s; in FSE_buildDTable_internal()
105 if (highThreshold == tableSize - 1) { in FSE_buildDTable_internal()
106 size_t const tableMask = tableSize-1; in FSE_buildDTable_internal()
107 size_t const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal() local
108 /* First lay down the symbols in order. in FSE_buildDTable_internal()
109 * We use a uint64_t to lay down 8 bytes at a time. This reduces branch in FSE_buildDTable_internal()
112 * our buffer to handle the over-write. in FSE_buildDTable_internal()
143 size_t const uPosition = (position + (u * step)) & tableMask; in FSE_buildDTable_internal()
146 position = (position + (unroll * step)) & tableMask; in FSE_buildDTable_internal()
151 U32 const tableMask = tableSize-1; in FSE_buildDTable_internal()
152 U32 const step = FSE_TABLESTEP(tableSize); in FSE_buildDTable_internal() local
158 position = (position + step) & tableMask; in FSE_buildDTable_internal()
159 … while (position > highThreshold) position = (position + step) & tableMask; /* lowprob area */ in FSE_buildDTable_internal()
169 tableDecode[u].nbBits = (BYTE) (tableLog - BIT_highbit32(nextState) ); in FSE_buildDTable_internal()
170 tableDecode[u].newState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in FSE_buildDTable_internal()
184 /*-*******************************************************
194 DTableH->tableLog = 0; in FSE_buildDTable_rle()
195 DTableH->fastMode = 0; in FSE_buildDTable_rle()
197 cell->newState = 0; in FSE_buildDTable_rle()
198 cell->symbol = symbolValue; in FSE_buildDTable_rle()
199 cell->nbBits = 0; in FSE_buildDTable_rle()
212 const unsigned tableMask = tableSize - 1; in FSE_buildDTable_raw()
220 DTableH->tableLog = (U16)nbBits; in FSE_buildDTable_raw()
221 DTableH->fastMode = 1; in FSE_buildDTable_raw()
239 BYTE* const olimit = omax-3; in FSE_decompress_usingDTable_generic()
276 if (op>(omax-2)) return ERROR(dstSize_tooSmall); in FSE_decompress_usingDTable_generic()
283 if (op>(omax-2)) return ERROR(dstSize_tooSmall); in FSE_decompress_usingDTable_generic()
290 return op-ostart; in FSE_decompress_usingDTable_generic()
300 const U32 fastMode = DTableH->fastMode; in FSE_decompress_usingDTable()
336 …size_t const NCountLength = FSE_readNCount_bmi2(wksp->ncount, &maxSymbolValue, &tableLog, istart, … in FSE_decompress_wksp_body()
341 cSrcSize -= NCountLength; in FSE_decompress_wksp_body()
345 workSpace = wksp->dtable + FSE_DTABLE_SIZE_U32(tableLog); in FSE_decompress_wksp_body()
346 wkspSize -= sizeof(*wksp) + FSE_DTABLE_SIZE(tableLog); in FSE_decompress_wksp_body()
348 …CHECK_F( FSE_buildDTable_internal(wksp->dtable, wksp->ncount, maxSymbolValue, tableLog, workSpace,… in FSE_decompress_wksp_body()
351 const void* ptr = wksp->dtable; in FSE_decompress_wksp_body()
353 const U32 fastMode = DTableH->fastMode; in FSE_decompress_wksp_body()
356 …stMode) return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, wksp->dtable, 1); in FSE_decompress_wksp_body()
357 return FSE_decompress_usingDTable_generic(dst, dstCapacity, ip, cSrcSize, wksp->dtable, 0); in FSE_decompress_wksp_body()