From 2d8050d5bd74adc66b9a45f55078791a36434be8 Mon Sep 17 00:00:00 2001 From: ukashanoor Date: Thu, 29 Jun 2017 20:26:08 +0530 Subject: till disp complete --- 2.3-1/src/c/signalProcessing/includes/dct.h | 2 + 2.3-1/src/c/signalProcessing/includes/idct.h | 2 + 2.3-1/src/c/signalProcessing/interfaces/int_dct.h | 4 + 2.3-1/src/c/signalProcessing/interfaces/int_idct.h | 2 + .../src/c/signalProcessing/transforms/dct/sdcta.c | 160 +++++++++++++++++++++ .../c/signalProcessing/transforms/idct/sidcta.c | 83 +++++++++++ 6 files changed, 253 insertions(+) create mode 100644 2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c create mode 100644 2.3-1/src/c/signalProcessing/transforms/idct/sidcta.c (limited to '2.3-1/src/c/signalProcessing') diff --git a/2.3-1/src/c/signalProcessing/includes/dct.h b/2.3-1/src/c/signalProcessing/includes/dct.h index 5255241e..80668ffa 100644 --- a/2.3-1/src/c/signalProcessing/includes/dct.h +++ b/2.3-1/src/c/signalProcessing/includes/dct.h @@ -25,6 +25,8 @@ extern "C" { void ddcta(double *in,int row,int col,int sign,double *out); +void sdcta(float *in,int row,int col,int sign,float *out); + void zdcta(doubleComplex *in,int row,int col,int sign,doubleComplex *out); void cdcta(floatComplex *in,int row,int col,int sign,floatComplex *out); diff --git a/2.3-1/src/c/signalProcessing/includes/idct.h b/2.3-1/src/c/signalProcessing/includes/idct.h index 13458b7d..1e7b85b3 100644 --- a/2.3-1/src/c/signalProcessing/includes/idct.h +++ b/2.3-1/src/c/signalProcessing/includes/idct.h @@ -25,6 +25,8 @@ extern "C" { void didcta(double *in,int row,int col,double *out); +void sidcta(float *in,int row,int col,float *out); + void zidcta(doubleComplex *in,int row,int col,doubleComplex *out); void cidcta(floatComplex *in,int row,int col,floatComplex *out); diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_dct.h b/2.3-1/src/c/signalProcessing/interfaces/int_dct.h index 6cfb21c7..3481c4d5 100644 --- a/2.3-1/src/c/signalProcessing/interfaces/int_dct.h +++ b/2.3-1/src/c/signalProcessing/interfaces/int_dct.h @@ -21,6 +21,10 @@ #define d2d0dctd2(in,size,sign,out) ddcta(in,size[0],size[1],sign,out) +#define s2dcts2(in,size,out) sdcta(in,size[0],size[1],-1,out) + +#define s2s0dcts2(in,size,sign,out) sdcta(in,size[0],size[1],sign,out) + #define z2dctz2(in,size,out) zdcta(in,size[0],size[1],-1,out) #define z2d0dctz2(in,size,sign,out) zdcta(in,size[0],size[1],sign,out) diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_idct.h b/2.3-1/src/c/signalProcessing/interfaces/int_idct.h index c3a174ac..f705fe2d 100644 --- a/2.3-1/src/c/signalProcessing/interfaces/int_idct.h +++ b/2.3-1/src/c/signalProcessing/interfaces/int_idct.h @@ -19,6 +19,8 @@ #define d2idctd2(in,size,out) didcta(in,size[0],size[1],out) +#define s2idcts2(in,size,out) sidcta(in,size[0],size[1],out) + #define z2idctz2(in,size,out) zidcta(in,size[0],size[1],out) #define c2idctc2(in,size,out) cidcta(in,size[0],size[1],out) diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c new file mode 100644 index 00000000..9f380e8b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c @@ -0,0 +1,160 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + 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 + Author: Ukasha Noor + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + +#include "dct.h" +/*#include */ +#include + +void sdcta(float *in,int row,int col,int sign,float *out) +{ + int i,j,k,u,v; + int n; + int x,y; + float res,ress; + float re,z,q,m; + if(sign==-1) + { + if(row==1) + { + n=col; + for(u=0;u*/ +#include + +void sidcta(float *in,int row,int col,float *out) +{ + int i,j,k,u,v; + int n=col; + int x,y; + float res,ress; + float re,z,q,m; + if(row==1) + { + res=1./sqrt(n); + ress=sqrt(2./n); + for(u=0;u