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

Function stbi__jpeg_get_bits

include/stb/stb_image.h:2169–2179  ·  view source on GitHub ↗

get some unsigned bits

Source from the content-addressed store, hash-verified

2167
2168// get some unsigned bits
2169stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
2170{
2171 unsigned int k;
2172 if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
2173 if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
2174 k = stbi_lrot(j->code_buffer, n);
2175 j->code_buffer = k & ~stbi__bmask[n];
2176 k &= stbi__bmask[n];
2177 j->code_bits -= n;
2178 return k;
2179}
2180
2181stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
2182{

Callers 1

Calls 1

stbi__grow_buffer_unsafeFunction · 0.85

Tested by

no test coverage detected