summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/jp2.h
diff options
context:
space:
mode:
authorRobert Gabriel Jakabosky <rjakabosky+github@neoawareness.com>2022-02-10 21:27:17 +0800
committerGitHub <noreply@github.com>2022-02-10 14:27:17 +0100
commit883c31dbe09771aab043744ac2b490d7386878e3 (patch)
tree254f62d7e8158b28eea45e6ff6a58b212a380371 /src/lib/openjp2/jp2.h
parent99d555c0f1818277645a0c79a5199f2e827d68cc (diff)
Add support for partial bitstream decoding (#1407) (fixes #715)
Add a -allow-partial option to opj_decompress utility and a opj_decoder_set_strict_mode() option to the API Co-authored-by: Chris Hafey <chafey@gmail.com>
Diffstat (limited to 'src/lib/openjp2/jp2.h')
-rw-r--r--src/lib/openjp2/jp2.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/openjp2/jp2.h b/src/lib/openjp2/jp2.h
index 9e7fa566..173f2511 100644
--- a/src/lib/openjp2/jp2.h
+++ b/src/lib/openjp2/jp2.h
@@ -235,6 +235,15 @@ Decoding parameters are returned in jp2->j2k->cp.
*/
void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters);
+/**
+Set the strict mode parameter. When strict mode is enabled, the entire
+bitstream must be decoded or an error is returned. When it is disabled,
+the decoder will decode partial bitstreams.
+@param jp2 JP2 decompressor handle
+@param strict OPJ_TRUE for strict mode
+*/
+void opj_jp2_decoder_set_strict_mode(opj_jp2_t *jp2, OPJ_BOOL strict);
+
/** Allocates worker threads for the compressor/decompressor.
*
* @param jp2 JP2 decompressor handle