Lines Matching refs:new_capacity
87 unsigned new_capacity;
94 new_capacity = bw->words + ((bw->bits + bits_to_add + FLAC__BITS_PER_WORD - 1) / FLAC__BITS_PER_WORD);
99 if(bw->capacity >= new_capacity)
103 if((new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT)
104 new_capacity += FLAC__BITWRITER_DEFAULT_INCREMENT - ((new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT);
106 FLAC__ASSERT(0 == (new_capacity - bw->capacity) % FLAC__BITWRITER_DEFAULT_INCREMENT);
107 FLAC__ASSERT(new_capacity > bw->capacity);
108 FLAC__ASSERT(new_capacity >= bw->words + ((bw->bits + bits_to_add + FLAC__BITS_PER_WORD - 1) / FLAC__BITS_PER_WORD));
110 new_buffer = safe_realloc_mul_2op_(bw->buffer, sizeof(uint32_t), /*times*/new_capacity);
114 bw->capacity = new_capacity;