diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-09-01 16:30:48 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-09-01 16:30:48 +0200 |
| commit | 0ae3cba3404674bbe2028ea9a801301a4c951b33 (patch) | |
| tree | 8150750654ca96ea629ded16cc2731d9e0bd9cdf /src/lib/openjp2/openjpeg.h | |
| parent | 5d07d463fdb0a5eeffa90eba1566cc21697011b8 (diff) | |
Allow several repeated calls to opj_set_decode_area() and opj_decode() for single-tiled images
* Only works for single-tiled images --> will error out cleanly, as currently
in other cases
* Save re-reading the codestream for the tile, and re-use code-blocks of the
previous decoding pass.
* Future improvements might involve improving opj_decompress, and the image writing logic,
to use this strategy.
Diffstat (limited to 'src/lib/openjp2/openjpeg.h')
| -rw-r--r-- | src/lib/openjp2/openjpeg.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 21755b48..7020d37d 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -1340,6 +1340,12 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, * that is to say at the highest resolution level, even if requesting the image at lower * resolution levels. * + * Generally opj_set_decode_area() should be followed by opj_decode(), and the + * codec cannot be re-used. + * In the particular case of an image made of a single tile, several sequences of + * calls to opoj_set_decode_area() and opj_decode() are allowed, and will bring + * performance improvements when reading an image by chunks. + * * @param p_codec the jpeg2000 codec. * @param p_image the decoded image previously setted by opj_read_header * @param p_start_x the left position of the rectangle to decode (in image coordinates). |
