Unverified Commit 9acc1e5a authored by Gregor Richards's avatar Gregor Richards Committed by Jean-Marc Valin
Browse files

Removing the long since broken non-SMOOTH_BANDS mode.

parent 9aff6a72
...@@ -53,13 +53,7 @@ ...@@ -53,13 +53,7 @@
#define SQUARE(x) ((x)*(x)) #define SQUARE(x) ((x)*(x))
#define SMOOTH_BANDS 1
#if SMOOTH_BANDS
#define NB_BANDS 22 #define NB_BANDS 22
#else
#define NB_BANDS 21
#endif
#define CEPS_MEM 8 #define CEPS_MEM 8
#define NB_DELTA_CEPS 6 #define NB_DELTA_CEPS 6
...@@ -103,7 +97,6 @@ struct DenoiseState { ...@@ -103,7 +97,6 @@ struct DenoiseState {
RNNState rnn; RNNState rnn;
}; };
#if SMOOTH_BANDS
void compute_band_energy(float *bandE, const kiss_fft_cpx *X) { void compute_band_energy(float *bandE, const kiss_fft_cpx *X) {
int i; int i;
float sum[NB_BANDS] = {0}; float sum[NB_BANDS] = {0};
...@@ -168,32 +161,6 @@ void interp_band_gain(float *g, const float *bandE) { ...@@ -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; CommonState common;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment