Home | History | Annotate | Download | only in libFLAC

Lines Matching full: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... */
527 /* step 2: skip whole words in chunks */
529 if(br->consumed_words < br->words) {
563 /* step 2: read whole words in chunks */
565 if(br->consumed_words < br->words) {
630 while(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
652 /* at this point we've eaten up all the whole words; have to try
716 unsigned cwords, words, lsbs, msbs, x, y;
723 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
726 /* 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 */
746 words = br->words;
749 if(cwords >= words) {
765 if (cwords >= words)
785 if (cwords >= words)
800 /* at this point we've eaten up all the whole words */
832 words = br->words;
835 } while(cwords >= words && val < end);
838 if(ucbits == 0 && cwords < words) {