[gdal-dev] decoding consistency between JPEG2000 drivers

Jukka Rahkonen jukka.rahkonen at maanmittauslaitos.fi
Sun Oct 11 04:51:09 PDT 2015


Even Rouault <even.rouault <at> spatialys.com> writes:

> 
> Le vendredi 09 octobre 2015 20:26:34, Pierre Soille a écrit :
> > Dear GDLALers,
> > 
> > recently we tested the following 3 JPEG2000 drivers: JP2ECW, JPEG2000,
> > and JP2OpenJPEG.  A jp2 file was opened by all three drivers and we
> > tested whether the decoded image were equal. To our suprise they are
> > not: theJPEG2000 and JP2OpenJPEG lead to the same decoded image but they
> > differ from the one obtained with JP2ECW.  Is this a bug in the
> > implementation of the JP2ECW driver or is there any rationale explanation?
> 
> Pierre,
> 
> I don't think the differences come from the GDAL drivers, but rather from 
> differences/bugs/features of the underlying libraries. Regarding JP2ECW, I 
> recall to have observed differences depending if you read component per 
> component or all components together. The version of the JP2 ECW SDK might 
> also have some influence.

Hi,

Were the original JPEG2000 files lossy or lossless? Getting slightly
different results from lossy files does not feel critical but lossless
conversion should naturally be lossless. It looks like I have seen an issue
with ECWJP2 driver (SDK 3.x) a few years ago
https://lists.osgeo.org/pipermail/gdal-dev/2009-January/019588.html

I suppose that with the SDK v. 3.x the irreversible 9/7 trasformation was
used also for reversible compression and/or decompression instead of the 5/3
transformation. I am not sure if the bug was ever corrected for SDK 3.x.
Please make a test and report the results. If the bug is still there I
suppose that it will never be fixed but at least we could document it
because SDK 3.x is still used due to its more allowing license.

-Jukka Rahkonen-


More information about the gdal-dev mailing list