diff --git a/dnn/dump_data.c b/dnn/dump_data.c index 75688644..790a47c0 100644 --- a/dnn/dump_data.c +++ b/dnn/dump_data.c @@ -176,8 +176,12 @@ static void compute_frame_features(DenoiseState *st, FILE *ffeat, const float *i #endif } st->pcount++; - /* Running on groups of 4 frames. */ - if (st->pcount == 4) { + } +} + +static void process_superframe(DenoiseState *st, FILE *ffeat) { + int i; + int sub; int best_i; int best[10]; int pitch_prev[8][PITCH_MAX_PERIOD]; @@ -285,8 +289,6 @@ static void compute_frame_features(DenoiseState *st, FILE *ffeat, const float *i fwrite(st->features[i], sizeof(float), NB_FEATURES, ffeat); } st->pcount=0; - } - } } static void biquad(float *y, float mem[2], const float *x, const float *b, const float *a, int N) { @@ -453,6 +455,11 @@ int main(int argc, char **argv) { } for (i=0;ipcount == 4) { + process_superframe(st, ffeat); + } + /* PCM is delayed by 1/2 frame to make the features centered on the frames. */ for (i=0;i