diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-07-20 19:21:03 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-07-20 19:21:03 (GMT) |
commit | 4cb6c01d7f59be968649e36a61346be044f76345 (patch) | |
tree | e0a0b81e542768b75d5bbb2de8afc1abfb8c4370 /tools/h5repack/h5repack_filters.c | |
parent | 00909f278d64017c21c8348537231daba97be9dd (diff) | |
download | hdf5-4cb6c01d7f59be968649e36a61346be044f76345.zip hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.gz hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.bz2 |
[svn-r8904] Purpose:
h5diff and h5repack changes
Description:
h5diff
introduced the following four modes of output:
Normal mode: print the number of differences found and where they occured
Report mode: print the above plus the differences
Verbose mode: print the above plus a list of objects and warnings
Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found)
h5repack
added an extra parameter for SZIP filter (coding method)
the new syntax is
-f SZIP=<pixels per block,coding>
(pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN')
Example of use:
./h5repack -i file1 -o file2 -f SZIP=8,NN -v
updated usage messages, test scripts and files accordingly
Solution:
Platforms tested:
linux
AIX
solaris
Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_filters.c')
-rw-r--r-- | tools/h5repack/h5repack_filters.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 61ef4a7..2536ced 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -122,8 +122,6 @@ int apply_filters(const char* name, /* object name from traverse list */ unsigned aggression; /* the deflate level */ hsize_t nelmts; /* number of elements in dataset */ size_t size; /* size of datatype in bytes */ - unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block; int i; /* check first if the object is to be filtered */ @@ -205,15 +203,23 @@ int apply_filters(const char* name, /* object name from traverse list */ *------------------------------------------------------------------------- */ case H5Z_FILTER_SZIP: - szip_pixels_per_block=obj->filter[i].cd_values[0]; - + { + unsigned options_mask; + unsigned pixels_per_block; + + pixels_per_block=obj->filter[i].cd_values[0]; + if (obj->filter[i].szip_coding==0) + options_mask=H5_SZIP_NN_OPTION_MASK; + else + options_mask=H5_SZIP_EC_OPTION_MASK; + #if defined (CHECK_SZIP) /* check szip parameters */ if (check_szip(type_id, obj->chunk.rank, obj->chunk.chunk_lengths, - szip_options_mask, - &szip_pixels_per_block, + options_mask, + &pixels_per_block, options)==1) { #endif @@ -221,9 +227,10 @@ int apply_filters(const char* name, /* object name from traverse list */ /* set up for szip data */ if(H5Pset_chunk(dcpl_id,obj->chunk.rank,obj->chunk.chunk_lengths)<0) return -1; - if (H5Pset_szip(dcpl_id, szip_options_mask, szip_pixels_per_block)<0) + if (H5Pset_szip(dcpl_id,options_mask,pixels_per_block)<0) return -1; + #if defined (CHECK_SZIP) } else @@ -234,6 +241,7 @@ int apply_filters(const char* name, /* object name from traverse list */ #endif + } break; /*------------------------------------------------------------------------- @@ -269,7 +277,6 @@ out: } - /*------------------------------------------------------------------------- * Function: print_filters * @@ -277,7 +284,7 @@ out: * * Return: 0, ok, -1 no * - * Programmer: pvn@ncsa.uiuc.edu + * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * * Date: December 19, 2003 * @@ -292,7 +299,7 @@ int print_filters(hid_t dcpl_id) unsigned cd_values[20]; /* filter client data values */ size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ - char f_name[256]; /* filter/file name */ + char f_name[256]; /* filter name */ char s[64]; /* temporary string buffer */ int i; @@ -338,6 +345,9 @@ int print_filters(hid_t dcpl_id) } +#if defined (CHECK_SZIP) + + /*------------------------------------------------------------------------- * Function: check_szip * @@ -353,7 +363,7 @@ int print_filters(hid_t dcpl_id) * Return: 1=can apply the filter * 0=cannot apply the filter * - * Programmer: pvn@ncsa.uiuc.edu + * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * * Date: December 23, 2003 * @@ -560,3 +570,6 @@ int check_szip_params( unsigned bits_per_pixel, return 1; } +#endif /* CHECK_SZIP */ + + |