MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__jpeg_get_bit

Function stbi__jpeg_get_bit

include/stb/stb_image.h:2181–2190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2179}
2180
2181stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
2182{
2183 unsigned int k;
2184 if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
2185 if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing
2186 k = j->code_buffer;
2187 j->code_buffer <<= 1;
2188 --j->code_bits;
2189 return k & 0x80000000;
2190}
2191
2192// given a value that's at position X in the zigzag stream,
2193// where does it appear in the 8x8 matrix coded as row-major?

Calls 1

stbi__grow_buffer_unsafeFunction · 0.85

Tested by

no test coverage detected