summaryrefslogtreecommitdiff
path: root/libopenjpeg/j2k.c
diff options
context:
space:
mode:
authorGiuseppe Baruffa <gbaruffa@users.noreply.github.com>2007-09-03 13:30:59 +0000
committerGiuseppe Baruffa <gbaruffa@users.noreply.github.com>2007-09-03 13:30:59 +0000
commit564e16d5cea51dc877870055e2703330ad323cdd (patch)
tree55d241a023631ee09e4ae754bfde733f38018aba /libopenjpeg/j2k.c
parentc4313f0b3983381332546bdae10ecab2dffdd794 (diff)
Added the knowledge of JPSEC SEC and INSEC markers (you have to compile the JPWL project). Management of these markers is limited to skipping them without crashing: no real security function at this stage. Deprecated USE_JPSEC and USE_JPWL will be removed next
Diffstat (limited to 'libopenjpeg/j2k.c')
-rw-r--r--libopenjpeg/j2k.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c
index f020167c..476b68c5 100644
--- a/libopenjpeg/j2k.c
+++ b/libopenjpeg/j2k.c
@@ -1541,6 +1541,10 @@ opj_dec_mstabent_t j2k_dec_mstab[] = {
{J2K_MS_ESD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_esd},
{J2K_MS_RED, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_red},
#endif /* USE_JPWL */
+#ifdef USE_JPSEC
+ {J2K_MS_SEC, J2K_STATE_MH, j2k_read_sec},
+ {J2K_MS_INSEC, 0, j2k_read_insec},
+#endif /* USE_JPSEC */
{0, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_unk}
};
@@ -2261,6 +2265,9 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestre
}
}
+ /* uncomment only for testing JPSEC marker writing */
+ /* j2k_write_sec(j2k); */
+
/* INDEX >> */
if(cstr_info && cstr_info->index_on) {
cstr_info->main_head_end = cio_tell(cio) - 1;