Lines Matching refs:msbits
548 unsigned msbits;
560 msbits = uval >> parameter;
563 if(bw->bits && bw->bits + msbits + lsbits <= FLAC__BITS_PER_WORD) { /* i.e. if the whole thing fits in the current bwword */
565 bw->bits = bw->bits + msbits + lsbits;
568 /* NOT: bw->accum <<= msbits + lsbits because msbits+lsbits could be 32, then the shift would be a NOP */
569 bw->accum <<= msbits;
584 if(bw->bits && bw->bits + msbits + lsbits < FLAC__BITS_PER_WORD) { /* i.e. if the whole thing fits in the current bwword */
586 bw->bits = bw->bits + msbits + lsbits;
589 bw->accum <<= msbits + lsbits;
594 /* slightly pessimistic size check but faster than "<= bw->words + (bw->bits+msbits+lsbits+FLAC__BITS_PER_WORD-1)/FLAC__BITS_PER_WORD" */
596 if(bw->capacity <= bw->words + bw->bits + msbits + 1/*lsbits always fit in 1 bwword*/ && !bitwriter_grow_(bw, msbits+lsbits))
599 if(msbits) {
603 if(msbits < left) {
604 bw->accum <<= msbits;
605 bw->bits += msbits;
610 msbits -= left;
616 while(msbits >= FLAC__BITS_PER_WORD) {
618 msbits -= FLAC__BITS_PER_WORD;
621 if(msbits > 0) {
623 bw->bits = msbits;