Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 12, 2022

Conversation

rouault
Copy link
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
mtremer pushed a commit to ipfire/ipfire-2.x that referenced this pull request Mar 12, 2024
- Update from version 2.5.0 to 2.5.2
- Update of rootfile
- Changelog
    2.5.2 (Feb 2024)
	No API/ABI break compared to v2.5.1
	* Make sure openjpeg.h includes opj_config.h [\#1514](uclouvain/openjpeg#1514)
    2.5.1 (Feb 2024)
	No API/ABI break compared to v2.5.0
	* CMake: drop support for cmake < 3.5
	* Several bugfixes, including [\#1509](uclouvain/openjpeg#1509) for CVE-2021-3575
	* Significant speed-up rate allocation by rate/distoratio ratio [\#1440](uclouvain/openjpeg#1440)

Signed-off-by: Adolf Belka <[email protected]>
Signed-off-by: Michael Tremer <[email protected]>
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