IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 3, 2015, 7:00:55 AM (11 years ago)
Author:
eugene
Message:

get the input / output / compressed pixels sizes right and get the byteswaps right

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/matrix/F_compress_data.c

    r38355 r38356  
    6565  }
    6666
    67   if (!strcasecmp(cmptype, "RICE_1")) {
     67  if (!strcasecmp(cmptype, "RICE_1") || !strcasecmp(cmptype, "RICE_ONE")) {
    6868    int i, blocksize;
    6969    // look for the BLOCKSIZE
     
    8383    // fprintf (stderr, "%d comp bytes; %d uncomp 'pixels', totals: %d %d\n", Nzdata, Npix, Ninsum, Noutsum);
    8484
     85    char buffer[1000];
     86    int k;
     87
    8588    switch (rawpix_size) {
    8689      case 4:
     
    9093
    9194      case 2:
     95        // Nout is the number of bytes in the compressed buffer
    9296        Nout = fits_rcomp_short ((short *) rawdata, Nrawpix, (unsigned char *) zdata, *Nzdata, blocksize);
     97
     98        if (0) {
     99          fprintf (stderr, "Nout: %d, Nrawpix: %d\n", Nout, Nrawpix);
     100          fprintf (stderr, "cmp inp: ");
     101          for (k = 0; k < Nout; k++) { fprintf (stderr, "0x%02hhx ", zdata[k]); }
     102          fprintf (stderr, "\n");
     103        }
     104
     105        status = fits_rdecomp_short ((unsigned char *) zdata, Nout, (unsigned short *) buffer, Nrawpix, blocksize);
     106        myAssert (!status, "failed to rdecomp");
    93107        break;
    94108
Note: See TracChangeset for help on using the changeset viewer.