Lines Matching defs:bytes
50 /* also, some sections currently only have fast versions for 4 or 8 bytes per word */
54 /* SWAP_BE_WORD_TO_HOST swaps bytes in a uint32_t (which is always big-endian) if necessary to match host byte order */
67 * But to be practical it should be at least 1K bytes.
79 /* any incomplete word at the tail will be left-justified, and bytes from the read callback are added on the right */
83 unsigned bytes; /* # of bytes in incomplete word at buffer[words] */
124 size_t bytes;
130 end = br->words + (br->bytes? 1:0);
140 bytes = (br->capacity - br->words) * FLAC__BYTES_PER_WORD - br->bytes;
141 if(bytes == 0)
143 target = ((FLAC__byte*)(br->buffer+br->words)) + br->bytes;
146 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1 (partial tail word is left-justified)
147 * buffer[BE]: 11 22 33 44 55 ?? ?? ?? (shown layed out as bytes sequentially in memory)
149 * ^^-------target, bytes=3
155 if(br->bytes)
160 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1
163 * ^^-------target, bytes=3
166 /* read in the data; note that the callback may return a smaller number of bytes */
167 if(!br->read_callback(target, &bytes, br->client_data))
170 /* after reading bytes 66 77 88 99 AA BB CC DD EE FF from the client:
178 end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
189 end = br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes;
191 br->bytes = end % FLAC__BYTES_PER_WORD;
210 br->words = br->bytes = 0;
236 br->words = br->bytes = 0;
256 br->words = br->bytes = 0;
264 br->words = br->bytes = 0;
276 fprintf(out, "bitreader: capacity=%u words=%u bytes=%u consumed: words=%u, bits=%u\n", br->capacity, br->words, br->bytes, br->consumed_words, br->consumed_bits);
287 if(br->bytes > 0) {
289 for(j = 0; j < br->bytes*8; j++)
293 fprintf(out, "%01u", br->buffer[i] & (1 << (br->bytes*8-j-1)) ? 1:0);
316 /* CRC any tail bytes in a partially-consumed word */
337 return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
357 while((br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits < bits) {
406 FLAC__ASSERT(br->consumed_bits + bits <= br->bytes*8);
522 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
538 /* step 3: skip any remainder from partial tail bytes */
557 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
593 /* step 3: read any remainder from partial tail bytes */
655 * reading through any tail bytes before calling the read callback.
661 if(br->bytes*8 > br->consumed_bits) {
662 const unsigned end = br->bytes * 8;