summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo
authorerik <erik>2007-01-24 23:29:42 (UTC)
committer erik <erik>2007-01-24 23:29:42 (UTC)
commit0076a11b467dce1233194ce228287a2a127b1f5d (patch) (unidiff)
treef2136a1a3e9b5fd6bede52251ed7249365838752 /noncore/settings/sysinfo
parent48d9219a96096cf44df8ac24413b36d1b718b1d5 (diff)
downloadopie-0076a11b467dce1233194ce228287a2a127b1f5d.zip
opie-0076a11b467dce1233194ce228287a2a127b1f5d.tar.gz
opie-0076a11b467dce1233194ce228287a2a127b1f5d.tar.bz2
Each file in this commit has the issue where it is possible for code to
overrun static buffers. This could lead to serious problems. Granted it is almost impossible to do that. But it isn't totally impossible. So this commit makes it impossible to overrun.
Diffstat (limited to 'noncore/settings/sysinfo') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/contrib/fft.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/contrib/fft.c b/noncore/settings/sysinfo/contrib/fft.c
index 01a1b26..60ee27d 100644
--- a/noncore/settings/sysinfo/contrib/fft.c
+++ b/noncore/settings/sysinfo/contrib/fft.c
@@ -8,49 +8,49 @@
8// of the License, or (at your option) any later version. 8// of the License, or (at your option) any later version.
9// 9//
10// This program is distributed in the hope that it will be useful, 10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of 11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details. 13// GNU General Public License for more details.
14// 14//
15// You should have received a copy of the GNU General Public License 15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software 16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18// 18//
19// 19//
20// Author : Satoshi ( af230533@im07.alpha-net.ne.jp ) 20// Author : Satoshi ( af230533@im07.alpha-net.ne.jp )
21// ****************************************************************** 21// ******************************************************************
22 22
23//*********************************************************************** 23//***********************************************************************
24// ¹â®¥Õ¡¼¥ê¥¨ÊÑ´¹¡Ê£Æ£Æ£Ô¡Ë 24// ¹â®¥Õ¡¼¥ê¥¨ÊÑ´¹¡Ê£Æ£Æ£Ô¡Ë
25// ¹¹¤Ë¥¹¥Ô¡¼¥É¡¦¥¢¥Ã¥×¤¹¤ë¤Ë¤Ï£Ã£Ï£Ó¤ò¸ÇÄê¤Ç»ý¤Ä¤³¤È¡ª 25// ¹¹¤Ë¥¹¥Ô¡¼¥É¡¦¥¢¥Ã¥×¤¹¤ë¤Ë¤Ï£Ã£Ï£Ó¤ò¸ÇÄê¤Ç»ý¤Ä¤³¤È¡ª
26// 26//
27// Copyright (C) Satoshi 1994-2002 All rights reserved. 27// Copyright (C) Satoshi 1994-2002 All rights reserved.
28// *********************************************************************** 28// ***********************************************************************
29 29
30#include <math.h> 30#include <math.h>
31 31
32#define FFT_TEST_COUNT 500 // Bench FFT 32#define FFT_TEST_COUNT 332 // Bench FFT
33 33
34// ----------------------------------------------------- FFT 34// ----------------------------------------------------- FFT
35#define OBJ_DATA_COUNT 128 35#define OBJ_DATA_COUNT 128
36#define OBJ_DATA_SISU 7 // 128 = 2 ** 7 36#define OBJ_DATA_SISU 7 // 128 = 2 ** 7
37#define OBJ_DATA_SLIDE 1 37#define OBJ_DATA_SLIDE 1
38 38
39#define FFT_TRN 1 39#define FFT_TRN 1
40#define IFFT_TRN -1 40#define IFFT_TRN -1
41 41
42typedef struct _fft { 42typedef struct _fft {
43 int N; // ¥Ç¥¸¥¿¥ë¡¦¥Ç¡¼¥¿·ï¿ô 43 int N; // ¥Ç¥¸¥¿¥ë¡¦¥Ç¡¼¥¿·ï¿ô
44 int r; // N = 2^r 44 int r; // N = 2^r
45 double* result_A; // ¥µ¥ó¥×¥ê¥ó¥°¥Ç¡¼¥¿¤ò¤³¤³¤Ë¥»¥Ã¥È¤¹¤ë 45 double* result_A; // ¥µ¥ó¥×¥ê¥ó¥°¥Ç¡¼¥¿¤ò¤³¤³¤Ë¥»¥Ã¥È¤¹¤ë
46 // cos À®Ê¬¡Äµá¤á¤ë¥¹¥Ú¥¯¥È¥ëÀ®Ê¬¤Î¿ôʬ¤ÎÎΰ褬ɬÍ× 46 // cos À®Ê¬¡Äµá¤á¤ë¥¹¥Ú¥¯¥È¥ëÀ®Ê¬¤Î¿ôʬ¤ÎÎΰ褬ɬÍ×
47 double* result_B; // sin À®Ê¬¡Äµá¤á¤ë¥¹¥Ú¥¯¥È¥ëÀ®Ê¬¤Î¿ôʬ¤ÎÎΰ褬ɬÍ× 47 double* result_B; // sin À®Ê¬¡Äµá¤á¤ë¥¹¥Ú¥¯¥È¥ëÀ®Ê¬¤Î¿ôʬ¤ÎÎΰ褬ɬÍ×
48} FFT; 48} FFT;
49#define FFT_SIZE sizeof( FFT ) 49#define FFT_SIZE sizeof( FFT )
50 50
51 51
52void digital_fft( FFT* fft ); 52void digital_fft( FFT* fft );
53 53
54 54
55double SpectA[OBJ_DATA_COUNT]; 55double SpectA[OBJ_DATA_COUNT];
56double SpectB[OBJ_DATA_COUNT]; 56double SpectB[OBJ_DATA_COUNT];