home *** CD-ROM | disk | FTP | other *** search
/ Los Alamos National Laboratory / LANL_CD.ISO / software / compres / src / conv_ds0.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-11  |  834 b   |  35 lines

  1. /****************************************************************
  2.  
  3. COPYRIGHT (C) 1992 UNIVERSITY OF CALIFORNIA
  4.  
  5. ***************************************************************/
  6.  
  7. conv_ds(x1, x2, h, m, nrow, ncol, flag)
  8. int nrow, ncol, m, flag;
  9. float *x1, **x2, *h;
  10. {
  11.     *x2 = (float*)malloc((nrow*ncol/2)*sizeof(float));
  12.     conv_rows(x1, x2, h, m, nrow, ncol, flag);
  13.     tpose(x2, nrow, ncol/2);
  14. }
  15.  
  16. /****************************************************************/
  17.  
  18. conv_rows(x1, x2, h, m, nrow, ncol, flag)
  19. int nrow, ncol, m, flag;
  20. float *x1, **x2, *h;
  21. {
  22.     float *max, *x2ptr;
  23.  
  24.     x2ptr = *x2;
  25.     max = x1 + nrow*ncol;
  26.     while(x1 < max) {
  27.         if(!flag)
  28.             conv_ds_lp_rbc(x1, x2ptr, h, m, ncol);
  29.         else
  30.             conv_ds_hp_rbc(x1, x2ptr, h, m, ncol);
  31.         x1 += ncol;
  32.         x2ptr += ncol/2;
  33.     }
  34. }
  35.