diff options
Diffstat (limited to 'src/lib/openmj2/jp2.h')
| -rw-r--r-- | src/lib/openmj2/jp2.h | 97 |
1 files changed, 46 insertions, 51 deletions
diff --git a/src/lib/openmj2/jp2.h b/src/lib/openmj2/jp2.h index fbd17a4d..74363f4e 100644 --- a/src/lib/openmj2/jp2.h +++ b/src/lib/openmj2/jp2.h @@ -1,6 +1,6 @@ /* - * The copyright in this software is being made available under the 2-clauses - * BSD License, included below. This software may be subject to other third + * The copyright in this software is being made available under the 2-clauses + * BSD License, included below. This software may be subject to other third * party and contributor rights, including patent rights, and no such rights * are granted under this license. * @@ -57,37 +57,33 @@ #define JP2_CDEF 0x63646566 /**< Channel Definition box */ /* ----------------------------------------------------------------------- */ -/** +/** Channel description: channel index, type, association */ -typedef struct opj_jp2_cdef_info -{ +typedef struct opj_jp2_cdef_info { unsigned short cn, typ, asoc; } opj_jp2_cdef_info_t; -/** +/** Channel descriptions and number of descriptions */ -typedef struct opj_jp2_cdef -{ +typedef struct opj_jp2_cdef { opj_jp2_cdef_info_t *info; unsigned short n; } opj_jp2_cdef_t; -/** +/** Component mappings: channel index, mapping type, palette index */ -typedef struct opj_jp2_cmap_comp -{ +typedef struct opj_jp2_cmap_comp { unsigned short cmp; unsigned char mtyp, pcol; } opj_jp2_cmap_comp_t; -/** +/** Palette data: table entries, palette columns */ -typedef struct opj_jp2_pclr -{ +typedef struct opj_jp2_pclr { unsigned int *entries; unsigned char *channel_sign; unsigned char *channel_size; @@ -95,11 +91,10 @@ typedef struct opj_jp2_pclr unsigned short nr_entries, nr_channels; } opj_jp2_pclr_t; -/** -Collector for ICC profile, palette, component mapping, channel description +/** +Collector for ICC profile, palette, component mapping, channel description */ -typedef struct opj_jp2_color -{ +typedef struct opj_jp2_color { unsigned char *icc_profile_buf; int icc_profile_len; @@ -108,51 +103,51 @@ typedef struct opj_jp2_color unsigned char jp2_has_colr; } opj_jp2_color_t; -/** +/** JP2 component */ typedef struct opj_jp2_comps { - int depth; - int sgnd; - int bpcc; + int depth; + int sgnd; + int bpcc; } opj_jp2_comps_t; /** JPEG-2000 file format reader/writer */ typedef struct opj_jp2 { - /** codec context */ - opj_common_ptr cinfo; - /** handle to the J2K codec */ - opj_j2k_t *j2k; - unsigned int w; - unsigned int h; - unsigned int numcomps; - unsigned int bpc; - unsigned int C; - unsigned int UnkC; - unsigned int IPR; - unsigned int meth; - unsigned int approx; - unsigned int enumcs; - unsigned int precedence; - unsigned int brand; - unsigned int minversion; - unsigned int numcl; - unsigned int *cl; - opj_jp2_comps_t *comps; - unsigned int j2k_codestream_offset; - unsigned int j2k_codestream_length; - opj_bool ignore_pclr_cmap_cdef; + /** codec context */ + opj_common_ptr cinfo; + /** handle to the J2K codec */ + opj_j2k_t *j2k; + unsigned int w; + unsigned int h; + unsigned int numcomps; + unsigned int bpc; + unsigned int C; + unsigned int UnkC; + unsigned int IPR; + unsigned int meth; + unsigned int approx; + unsigned int enumcs; + unsigned int precedence; + unsigned int brand; + unsigned int minversion; + unsigned int numcl; + unsigned int *cl; + opj_jp2_comps_t *comps; + unsigned int j2k_codestream_offset; + unsigned int j2k_codestream_length; + opj_bool ignore_pclr_cmap_cdef; } opj_jp2_t; /** JP2 Box */ typedef struct opj_jp2_box { - int length; - int type; - int init_pos; + int length; + int type; + int init_pos; } opj_jp2_box_t; /** @name Exported functions */ @@ -185,7 +180,7 @@ Destroy a JP2 decompressor handle void jp2_destroy_decompress(opj_jp2_t *jp2); /** Setup the decoder decoding parameters using user parameters. -Decoding parameters are returned in jp2->j2k->cp. +Decoding parameters are returned in jp2->j2k->cp. @param jp2 JP2 decompressor handle @param parameters decompression parameters */ @@ -210,8 +205,8 @@ Destroy a JP2 compressor handle */ void jp2_destroy_compress(opj_jp2_t *jp2); /** -Setup the encoder parameters using the current image and using user parameters. -Coding parameters are returned in jp2->j2k->cp. +Setup the encoder parameters using the current image and using user parameters. +Coding parameters are returned in jp2->j2k->cp. @param jp2 JP2 compressor handle @param parameters compression parameters @param image input filled image |
