- Timestamp:
- May 30, 2015, 7:59:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/libfits/matrix/F_compress_M.c
r38329 r38340 139 139 int tile_pixsize = gfits_uncompressed_data_pixsize (zcmptype, header[0].bitpix, NULL, NULL, 0); 140 140 141 int Nzdata_alloc = raw_pixsize*max_tile_size + 100; 141 142 ALLOCATE (raw, char, raw_pixsize*max_tile_size); 142 ALLOCATE (zdata, char, raw_pixsize*max_tile_size);143 ALLOCATE (zdata, char, Nzdata_alloc); 143 144 144 145 // init the otile[] counters … … 155 156 if (!gfits_collect_data (matrix, raw, Nraw, raw_pixsize, otile, oblank, ztile, zblank, zscale, zzero)) ESCAPE(A); 156 157 158 if (!strcasecmp(zcmptype, "GZIP_1")) { 159 if (!gfits_byteswap_zdata (raw, Nraw, raw_pixsize)) ESCAPE(A); 160 } 161 157 162 // XXX the tile must not be > 2GB 158 163 159 164 // optname, optvalue = NULL, Noptions = 0 160 165 161 int Nzdata = raw_pixsize*max_tile_size; // available space, replaced with actual output size on compression166 int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression 162 167 if (!gfits_compress_data (zdata, &Nzdata, zcmptype, NULL, NULL, 0, raw, Nraw, tile_pixsize)) ESCAPE(A); 163 168 … … 298 303 SETUP_INSIZE (int, 4); 299 304 break; 305 case 8: 306 SETUP_INSIZE (double, 8); 307 break; 300 308 default: 301 309 abort();
Note:
See TracChangeset
for help on using the changeset viewer.
