| 2073 | } |
| 2074 | |
| 2075 | static 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 |
| 2094 | 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