diff options
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 4 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 24 | ||||
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 10 |
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 |