summaryrefslogtreecommitdiff
path: root/libopenjpeg/j2k.h
diff options
context:
space:
mode:
Diffstat (limited to 'libopenjpeg/j2k.h')
-rw-r--r--libopenjpeg/j2k.h93
1 files changed, 4 insertions, 89 deletions
diff --git a/libopenjpeg/j2k.h b/libopenjpeg/j2k.h
index c18f4cdc..8ed758c2 100644
--- a/libopenjpeg/j2k.h
+++ b/libopenjpeg/j2k.h
@@ -305,92 +305,6 @@ typedef struct opj_cp {
} opj_cp_t;
/**
-Information concerning a packet inside tile
-*/
-typedef struct opj_packet_info {
- /** start position */
- int start_pos;
- /** end position */
- int end_pos;
- /** ADD for Marcela */
- double disto;
-} opj_packet_info_t;
-
-/**
-Index structure : information regarding tiles inside image
-*/
-typedef struct opj_tile_info {
- /** value of thresh for each layer by tile cfr. Marcela */
- double *thresh;
- /** number of tile */
- int num_tile;
- /** start position */
- int start_pos;
- /** end position of the header */
- int end_header;
- /** end position */
- int end_pos;
- /** precinct number for each resolution level (width) */
- int pw[33];
- /** precinct number for each resolution level (height) */
- int ph[33];
- /** precinct size (in power of 2), in X for each resolution level */
- int pdx[33];
- /** precinct size (in power of 2), in Y for each resolution level */
- int pdy[33];
- /** information concerning packets inside tile */
- opj_packet_info_t *packet;
- /** add fixed_quality */
- int nbpix;
- /** add fixed_quality */
- double distotile;
-} opj_tile_info_t;
-
-/**
-Index structure
-*/
-typedef struct opj_image_info {
- /** 0 = no index || 1 = index */
- int index_on;
- /** maximum distortion reduction on the whole image (add for Marcela) */
- double D_max;
- /** packet number */
- int num;
- /** writing the packet in the index with t2_encode_packets */
- int index_write;
- /** image width */
- int image_w;
- /** image height */
- int image_h;
- /** progression order */
- OPJ_PROG_ORDER prog;
- /** tile size in x */
- int tile_x;
- /** tile size in y */
- int tile_y;
- /** */
- int tile_Ox;
- /** */
- int tile_Oy;
- /** number of tiles in X */
- int tw;
- /** number of tiles in Y */
- int th;
- /** component numbers */
- int comp;
- /** number of layer */
- int layer;
- /** number of decomposition */
- int decomposition;
- /** main header position */
- int main_head_end;
- /** codestream's size */
- int codestream_size;
- /** information regarding tiles inside image */
- opj_tile_info_t *tile;
-} opj_image_info_t;
-
-/**
JPEG-2000 codestream reader/writer
*/
typedef struct opj_j2k {
@@ -445,7 +359,7 @@ typedef struct opj_j2k {
/** pointer to the coding parameters */
opj_cp_t *cp;
/** helper used to write the index file */
- opj_image_info_t *image_info;
+ opj_codestream_info_t *cstr_info;
/** pointer to the byte i/o stream */
opj_cio_t *cio;
} opj_j2k_t;
@@ -513,10 +427,11 @@ Encode an image into a JPEG-2000 codestream
@param j2k J2K compressor handle
@param cio Output buffer stream
@param image Image to encode
-@param index Name of the index file if required, NULL otherwise
+@param cstr_info Codestream information structure if required, NULL otherwise
@return Returns true if successful, returns false otherwise
*/
-bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *index);
+bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info);
+
/* ----------------------------------------------------------------------- */
/*@}*/