Skip to content

Significant speed-up rate allocation by rate/distoratio ratio#1440

Merged
rouault merged 3 commits intouclouvain:masterfrom
rouault:rate_alloc_speedup
Aug 12, 2022
Merged

Significant speed-up rate allocation by rate/distoratio ratio#1440
rouault merged 3 commits intouclouvain:masterfrom
rouault:rate_alloc_speedup

Conversation

@rouault
Copy link
Copy Markdown
Collaborator

@rouault rouault commented Aug 11, 2022

  • Avoid doing 128 iterations all the time, and stop when the threshold
    doesn't vary much
  • Avoid calling costly opj_t2_encode_packets() repeatdly when bisecting the
    layer ratio if the truncation points haven't changed since the last
    iteration.

When used with the GDAL gdal_translate application to convert a 11977 x
8745 raster with data type UInt16 and 8 channels, the conversion time
to JPEG2000 with 20 quality layers using disto/rate allocation (
-co "IC=C8" -co "JPEG2000_DRIVER=JP2OPENJPEG" -co "PROFILE=NPJE_NUMERICALLY_LOSSLESS"
creation options of the GDAL NITF driver) goes from 5m56 wall clock
(8m20s total, 12 vCPUs) down to 1m16 wall clock (3m45 total).

to be compared to 34s wall clock (3m5 total) for single quality layer output.

- Avoid doing 128 iterations all the time, and stop when the threshold
  doesn't vary much
- Avoid calling costly opj_t2_encode_packets() repeatdly when bisecting the
  layer ratio if the truncation points haven't changed since the last
  iteration.

When used with the GDAL gdal_translate application to convert a 11977 x
8745 raster with data type UInt16 and 8 channels, the conversion time
to JPEG2000 with 20 quality layers using disto/rate allocation (
-co "IC=C8" -co "JPEG2000_DRIVER=JP2OPENJPEG" -co "PROFILE=NPJE_NUMERICALLY_LOSSLESS"
creation options of the GDAL NITF driver) goes from 5m56 wall clock
(8m20s total, 12 vCPUs) down to 1m16 wall clock (3m45 total).
@rouault rouault added this to the 2.5.1 milestone Aug 11, 2022
@rouault rouault merged commit 49fea5c into uclouvain:master Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant