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