summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Znbit.c1
-rw-r--r--src/H5Zpublic.h5
-rw-r--r--src/H5Zscaleoffset.c1
-rw-r--r--tools/h5repack/h5repack_verify.c25
4 files changed, 20 insertions, 12 deletions
diff --git a/src/H5Znbit.c b/src/H5Znbit.c
index 8f95006..1b9265d 100644
--- a/src/H5Znbit.c
+++ b/src/H5Znbit.c
@@ -96,7 +96,6 @@ H5Z_class_t H5Z_NBIT[1] = {{
#define H5Z_NBIT_ARRAY 2 /* Array datatype class */
#define H5Z_NBIT_COMPOUND 3 /* Compound datatype class */
#define H5Z_NBIT_NOOPTYPE 4 /* Other datatype class: nbit does no compression */
-#define H5Z_NBIT_USER_NPARMS 0 /* Number of parameters that users can set */
#define H5Z_NBIT_MAX_NPARMS 4096 /* Max number of parameters for filter */
#define H5Z_NBIT_ORDER_LE 0 /* Little endian for datatype byte order */
#define H5Z_NBIT_ORDER_BE 1 /* Big endian for datatype byte order */
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index a671d1a..7211a2b 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -86,6 +86,11 @@ typedef int H5Z_filter_t;
#define H5Z_SZIP_PARM_BPP 2 /* "Local" parameter for bits-per-pixel */
#define H5Z_SZIP_PARM_PPS 3 /* "Local" parameter for pixels-per-scanline */
+/* Macros for the nbit filter */
+#define H5Z_NBIT_USER_NPARMS 0 /* Number of parameters that users can set */
+
+/* Macros for the scale offset filter */
+#define H5Z_SCALEOFFSET_USER_NPARMS 2 /* Number of parameters that users can set */
/* Special parameters for ScaleOffset filter*/
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 7482275..84d404e 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -92,7 +92,6 @@ H5Z_class_t H5Z_SCALEOFFSET[1] = {{
}};
/* Local macros */
-#define H5Z_SCALEOFFSET_USER_NPARMS 2 /* Number of parameters that users can set */
#define H5Z_SCALEOFFSET_TOTAL_NPARMS 20 /* Total number of parameters for filter */
#define H5Z_SCALEOFFSET_PARM_SCALETYPE 0 /* "User" parameter for scale type */
#define H5Z_SCALEOFFSET_PARM_SCALEFACTOR 1 /* "User" parameter for scale factor */
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index a878621..465fdbf 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -517,22 +517,27 @@ static int has_filters(hid_t pid, hid_t tid, unsigned nfilters, filter_info_t *f
break;
case H5Z_FILTER_NBIT:
-
- /* TO DO */
-
- ;
-
+
+ /* only client data values number of values checked */
+ if ( H5Z_NBIT_USER_NPARMS != filter[i].cd_nelmts)
+ return 0;
+
break;
case H5Z_FILTER_SCALEOFFSET:
-
- /* TO DO */
- ;
-
-
+ /* only client data values checked */
+ for( j = 0; j < H5Z_SCALEOFFSET_USER_NPARMS; j++)
+ {
+ if (cd_values[j] != filter[i].cd_values[j])
+ {
+ return 0;
+ }
+
+ }
+
break;