Lines Matching full:capacity
74 * The default capacity here doesn't matter too much. The buffer always grows
105 unsigned capacity; /* capacity of buffer in words */
134 if(bw->capacity >= new_capacity)
137 /* round up capacity increase to the nearest FLAC__BITWRITER_DEFAULT_INCREMENT */
138 if((new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT)
139 new_capacity += FLAC__BITWRITER_DEFAULT_INCREMENT - ((new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT);
141 FLAC__ASSERT(0 == (new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT);
142 FLAC__ASSERT(new_capacity > bw->capacity);
149 bw->capacity = new_capacity;
186 bw->capacity = FLAC__BITWRITER_DEFAULT_CAPACITY;
187 bw->buffer = (bwword*)malloc(sizeof(bwword) * bw->capacity);
201 bw->capacity = 0;
217 fprintf(out, "bitwriter: capacity=%u words=%u bits=%u total_bits=%u\n", bw->capacity, bw->words, bw->bits, FLAC__TOTAL_BITS(bw));
282 FLAC__ASSERT(bw->words <= bw->capacity);
283 if(bw->words == bw->capacity && !bitwriter_grow_(bw, FLAC__BITS_PER_WORD))
312 if(bw->capacity <= bw->words + bits && !bitwriter_grow_(bw, bits))
355 if(bw->capacity <= bw->words + bits && !bitwriter_grow_(bw, bits))
575 /* burying the capacity check down here means we have to grow the buffer a little if there are more vals to do */
576 if(bw->capacity <= bw->words && nvals > 1 && !bitwriter_grow_(bw, 1)) {
577 FLAC__ASSERT(bw->capacity == bw->words);
596 if(bw->capacity <= bw->words + bw->bits + msbits + 1/*lsbits always fit in 1 bwword*/ && !bitwriter_grow_(bw, msbits+lsbits))