MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FSE_initCState2

Function FSE_initCState2

freebsd/contrib/openzfs/module/zstd/lib/zstd.c:1971–1980  ·  view source on GitHub ↗

! FSE_initCState2() : * Same as FSE_initCState(), but the first symbol to include (which will be the last to be read) * uses the smallest state value possible, saving the cost of this symbol */

Source from the content-addressed store, hash-verified

1969* Same as FSE_initCState(), but the first symbol to include (which will be the last to be read)
1970* uses the smallest state value possible, saving the cost of this symbol */
1971MEM_STATIC void FSE_initCState2(FSE_CState_t* statePtr, const FSE_CTable* ct, U32 symbol)
1972{
1973 FSE_initCState(statePtr, ct);
1974 { const FSE_symbolCompressionTransform symbolTT = ((const FSE_symbolCompressionTransform*)(statePtr->symbolTT))[symbol];
1975 const U16* stateTable = (const U16*)(statePtr->stateTable);
1976 U32 nbBitsOut = (U32)((symbolTT.deltaNbBits + (1<<15)) >> 16);
1977 statePtr->value = (nbBitsOut << 16) - symbolTT.deltaNbBits;
1978 statePtr->value = stateTable[(statePtr->value >> nbBitsOut) + symbolTT.deltaFindState];
1979 }
1980}
1981
1982MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* statePtr, unsigned symbol)
1983{

Callers 2

Calls 1

FSE_initCStateFunction · 0.70

Tested by

no test coverage detected