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