Lines Matching defs:posState

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

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