Home | History | Annotate | Download | only in libFLAC

Lines Matching full:consumed_bits

144 	unsigned consumed_bits; /* ... + (#bits of head word) already consumed from the front of buffer */
305 br->consumed_words = br->consumed_bits = 0;
331 br->consumed_words = br->consumed_bits = 0;
352 br->consumed_words = br->consumed_bits = 0;
360 br->consumed_words = br->consumed_bits = 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);
376 if(i < br->consumed_words || (i == br->consumed_words && j < br->consumed_bits))
385 if(i < br->consumed_words || (i == br->consumed_words && j < br->consumed_bits))
398 FLAC__ASSERT((br->consumed_bits & 7) == 0);
401 br->crc16_align = br->consumed_bits;
408 FLAC__ASSERT((br->consumed_bits & 7) == 0);
409 FLAC__ASSERT(br->crc16_align <= br->consumed_bits);
412 if(br->consumed_bits) {
414 for( ; br->crc16_align < br->consumed_bits; br->crc16_align += 8)
422 return ((br->consumed_bits & 7) == 0);
427 return 8 - (br->consumed_bits & 7);
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) {
457 /* OPT: taking out the consumed_bits
458 if(br->consumed_bits) {
459 /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
460 const unsigned n = FLAC__BITS_PER_WORD - br->consumed_bits;
463 *val = (word & (FLAC__WORD_ALL_ONES >> br->consumed_bits)) >> (n-bits);
464 br->consumed_bits += bits;
467 *val = word & (FLAC__WORD_ALL_ONES >> br->consumed_bits);
471 br->consumed_bits = 0;
475 br->consumed_bits = bits;
483 br->consumed_bits = bits;
498 /* OPT: taking out the consumed_bits==0 "else" case below might make things faster if less code allows the compiler to inline this function */
499 if(br->consumed_bits) {
500 /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
501 FLAC__ASSERT(br->consumed_bits + bits <= br->bytes*8);
502 *val = (br->buffer[br->consumed_words] & (FLAC__WORD_ALL_ONES >> br->consumed_bits)) >> (FLAC__BITS_PER_WORD-br->consumed_bits-bits);
503 br->consumed_bits += bits;
508 br->consumed_bits += bits;
581 const unsigned n = br->consumed_bits & 7;
615 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
650 while(nvals && br->consumed_bits) { /* i.e. run until we read 'nvals' bytes or we hit the end of the head word */
726 brword b = br->buffer[br->consumed_words] << br->consumed_bits;
731 br->consumed_bits += i;
732 if(br->consumed_bits >= FLAC__BITS_PER_WORD) { /* faster way of testing if(br->consumed_bits == FLAC__BITS_PER_WORD) */
735 br->consumed_bits = 0;
740 *val += FLAC__BITS_PER_WORD - br->consumed_bits;
743 br->consumed_bits = 0;
751 * us data a byte at a time (unlikely), br->consumed_bits may not
756 brword b = (br->buffer[br->consumed_words] & (FLAC__WORD_ALL_ONES << (FLAC__BITS_PER_WORD-end))) << br->consumed_bits;
761 br->consumed_bits += i;
762 FLAC__ASSERT(br->consumed_bits < FLAC__BITS_PER_WORD);
766 *val += end - br->consumed_bits;
767 br->consumed_bits += end;
768 FLAC__ASSERT(br->consumed_bits < FLAC__BITS_PER_WORD);
815 /* try and get br->consumed_words and br->consumed_bits into register;
831 cbits = br->consumed_bits;
874 * us data a byte at a time (unlikely), br->consumed_bits may not
897 * not touch br->consumed_bits at all but we still need to set
900 br->consumed_bits = cbits;
913 * not touch br->consumed_bits at all but we still need to set
916 br->consumed_bits = cbits;
924 /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
961 /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
981 br->consumed_bits = cbits;
996 /* try and get br->consumed_words and br->consumed_bits into register;
1013 consumed_bits;
1057 * us data a byte at a time (unlikely), br->consumed_bits may not
1079 * not touch br->consumed_bits at all but we still need to set
1082 br->consumed_bits = cbits;
1103 * not touch br->consumed_bits at all but we still need to set
1106 br->consumed_bits = cbits;
1115 /* this also works when consumed_bits==0, it's just slower than necessary for that case */
1148 /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
1168 br->consumed_bits = cbits;