This repository has been archived on 2024-11-23. You can view files and clone it, but cannot push or open issues or pull requests.
SSTV-Decoder/include/fft/fft.h
liuyihui f1348dd584 refactor: code style (if-else in one line)
remove: old hanning window
feat: FFT fixed length
2023-04-24 01:05:42 +08:00

12 lines
223 B
C

#pragma once
#include "inttypes.h"
#define q15_t int16_t
#define q31_t int32_t
#define FFT_BIN(num, re) (uint16_t)((float)(num + 0.5) * re)
#define FFT_INDEX(freq, re) (uint16_t)((float)freq / re)
int FFT(q15_t *data);