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 <ushort> [4]; for (var i = 0; i < dequant.Length; ++i) { dequant[i] = new PinnedArray <ushort>(64); } }
internal static void *Malloc(long size) { var result = new PinnedArray <byte>(size); _pointers[(long)result.Ptr] = result; return(result.Ptr); }
internal static void MemMove(void *a, void *b, long size) { using (var temp = new PinnedArray <byte>(size)) { CRuntime.memcpy(temp.Ptr, b, size); CRuntime.memcpy(a, temp.Ptr, size); } }
public stbi__gif() { codes = new PinnedArray <stbi__gif_lzw>(4096); pal = new PinnedArray <byte>(256 * 4); lpal = new PinnedArray <byte>(256 * 4); }