SSTV-Decoder/include/fft/fft.h

11 lines
286 B
C
Raw Normal View History

2023-04-23 21:24:45 +08:00
#pragma once
#include "inttypes.h"
2023-04-23 21:36:04 +08:00
#define q15_t int16_t
#define q31_t int32_t
2023-04-23 21:24:45 +08:00
2023-04-23 21:36:04 +08:00
#define FFT_BIN(num, fs, size) (uint16_t)((float)(num) * (float)fs / (float)size)
#define FFT_INDEX(freq, fs, size) (uint16_t)((float)freq / ((float)fs / (float)size))
2023-04-23 21:24:45 +08:00
2023-04-23 21:36:04 +08:00
int FFT(q15_t *data, uint16_t len);