Lines Matching refs:posState

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