home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************
-
- COPYRIGHT (C) 1992 UNIVERSITY OF CALIFORNIA
-
- ***************************************************************/
-
- us_conv(x, h, m, nrow, ncol, flag)
- int nrow, ncol, flag;
- float **x, *h;
- {
- conv_rows(*x, h, m, nrow, ncol, flag);
- tpose(x, nrow, ncol*2);
- }
-
- /****************************************************************/
-
- conv_rows(x, h, m, nrow, ncol, flag)
- int nrow, ncol, m, flag;
- float *x, *h;
- {
- float *ptr1, *ptr2, *temp;
-
- ptr1 = x + nrow*ncol - ncol;
- ptr2 = x + 2*nrow*ncol - 2*ncol;
-
- while(ptr1 > x) {
-
- if(!flag)
- us_conv_lp_rbc(ptr1, ptr2, h, ncol, m);
- else
- us_conv_hp_rbc(ptr1, ptr2, h, ncol, m);
-
- ptr1 -= ncol;
- ptr2 -= 2*ncol;
- }
-
- temp = (float*)malloc(2*ncol*sizeof(float));
-
- if(!flag)
- us_conv_lp_rbc(x, temp, h, ncol, m);
- else
- us_conv_hp_rbc(x, temp, h, ncol, m);
-
- copy(temp, x, 2*ncol);
- free(temp);
- }
-
- /****************************************************************/
-
- copy(x1, x2, n)
- int n;
- register float *x1, *x2;
- {
- register float *max;
-
- max = x1 + n;
- while(x1 < max)
- *x2++ = *x1++;
- }
-