dsp/: C++ skeleton with working FFT/WOLA STFT
- Cooley-Tukey radix-2 FFT (forward + inverse with /N normalization) - WOLA STFT/ISTFT with Hann window (nfft=2048, hop=512) - WAV16 read + WAV24 write (fixed aliasing bug in read) - Fixed in-place processing bug (separate input/output buffers) - Biquad filter (peak/shelf/reject) - Peak detector skeleton - MS encode/decode (M8 stereo) - Harness: WAV16 → STFT → WAV24 passthrough verified non-zero output Verified: burst500.wav passthrough produces output RMS=0.0678
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
struct FFTStage {
|
||||
uint32_t radix; // 2, 4, или 8
|
||||
uint32_t group_size; // N / radix
|
||||
uint32_t groups; // количество групп
|
||||
};
|
||||
|
||||
struct FFTPlan {
|
||||
uint32_t log2N;
|
||||
uint32_t N;
|
||||
uint32_t stage_count;
|
||||
FFTStage stages[16];
|
||||
uint32_t bit_reverse; // 1 если нужна бит-реверсия
|
||||
uint64_t xor_mask; // маска для XOR при бит-реверсии (DAT_181c5e4e0)
|
||||
};
|
||||
|
||||
namespace fft {
|
||||
|
||||
void init_plan(FFTPlan* plan, uint32_t log2N);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user