- Timestamp:
- May 29, 2015, 5:24:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/libfits/table/F_compress_T.c
r38329 r38334 56 56 57 57 TableField *fields = NULL; 58 ALLOCATE (fields, TableField, Nfields);58 ALLOCATE_ZERO (fields, TableField, Nfields); 59 59 for (i = 0; i < Nfields; i++) { 60 60 snprintf (keyword, 80, "TTYPE%d", i+1); … … 129 129 130 130 fields[i].offset = offset; 131 offset += fields[i]. offset;131 offset += fields[i].rowsize; 132 132 } 133 133 134 134 // allocate the intermediate storage buffers 135 int Nzdata_alloc = max_width*ztilelen + 100; 135 136 ALLOCATE (raw, char, max_width*ztilelen); 136 ALLOCATE (zdata, char, max_width*ztilelen);137 ALLOCATE (zdata, char, Nzdata_alloc); 137 138 138 139 // compress the data : copy into a tile, compress the tile, then add to the output table … … 153 154 154 155 int Nraw = Nrows*fields[j].Nvalues; // number of pixels 155 int Nzdata = max_width*ztilelen; // available space, replaced with actual output size on compression156 int Nzdata = Nzdata_alloc; // available space, replaced with actual output size on compression 156 157 if (!gfits_compress_data (zdata, &Nzdata, fields[j].zctype, NULL, NULL, 0, raw, Nraw, fields[j].pixsize)) ESCAPE(A); 157 158
Note:
See TracChangeset
for help on using the changeset viewer.
