diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2005-11-14 09:56:13 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2005-11-14 09:56:13 +0000 |
commit | 219ce0859f42e4a7b6a8767dfcc6811bfb5d8b04 (patch) | |
tree | 95bce5dd8bc5c3c91f069f795ec4c85f5d873af8 | |
parent | 21ae6d6baaefe9a1d4e7a9189b6f8d9ef8cc091c (diff) |
enlarging the mtx_rowr(i)fft column size again from N/2 to N/2+1.
all other changes from zmoelnig (crashy) were kept.
svn path=/trunk/externals/iem/iemmatrix/; revision=3886
-rw-r--r-- | src/mtx_rowrfft.c | 2 | ||||
-rw-r--r-- | src/mtx_rowrifft.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mtx_rowrfft.c b/src/mtx_rowrfft.c index 3475a8b..55e67d7 100644 --- a/src/mtx_rowrfft.c +++ b/src/mtx_rowrfft.c @@ -102,7 +102,7 @@ static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s, //mTXrowrfftList (x, s, argc-2, argv+2); int rows = atom_getint (argv++); int columns = atom_getint (argv++); - int columns_re = (columns>>1); + int columns_re = (columns>>1)+1; /* N/2+1 samples needed for real part of realfft */ int size = rows * columns; int in_size = argc-2; int size2 = columns_re * rows + 2; /* +2 since the list also contains matrix row+col */ diff --git a/src/mtx_rowrifft.c b/src/mtx_rowrifft.c index 45678a0..223600c 100644 --- a/src/mtx_rowrifft.c +++ b/src/mtx_rowrifft.c @@ -94,7 +94,7 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, int rows = atom_getint (argv++); int columns_re = atom_getint (argv++); int in_size = argc-2; - int columns = columns_re<<1; + int columns = (columns_re-1)<<1; int size2 = columns_re * rows; int size = rows * columns; int ifft_count; @@ -103,7 +103,9 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, t_float *f_im = x->f_im; // ifftsize check - if (!size) + if (columns_re < 3) + post("mtx_rowrifft: matrix must have at least 3 columns"); + else if (!size) post("mtx_rowrifft: invalid dimensions"); else if (in_size < size2) post("mtx_rowrifft: sparse matrix not yet supported: use \"mtx_check\""); @@ -136,7 +138,7 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, // do nothing else! } else - post("mtx_rowrifft: rowvector size no power of 2!"); + post("mtx_rowrifft: rowvector 2*(size+1) no power of 2!"); } static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s, |