Пример #1
0
 UInt32 GetPureRepPrice(UInt32 repIndex, LZMABase.State state, UInt32 posState)
 {
     UInt32 price;
     if (repIndex == 0)
     {
         price = _isRepG0[state.Index].GetPrice0();
         price += _isRep0Long[(state.Index << LZMABase.kNumPosStatesBitsMax) + posState].GetPrice1();
     }
     else
     {
         price = _isRepG0[state.Index].GetPrice1();
         if (repIndex == 1)
             price += _isRepG1[state.Index].GetPrice0();
         else
         {
             price += _isRepG1[state.Index].GetPrice1();
             price += _isRepG2[state.Index].GetPrice(repIndex - 2);
         }
     }
     return price;
 }
Пример #2
0
 UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, LZMABase.State state, UInt32 posState)
 {
     UInt32 price = _repMatchLenEncoder.GetPrice(len - LZMABase.kMatchMinLen, posState);
     return price + GetPureRepPrice(repIndex, state, posState);
 }
Пример #3
0
 UInt32 GetRepLen1Price(LZMABase.State state, UInt32 posState)
 {
     return _isRepG0[state.Index].GetPrice0() +
             _isRep0Long[(state.Index << LZMABase.kNumPosStatesBitsMax) + posState].GetPrice0();
 }