From dc1985f978e2f1a7ca99c4add80cf825955251de Mon Sep 17 00:00:00 2001 From: Rui Huang Date: Tue, 23 Apr 2019 11:20:57 +0800 Subject: [PATCH 1/3] Fix document problem, change AES to FFT --- fft_test/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fft_test/README.md b/fft_test/README.md index 9eb85b8..3f9b0f2 100644 --- a/fft_test/README.md +++ b/fft_test/README.md @@ -1,6 +1,12 @@ -FFT hardware calculation -===== -include FFT-512 FFT-256 FFT-128 FFT-64. +# FFT and IFFT hardware calculation + +include + +- FFT-512/IFFT-512 +- FFT-256/IFFT-256 +- FFT-128/IFFT-128 +- FFT-64/IFFT-64 1.Calculate the frequency, phase and amplitude of the time domain signal. -2.Compare the time spent on hardware aes and software aes. + +2.Compare the time spent on hardware FFT and software FFT. From 17062b6ae82d5801bbff098f506e5d40fbb3f167 Mon Sep 17 00:00:00 2001 From: bj_wanghz Date: Wed, 5 Jun 2019 17:21:28 +0800 Subject: [PATCH 2/3] fix image sawtooth problem --- dvp2sdcard/rgb2bmp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dvp2sdcard/rgb2bmp.c b/dvp2sdcard/rgb2bmp.c index 9a466ab..d158774 100644 --- a/dvp2sdcard/rgb2bmp.c +++ b/dvp2sdcard/rgb2bmp.c @@ -1,11 +1,14 @@ #include "rgb2bmp.h" #include "ff.h" -int rgb565tobmp(char *buf,int width,int height, const char *filename) +int rgb565tobmp(uint8_t *buf,int width,int height, const char *filename) { FIL file; FRESULT ret = FR_OK; uint32_t ret_len = 0; + uint32_t i; + uint16_t temp; + uint16_t *ptr; BitMapFileHeader bmfHdr; /* file header */ BitMapInfoHeader bmiHdr; /* information header */ @@ -45,6 +48,15 @@ int rgb565tobmp(char *buf,int width,int height, const char *filename) bmfHdr.bfReserved2 = 0; bmfHdr.bfOffBits = sizeof(BitMapFileHeader) + sizeof(BitMapInfoHeader)+ sizeof(RgbQuad) * 3; + ptr = (uint16_t*)buf; + + for (i = 0; i < width * height; i += 2) + { + temp = ptr[i]; + ptr[i] = ptr[i + 1]; + ptr[i + 1] = temp; + } + if ((ret = f_open(&file, filename, FA_CREATE_ALWAYS | FA_WRITE)) != FR_OK) { printf("create file %s err[%d]\n", filename, ret); From 956ee18f63dc9e2b57398d4603519f97d411f164 Mon Sep 17 00:00:00 2001 From: bj_wanghz Date: Mon, 24 Jun 2019 20:09:06 +0800 Subject: [PATCH 3/3] fix the type conflict of rgb565tobmp() --- dvp2sdcard/main.c | 2 +- dvp2sdcard/rgb2bmp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dvp2sdcard/main.c b/dvp2sdcard/main.c index d604e53..ec83e94 100644 --- a/dvp2sdcard/main.c +++ b/dvp2sdcard/main.c @@ -249,7 +249,7 @@ int main(void) if (g_save_flag) { - rgb565tobmp((char*)(g_ram_mux ? g_lcd_gram0 : g_lcd_gram1), 320, 240, _T("0:photo.bmp")); + rgb565tobmp((uint8_t*)(g_ram_mux ? g_lcd_gram0 : g_lcd_gram1), 320, 240, _T("0:photo.bmp")); g_save_flag = 0; } /* display pic*/ diff --git a/dvp2sdcard/rgb2bmp.h b/dvp2sdcard/rgb2bmp.h index 48330ab..6ee15a3 100644 --- a/dvp2sdcard/rgb2bmp.h +++ b/dvp2sdcard/rgb2bmp.h @@ -35,6 +35,6 @@ typedef struct tagRGBQUAD{ uint8_t rgbReserved;/* reserved */ }__attribute__((packed)) RgbQuad; -int rgb565tobmp(char *buf,int width,int height, const char *filename); +int rgb565tobmp(uint8_t *buf,int width,int height, const char *filename); #endif