| 2216 | } |
| 2217 | |
| 2218 | static void stbi__grow_buffer_unsafe(stbi__jpeg* j) { |
| 2219 | do { |
| 2220 | unsigned int b = j->nomore ? 0 : stbi__get8(j->s); |
| 2221 | if (b == 0xff) { |
| 2222 | int c = stbi__get8(j->s); |
| 2223 | while (c == 0xff) |
| 2224 | c = stbi__get8(j->s); // consume fill bytes |
| 2225 | if (c != 0) { |
| 2226 | j->marker = (unsigned char)c; |
| 2227 | j->nomore = 1; |
| 2228 | return; |
| 2229 | } |
| 2230 | } |
| 2231 | j->code_buffer |= b << (24 - j->code_bits); |
| 2232 | j->code_bits += 8; |
| 2233 | } while (j->code_bits <= 24); |
| 2234 | } |
| 2235 | |
| 2236 | // (1 << n) - 1 |
| 2237 | static const stbi__uint32 stbi__bmask[17] = {0, 1, 3, 7, 15, 31, |
no test coverage detected