Lines Matching refs:posState

177 			for (int posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++)

179 _lowCoder[posState] = new BitTreeEncoder(Base.kNumLowLenBits);
180 _midCoder[posState] = new BitTreeEncoder(Base.kNumMidLenBits);
188 for (int posState = 0; posState < numPosStates; posState++)
190 _lowCoder[posState].Init();
191 _midCoder[posState].Init();
196 public void Encode(SevenZip.Compression.RangeCoder.Encoder rangeEncoder, int symbol, int posState) throws IOException
201 _lowCoder[posState].Encode(rangeEncoder, symbol);
210 _midCoder[posState].Encode(rangeEncoder, symbol);
220 public void SetPrices(int posState, int numSymbols, int[] prices, int st)
231 prices[st + i] = a0 + _lowCoder[posState].GetPrice(i);
237 prices[st + i] = b0 + _midCoder[posState].GetPrice(i - Base.kNumLowLenSymbols);
254 public int GetPrice(int symbol, int posState)
256 return _prices[posState * Base.kNumLenSymbols + symbol];
259 void UpdateTable(int posState)
261 SetPrices(posState, _tableSize, _prices, posState * Base.kNumLenSymbols);
262 _counters[posState] = _tableSize;
267 for (int posState = 0; posState < numPosStates; posState++)
268 UpdateTable(posState);
271 public void Encode(SevenZip.Compression.RangeCoder.Encoder rangeEncoder, int symbol, int posState) throws IOException
273 super.Encode(rangeEncoder, symbol, posState);
274 if (--_counters[posState] == 0)
275 UpdateTable(posState);
455 int GetRepLen1Price(int state, int posState)
458 SevenZip.Compression.RangeCoder.Encoder.GetPrice0(_isRep0Long[(state << Base.kNumPosStatesBitsMax) + posState]);
461 int GetPureRepPrice(int repIndex, int state, int posState)
467 price += SevenZip.Compression.RangeCoder.Encoder.GetPrice1(_isRep0Long[(state << Base.kNumPosStatesBitsMax) + posState]);
483 int GetRepPrice(int repIndex, int len, int state, int posState)
485 int price = _repMatchLenEncoder.GetPrice(len - Base.kMatchMinLen, posState);
486 return price + GetPureRepPrice(repIndex, state, posState);
489 int GetPosLenPrice(int pos, int len, int posState)
498 return price + _lenEncoder.GetPrice(len - Base.kMatchMinLen, posState);
606 int posState = (position & _posStateMask);
608 _optimum[1].Price = SevenZip.Compression.RangeCoder.Encoder.GetPrice0(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState]) +
612 int matchPrice = SevenZip.Compression.RangeCoder.Encoder.GetPrice1(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState]);
617 int shortRepPrice = repMatchPrice + GetRepLen1Price(_state, posState);
650 int price = repMatchPrice + GetPureRepPrice(i, _state, posState);
653 int curAndLenPrice = price + _repMatchLenEncoder.GetPrice(repLen - 2, posState);
677 int curAndLenPrice = normalMatchPrice + GetPosLenPrice(distance, len, posState);
805 posState = (position & _posStateMask);
808 SevenZip.Compression.RangeCoder.Encoder.GetPrice0(_isMatch[(state << Base.kNumPosStatesBitsMax) + posState]) +
823 matchPrice = curPrice + SevenZip.Compression.RangeCoder.Encoder.GetPrice1(_isMatch[(state << Base.kNumPosStatesBitsMax) + posState]);
829 int shortRepPrice = repMatchPrice + GetRepLen1Price(state, posState);
891 int curAndLenPrice = repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState);
918 repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState) +
971 int curAndLenPrice = normalMatchPrice + GetPosLenPrice(curBack, lenTest, posState);
1036 void WriteEndMarker(int posState) throws IOException
1041 _rangeEncoder.Encode(_isMatch, (_state << Base.kNumPosStatesBitsMax) + posState, 1);
1045 _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);
1092 int posState = (int)(nowPos64) & _posStateMask;
1093 _rangeEncoder.Encode(_isMatch, (_state << Base.kNumPosStatesBitsMax) + posState, 0);
1111 int posState = ((int)nowPos64) & _posStateMask;
1112 int complexState = (_state << Base.kNumPosStatesBitsMax) + posState;
1157 _repMatchLenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);
1172 _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);