Exemplo n.º 1
0
 public static void ReverseEncode(BitEncoder[] Models, uint startIndex, Encoder rangeEncoder, int NumBitLevels, uint symbol)
 {
     uint num = 1;
     for (int i = 0; i < NumBitLevels; i++)
     {
         uint num3 = symbol & 1;
         Models[startIndex + num].Encode(rangeEncoder, num3);
         num = (num << 1) | num3;
         symbol = symbol >> 1;
     }
 }
Exemplo n.º 2
0
 public static uint ReverseGetPrice(BitEncoder[] Models, uint startIndex, int NumBitLevels, uint symbol)
 {
     uint num = 0;
     uint num2 = 1;
     for (int i = NumBitLevels; i > 0; i--)
     {
         uint num4 = symbol & 1;
         symbol = symbol >> 1;
         num += Models[startIndex + num2].GetPrice(num4);
         num2 = (num2 << 1) | num4;
     }
     return num;
 }
Exemplo n.º 3
0
 public static UInt32 ReverseGetPrice(BitEncoder[] Models, UInt32 startIndex,
     int NumBitLevels, UInt32 symbol)
 {
     UInt32 price = 0;
     UInt32 m = 1;
     for (int i = NumBitLevels; i > 0; i--)
     {
         UInt32 bit = symbol & 1;
         symbol >>= 1;
         price += Models[startIndex + m].GetPrice(bit);
         m = (m << 1) | bit;
     }
     return price;
 }
Exemplo n.º 4
0
 public static void ReverseEncode(BitEncoder[] Models, UInt32 startIndex,
     Encoder rangeEncoder, int NumBitLevels, UInt32 symbol)
 {
     UInt32 m = 1;
     for (int i = 0; i < NumBitLevels; i++)
     {
         UInt32 bit = symbol & 1;
         Models[startIndex + m].Encode(rangeEncoder, bit);
         m = (m << 1) | bit;
         symbol >>= 1;
     }
 }