summaryrefslogtreecommitdiff
path: root/libopenjpeg/openjpeg.h
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2011-09-09 14:49:08 +0000
committerAntonin Descampe <antonin@gmail.com>2011-09-09 14:49:08 +0000
commitfa720c1858c5bccc70d9b0a8413c944c64d73b04 (patch)
tree60c7372c83acc30356b9ebf345775f7f5c02aeb3 /libopenjpeg/openjpeg.h
parentbc7c3e44d559b7772fe5e76d04084fb13c292a91 (diff)
TRUNK:added a new indexer functionality to the library. With the new -jpip option at encoding, the user can now generate a JP2 file including an XML box with the index used when browsing the image with JPIP
Diffstat (limited to 'libopenjpeg/openjpeg.h')
-rw-r--r--libopenjpeg/openjpeg.h47
1 files changed, 29 insertions, 18 deletions
diff --git a/libopenjpeg/openjpeg.h b/libopenjpeg/openjpeg.h
index c46d896f..51d691e6 100644
--- a/libopenjpeg/openjpeg.h
+++ b/libopenjpeg/openjpeg.h
@@ -6,6 +6,7 @@
* Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2006-2007, Parvatha Elangovan
+ * Copyright (c) 2010-2011, Kaori Hagihara
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -139,9 +140,9 @@ Supported codec
*/
typedef enum CODEC_FORMAT {
CODEC_UNKNOWN = -1, /**< place-holder */
- CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */
- CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */
- CODEC_JP2 = 2 /**< JPEG-2000 file format : read/write */
+ CODEC_J2K = 0, /**< JPEG-2000 codestream : read/write */
+ CODEC_JPT = 1, /**< JPT-stream (JPEG 2000, JPIP) : read only */
+ CODEC_JP2 = 2, /**< JPEG-2000 file format : read/write */
} OPJ_CODEC_FORMAT;
/**
@@ -346,6 +347,8 @@ typedef struct opj_cparameters {
char tp_flag;
/** MCT (multiple component transform) */
char tcp_mct;
+ /** Enable JPIP indexing*/
+ opj_bool jpip_on;
} opj_cparameters_t;
/**
@@ -585,6 +588,21 @@ typedef struct opj_packet_info {
double disto;
} opj_packet_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 : Information concerning tile-parts
*/
@@ -629,26 +647,18 @@ typedef struct opj_tile_info {
int numpix;
/** add fixed_quality */
double distotile;
+ /** number of markers */
+ int marknum;
+ /** list of markers */
+ opj_marker_info_t *marker;
+ /** actual size of markers array */
+ int maxmarknum;
/** number of tile parts */
int num_tps;
/** information concerning tile parts */
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
*/
@@ -867,7 +877,7 @@ Setup the encoder parameters using the current image and using user parameters.
OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image);
/**
Encode an image into a JPEG-2000 codestream
-@param cinfo compressor handle
+3@param cinfo compressor handle
@param cio Output buffer stream
@param image Image to encode
@param index Depreacted -> Set to NULL. To extract index, used opj_encode_wci()
@@ -889,6 +899,7 @@ Destroy Codestream information after compression or decompression
*/
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info);
+
#ifdef __cplusplus
}
#endif