IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2015, 5:42:47 PM (11 years ago)
Author:
eugene
Message:

libfits compressed I/O seems to be generally working

File:
1 edited

Legend:

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

    r38363 r38366  
    271271
    272272    // expected output size for this tile
    273     // Nout = gfits_tile_size (matrix, otile, ztile);
    274     Nout = Nout_alloc;
     273    Nout = raw_pixsize*gfits_tile_size (matrix, otile, ztile);
    275274
    276275    zdata = gfits_varlength_column_pointer (ftable, &zdef, row, &Nzdata);
     
    284283    }
    285284
    286     if (strcasecmp(cmptype, "GZIP_1") && strcasecmp(cmptype, "GZIP_2") && strcasecmp(cmptype, "RICE_1")) {
     285    if (strcasecmp(cmptype, "NONE") &&
     286        strcasecmp(cmptype, "NONE_2") &&
     287        strcasecmp(cmptype, "GZIP_1") &&
     288        strcasecmp(cmptype, "GZIP_2") &&
     289        strcasecmp(cmptype, "RICE_1") &&
     290        strcasecmp(cmptype, "RICE_ONE")) {
    287291      // Nzdata is number of bytes
    288292      if (!gfits_byteswap_zdata (zdata, Nzdata, cmp_pixsize)) ESCAPE;
     
    300304    // XXX the tile must not be > 2GB
    301305    // Nout going in is number of bytes
    302     if (!gfits_uncompress_data ((char *)zdata, Nzdata, cmptype, optname, optvalue, Noptions, out, &Nout, raw_pixsize)) ESCAPE;
     306    if (!gfits_uncompress_data ((char *)zdata, Nzdata, cmptype, optname, optvalue, Noptions, out, &Nout, Nout_alloc, raw_pixsize)) ESCAPE;
    303307
    304308    if (VERBOSE_DUMP && (row == 0)) {
     
    323327
    324328    // copy the uncompressed pixels into their correct locations           
    325     if (!strcasecmp(cmptype, "GZIP_2")) {
     329    if (!strcasecmp(cmptype, "GZIP_2") || !strcasecmp(cmptype, "NONE_2")) {
    326330      if (!gfits_distribute_gzp2 (matrix, out, Nout, raw_bitpix, otile, oblank, ztile, zblank, zscale, zzero)) ESCAPE;
    327331    } else {
Note: See TracChangeset for help on using the changeset viewer.