Пример #1
0
            public stbi__jpeg()
            {
                for (var i = 0; i < 4; ++i)
                {
                    huff_ac[i] = new stbi__huffman();
                    huff_dc[i] = new stbi__huffman();
                }

                for (var i = 0; i < img_comp.Length; ++i)
                {
                    img_comp[i] = new img_comp();
                }

                fast_ac = new PinnedArray <short> [4];
                for (var i = 0; i < fast_ac.Length; ++i)
                {
                    fast_ac[i] = new PinnedArray <short>(1 << STBI__ZFAST_BITS);
                }

                dequant = new PinnedArray <byte> [4];
                for (var i = 0; i < dequant.Length; ++i)
                {
                    dequant[i] = new PinnedArray <byte>(64);
                }
            }
Пример #2
0
 public static void MemMove(void *a, void *b, long size)
 {
     using (var temp = new PinnedArray <byte>(size))
     {
         Memcpy(temp.Ptr, b, size);
         Memcpy(a, temp.Ptr, size);
     }
 }
Пример #3
0
        public static void *Malloc(long size)
        {
            var result = new PinnedArray <byte>(size);

            _pointers[(long)result.Ptr] = result;

            return(result.Ptr);
        }
Пример #4
0
 public stbi__gif()
 {
     codes = new PinnedArray <stbi__gif_lzw>(4096);
     pal   = new PinnedArray <byte>(256 * 4);
     lpal  = new PinnedArray <byte>(256 * 4);
 }