Lines Matching refs:posState

753 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)  in LenEnc_Encode()  argument
758 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); in LenEnc_Encode()
766 …RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbol… in LenEnc_Encode()
776 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32… in LenEnc_SetPrices() argument
787 …prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPri… in LenEnc_SetPrices()
793 …prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNu… in LenEnc_SetPrices()
799 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPric… in LenPriceEnc_UpdateTable() argument
801 LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); in LenPriceEnc_UpdateTable()
802 p->counters[posState] = p->tableSize; in LenPriceEnc_UpdateTable()
807 UInt32 posState; in LenPriceEnc_UpdateTables() local
808 for (posState = 0; posState < numPosStates; posState++) in LenPriceEnc_UpdateTables()
809 LenPriceEnc_UpdateTable(p, posState, ProbPrices); in LenPriceEnc_UpdateTables()
812 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool upd… in LenEnc_Encode2() argument
814 LenEnc_Encode(&p->p, rc, symbol, posState); in LenEnc_Encode2()
816 if (--p->counters[posState] == 0) in LenEnc_Encode2()
817 LenPriceEnc_UpdateTable(p, posState, ProbPrices); in LenEnc_Encode2()
876 static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) in GetRepLen1Price() argument
880 GET_PRICE_0(p->isRep0Long[state][posState]); in GetRepLen1Price()
883 static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) in GetPureRepPrice() argument
889 price += GET_PRICE_1(p->isRep0Long[state][posState]); in GetPureRepPrice()
905 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) in GetRepPrice() argument
907 return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + in GetRepPrice()
908 GetPureRepPrice(p, repIndex, state, posState); in GetRepPrice()
951 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; in GetOptimum() local
1029 posState = (position & p->pbMask); in GetOptimum()
1033 p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + in GetOptimum()
1041 matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); in GetOptimum()
1046 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); in GetOptimum()
1076 price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); in GetOptimum()
1079 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; in GetOptimum()
1105 … UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; in GetOptimum()
1146 UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; in GetOptimum() local
1241 posState = (position & p->pbMask); in GetOptimum()
1243 curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); in GetOptimum()
1262 matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); in GetOptimum()
1267 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); in GetOptimum()
1342 price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); in GetOptimum()
1345 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; in GetOptimum()
1375 price + p->repLenEnc.prices[posState][lenTest - 2] + in GetOptimum()
1432 …UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN… in GetOptimum()
1617 static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) in WriteEndMarker() argument
1620 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); in WriteEndMarker()
1624 …LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices… in WriteEndMarker()
1788 UInt32 pos, len, posState; in LzmaEnc_CodeOneBlock() local
1799 posState = nowPos32 & p->pbMask; in LzmaEnc_CodeOneBlock()
1806 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); in LzmaEnc_CodeOneBlock()
1818 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); in LzmaEnc_CodeOneBlock()
1825 RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); in LzmaEnc_CodeOneBlock()
1848 …LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPri… in LzmaEnc_CodeOneBlock()
1857 …LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices… in LzmaEnc_CodeOneBlock()