summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-06-30 19:47:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-06-30 19:47:40 (GMT)
commit70db25c5614b515edac40bff118fb6462e6e0415 (patch)
treec549824cd0f9471b11514818d0280dfb2a08fc63 /src
parent82a89d2c18953ca826f3fa805f01f81255839531 (diff)
downloadhdf5-70db25c5614b515edac40bff118fb6462e6e0415.zip
hdf5-70db25c5614b515edac40bff118fb6462e6e0415.tar.gz
hdf5-70db25c5614b515edac40bff118fb6462e6e0415.tar.bz2
[svn-r7126] Purpose:
Code cleanup Description: Add in rest of szip "options mask" macros that were missing. Also made "raw" options mask set by the library, instead of requiring users to always set it. Platforms tested: FreeBSD 4.8 (sleipnir) Minor tweaks too small fo h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5Pdcpl.c7
-rw-r--r--src/H5Zprivate.h8
-rw-r--r--src/H5Zpublic.h6
-rw-r--r--src/H5Zszip.c7
4 files changed, 25 insertions, 3 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 7da0afc..e43e916 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -1020,6 +1020,13 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block)
if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_CREATE)))
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ /* Always set "raw" (no szip header) flag for data */
+ options_mask |= H5_SZIP_RAW_OPTION_MASK;
+
+ /* Mask off the LSB and MSB options, if they were given */
+ /* (The HDF5 library sets them internally, as needed) */
+ options_mask &= ~(H5_SZIP_LSB_OPTION_MASK|H5_SZIP_MSB_OPTION_MASK);
+
/* Set the parameters for the filter */
cd_values[0]=options_mask;
cd_values[1]=pixels_per_block;
diff --git a/src/H5Zprivate.h b/src/H5Zprivate.h
index 84b2eeb..103aeff 100644
--- a/src/H5Zprivate.h
+++ b/src/H5Zprivate.h
@@ -30,6 +30,14 @@ typedef struct {
unsigned *cd_values; /*client data values */
} H5Z_filter_info_t;
+/* Special parameters for szip compression */
+/* [These are aliases for the similar definitions in szlib.h, which we can't
+ * include directly due to the duplication of various symbols with the zlib.h
+ * header file] */
+#define H5_SZIP_LSB_OPTION_MASK 8
+#define H5_SZIP_MSB_OPTION_MASK 16
+#define H5_SZIP_RAW_OPTION_MASK 128
+
struct H5O_pline_t; /*forward decl*/
/* Internal API routines */
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index c455700..1463598 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -51,8 +51,10 @@ typedef int H5Z_filter_t;
/* [These are aliases for the similar definitions in szlib.h, which we can't
* include directly due to the duplication of various symbols with the zlib.h
* header file] */
-#define H5_SZIP_RAW_OPTION_MASK 128
-#define H5_SZIP_NN_OPTION_MASK 32
+#define H5_SZIP_ALLOW_K13_OPTION_MASK 1
+#define H5_SZIP_CHIP_OPTION_MASK 2
+#define H5_SZIP_EC_OPTION_MASK 4
+#define H5_SZIP_NN_OPTION_MASK 32
#define H5_SZIP_MAX_PIXELS_PER_BLOCK 32
/* Values to decide if EDC is enabled for reading data */
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index aa83469..bf3bcda 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -250,8 +250,13 @@ H5Z_filter_szip (unsigned flags, size_t cd_nelmts, const unsigned cd_values[],
/* Sanity check to make certain that we haven't drifted out of date with
* the mask options from the szlib.h header */
- assert(H5_SZIP_RAW_OPTION_MASK==SZ_RAW_OPTION_MASK);
+ assert(H5_SZIP_ALLOW_K13_OPTION_MASK==SZ_ALLOW_K13_OPTION_MASK);
+ assert(H5_SZIP_CHIP_OPTION_MASK==SZ_CHIP_OPTION_MASK);
+ assert(H5_SZIP_EC_OPTION_MASK==SZ_EC_OPTION_MASK);
+ assert(H5_SZIP_LSB_OPTION_MASK==SZ_LSB_OPTION_MASK);
+ assert(H5_SZIP_MSB_OPTION_MASK==SZ_MSB_OPTION_MASK);
assert(H5_SZIP_NN_OPTION_MASK==SZ_NN_OPTION_MASK);
+ assert(H5_SZIP_RAW_OPTION_MASK==SZ_RAW_OPTION_MASK);
/* Check arguments */
if (cd_nelmts!=4)