summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Zpublic.h13
-rw-r--r--src/H5Zszip.c7
-rw-r--r--tools/h5repack/h5repack_verify.c19
3 files changed, 19 insertions, 20 deletions
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index 6c238fe..df02af8 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -74,8 +74,17 @@ typedef int H5Z_filter_t;
#define H5_SZIP_NN_OPTION_MASK 32
#define H5_SZIP_MAX_PIXELS_PER_BLOCK 32
-/* Total number of parameters for the shuffle filter, private */
-#define H5Z_SHUFFLE_TOTAL_NPARMS 1
+/* Total number of parameters for the shuffle filter */
+#define H5Z_SHUFFLE_TOTAL_NPARMS 1
+
+/* Macros for the szip filter */
+#define H5Z_SZIP_USER_NPARMS 2 /* Number of parameters that users can set */
+#define H5Z_SZIP_TOTAL_NPARMS 4 /* Total number of parameters for filter */
+#define H5Z_SZIP_PARM_MASK 0 /* "User" parameter for option mask */
+#define H5Z_SZIP_PARM_PPB 1 /* "User" parameter for pixels-per-block */
+#define H5Z_SZIP_PARM_BPP 2 /* "Local" parameter for bits-per-pixel */
+#define H5Z_SZIP_PARM_PPS 3 /* "Local" parameter for pixels-per-scanline */
+
/* Special parameters for ScaleOffset filter*/
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index cdc26aa..9201a80 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -51,13 +51,6 @@ H5Z_class_t H5Z_SZIP[1] = {{
H5Z_filter_szip, /* The actual filter function */
}};
-/* Local macros */
-#define H5Z_SZIP_USER_NPARMS 2 /* Number of parameters that users can set */
-#define H5Z_SZIP_TOTAL_NPARMS 4 /* Total number of parameters for filter */
-#define H5Z_SZIP_PARM_MASK 0 /* "User" parameter for option mask */
-#define H5Z_SZIP_PARM_PPB 1 /* "User" parameter for pixels-per-block */
-#define H5Z_SZIP_PARM_BPP 2 /* "Local" parameter for bits-per-pixel */
-#define H5Z_SZIP_PARM_PPS 3 /* "Local" parameter for pixels-per-scanline */
/*-------------------------------------------------------------------------
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index 42e8683..9bb5443 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -507,18 +507,15 @@ static int has_filters(hid_t pid, hid_t tid, unsigned nfilters, filter_info_t *f
break;
case H5Z_FILTER_SZIP:
-
-#if 0
- /* 4 private client values are returned by DCPL */
- if ( f1.cd_nelmts != 4 && f2.cd_nelmts != 2 )
- return -1;
-
- if ( f2.cd_values[0] != f1.cd_values[2] &&
- f2.cd_values[1] != f1.cd_values[1] )
- return -1;
-#endif
-
+ /* 4 private client value is returned by DCPL */
+ if ( cd_nelmts != H5Z_SZIP_TOTAL_NPARMS && filter[i].cd_nelmts != H5Z_SZIP_USER_NPARMS )
+ return 0;
+
+ /* "User" parameter for pixels-per-block (index 1) */
+ if ( cd_values[H5Z_SZIP_PARM_PPB] != filter[i].cd_values[H5Z_SZIP_PARM_PPB] )
+ return 0;
+
break;