summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-21 19:27:56 (GMT)
committerRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-21 19:27:56 (GMT)
commit89ed8ceec247d050e6962da876443bb864f08eb5 (patch)
treed231d13b9f04937da1a1fe1cedd7f2069143a6bd /tools/h5dump
parentf20a7939694a60c08eb59cc916abe62afcf5310a (diff)
downloadhdf5-89ed8ceec247d050e6962da876443bb864f08eb5.zip
hdf5-89ed8ceec247d050e6962da876443bb864f08eb5.tar.gz
hdf5-89ed8ceec247d050e6962da876443bb864f08eb5.tar.bz2
[svn-r10060] Purpose:
feature Description: h5dump support for scaleoffset compression Solution: Platforms tested: verbena, shanti,copper64 Misc. update:
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump.c4
-rw-r--r--tools/h5dump/h5dumpgentest.c24
-rw-r--r--tools/h5dump/testh5dump.sh.in10
3 files changed, 37 insertions, 1 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index f241c8f..637dd71 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -2352,6 +2352,10 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
indentation(indent + COL);
printf("%s\n", NBIT);
break;
+ case H5Z_FILTER_SCALEOFFSET:
+ indentation(indent + COL);
+ printf("%s %s %s %d %s\n", SCALEOFFSET, BEGIN, SCALEOFFSET_MINBIT, cd_values[0], END);
+ break;
default:
indentation(indent + COL);
if (H5Zfilter_avail(filtn))
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 23da7e8..b01d87a 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -4649,6 +4649,24 @@ static void gent_filters(void)
ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1);
assert(ret>=0);
#endif
+
+/*-------------------------------------------------------------------------
+ * scaleoffset
+ *-------------------------------------------------------------------------
+ */
+#if defined (H5_HAVE_FILTER_SCALEOFFSET)
+ /* remove the filters from the dcpl */
+ ret=H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ assert(ret>=0);
+
+ /* set the scaleoffset filter */
+ ret=H5Pset_scaleoffset(dcpl,H5Tget_size(H5T_NATIVE_INT));
+ assert(ret>=0);
+
+ ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
+ assert(ret>=0);
+#endif
+
/*-------------------------------------------------------------------------
* all filters
*-------------------------------------------------------------------------
@@ -4684,6 +4702,12 @@ static void gent_filters(void)
assert(ret>=0);
#endif
+#if defined (H5_HAVE_FILTER_NBIT)
+ /* set the nbit filter */
+ ret=H5Pset_nbit(dcpl);
+ assert(ret>=0);
+#endif
+
ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1);
assert(ret>=0);
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 215a124..5cd2e46 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -20,6 +20,7 @@ USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
USE_FILTER_NBIT="@USE_FILTER_NBIT@"
+USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
DUMPER=h5dump # The tool name
DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
@@ -290,9 +291,16 @@ if test $USE_FILTER_NBIT != "yes"; then
else
TOOLTEST tnbit.ddl $option
fi
+# scaleoffset
+option="-H -p -d scaleoffset tfilters.h5"
+if test $USE_FILTER_SCALEOFFSET != "yes"; then
+ SKIP $option
+else
+ TOOLTEST tscaleoffset.ddl $option
+fi
# all
option="-H -p -d all tfilters.h5"
-if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then
+if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes"; then
SKIP $option
else
TOOLTEST tallfilters.ddl $option