Lines Matching defs:bits

418 // 8-bits-per-channel interface
440 // 16-bits-per-channel interface
1978 int code_bits; // number of valid bits
2115 // naive test is to shift the code_buffer down so k bits are
2118 // end; in other words, regardless of the number of bits, it
2156 if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
2166 // get some unsigned bits
2171 if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
2183 if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing
2217 // 0 all the ac values now so we can do it 32-bits at a time
2238 if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available");
2316 if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available");
2485 // down, but keep 2 extra bits of precision
3315 // these sizes can't be more than 17 bits
3328 // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier)
4114 stbi_inline static int stbi__bit_reverse(int v, int bits)
4116 STBI_ASSERT(bits <= 16);
4117 // to bit reverse n bits, reverse 16 and shift
4118 // e.g. 11 bits, bit reverse and shift away 5
4119 return stbi__bitreverse16(v) >> (16-bits);
4774 // we make a separate pass to expand bits to pixels; for performance,
5385 a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits
5386 a = (a + (a >> 8)); // max 16 per 8 bits
5387 a = (a + (a >> 16)); // max 32 per 8 bits
5391 // extract an arbitrarily-aligned N-bit value (N=bits)
5392 // from v, and then make it 8-bits long and fractionally
5394 static int stbi__shiftsigned(unsigned int v, int shift, int bits)
5409 v >>= (8-bits);
5410 STBI_ASSERT(bits >= 0 && bits <= 8);
5411 return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];
5475 if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
5771 sz = stbi__get8(s); // check bits per palette color entry
5796 tga_bits_per_pixel = stbi__get8(s); // bits per pixel
5797 stbi__get8(s); // ignore alpha bits
5830 sz = stbi__get8(s); // check bits per palette color entry
5839 sz = stbi__get8(s); // bits per pixel
5855 // we have 3 channels with 5bits each
5887 // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?)
5911 // If I'm paletted, then I'll use the number of bits from the palette
6158 // Make sure the depth is 8 bits.
6695 stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear;
6704 bits = 0;
6725 bits |= (stbi__int32) stbi__get8(s) << valid_bits;
6728 stbi__int32 code = bits & codemask;
6729 bits >>= codesize;
7940 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available