diff options
| author | Antonin Descampe <antonin@gmail.com> | 2010-10-05 10:33:15 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2010-10-05 10:33:15 +0000 |
| commit | eeefefd56cb3edddefb73141733fd1e757c4b798 (patch) | |
| tree | 4727958764c4c348762c043c2efbb7470a9ffcca /libopenjpeg/jp2.h | |
| parent | 531c0cf26f0c327b42a5caa79725e4afeb98768d (diff) | |
Added files to let people build openjpeg with configure tools ; Added makefiles to let people manually build openjpeg on *nix platforms ; Removed obsolete Makefiles ; Renamed dirent.h to windirent.h ; Made optional the PNG, TIFF, and LCMS support in CMake files ; Added opj_config* files to configure openjpeg before building it (opj_config.h generated by configure, cmake, or manually by the user) ; Renamed this file from ChangeLog to CHANGES ; Renamed License.txt to LICENSE ; Updated README files ; Added INSTALL and LICENSE files ; Added man pages
Diffstat (limited to 'libopenjpeg/jp2.h')
| -rw-r--r-- | libopenjpeg/jp2.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/libopenjpeg/jp2.h b/libopenjpeg/jp2.h index 7e363be2..e9ce242a 100644 --- a/libopenjpeg/jp2.h +++ b/libopenjpeg/jp2.h @@ -49,8 +49,48 @@ #define JP2_DBTL 0x6474626c /**< ??? */ #define JP2_BPCC 0x62706363 /**< Bits per component box */ #define JP2_JP2 0x6a703220 /**< File type fields */ +#define JP2_PCLR 0x70636c72 +#define JP2_CMAP 0x636d6170 +#define JP2_CDEF 0x63646566 /* ----------------------------------------------------------------------- */ +/* cdef, cmap, pclr, colr +*/ +typedef struct opj_jp2_cdef_info +{ + unsigned short cn, typ, asoc; +} opj_jp2_cdef_info_t; + +typedef struct opj_jp2_cdef +{ + opj_jp2_cdef_info_t *info; + unsigned short n; +} opj_jp2_cdef_t; + +typedef struct opj_jp2_cmap_comp +{ + unsigned short cmp; + unsigned char mtyp, pcol; +} opj_jp2_cmap_comp_t; + +typedef struct opj_jp2_pclr +{ + unsigned int *entries; + unsigned char *channel_sign; + unsigned char *channel_size; + opj_jp2_cmap_comp_t *cmap; + unsigned short nr_entries, nr_channels; +} opj_jp2_pclr_t; + +struct extension +{ + unsigned char *jp2_profile_buf; + int jp2_profile_len; + + opj_jp2_cdef_t *jp2_cdef; + opj_jp2_pclr_t *jp2_pclr; + unsigned char jp2_has_colr; +}; /** JP2 component @@ -113,7 +153,7 @@ Read the JP2H box - JP2 Header box (used in MJ2) @param cio Input buffer stream @return Returns true if successful, returns false otherwise */ -bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); +bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, struct extension *ext); /** Creates a JP2 decompression structure @param cinfo Codec context info |
