[svn-r14379] add check of some values for the nbit and scale offest filters on the h5repack verify function

note: some sybols were made public

tested: windows, linux
This commit is contained in:
Pedro Vicente Nunes 2008-01-07 14:16:29 -05:00
parent dfbeb73b48
commit 20c5484440
4 changed files with 20 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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