Example #1
0
 UInt32 GetRepLen1Price(Base.State state, UInt32 posState)
 {
     return _isRepG0[state.Index].GetPrice0() +
             _isRep0Long[(state.Index << Base.kNumPosStatesBitsMax) + posState].GetPrice0();
 }
Example #2
0
 UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, Base.State state, UInt32 posState)
 {
     UInt32 price = _repMatchLenEncoder.GetPrice(len - Base.kMatchMinLen, posState);
     return price + GetPureRepPrice(repIndex, state, posState);
 }
Example #3
0
 UInt32 GetPureRepPrice(UInt32 repIndex, Base.State state, UInt32 posState)
 {
     UInt32 price;
     if (repIndex == 0)
     {
         price = _isRepG0[state.Index].GetPrice0();
         price += _isRep0Long[(state.Index << Base.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;
 }