[gdal-dev] JasPer vs OpenJPEG performance

Even Rouault even.rouault at spatialys.com
Fri Aug 7 05:16:16 PDT 2015


On Friday 07 August 2015 11:17:56 Jukka Rahkonen wrote:
> ewenger <ewenger <at> ara.com> writes:
> > I'm building GDAL 2.0 with JPEG-2000 support for my current project and I
> > was surprised about the performance differences I saw between JasPer and
> > OpenJPEG.  Using JasPer, gdal_translate is able to decompress a 465 MB
> > NITF C8 file in 2.3 minutes (wall clock) even though JasPer runs
> > single-threaded. OpenJPEG took 4.4 minutes (wall clock) and used 24.5
> > minutes in CPU time across the four threads that were spawned.  Is there
> > some trick to building OpenJPEG that I'm not following or has anyone
> > tried to multithread JasPer?
> Hi,
> 
> Could you point us any similar sample image for testing?
> 
> Based on your timings both drivers are actually unusable for any real work
> with your images.  OpenJPEG is usually rather fast and much better than
> JasPer but it can't handle any bigger images which are compressed into
> JPEG2000 as one tile. NITF requires either that the tile size must not be
> bigger that 1024x1024, or that the whole file is written as one single tile.


> I believe you have such single-tile NITF file.

I'm not sure of this, since the multi-threaded decoding of the OpenJPEG driver 
can only be triggered with multiple JPEG2000 tiles.

I've created a test 4096x4096 C8 NITF 3 bands with 1024x1024 tiles

With that, gdal_translate to GTiff takes :
- 2.5s with Jasper
- 2.1s with OpenJPEG single threaded
- 1.2s with OpenJPEG 4 threads

Eric, are you sure you have built openjpeg in release mode ?


> 
> -Jukka Rahkonen-
> 
> 
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list