Ejemplo n.º 1
0
        private int GetVLC(VLCCode *vlc, byte *code)
        {
            int value = ShowBits(16);
            int bits  = vlc[value].bits;

            if (bits == 0)
            {
                //
            }
            SkipBits(bits);
            value = vlc[value].code;
            if (code != null)
            {
                *code = (byte)value;
            }
            bits = value & 15;
            if (bits == 0)
            {
                return(0);
            }
            value = GetBits(bits);
            if (value < (1 << (bits - 1)))
            {
                value += ((-1) << bits) + 1;
            }
            return(value);
        }
Ejemplo n.º 2
0
 private static void FillMem(VLCCode *block, VLCCode value, int count)
 {
     for (int i = 0; i < count; i++)
     {
         block[i] = value;
     }
 }