! 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 */
| 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 */ |
| 1971 | MEM_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 | |
| 1982 | MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* statePtr, unsigned symbol) |
| 1983 | { |
no test coverage detected