Opened 7 years ago
Closed 7 years ago
#6764 closed task (fixed)
Question: Why if Y size >= 256 is the nBlockYSize set to 128?
Reported by: | Kurt Schwehr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | kakadu |
Cc: |
Description
Why when the when a raster size is greater than or less than a threshold, why did you not clamp to that threshold? Was there a performance reason? Should the Y size be clamped to 128 or 256 now? Any why only at 256?
Frank, in r4191, you have:
/* -------------------------------------------------------------------- */ /* Use a 512x128 "virtual" block size unless the file is small. */ /* -------------------------------------------------------------------- */ if( nRasterXSize >= 1024 ) // <-- different nBlockXSize = 512; // <-- different else nBlockXSize = nRasterXSize; if( nRasterYSize >= 256 ) // <-- different nBlockYSize = 128; // <-- different else nBlockYSize = nRasterYSize;
which is the following as of r9873:
/* -------------------------------------------------------------------- */ /* Use a 2048x128 "virtual" block size unless the file is small. */ /* -------------------------------------------------------------------- */ if( nRasterXSize >= 2048 ) // <-- same nBlockXSize = 2048; // <-- same else nBlockXSize = nRasterXSize; if( nRasterYSize >= 256 ) // <-- different nBlockYSize = 128; // <-- different else nBlockYSize = nRasterYSize;
Should this be:
// Clamp "virtual" block size to 2048x128. nBlockXSize = std::min(nRasterXSize, 2048); nBlockYSize = std::min(nRasterYSize, 128)
Change History (3)
comment:1 by , 7 years ago
Keywords: | kakadu added |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Committed the simplification in r37068
Forgot to add this ticket to the change description