[gdal-dev] JP2ECW reversible compression issue with MapServer

Frank Warmerdam warmerdam at pobox.com
Wed Nov 19 12:12:12 EST 2008


Jukka Rahkonen wrote:
> I was measuring MapServer speed with lossless vs.lossy JPEG2000 images and by
> using either JP2ECW or JP2MrSID driver. I did not find any improvement in speed,
> but accidentally I notised that when I used the JP2ECW driver I can not get full
> quality image through MapServer. The output image looks like it were slightly
> compressed even the originals are lossless. If I skip the JP2ECW driver and take
> JP2MrSID driver Mapserver starts to deliver full quality images which are
> identical with the output reached from GeoTIFF originals.
> 
> Question 1: Could this issue of getting lossy output from lossless JPEG2000
> images be something worth making a trac issue, or is it known already, or do you
> suppose I have made just some mistake in my test?

Jukka,

Presumably it would be a GDAL trac issue if you want to submit it.  So I'd
suggest trying to reproduce it with gdal_translate too.  Generally speaking I'm
loath to investigate problems related to the ECW SDK due to painful past
experiences trying to track bugs into it.  So it may get no action for some
time but it would be good to have a ticket in the system on any issue.

> Question 2: MapServer is quite slow with JPEG2000 images. Do gdal developers
> have ideas about how to make it faster? Any estimates about how much money would
> be needed to make it 100 percent faster?  I believe that it is a realistic goal.

The most obvious room for improvement is that RGB images are read from ECW one
band at a time.  Assuming this is reflected in three decodes for each area from
ECW instead of one then there could be substantial room for improvement.  This
would likely be approached as a MapServer change to request all bands at once.
Paul Ramsey has prototyped an effort in this regard though I feel doing it
properly in the mapserver code is a non-trivial effort (perhaps a couple days
to do it right with good testing).

The other thing that can be helpful is to ensure the mapserver map render
is handled as one windowed request on the jpeg2000 file instead of several
smaller chunks.  I imagine this is already working properly but it might
be worth investigation.

Some recent work with the JP2MrSID driver suggest to me this should not
be an issue with it, though it is possible there is still an issue with the
JP2ECW driver.

If we set out reasonably specific parameters I would be interested in
a contract to speed up jpeg2000 access by a factor of two (which I would
refer to as 50% faster - surely 100% faster means instant!).

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    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list