IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 24, 2021, 3:37:52 PM (5 years ago)
Author:
eugene
Message:

clarify in comments the buffers and pixel sizes used in the different stages of compression/uncompression; catch unimplemented compression cases; fix error in pixel size for RICE1; cleanup verbose code; use correct sscanf format code in ASCII table reading code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/test/imagecomp.c

    r39457 r41474  
    33# include "tap_ohana.h"
    44
     5# define MEM_VERBOSE FALSE
     6
    57int test_compress (int bitpix, char *zcmptype);
    68int test_compress_fullrange (int bitpix, char *zcmptype);
    79int test_compress_fulltile (int bitpix, char *zcmptype);
    810
    9 // char *cmptype[] = {"NONE", "NONE_2", "GZIP_1", "GZIP_2", "PLIO_1", "RICE_1", "RICE_ONE", "HCOMPRESS_1", NULL};
     11// XXX FULL SET : char *cmptype[] = {"NONE", "NONE_2", "GZIP_1", "GZIP_2", "PLIO_1", "RICE_1", "RICE_ONE", "HCOMPRESS_1", NULL};
    1012char *cmptype[] = {"NONE", "NONE_1", "NONE_2", "GZIP_1", "GZIP_2", "RICE_1", "RICE_ONE", NULL};
     13// XXX NOT WORKING: char *cmptype[] = {"HCOMPRESS_1", NULL};
    1114int bitpix[] = {8, 16, 32, -32, -64, 0};
    1215
     
    3134      test_compress_fulltile (bitpix[j], cmptype[i]);
    3235      test_compress_fullrange (bitpix[j], cmptype[i]);
    33       ok (ohana_memcheck (TRUE), "no memory corruption");
     36      ok (ohana_memcheck (MEM_VERBOSE), "no memory corruption");
    3437    }
    3538  }
     
    4346      test_compress_fulltile (bitpix[j], cmptype[i]);
    4447      test_compress_fullrange (bitpix[j], cmptype[i]);
    45       ok (ohana_memcheck (TRUE), "no memory corruption");
     48      ok (ohana_memcheck (MEM_VERBOSE), "no memory corruption");
    4649    }
    4750  }
     
    5558      test_compress_fulltile (bitpix[j], cmptype[i]);
    5659      test_compress_fullrange (bitpix[j], cmptype[i]);
    57       ok (ohana_memcheck (TRUE), "no memory corruption");
     60      ok (ohana_memcheck (MEM_VERBOSE), "no memory corruption");
    5861    }
    5962  }
     
    138141  }     
    139142 
     143  // diag ("--- Image has a total of %d pixels of which %d are bad ---", NX*NY, Nbad);
    140144  ok (!Nbad, "all image pixels match");
    141145
Note: See TracChangeset for help on using the changeset viewer.