diff options
| author | Robert Gabriel Jakabosky <rjakabosky+github@neoawareness.com> | 2022-02-10 21:27:17 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-10 14:27:17 +0100 |
| commit | 883c31dbe09771aab043744ac2b490d7386878e3 (patch) | |
| tree | 254f62d7e8158b28eea45e6ff6a58b212a380371 /src/lib/openjp2/openjpeg.h | |
| parent | 99d555c0f1818277645a0c79a5199f2e827d68cc (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/openjpeg.h')
| -rw-r--r-- | src/lib/openjp2/openjpeg.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index c0d6dbcb..ebce53db 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -1346,6 +1346,20 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters); /** + * Set strict decoding parameter for this decoder. If strict decoding is enabled, partial bit + * streams will fail to decode. If strict decoding is disabled, the decoder will decode partial + * bitstreams as much as possible without erroring + * + * @param p_codec decompressor handler + * @param strict OPJ_TRUE to enable strict decoding, OPJ_FALSE to disable + * + * @return true if the decoder is correctly set + */ + +OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, + OPJ_BOOL strict); + +/** * Allocates worker threads for the compressor/decompressor. * * By default, only the main thread is used. If this function is not used, |
