diff options
| author | Giuseppe Baruffa <gbaruffa@users.noreply.github.com> | 2007-09-11 15:21:12 +0000 |
|---|---|---|
| committer | Giuseppe Baruffa <gbaruffa@users.noreply.github.com> | 2007-09-11 15:21:12 +0000 |
| commit | 1e705438e469890cabc3c3d1fa0b91ed45b454ff (patch) | |
| tree | 70f53371d334c0dccdc5770a3b68a5d6db9a3664 /libopenjpeg | |
| parent | d70a0415b910cc5a3550fea1d777ded84d4cdfa0 (diff) | |
JPWL encoding is finalized correctly into the JP2 file format; added an additional structure in opj_codestream_info, to keep a record of the written markers
Diffstat (limited to 'libopenjpeg')
| -rw-r--r-- | libopenjpeg/j2k.c | 14 | ||||
| -rw-r--r-- | libopenjpeg/openjpeg.h | 20 |
2 files changed, 23 insertions, 11 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index 727391ef..651ef215 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -2454,20 +2454,12 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestre #ifdef USE_JPWL /* - preparation of JPWL marker segments: can be finalized only when the whole - codestream is known + preparation of JPWL marker segments */ if(cp->epc_on) { - /* let's begin creating a marker list, according to user wishes */ - jpwl_prepare_marks(j2k, cio, image); - - /* now we dump the JPWL markers on the codestream */ - jpwl_dump_marks(j2k, cio, image); - - /* do not know exactly what is this for, - but it gets called during index creation */ - j2k->pos_correction = 0; + /* encode according to JPWL */ + jpwl_encode(j2k, cio, image); } #endif /* USE_JPWL */ diff --git a/libopenjpeg/openjpeg.h b/libopenjpeg/openjpeg.h index 7021bb54..876c0ab1 100644 --- a/libopenjpeg/openjpeg.h +++ b/libopenjpeg/openjpeg.h @@ -644,6 +644,20 @@ typedef struct opj_tile_info { opj_tp_info_t *tp; } opj_tile_info_t; +/* UniPG>> */ +/** +Marker structure +*/ +typedef struct opj_marker_info_t { + /** marker type */ + unsigned short int type; + /** position in codestream */ + int pos; + /** length, marker val included */ + int len; +} opj_marker_info_t; +/* <<UniPG */ + /** Index structure of the codestream */ @@ -678,6 +692,12 @@ typedef struct opj_codestream_info { int numlayers; /** number of decomposition of first component */ int numdecompos; +/* UniPG>> */ + /** number of markers */ + int marknum; + /** list of markers */ + opj_marker_info_t *marker; +/* <<UniPG */ /** main header position */ int main_head_start; /** main header position */ |
