Home | History | Annotate | Download | only in libFLAC

Lines Matching defs:words

81  * This should be at least twice as large as the largest number of words
94 static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
140 unsigned capacity; /* in words */
141 unsigned words; /* # of completed words in buffer */
142 unsigned bytes; /* # of bytes in incomplete word at buffer[words] */
143 unsigned consumed_words; /* #words ... */
217 end = br->words + (br->bytes? 1:0);
220 br->words -= start;
227 bytes = (br->capacity - br->words) * FLAC__BYTES_PER_WORD - br->bytes;
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)
243 br->buffer[br->words] = SWAP_BE_WORD_TO_HOST(br->buffer[br->words]);
247 * bitstream : 11 22 33 44 55 br->words=1 br->bytes=1
265 end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
268 start = br->words;
273 for(start = br->words; start < end; start++)
283 end = br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes;
284 br->words = 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);
373 for(i = 0; i < br->words; i++) {
432 return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
442 FLAC__ASSERT(br->consumed_words <= br->words);
444 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
452 while((br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits < bits) {
456 if(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
622 /* step 2: skip whole words in chunks */
624 if(br->consumed_words < br->words) {
658 /* step 2: read whole words in chunks */
660 if(br->consumed_words < br->words) {
725 while(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
747 /* at this point we've eaten up all the whole words; have to try
823 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
826 /* the above two asserts also guarantee that the binary part never straddles more that 2 words, so we don't have to loop to read it */
838 while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
870 /* at this point we've eaten up all the whole words; have to try
908 FLAC__ASSERT(cwords <= br->words);
911 while((br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits < bits) {
922 if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
1005 /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
1008 /* 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 */
1015 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
1021 while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
1053 /* at this point we've eaten up all the whole words; have to try
1087 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits + uval;
1098 FLAC__ASSERT(cwords <= br->words);
1111 ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
1113 if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */