summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/tcd.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2022-08-11 16:46:55 +0200
committerEven Rouault <even.rouault@spatialys.com>2022-08-11 18:06:50 +0200
commit3d9bcd37534ce1166e1f0a7764faf69bea4d89b1 (patch)
treeb36495b136fd3eeec11a4c02cfb7326d69ba31a6 /src/lib/openjp2/tcd.h
parente9fc08a52acaf34bdcc0e04b7f716f0a3fb2b846 (diff)
Significant speed-up rate allocation by rate/distoratio ratio
- 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).
Diffstat (limited to 'src/lib/openjp2/tcd.h')
-rw-r--r--src/lib/openjp2/tcd.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/lib/openjp2/tcd.h b/src/lib/openjp2/tcd.h
index 340c2bf8..7a4f3dcb 100644
--- a/src/lib/openjp2/tcd.h
+++ b/src/lib/openjp2/tcd.h
@@ -369,23 +369,6 @@ OPJ_BOOL opj_tcd_init(opj_tcd_t *p_tcd,
OPJ_BOOL opj_tcd_init_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
opj_event_mgr_t* p_manager);
-void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno,
- OPJ_UINT32 final);
-
-void opj_tcd_rateallocate_fixed(opj_tcd_t *tcd);
-
-void opj_tcd_makelayer(opj_tcd_t *tcd,
- OPJ_UINT32 layno,
- OPJ_FLOAT64 thresh,
- OPJ_UINT32 final);
-
-OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
- OPJ_BYTE *dest,
- OPJ_UINT32 * p_data_written,
- OPJ_UINT32 len,
- opj_codestream_info_t *cstr_info,
- opj_event_mgr_t *p_manager);
-
/**
* Gets the maximum tile size that will be taken by the tile once decoded.
*/