From 8b44229ef44f0558ce045e46ff833fb44df913c9 Mon Sep 17 00:00:00 2001 From: jofret Date: Mon, 21 Jun 2010 06:24:38 +0000 Subject: Tagging the 2.0 release of scilab2c --- src/c/signalProcessing/ifft/ifft842.c | 163 ++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 src/c/signalProcessing/ifft/ifft842.c (limited to 'src/c/signalProcessing/ifft/ifft842.c') diff --git a/src/c/signalProcessing/ifft/ifft842.c b/src/c/signalProcessing/ifft/ifft842.c new file mode 100644 index 00000000..75f6e1ca --- /dev/null +++ b/src/c/signalProcessing/ifft/ifft842.c @@ -0,0 +1,163 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ifft_internal.h" + + + +/* get binary log of integer argument; exact if n a power of 2 */ +static int fastlog2( int n) +{ + int log = -1; + while(n) { + log++; + n >>= 1; + } + return(log); +} + +/* + int in; FORWARD or INVERSE + int n; length of vector + DPCOMPLEX *b; input vector +*/ +void ifft842 (doubleComplex* b, int size , int in) +{ + double fn; + doubleComplex temp ; + + int L[16],L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15; + int j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14; + int i = 0, j, ij, ji, ij1, ji1; + int n2pow, n8pow, nthpo, ipass, nxtlt, lengt; + + n2pow = fastlog2( size ); + nthpo = size ; + fn = nthpo; + + + if(in==INVERSE) + /*scramble inputs*/ + + for(i=0,j=size/2;j