remove: Rcos and hann
This commit is contained in:
parent
dc40229644
commit
d9dfcc39ec
17
src/sstv.c
17
src/sstv.c
@ -1,28 +1,20 @@
|
||||
#include "derivative.h"
|
||||
#include "fft/fft.h"
|
||||
#include "fft/table.h"
|
||||
#include "math.h"
|
||||
#include "sstv.h"
|
||||
#include "stdio.h"
|
||||
|
||||
static q15_t buffer[MN];
|
||||
static q15_t data[N];
|
||||
static q15_t buffer[MN];
|
||||
static q15_t* pData = &data[0];
|
||||
static q15_t img[1843202];
|
||||
static q15_t* pImg = &img[0];
|
||||
static uint8_t colorBuf[960];
|
||||
|
||||
static const float32_t color_re = (float32_t)(FREQ_RANGE) / (COLOR_SCALE - 1);
|
||||
#define fre2lum(fre) (uint8_t)((fre - FREQ_BLACK) / color_re)
|
||||
|
||||
// #define Rcos(x, N) (0.5 - 0.5 * cos(2.0 * PI * x / (N - 1.0)))
|
||||
|
||||
// static q15_t hann(uint16_t x, uint16_t len) {
|
||||
// q31_t v = round(Rcos(x, len) * 32768);
|
||||
// if (v > 32767) v = 32767;
|
||||
// if (v < -32768) v = -32768;
|
||||
// return (q15_t)v;
|
||||
// }
|
||||
|
||||
static q15_t img[1843202];
|
||||
static q15_t* pImg = &img[0];
|
||||
void init() {
|
||||
FILE* fp;
|
||||
fp = fopen("temp/data.txt", "r");
|
||||
@ -45,7 +37,6 @@ static uint16_t find_peak(uint16_t L, uint16_t R) {
|
||||
|
||||
static void hanning(uint16_t len) {
|
||||
for (uint16_t i = len; i < N; i++) data[i] = 0;
|
||||
// for (uint16_t i = 0; i < len; i++) data[i] = ((q31_t)data[i] * hann(i, len)) >> 15;
|
||||
if (len == 160)
|
||||
for (uint16_t i = 0; i < len; i++) data[i] = ((q31_t)data[i] * hanning_160[i]) >> 15;
|
||||
else
|
||||
|
Reference in New Issue
Block a user