diff options
| author | Antonin Descampe <antonin@gmail.com> | 2005-12-08 09:38:47 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2005-12-08 09:38:47 +0000 |
| commit | 95bc884365deb41c357583874c23d82eac7cad2d (patch) | |
| tree | cbeb4c538d1bf2f253bc5d3aa21da2871032b670 /libopenjpeg/jp2.h | |
| parent | e45e87cfb7c7a131fcd7412e3fb228b61f3c999e (diff) | |
OpenJPEG version 1.1
Diffstat (limited to 'libopenjpeg/jp2.h')
| -rw-r--r-- | libopenjpeg/jp2.h | 142 |
1 files changed, 36 insertions, 106 deletions
diff --git a/libopenjpeg/jp2.h b/libopenjpeg/jp2.h index ea7c09bd..2e4623f1 100644 --- a/libopenjpeg/jp2.h +++ b/libopenjpeg/jp2.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2004, Yannick Verschueren - * Copyright (c) 2005, Herv Drolon, FreeImage Team + * Copyright (c) 2005, Hervé Drolon, FreeImage Team * Copyright (c) 2002-2005, Communications and remote sensing Laboratory, Universite catholique de Louvain, Belgium * All rights reserved. * @@ -38,16 +38,16 @@ #define JPIP_JPIP 0x6a706970 -#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */ -#define JP2_FTYP 0x66747970 /**< File type box */ -#define JP2_JP2H 0x6a703268 /**< JP2 header box */ -#define JP2_IHDR 0x69686472 /**< Image header box */ -#define JP2_COLR 0x636f6c72 /**< Colour specification box */ -#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */ -#define JP2_URL 0x75726c20 /**< URL box */ -#define JP2_DBTL 0x6474626c /**< ??? */ -#define JP2_BPCC 0x62706363 /**< Bits per component box */ -#define JP2_JP2 0x6a703220 /**< File type fields */ +#define JP2_JP 0x6a502020 /**< JPEG 2000 signature box */ +#define JP2_FTYP 0x66747970 /**< File type box */ +#define JP2_JP2H 0x6a703268 /**< JP2 header box */ +#define JP2_IHDR 0x69686472 /**< Image header box */ +#define JP2_COLR 0x636f6c72 /**< Colour specification box */ +#define JP2_JP2C 0x6a703263 /**< Contiguous codestream box */ +#define JP2_URL 0x75726c20 /**< URL box */ +#define JP2_DBTL 0x6474626c /**< ??? */ +#define JP2_BPCC 0x62706363 /**< Bits per component box */ +#define JP2_JP2 0x6a703220 /**< File type fields */ /* ----------------------------------------------------------------------- */ @@ -55,8 +55,8 @@ JP2 component */ typedef struct opj_jp2_comps { - int depth; - int sgnd; + int depth; + int sgnd; int bpcc; } opj_jp2_comps_t; @@ -64,29 +64,29 @@ typedef struct opj_jp2_comps { 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; - opj_image_t *image; - unsigned int j2k_codestream_offset; - unsigned int j2k_codestream_length; + /** 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; + opj_image_t *image; + unsigned int j2k_codestream_offset; + unsigned int j2k_codestream_length; } opj_jp2_t; /** @@ -98,76 +98,6 @@ typedef struct opj_jp2_box { int init_pos; } opj_jp2_box_t; -/** @name Local static functions */ -/*@{*/ -/* ----------------------------------------------------------------------- */ -/** -Read box headers -@param cinfo Codec context info -@param cio Input stream -@param box -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box); -static void jp2_write_url(opj_cio_t *cio, char *Idx_file); -/** -Read the IHDR box - Image Header box -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); -static bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio); -static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio); -static bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Write the JP2H box - JP2 Header box -@param jp2 JP2 handle -@param cio Output buffer stream -*/ -static void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Read the JP2H box - JP2 Header box -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Write the FTYP box - File type box -@param jp2 JP2 handle -@param cio Output buffer stream -*/ -static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Read the FTYP box - File type box -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio); -static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, char *index); -static bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset); -static void jp2_write_jp(opj_cio_t *cio); -/** -Read the JP box - JPEG 2000 signature -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio); -/** -Decode the structure of a JP2 file -@param jp2 JP2 handle -@param cio Input buffer stream -@return Returns true if successful, returns false otherwise -*/ -static bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio); -/* ----------------------------------------------------------------------- */ -/*@}*/ - /** @name Exported functions */ /*@{*/ /* ----------------------------------------------------------------------- */ |
