uint16_t exponent_bands[BLOCK_NB_SIZES][25];
/** The index of the first coef in high band. */
int high_band_start[BLOCK_NB_SIZES];
- int coefs_start;///< first coded coef
int coefs_end[BLOCK_NB_SIZES]; ///< max number of coded coefficients
int exponent_high_sizes[BLOCK_NB_SIZES];
int exponent_high_bands[BLOCK_NB_SIZES][HIGH_BAND_MAX_SIZE];
int a, b, pos, lpos, k, block_len, i, j, n;
const uint8_t *table;
- pwd->coefs_start = 0;
for (k = 0; k < pwd->nb_block_sizes; k++) {
block_len = pwd->frame_len >> k;
coefs = pwd->coefs[ch];
if (!pwd->use_noise_coding) {
/* XXX: optimize more */
- for (i = 0; i < pwd->coefs_start; i++)
- *coefs++ = 0.0;
n = nb_coefs[ch];
for (i = 0; i < n; i++)
*coefs++ = coefs1[i] *
continue;
}
mult1 = mult;
- /* very low freqs: noise */
- for (i = 0; i < pwd->coefs_start; i++) {
- *coefs++ = pwd->noise_table[pwd->noise_index] *
- exponents[i << bsize >> esize] * mult1;
- pwd->noise_index = (pwd->noise_index + 1) &
- (NOISE_TAB_SIZE - 1);
- }
n1 = pwd->exponent_high_sizes[bsize];
/* compute power of high bands */
exponents = pwd->exponents[ch] +
exponents += n << bsize;
}
/* main freqs and high freqs */
- exponents = pwd->exponents[ch] + (pwd->coefs_start << bsize);
+ exponents = pwd->exponents[ch];
for (j = -1; j < n1; j++) {
if (j < 0)
- n = pwd->high_band_start[bsize]
- - pwd->coefs_start;
+ n = pwd->high_band_start[bsize];
else
n = pwd->exponent_high_bands[pwd->frame_len_bits
- pwd->block_len_bits][j];
coef_nb_bits = wma_total_gain_to_bits(total_gain);
/* compute number of coefficients */
- n = pwd->coefs_end[bsize] - pwd->coefs_start;
+ n = pwd->coefs_end[bsize];
for (ch = 0; ch < pwd->ahi.channels; ch++)
nb_coefs[ch] = n;