Lines Matching defs:bits
425 * allocate bits among 2 channels based on PE
427 * bugfixes rh 8/01: often allocated more than the allowed 4095 bits
433 int extra_bits = 0, tbits, bits;
435 int max_bits; /* maximum allowed bits for this granule */
444 for (bits = 0, ch = 0; ch < cfg->channels_out; ++ch) {
446 * allocate bits for each channel
452 /* at most increase bits by 1.5*average */
461 bits += add_bits[ch];
463 if (bits > extra_bits && bits > 0) {
465 add_bits[ch] = extra_bits * add_bits[ch] / bits;
474 for (bits = 0, ch = 0; ch < cfg->channels_out; ++ch) {
475 bits += targ_bits[ch];
477 if (bits > MAX_BITS_PER_GRANULE) {
481 targ_bits[ch] /= bits;
512 /* number of bits to move from side channel to mid channel */
523 /* dont reduce side channel below 125 bits */
527 /* mean_bits = bits per granule (for both channels) */