[Gdal-dev] JP2KAK Driver Optimization

Frank Warmerdam warmerdam at pobox.com
Fri Feb 9 01:47:38 EST 2007


Folks,

I have implemented optimized IRasterIO() functions on the JP2KAK driver.
This can give a substantial speed up (as much as a factor of 3) for for
applications making single big windowed requests.  However, it can also
result in substantial negative performance characteristics for applications
many small requests.

The optimized (direct) io method is not used if:
  o the target buffer or source image is not 8bit.
  o the requested buffer has a ysize of 1 (a single scanline)
  o the requested buffer is less than 100 pixels.
  o the requested window is a single pixel tall (a single scanline)
  o the requested window is less than 100 pixels.
  o the GDAL_FORCE_CACHING config option is TRUE.

You can also set the GDAL_ONE_BIG_READ config option TRUE to force use
of the direct method in all cases (except the non-8bit data).

Amoung other things this optimization also reads all requested bands in
a single pass for a GDALDataset::RasterIO() call.  So use of this method
is increasingly valuable as more and more drivers have optimized
implementations.

I don't consider this optimized driver all that safe, and I don't plan to
take it back to the gdal 1.4 branch for the time being.  I would appreciate
feedback from folks using it.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list