[svn-r14365] Add szip filter check of client data values for has_filters.

NOTE: szip client symbols were made public

Tested: windows, linux, solaris
This commit is contained in:
Pedro Vicente Nunes 2008-01-03 14:59:25 -05:00
parent 136cefdf91
commit 5aab9089de
3 changed files with 19 additions and 20 deletions

View File

@ -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*/

View File

@ -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 */
/*-------------------------------------------------------------------------

View File

@ -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;