Lines Matching refs:words
62 * This should be at least twice as large as the largest number of words
75 static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
81 unsigned capacity; /* in words */
82 unsigned words; /* # of completed words in buffer */
83 unsigned bytes; /* # of bytes in incomplete word at buffer[words] */
84 unsigned consumed_words; /* #words ... */
130 end = br->words + (br->bytes? 1:0);
133 br->words -= start;
140 bytes = (br->capacity - br->words) * FLAC__BYTES_PER_WORD - br->bytes;
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)
156 br->buffer[br->words] = SWAP_BE_WORD_TO_HOST(br->buffer[br->words]);
160 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1
178 end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
179 for(start = br->words; start < end; start++)
189 end = br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes;
190 br->words = 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);
278 for(i = 0; i < br->words; i++) {
337 return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
347 FLAC__ASSERT(br->consumed_words <= br->words);
349 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
357 while((br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits < bits) {
361 if(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
529 /* step 2: skip whole words in chunks */
531 if(br->consumed_words < br->words) {
565 /* step 2: read whole words in chunks */
567 if(br->consumed_words < br->words) {
632 while(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
654 /* at this point we've eaten up all the whole words; have to try
718 unsigned cwords, words, lsbs, msbs, x, y;
725 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
728 /* the above two asserts also guarantee that the binary part never straddles more than 2 words, so we don't have to loop to read it */
748 words = br->words;
751 if(cwords >= words) {
767 if (cwords >= words)
787 if (cwords >= words)
802 /* at this point we've eaten up all the whole words */
834 words = br->words;
837 } while(cwords >= words && val < end);
840 if(ucbits == 0 && cwords < words) {