diff options
author | Siddhesh Wani | 2017-07-04 19:55:17 +0530 |
---|---|---|
committer | GitHub | 2017-07-04 19:55:17 +0530 |
commit | e7a1a9bd776aa3ebdd13aea4d4ef838e65acb34c (patch) | |
tree | 749b476d7653774c918af42ebd952d4050ed49b6 /2.3-1/src/c/signalProcessing/transforms/dct | |
parent | c66867c874436fb37ef54c67b048885ce094e894 (diff) | |
parent | 8889f4a5edad040f47c3fcb717053352ab0d05b8 (diff) | |
download | Scilab2C-e7a1a9bd776aa3ebdd13aea4d4ef838e65acb34c.tar.gz Scilab2C-e7a1a9bd776aa3ebdd13aea4d4ef838e65acb34c.tar.bz2 Scilab2C-e7a1a9bd776aa3ebdd13aea4d4ef838e65acb34c.zip |
Merge pull request #13 from jschandi/master
Fixed standalone conversion errors with RPi files
Diffstat (limited to '2.3-1/src/c/signalProcessing/transforms/dct')
-rw-r--r-- | 2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c index 5bc27929..7a006a0e 100644 --- a/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c +++ b/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c @@ -15,6 +15,7 @@ #include "addition.h" #include "types.h" #include "floatComplex.h" +#include "multiplication.h" /*#include "matrixMultiplication"*/ /*#include <fftw3.h>*/ #include <math.h> @@ -26,7 +27,7 @@ void cdcta(floatComplex *in,int row,int col,int sign,floatComplex *out) int x,y; float res,ress; float re,z,q,m; - floatComplex accu = DoubleComplex(0, 0); + floatComplex accu = FloatComplex(0, 0); floatComplex temp,mm; if(sign==-1) { @@ -44,7 +45,10 @@ void cdcta(floatComplex *in,int row,int col,int sign,floatComplex *out) for(j=0;j<col;j++) { y=row*j+i; - temp=in[y]*(cos(((M_PI)*(y+1-1./2.)*(x))/n)); + float a; + a=(cos(((M_PI)*(y+1-1./2.)*(x))/n)); + floatComplex b=FloatComplex(a,0); + temp=cmuls(in[y],b); out[x]=cadds(out[x],temp); } } |