updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / wavelet / idwtai2.c
blobe444dd8bba61fe35ada99b3b55bb6f7ed92f3260
1 // Author: Aime' Fournier
2 // E-mail: fournier@ucar.edu
4 #include "qf.h"
6 void idwtai2( // inverse of dwtai2()
7 real *u, // input/output array of size ia[0][0]*ia[1][0]
8 real *s, // scratch array, see dwtai2_t.c for size
9 int *iv[2], // v-space lengths from DWTAPartition()
10 int *iw[2], // w-space lengths from DWTAPartition()
11 int *ia[2], // w-space starts from DWTAPartition()
12 int lm, // maximum level
13 const pqf *h, // low-pass filter
14 const pqf *g) { // high-pass filter
15 int k,lx,ly;
17 lx=ia[1][0]; // padded x-length (nu. columns)
18 ly=ia[0][0]; // padded y-length (nu. rows)
19 for( k=0; k<=(ly-1)*lx; k+=lx )
20 idwtai(u+k,s,iv[1],iw[1],ia[1],lm,h,g);
21 xpi2(u,ly,lx,sizeof(real));
22 for( k=0; k<=(lx-1)*ly; k+=ly )
23 idwtai(u+k,s,iv[0],iw[0],ia[0],lm,h,g);
24 xpi2(u,lx,ly,sizeof(real));