Lines Matching defs:bits
461 /*the extra bits used by codes 257-285 (added to base length)*/
466 /*the base backwards distances (the bits of distance codes appear after length codes and use their own huffman tree)*/
471 /*the extra bits of backwards distances (added to base)*/
491 unsigned maxbitlen; /*maximum number of bits a single code can get*/
549 for(i = 0; i < tree->lengths[n]; i++) /*the bits for this code*/
591 unsigned bits, n, error = 0;
606 for(bits = 0; bits < tree->numcodes; bits++) blcount.data[tree->lengths[bits]]++;
608 for(bits = 1; bits <= tree->maxbitlen; bits++)
610 nextcode.data[bits] = (nextcode.data[bits - 1] + blcount.data[bits - 1]) << 1;
628 by Deflate. maxbitlen is the maximum bits that a code in the tree can have.
742 symbol, it'd give it the theoritical 0 bits but in practice zlib wants 1 bit*/
900 inbitlength is the length of the complete buffer, in bits (so its byte length times 8)
966 /*read the code length codes out of 3 * (amount of code length codes) bits*/
1000 unsigned replength = 3; /*read in the 2 bits that indicate repeat length (3-6)*/
1021 unsigned replength = 3; /*read in the bits that indicate repeat length*/
1038 unsigned replength = 11; /*read in the bits that indicate repeat length*/
1117 unsigned numextrabits_l, numextrabits_d; /*extra bits for length and distance*/
1123 /*part 2: get extra bits and add the value of that to length*/
1143 /*part 4: get extra bits from distance*/
1287 /*bitlen is the size in bits of the code*/
1319 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits)
1568 /*compensate for the fact that longer offsets have more extra bits, a
1602 /*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next byte,
1696 uivector bitlen_lld; /*lit,len,dist code lenghts (int bits), literally (without repeat codes).*/
1825 /*after a repeat code come the bits that specify the number of repetitions,
1851 - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN
1852 - (HCLEN+4)*3 bits code lengths of code length alphabet
1884 /*extra bits of repeat codes*/
2316 /* / Reading and writing single bits and bytes from/to stream for LodePNG / */
2500 return 0; /*allowed color type / bits combination*/
2518 /*bits per pixel is amount of channels * bits per channel*/
2603 /*calculate bits per pixel out of colortype and bitdepth*/
2896 /*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/
2897 static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in)
2899 unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/
2902 in &= (1 << bits) - 1; /*filter out any other bits of the input value*/
2903 in = in << (bits * (m - p));
2904 if(p == 0) out[index * bits / 8] = in;
2905 else out[index * bits / 8] |= in;
2993 /*take the most significant bits of grey*/
3390 the out buffer must have (w * h * bpp + 7) / 8 bytes, where bpp is the bits per pixel of the output color type
3391 (lodepng_get_bpp) for < 8 bpp images, there may _not_ be padding bits at the end of scanlines.
3464 unsigned char sixteenbit; /*needs more than 8 bits per channel*/
3484 unsigned greybits; /*amount of bits required for greyscale (1, 2, 4, 8). Does not take 16 bit into account.*/
3542 /*Returns how many bits needed to represent given value (max 8 bit)*/
3623 unsigned bits = getValueRequiredBits(r);
3624 if(bits > profile->greybits) profile->greybits = bits;
3702 unsigned bits = getValueRequiredBits(r);
3703 if(bits > profile->greybits) profile->greybits = bits;
3806 else /*less than 16 bits per channel*/
3812 int grey_ok = !profile.colored && !profile.alpha; /*grey without alpha, with potentially low bits*/
3912 bpp: bits per pixel
3937 /*bits padded if needed to fill full byte at end of each scanline*/
4088 w and h are image dimensions or dimensions of reduced image, bpp is bits per pixel
4114 in: Adam7 interlaced image, with no padding bits between scanlines, but between
4117 bpp: bits per pixel
4118 out has the following size in bits: w * h * bpp.
4119 in is possibly bigger due to padding bits between reduced images.
4122 NOTE: comments about padding bits are only relevant if bpp < 8
4178 After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need
4182 have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits
4183 also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7
4202 the IDAT chunks (with filter index bytes and possible padding bits)
4210 *) if no Adam7: 1) unfilter 2) remove padding bits (= posible extra bits per scanline if bpp < 8)
4211 *) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace
4237 /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline,
4238 move bytes instead of bits or move not at all*/
4241 /*remove padding bits in scanlines; after this there still may be padding
4242 bits between the different reduced images: each reduced image still starts nicely at a byte*/
5467 /*obp += diff; --> no, fill in some value in the padding bits too, to avoid
5476 no padding bits between scanlines, but between reduced images so that each
5478 bpp: bits per pixel
5479 there are no padding bits, not between scanlines, not between reduced images
5480 in has the following size in bits: w * h * bpp.
5481 out is possibly bigger due to padding bits between reduced images
5482 NOTE: comments about padding bits are only relevant if bpp < 8
5541 *) if no Adam7: 1) add padding bits (= posible extra bits per scanline if bpp < 8) 2) filter
5542 *) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter
5549 *outsize = h + (h * ((w * bpp + 7) / 8)); /*image size plus an extra byte per scanline + possible padding bits*/
5555 /*non multiple of 8 bits per scanline, padding bits needed per scanline*/
5582 *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/