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

Function stbi__grow_buffer_unsafe

include/stb/stb_image.h:2075–2091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2073}
2074
2075static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
2076{
2077 do {
2078 unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
2079 if (b == 0xff) {
2080 int c = stbi__get8(j->s);
2081 while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
2082 if (c != 0) {
2083 j->marker = (unsigned char) c;
2084 j->nomore = 1;
2085 return;
2086 }
2087 }
2088 j->code_buffer |= b << (24 - j->code_bits);
2089 j->code_bits += 8;
2090 } while (j->code_bits <= 24);
2091}
2092
2093// (1 << n) - 1
2094static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535};

Callers 8

stbi__jpeg_huff_decodeFunction · 0.85
stbi__extend_receiveFunction · 0.85
stbi__jpeg_get_bitsFunction · 0.85
stbi__jpeg_get_bitFunction · 0.85
stbi__jpeg_decode_blockFunction · 0.85

Calls 1

stbi__get8Function · 0.85

Tested by

no test coverage detected