Home | History | Annotate | Download | only in lodepng

Lines Matching refs:bitp

294   unsigned long readBitFromStream(size_t& bitp, const unsigned char* bits)
296 unsigned long result = (bits[bitp >> 3] >> (bitp & 0x7)) & 1;
297 bitp++;
301 unsigned long readBitsFromStream(size_t& bitp, const unsigned char* bits, size_t nbits)
304 for(size_t i = 0; i < nbits; i++) result += (readBitFromStream(bitp, bits)) << i;
623 unsigned long readBitFromReversedStream(size_t& bitp, const unsigned char* bits)
625 unsigned long result = (bits[bitp >> 3] >> (7 - (bitp & 0x7))) & 1;
626 bitp++;
630 unsigned long readBitsFromReversedStream(size_t& bitp, const unsigned char* bits, unsigned long nbits)
633 for(size_t i = nbits - 1; i < nbits; i--) result += ((readBitFromReversedStream(bitp, bits)) << i);
637 void setBitOfReversedStream(size_t& bitp, unsigned char* bits, unsigned long bit)
639 bits[bitp >> 3] |= (bit << (7 - (bitp & 0x7))); bitp++;