[Gdal-dev] MrSID Driver v. 4.0.x overviews

Andrey Kiselev dron at ak4719.spb.edu
Wed Jul 21 13:32:50 EDT 2004


Hi, Michael,

Thank you for your comments!

On Wed, Jul 21, 2004 at 09:50:13AM -0700, Michael P. Gerlek wrote:
> > Maybe one reason is that to read an RGB image I believe each tile is
> > decompressed 3 time, one time per component... About the same
> > problem with the GeoTIFF driver, Frank said that we can optimize
> > this by reading interleaved data in one pass by using the
> > GDALDataset::RasterIO() ; maybe we can also implement this for the
> > MrSID Driver ? Maybe we can also try to remove the memcpy in the
> > IReadBlock function and read directly data into the GDAL buffer.
> > (Maybe there are some optimization to do using the MrSID API
> > differently ?)
> 
> Yes, one scene read will decode all three bands at once (they are
> encoded together, due to the RGB->YIQ color transform).
> 
> I think you can easily use the GDAL buffer instead of having to
> memcpy; the LTISceneBuffer is designed specifically for this kind of
> thing.  What is the format/organization of the GDAL buffer?

I'm not sure that we can use LTISceneBuffer directly... The buffer
is sized to hold data for the single band, so if we read 8-bit image
using X*Y blocks it will be X*Y bytes long. But it is not enough for
LTISceneBuffer, because it wants to decode all image bands, so the buffer
size should be X*Y*nBands bytes. That's why I'm using separate buffer
created by the LTISceneBuffer and copy the date into GDAL buffer
afterwards.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list