Lines Matching refs:posState
783 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) in LenEnc_Encode() argument
788 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); in LenEnc_Encode()
796 …RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbol… in LenEnc_Encode()
806 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, const … in LenEnc_SetPrices() argument
817 …prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPri… in LenEnc_SetPrices()
823 …prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNu… in LenEnc_SetPrices()
829 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, const UInt32 *Pr… in LenPriceEnc_UpdateTable() argument
831 LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); in LenPriceEnc_UpdateTable()
832 p->counters[posState] = p->tableSize; in LenPriceEnc_UpdateTable()
837 UInt32 posState; in LenPriceEnc_UpdateTables() local
838 for (posState = 0; posState < numPosStates; posState++) in LenPriceEnc_UpdateTables()
839 LenPriceEnc_UpdateTable(p, posState, ProbPrices); in LenPriceEnc_UpdateTables()
842 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool upd… in LenEnc_Encode2() argument
844 LenEnc_Encode(&p->p, rc, symbol, posState); in LenEnc_Encode2()
846 if (--p->counters[posState] == 0) in LenEnc_Encode2()
847 LenPriceEnc_UpdateTable(p, posState, ProbPrices); in LenEnc_Encode2()
911 static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) in GetRepLen1Price() argument
915 GET_PRICE_0(p->isRep0Long[state][posState]); in GetRepLen1Price()
918 static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) in GetPureRepPrice() argument
924 price += GET_PRICE_1(p->isRep0Long[state][posState]); in GetPureRepPrice()
940 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) in GetRepPrice() argument
942 return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + in GetRepPrice()
943 GetPureRepPrice(p, repIndex, state, posState); in GetRepPrice()
992 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, len; in GetOptimum() local
1069 posState = (position & p->pbMask); in GetOptimum()
1073 p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + in GetOptimum()
1081 matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); in GetOptimum()
1086 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); in GetOptimum()
1116 price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); in GetOptimum()
1119 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; in GetOptimum()
1145 … UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; in GetOptimum()
1189 UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; in GetOptimum() local
1284 posState = (position & p->pbMask); in GetOptimum()
1286 curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); in GetOptimum()
1305 matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); in GetOptimum()
1310 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); in GetOptimum()
1385 price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); in GetOptimum()
1388 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; in GetOptimum()
1418 price + p->repLenEnc.prices[posState][lenTest - 2] + in GetOptimum()
1475 …UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN… in GetOptimum()
1662 static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) in WriteEndMarker() argument
1665 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); in WriteEndMarker()
1669 …LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices… in WriteEndMarker()
1833 UInt32 pos, len, posState; in LzmaEnc_CodeOneBlock() local
1844 posState = nowPos32 & p->pbMask; in LzmaEnc_CodeOneBlock()
1851 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); in LzmaEnc_CodeOneBlock()
1863 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); in LzmaEnc_CodeOneBlock()
1870 RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); in LzmaEnc_CodeOneBlock()
1893 …LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPri… in LzmaEnc_CodeOneBlock()
1902 …LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices… in LzmaEnc_CodeOneBlock()