diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2004-07-22 23:40:53 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2004-07-22 23:40:53 (GMT) |
commit | 48e8092c66c7d637d6b6975e4985aa26604f6228 (patch) | |
tree | 9c03f179edac0d556d42427b1c9a2e1cc4d2dbe9 /src | |
parent | ecd9f0a10ee44c6051054ecccbeb35fb2f26c673 (diff) | |
download | hdf5-48e8092c66c7d637d6b6975e4985aa26604f6228.zip hdf5-48e8092c66c7d637d6b6975e4985aa26604f6228.tar.gz hdf5-48e8092c66c7d637d6b6975e4985aa26604f6228.tar.bz2 |
[svn-r8936]
Purpose: Bug fix
Description: While working on the SZIP documentation with Frank, I realized
that when scanline was less than 4k and bigger than pixels_per_block,
it was not adjusted if number_of_blocks_per_scanline was bigger
than max_number_of_blocks_per_scanline.
Solution: Fixed the code. Unfortunately it didn't help with the problem
I had using h5repack with DOQGROD.he5 file.
Platforms tested: copper
Misc. update:
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Zszip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Zszip.c b/src/H5Zszip.c index 71abb54..37c5316 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -143,7 +143,8 @@ H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) scanline=dims[ndims-1]; /* Adjust scanline if it is smaller than number of pixels per block or - if it is bigger than maximum pixels per scanline */ + if it is bigger than maximum pixels per scanline, or there are more than + SZ_MAX_BLOCKS_PER_SCANLINE blocks per scanline */ /* Check the pixels per block against the 'scanline' size */ if(scanline<cd_values[H5Z_SZIP_PARM_PPB]) { @@ -158,10 +159,9 @@ H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) HGOTO_DONE(TRUE); } - - /* Check the scanline's size against the maximum value and adjust 'scanline' - size if necessary */ - if(scanline > SZ_MAX_PIXELS_PER_SCANLINE) + if(scanline <= SZ_MAX_PIXELS_PER_SCANLINE) + scanline = MIN((cd_values[H5Z_SZIP_PARM_PPB] * SZ_MAX_BLOCKS_PER_SCANLINE), scanline); + else scanline = cd_values[H5Z_SZIP_PARM_PPB] * SZ_MAX_BLOCKS_PER_SCANLINE; done: |