Changeset 8da0033 for src/pitch


Ignore:
Timestamp:
Mar 16, 2013, 9:38:21 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
4a95f83
Parents:
de5d3f1
Message:

src/pitch/pitchyinfft.c: simplify a bit, preparing for #7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/pitch/pitchyinfft.c

    rde5d3f1 r8da0033  
    110110  }
    111111  aubio_fft_do (p->fft, p->winput, p->fftout);
    112   for (l = 0; l < p->fftout->length; l++) {
     112  p->sqrmag->data[0] = SQR (p->fftout->norm[0]);
     113  p->sqrmag->data[0] *= p->weight->data[0];
     114  for (l = 1; l < p->fftout->length; l++) {
    113115    p->sqrmag->data[l] = SQR (p->fftout->norm[l]);
    114116    p->sqrmag->data[l] *= p->weight->data[l];
     117    p->sqrmag->data[p->sqrmag->length - l] = p->sqrmag->data[l];
    115118  }
    116   for (l = 1; l < p->fftout->length; l++) {
    117     p->sqrmag->data[(p->fftout->length - 1) * 2 - l] =
    118         SQR (p->fftout->norm[l]);
    119     p->sqrmag->data[(p->fftout->length - 1) * 2 - l] *=
    120         p->weight->data[l];
    121   }
    122   for (l = 0; l < p->sqrmag->length / 2 + 1; l++) {
     119  for (l = 0; l < p->fftout->length; l++) {
    123120    sum += p->sqrmag->data[l];
    124121  }
Note: See TracChangeset for help on using the changeset viewer.