Skip to content

Commit

Permalink
Removing the long since broken non-SMOOTH_BANDS mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorR authored and jmvalin committed May 29, 2019
1 parent 9aff6a7 commit 9acc1e5
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/denoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@

#define SQUARE(x) ((x)*(x))

#define SMOOTH_BANDS 1

#if SMOOTH_BANDS
#define NB_BANDS 22
#else
#define NB_BANDS 21
#endif

#define CEPS_MEM 8
#define NB_DELTA_CEPS 6
Expand Down Expand Up @@ -103,7 +97,6 @@ struct DenoiseState {
RNNState rnn;
};

#if SMOOTH_BANDS
void compute_band_energy(float *bandE, const kiss_fft_cpx *X) {
int i;
float sum[NB_BANDS] = {0};
Expand Down Expand Up @@ -168,32 +161,6 @@ void interp_band_gain(float *g, const float *bandE) {
}
}
}
#else
void compute_band_energy(float *bandE, const kiss_fft_cpx *X) {
int i;
for (i=0;i<NB_BANDS;i++)
{
int j;
opus_val32 sum = 0;
for (j=0;j<(eband5ms[i+1]-eband5ms[i])<<FRAME_SIZE_SHIFT;j++) {
sum += SQUARE(X[(eband5ms[i]<<FRAME_SIZE_SHIFT) + j].r);
sum += SQUARE(X[(eband5ms[i]<<FRAME_SIZE_SHIFT) + j].i);
}
bandE[i] = sum;
}
}

void interp_band_gain(float *g, const float *bandE) {
int i;
memset(g, 0, FREQ_SIZE);
for (i=0;i<NB_BANDS;i++)
{
int j;
for (j=0;j<(eband5ms[i+1]-eband5ms[i])<<FRAME_SIZE_SHIFT;j++)
g[(eband5ms[i]<<FRAME_SIZE_SHIFT) + j] = bandE[i];
}
}
#endif


CommonState common;
Expand Down

0 comments on commit 9acc1e5

Please sign in to comment.