Lines Matching refs:posState

743 static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState)

748 RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol);
756 RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols);
766 static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices)
777 prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices);
783 prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices);
789 static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices)
791 LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices);
792 p->counters[posState] = p->tableSize;
797 UInt32 posState;
798 for (posState = 0; posState < numPosStates; posState++)
799 LenPriceEnc_UpdateTable(p, posState, ProbPrices);
802 static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices)
804 LenEnc_Encode(&p->p, rc, symbol, posState);
806 if (--p->counters[posState] == 0)
807 LenPriceEnc_UpdateTable(p, posState, ProbPrices);
869 static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState)
873 GET_PRICE_0(p->isRep0Long[state][posState]);
876 static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState)
882 price += GET_PRICE_1(p->isRep0Long[state][posState]);
898 static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState)
900 return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] +
901 GetPureRepPrice(p, repIndex, state, posState);
944 UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur;
1022 posState = (position & p->pbMask);
1026 p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) +
1034 matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]);
1039 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState);
1069 price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState);
1072 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2];
1098 UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN];
1139 UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen;
1234 posState = (position & p->pbMask);
1236 curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]);
1255 matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]);
1260 UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState);
1335 price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState);
1338 UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2];
1368 price + p->repLenEnc.prices[posState][lenTest - 2] +
1425 UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN];
1610 static void WriteEndMarker(CLzmaEnc *p, UInt32 posState)
1613 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
1617 LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
1780 UInt32 pos, len, posState;
1791 posState = nowPos32 & p->pbMask;
1798 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0);
1810 RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1);
1817 RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1));
1840 LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
1849 LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);