summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaowen Wu <wuxiaowe@ncsa.uiuc.edu>2005-02-17 03:03:50 (GMT)
committerXiaowen Wu <wuxiaowe@ncsa.uiuc.edu>2005-02-17 03:03:50 (GMT)
commit7b4b65be1ceffea0db89d0e7b234201d2229244a (patch)
treef38e285d19a169d1e5920aa02cefaa005f7f8259
parent92173d4496ef45c01a25e74ee95d6274085ac5bf (diff)
downloadhdf5-7b4b65be1ceffea0db89d0e7b234201d2229244a.zip
hdf5-7b4b65be1ceffea0db89d0e7b234201d2229244a.tar.gz
hdf5-7b4b65be1ceffea0db89d0e7b234201d2229244a.tar.bz2
[svn-r10025] Purpose:
New feature. Description: Add the scaleoffset internal library filter. Solution: Platforms tested: heping, copper, arabica Misc. update:
-rw-r--r--src/H5Ppublic.h1
-rw-r--r--src/H5Z.c8
-rw-r--r--src/H5Zpkg.h7
-rw-r--r--src/H5Zpublic.h1
-rw-r--r--src/H5config.h.in3
-rwxr-xr-xsrc/Makefile.am2
-rw-r--r--src/Makefile.in14
-rw-r--r--test/Makefile.in1
8 files changed, 29 insertions, 8 deletions
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index e51688e..576b66b 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -246,6 +246,7 @@ H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression);
H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block);
H5_DLL herr_t H5Pset_shuffle(hid_t plist_id);
H5_DLL herr_t H5Pset_nbit(hid_t plist_id);
+H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, unsigned min_bits);
H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id);
H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check);
H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id);
diff --git a/src/H5Z.c b/src/H5Z.c
index b6e66a2..a243552 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -105,10 +105,14 @@ H5Z_init_interface (void)
if (H5Z_register (H5Z_NBIT)<0)
HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register nbit filter")
#endif /* H5_HAVE_FILTER_NBIT */
+#ifdef H5_HAVE_FILTER_SCALEOFFSET
+ if (H5Z_register (H5Z_SCALEOFFSET)<0)
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register scaleoffset filter")
+#endif /* H5_HAVE_FILTER_SCALEOFFSET */
-#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT)
+#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET)
done:
-#endif /* (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT) */
+#endif /* (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP | defined H5_HAVE_FILTER_NBIT | defined H5_HAVE_FILTER_SCALEOFFSET) */
FUNC_LEAVE_NOAPI(ret_value)
}
diff --git a/src/H5Zpkg.h b/src/H5Zpkg.h
index 69ed127..c00dc58 100644
--- a/src/H5Zpkg.h
+++ b/src/H5Zpkg.h
@@ -57,6 +57,13 @@ H5_DLLVAR H5Z_class_t H5Z_SZIP[1];
H5_DLLVAR H5Z_class_t H5Z_NBIT[1];
#endif /* H5_HAVE_FILTER_NBIT */
+#ifdef H5_HAVE_FILTER_SCALEOFFSET
+/*
+ * scaleoffset filter
+ */
+H5_DLLVAR H5Z_class_t H5Z_SCALEOFFSET[1];
+#endif /* H5_HAVE_FILTER_SCALEOFFSET */
+
/* Package-local function prototypes */
H5_DLL void H5Z_update_class_vers(H5Z_class_t * old_vers, H5Z_class_t * curr_vers);
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h
index 944934e..9eb03d0 100644
--- a/src/H5Zpublic.h
+++ b/src/H5Zpublic.h
@@ -35,6 +35,7 @@ typedef int H5Z_filter_t;
#define H5Z_FILTER_FLETCHER32 3 /*fletcher32 checksum of EDC */
#define H5Z_FILTER_SZIP 4 /*szip compression */
#define H5Z_FILTER_NBIT 5 /*nbit compression */
+#define H5Z_FILTER_SCALEOFFSET 6 /*scaleoffset compression */
#define H5Z_FILTER_RESERVED 256 /*filter ids below this value are reserved */
#define H5Z_FILTER_MAX 65535 /*maximum filter id */
#define H5Z_MAX_NFILTERS 32 /* Maximum number of filters allowed in a pipeline (should probably be allowed to be an unlimited amount) */
diff --git a/src/H5config.h.in b/src/H5config.h.in
index d3c20af..fb928eb 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -49,6 +49,9 @@
/* Define if support for nbit filter is enabled */
#undef HAVE_FILTER_NBIT
+/* Define if support for scaleoffset filter is enabled */
+#undef HAVE_FILTER_SCALEOFFSET
+
/* Define if support for shuffle filter is enabled */
#undef HAVE_FILTER_SHUFFLE
diff --git a/src/Makefile.am b/src/Makefile.am
index ae15f16..b0efbbd 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -58,7 +58,7 @@ libhdf5_la_SOURCES= H5.c H5A.c H5AC.c H5B.c H5B2.c H5B2cache.c H5B2dbg.c \
H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Topaque.c H5Torder.c \
H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TS.c H5V.c H5Z.c \
H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c \
- H5Ztrans.c
+ H5Zscaleoffset.c H5Ztrans.c
# Public headers
diff --git a/src/Makefile.in b/src/Makefile.in
index e3eae70..d006edf 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -156,6 +156,7 @@ TRACE_API = @TRACE_API@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
+USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
VERSION = @VERSION@
@@ -226,7 +227,7 @@ libhdf5_la_SOURCES = H5.c H5A.c H5AC.c H5B.c H5B2.c H5B2cache.c H5B2dbg.c \
H5Tfloat.c H5Tinit.c H5Tnative.c H5Toffset.c H5Topaque.c H5Torder.c \
H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c H5TS.c H5V.c H5Z.c \
H5Zdeflate.c H5Zfletcher32.c H5Znbit.c H5Zshuffle.c H5Zszip.c \
- H5Ztrans.c
+ H5Zscaleoffset.c H5Ztrans.c
# Public headers
@@ -295,7 +296,8 @@ am_libhdf5_la_OBJECTS = H5.lo H5A.lo H5AC.lo H5B.lo H5B2.lo H5B2cache.lo \
H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo \
H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo H5Tstrpad.lo \
H5Tvlen.lo H5TS.lo H5V.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \
- H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Ztrans.lo
+ H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \
+ H5Ztrans.lo
libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS)
noinst_PROGRAMS = H5detect$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
@@ -371,9 +373,10 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/H5V.Plo ./$(DEPDIR)/H5Z.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/H5Zdeflate.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/H5Zfletcher32.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/H5Znbit.Plo ./$(DEPDIR)/H5Zshuffle.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/H5Zszip.Plo ./$(DEPDIR)/H5Ztrans.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/H5detect.Po
+@AMDEP_TRUE@ ./$(DEPDIR)/H5Znbit.Plo \
+@AMDEP_TRUE@ ./$(DEPDIR)/H5Zscaleoffset.Plo \
+@AMDEP_TRUE@ ./$(DEPDIR)/H5Zshuffle.Plo ./$(DEPDIR)/H5Zszip.Plo \
+@AMDEP_TRUE@ ./$(DEPDIR)/H5Ztrans.Plo ./$(DEPDIR)/H5detect.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
@@ -580,6 +583,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zdeflate.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zfletcher32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Znbit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zscaleoffset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zshuffle.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Zszip.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ztrans.Plo@am__quote@
diff --git a/test/Makefile.in b/test/Makefile.in
index 5a4620c..81adb05 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -156,6 +156,7 @@ TRACE_API = @TRACE_API@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
USE_FILTER_NBIT = @USE_FILTER_NBIT@
+USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
VERSION = @VERSION@