Lines Matching defs:bytes
55 /* also, some sections currently only have fast versions for 4 or 8 bytes per word */
60 /* SWAP_BE_WORD_TO_HOST swaps bytes in a brword (which is always big-endian) if necessary to match host byte order */
86 * But to be practical it should be at least 1K bytes.
138 /* any incomplete word at the tail will be left-justified, and bytes from the read callback are added on the right */
142 unsigned bytes; /* # of bytes in incomplete word at buffer[words] */
211 size_t bytes;
217 end = br->words + (br->bytes? 1:0);
227 bytes = (br->capacity - br->words) * FLAC__BYTES_PER_WORD - br->bytes;
228 if(bytes == 0)
230 target = ((FLAC__byte*)(br->buffer+br->words)) + br->bytes;
233 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1 (partial tail word is left-justified)
234 * buffer[BE]: 11 22 33 44 55 ?? ?? ?? (shown layed out as bytes sequentially in memory)
236 * ^^-------target, bytes=3
242 if(br->bytes)
247 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1
250 * ^^-------target, bytes=3
253 /* read in the data; note that the callback may return a smaller number of bytes */
254 if(!br->read_callback(target, &bytes, br->client_data))
257 /* after reading bytes 66 77 88 99 AA BB CC DD EE FF from the client:
265 end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
283 end = br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes;
285 br->bytes = end % FLAC__BYTES_PER_WORD;
304 br->words = br->bytes = 0;
330 br->words = br->bytes = 0;
351 br->words = br->bytes = 0;
359 br->words = br->bytes = 0;
371 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);
382 if(br->bytes > 0) {
384 for(j = 0; j < br->bytes*8; j++)
388 fprintf(out, "%01u", br->buffer[i] & (1 << (br->bytes*8-j-1)) ? 1:0);
411 /* CRC any tail bytes in a partially-consumed word */
432 return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
452 while((br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits < bits) {
501 FLAC__ASSERT(br->consumed_bits + bits <= br->bytes*8);
615 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
631 /* step 3: skip any remainder from partial tail bytes */
650 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
686 /* step 3: read any remainder from partial tail bytes */
748 * reading through any tail bytes before calling the read callback.
754 if(br->bytes) {
755 const unsigned end = br->bytes * 8;
871 * reading through any tail bytes before calling the read callback.
877 if(br->bytes) {
878 const unsigned end = br->bytes * 8;
911 while((br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits < bits) {
962 FLAC__ASSERT(cbits + bits <= br->bytes*8);
1015 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
1054 * reading through any tail bytes before calling the read callback.
1060 if(br->bytes) {
1061 const unsigned end = br->bytes * 8;
1087 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits + uval;
1111 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
1149 FLAC__ASSERT(cbits + parameter <= br->bytes*8);