Lines Matching refs:Base
53 Base.State _state = new Base.State();
55 UInt32[] _repDistances = new UInt32[Base.kNumRepDistances];
61 for (UInt32 i = 0; i < Base.kNumRepDistances; i++) in BaseInit()
171 …RangeCoder.BitTreeEncoder[] _lowCoder = new RangeCoder.BitTreeEncoder[Base.kNumPosStatesEncodingMa…
172 …RangeCoder.BitTreeEncoder[] _midCoder = new RangeCoder.BitTreeEncoder[Base.kNumPosStatesEncodingMa…
173 RangeCoder.BitTreeEncoder _highCoder = new RangeCoder.BitTreeEncoder(Base.kNumHighLenBits);
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()
198 if (symbol < Base.kNumLowLenSymbols) in Encode()
205 symbol -= Base.kNumLowLenSymbols; in Encode()
207 if (symbol < Base.kNumMidLenSymbols) in Encode()
215 _highCoder.Encode(rangeEncoder, symbol - Base.kNumMidLenSymbols); in Encode()
227 for (i = 0; i < Base.kNumLowLenSymbols; i++) in SetPrices()
233 for (; i < Base.kNumLowLenSymbols + Base.kNumMidLenSymbols; i++) in SetPrices()
237 prices[st + i] = b0 + _midCoder[posState].GetPrice(i - Base.kNumLowLenSymbols); in SetPrices()
240 prices[st + i] = b1 + _highCoder.GetPrice(i - Base.kNumLowLenSymbols - Base.kNumMidLenSymbols); in SetPrices()
244 const UInt32 kNumLenSpecSymbols = Base.kNumLowLenSymbols + Base.kNumMidLenSymbols;
248 UInt32[] _prices = new UInt32[Base.kNumLenSymbols << Base.kNumPosStatesBitsEncodingMax];
250 UInt32[] _counters = new UInt32[Base.kNumPosStatesEncodingMax];
256 return _prices[posState * Base.kNumLenSymbols + symbol]; in GetPrice()
261 SetPrices(posState, _tableSize, _prices, posState * Base.kNumLenSymbols); in UpdateTable()
282 public Base.State State;
307 …RangeCoder.BitEncoder[] _isMatch = new RangeCoder.BitEncoder[Base.kNumStates << Base.kNumPosStates…
308 RangeCoder.BitEncoder[] _isRep = new RangeCoder.BitEncoder[Base.kNumStates];
309 RangeCoder.BitEncoder[] _isRepG0 = new RangeCoder.BitEncoder[Base.kNumStates];
310 RangeCoder.BitEncoder[] _isRepG1 = new RangeCoder.BitEncoder[Base.kNumStates];
311 RangeCoder.BitEncoder[] _isRepG2 = new RangeCoder.BitEncoder[Base.kNumStates];
312 …RangeCoder.BitEncoder[] _isRep0Long = new RangeCoder.BitEncoder[Base.kNumStates << Base.kNumPosSta…
314 …RangeCoder.BitTreeEncoder[] _posSlotEncoder = new RangeCoder.BitTreeEncoder[Base.kNumLenToPosState…
316 …RangeCoder.BitEncoder[] _posEncoders = new RangeCoder.BitEncoder[Base.kNumFullDistances - Base.kEn…
317 RangeCoder.BitTreeEncoder _posAlignEncoder = new RangeCoder.BitTreeEncoder(Base.kNumAlignBits);
324 UInt32[] _matchDistances = new UInt32[Base.kMatchMaxLen * 2 + 2];
337 UInt32[] _posSlotPrices = new UInt32[1 << (Base.kNumPosSlotBits + Base.kNumLenToPosStatesBits)];
338 UInt32[] _distancesPrices = new UInt32[Base.kNumFullDistances << Base.kNumLenToPosStatesBits];
339 UInt32[] _alignPrices = new UInt32[Base.kAlignTableSize];
377 _matchFinder.Create(_dictionarySize, kNumOpts, _numFastBytes, Base.kMatchMaxLen + 1); in Create()
386 for (int i = 0; i < Base.kNumLenToPosStates; i++) in Encoder()
387 _posSlotEncoder[i] = new RangeCoder.BitTreeEncoder(Base.kNumPosSlotBits); in Encoder()
401 for (i = 0; i < Base.kNumStates; i++) in Init()
405 uint complexState = (i << Base.kNumPosStatesBitsMax) + j; in Init()
415 for (i = 0; i < Base.kNumLenToPosStates; i++) in Init()
417 for (i = 0; i < Base.kNumFullDistances - Base.kEndPosModelIndex; i++) in Init()
440 Base.kMatchMaxLen - lenRes); in ReadMatchDistances()
455 UInt32 GetRepLen1Price(Base.State state, UInt32 posState) in GetRepLen1Price()
458 _isRep0Long[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0(); in GetRepLen1Price()
461 UInt32 GetPureRepPrice(UInt32 repIndex, Base.State state, UInt32 posState) in GetPureRepPrice()
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()
485 UInt32 price = _repMatchLenEncoder.GetPrice(len - Base.kMatchMinLen, posState); in GetRepPrice()
492 UInt32 lenToPosState = Base.GetLenToPosState(len); in GetPosLenPrice()
493 if (pos < Base.kNumFullDistances) in GetPosLenPrice()
494 price = _distancesPrices[(lenToPosState * Base.kNumFullDistances) + pos]; in GetPosLenPrice()
496 price = _posSlotPrices[(lenToPosState << Base.kNumPosSlotBits) + GetPosSlot2(pos)] + in GetPosLenPrice()
497 _alignPrices[pos & Base.kAlignMask]; in GetPosLenPrice()
498 return price + _lenEncoder.GetPrice(len - Base.kMatchMinLen, posState); in GetPosLenPrice()
535 UInt32[] reps = new UInt32[Base.kNumRepDistances];
536 UInt32[] repLens = new UInt32[Base.kNumRepDistances];
568 if (numAvailableBytes > Base.kMatchMaxLen) in GetOptimum()
569 numAvailableBytes = Base.kMatchMaxLen; in GetOptimum()
573 for (i = 0; i < Base.kNumRepDistances; i++) in GetOptimum()
576 repLens[i] = _matchFinder.GetMatchLen(0 - 1, reps[i], Base.kMatchMaxLen); in GetOptimum()
590 backRes = _matchDistances[numDistancePairs - 1] + Base.kNumRepDistances; 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()
645 for (i = 0; i < Base.kNumRepDistances; i++) in GetOptimum()
683 optimum.BackPrev = distance + Base.kNumRepDistances; in GetOptimum()
713 Base.State state; in GetOptimum()
720 if (_optimum[cur].BackPrev2 < Base.kNumRepDistances) in GetOptimum()
750 if (pos < Base.kNumRepDistances) in GetOptimum()
756 if (pos < Base.kNumRepDistances) in GetOptimum()
789 reps[0] = (pos - Base.kNumRepDistances); in GetOptimum()
808 _isMatch[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0() + in GetOptimum()
823 …matchPrice = curPrice + _isMatch[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice1(… in GetOptimum()
854 Base.State state2 = state; in GetOptimum()
858 _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice1() + in GetOptimum()
881 for (UInt32 repIndex = 0; repIndex < Base.kNumRepDistances; repIndex++) in GetOptimum()
914 Base.State state2 = state; in GetOptimum()
919 _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice0() + in GetOptimum()
926 …UInt32 nextMatchPrice = curAndLenCharPrice + _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) … in GetOptimum()
977 optimum.BackPrev = curBack + Base.kNumRepDistances; in GetOptimum()
989 Base.State state2 = state; in GetOptimum()
993 _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) + posStateNext].GetPrice0() + in GetOptimum()
1001 …UInt32 nextMatchPrice = curAndLenCharPrice + _isMatch[(state2.Index << Base.kNumPosStatesBitsMax) … in GetOptimum()
1017 optimum.BackPrev2 = curBack + Base.kNumRepDistances; in GetOptimum()
1041 _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].Encode(_rangeEncoder, 1); in WriteEndMarker()
1044 UInt32 len = Base.kMatchMinLen; in WriteEndMarker()
1045 _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState); in WriteEndMarker()
1046 UInt32 posSlot = (1 << Base.kNumPosSlotBits) - 1; in WriteEndMarker()
1047 UInt32 lenToPosState = Base.GetLenToPosState(len); in WriteEndMarker()
1051 … _rangeEncoder.EncodeDirectBits(posReduced >> Base.kNumAlignBits, footerBits - Base.kNumAlignBits); in WriteEndMarker()
1052 _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask); in WriteEndMarker()
1095 _isMatch[(_state.Index << Base.kNumPosStatesBitsMax) + posState].Encode(_rangeEncoder, 0); in CodeOneBlock()
1114 UInt32 complexState = (_state.Index << Base.kNumPosStatesBitsMax) + posState; in CodeOneBlock()
1133 if (pos < Base.kNumRepDistances) in CodeOneBlock()
1159 _repMatchLenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState); in CodeOneBlock()
1174 _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState); in CodeOneBlock()
1175 pos -= Base.kNumRepDistances; in CodeOneBlock()
1177 UInt32 lenToPosState = Base.GetLenToPosState(len); in CodeOneBlock()
1180 if (posSlot >= Base.kStartPosModelIndex) in CodeOneBlock()
1186 if (posSlot < Base.kEndPosModelIndex) in CodeOneBlock()
1191 … _rangeEncoder.EncodeDirectBits(posReduced >> Base.kNumAlignBits, footerBits - Base.kNumAlignBits); in CodeOneBlock()
1192 _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask); in CodeOneBlock()
1197 for (UInt32 i = Base.kNumRepDistances - 1; i >= 1; i--) in CodeOneBlock()
1211 if (_alignPriceCount >= Base.kAlignTableSize) in CodeOneBlock()
1264 _lenEncoder.SetTableSize(_numFastBytes + 1 - Base.kMatchMinLen); in SetStreams()
1266 _repMatchLenEncoder.SetTableSize(_numFastBytes + 1 - Base.kMatchMinLen); in SetStreams()
1311 UInt32[] tempPrices = new UInt32[Base.kNumFullDistances];
1316 for (UInt32 i = Base.kStartPosModelIndex; i < Base.kNumFullDistances; i++) in FillDistancesPrices()
1325 for (UInt32 lenToPosState = 0; lenToPosState < Base.kNumLenToPosStates; lenToPosState++) in FillDistancesPrices()
1330 UInt32 st = (lenToPosState << Base.kNumPosSlotBits); in FillDistancesPrices()
1333 for (posSlot = Base.kEndPosModelIndex; posSlot < _distTableSize; posSlot++) in FillDistancesPrices()
1334 …_posSlotPrices[st + posSlot] += ((((posSlot >> 1) - 1) - Base.kNumAlignBits) << RangeCoder.BitEnco… in FillDistancesPrices()
1336 UInt32 st2 = lenToPosState * Base.kNumFullDistances; in FillDistancesPrices()
1338 for (i = 0; i < Base.kStartPosModelIndex; i++) in FillDistancesPrices()
1340 for (; i < Base.kNumFullDistances; i++) in FillDistancesPrices()
1348 for (UInt32 i = 0; i < Base.kAlignTableSize; i++) in FillAlignPrices()
1380 if (numFastBytes < 5 || numFastBytes > Base.kMatchMaxLen) in SetCoderProperties()
1418 if (dictionarySize < (UInt32)(1 << Base.kDicLogSizeMin) || in SetCoderProperties()
1434 if (v < 0 || v > (UInt32)Base.kNumPosStatesBitsEncodingMax) in SetCoderProperties()
1445 if (v < 0 || v > (UInt32)Base.kNumLitPosStatesBitsEncodingMax) in SetCoderProperties()
1455 if (v < 0 || v > (UInt32)Base.kNumLitContextBitsMax) in SetCoderProperties()