mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
dft: cleanup of dft calculation
This commit is contained in:
parent
82ad0374f4
commit
28e3487252
1 changed files with 5 additions and 10 deletions
|
@ -470,27 +470,22 @@ public:
|
|||
double tmpSmpWindow[windowSize];
|
||||
|
||||
for (unsigned i = 0; i< windowSize; i++)
|
||||
tmpSmpWindow[i] = ringBuffer[(i + ringBufferPos) % windowSize];
|
||||
tmpSmpWindow[i] = ringBuffer[(i + ringBufferPos) % windowSize] * filterWindowCoefficents[i];;
|
||||
|
||||
#ifdef DFT_MEM_DUMP
|
||||
if (dumperEnable)
|
||||
origSigSync.writeDataBinary(windowSize, tmpSmpWindow);
|
||||
#endif
|
||||
|
||||
for (unsigned i = 0; i < windowSize; i++)
|
||||
/*for (unsigned i = 0; i < windowSize; i++)
|
||||
tmpSmpWindow[i] *= filterWindowCoefficents[i];
|
||||
|
||||
#ifdef DFT_MEM_DUMP
|
||||
if (dumperEnable)
|
||||
windowdSigSync.writeDataBinary(windowSize, tmpSmpWindow);
|
||||
#endif
|
||||
|
||||
*/
|
||||
for (unsigned i = 0; i < freqCount; i++) {
|
||||
results[i] = 0;
|
||||
|
||||
|
||||
for (unsigned j = 0; j < windowSize * windowMultiplier; j++) {
|
||||
if (padding == PaddingType::ZERO) {
|
||||
if (j < (windowSize))
|
||||
if (j < windowSize)
|
||||
results[i] += tmpSmpWindow[j] * matrix[i][j];
|
||||
else
|
||||
results[i] += 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue