Go to the documentation of this file.
58 #define INLINE __forceinline
59 #elif defined(__GNUC__)
60 #define INLINE __inline__
61 #elif defined(__MWERKS__)
71 #define OPJ_DEPRECATED(func) func __attribute__ ((deprecated))
72 #elif defined(_MSC_VER)
73 #define OPJ_DEPRECATED(func) __declspec(deprecated) func
75 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
76 #define OPJ_DEPRECATED(func) func
79 #if defined(__GNUC__) && __GNUC__ >= 6
80 #define OPJ_DEPRECATED_STRUCT_MEMBER(memb, msg) __attribute__ ((deprecated(msg))) memb
82 #define OPJ_DEPRECATED_STRUCT_MEMBER(memb, msg) memb
85 #if defined(OPJ_STATIC) || !defined(_WIN32)
87 # if !defined(_WIN32) && __GNUC__ >= 4
88 # if defined(OPJ_STATIC)
89 # define OPJ_API __attribute__ ((visibility ("hidden")))
91 # define OPJ_API __attribute__ ((visibility ("default")))
93 # define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
100 # define OPJ_CALLCONV __stdcall
109 # if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
110 # define OPJ_API __declspec(dllexport)
112 # define OPJ_API __declspec(dllimport)
142 #define OPJ_ARG_NOT_USED(x) (void)(x)
150 #define OPJ_PATH_LEN 4096
152 #define OPJ_J2K_MAXRLVLS 33
153 #define OPJ_J2K_MAXBANDS (3*OPJ_J2K_MAXRLVLS-2)
155 #define OPJ_J2K_DEFAULT_NB_SEGS 10
156 #define OPJ_J2K_STREAM_CHUNK_SIZE 0x100000
157 #define OPJ_J2K_DEFAULT_HEADER_SIZE 1000
158 #define OPJ_J2K_MCC_DEFAULT_NB_RECORDS 10
159 #define OPJ_J2K_MCT_DEFAULT_NB_RECORDS 10
162 #define JPWL_MAX_NO_TILESPECS 16
163 #define JPWL_MAX_NO_PACKSPECS 16
164 #define JPWL_MAX_NO_MARKERS 512
165 #define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename"
166 #define JPWL_EXPECTED_COMPONENTS 3
167 #define JPWL_MAXIMUM_TILES 8192
168 #define JPWL_MAXIMUM_HAMMING 2
169 #define JPWL_MAXIMUM_EPB_ROOM 65450
176 #define OPJ_IMG_INFO 1
177 #define OPJ_J2K_MH_INFO 2
178 #define OPJ_J2K_TH_INFO 4
179 #define OPJ_J2K_TCH_INFO 8
180 #define OPJ_J2K_MH_IND 16
181 #define OPJ_J2K_TH_IND 32
183 #define OPJ_JP2_INFO 128
184 #define OPJ_JP2_IND 256
200 #define OPJ_PROFILE_NONE 0x0000
201 #define OPJ_PROFILE_0 0x0001
202 #define OPJ_PROFILE_1 0x0002
203 #define OPJ_PROFILE_PART2 0x8000
204 #define OPJ_PROFILE_CINEMA_2K 0x0003
205 #define OPJ_PROFILE_CINEMA_4K 0x0004
206 #define OPJ_PROFILE_CINEMA_S2K 0x0005
207 #define OPJ_PROFILE_CINEMA_S4K 0x0006
208 #define OPJ_PROFILE_CINEMA_LTS 0x0007
209 #define OPJ_PROFILE_BC_SINGLE 0x0100
210 #define OPJ_PROFILE_BC_MULTI 0x0200
211 #define OPJ_PROFILE_BC_MULTI_R 0x0300
212 #define OPJ_PROFILE_IMF_2K 0x0400
213 #define OPJ_PROFILE_IMF_4K 0x0500
214 #define OPJ_PROFILE_IMF_8K 0x0600
215 #define OPJ_PROFILE_IMF_2K_R 0x0700
216 #define OPJ_PROFILE_IMF_4K_R 0x0800
217 #define OPJ_PROFILE_IMF_8K_R 0x0900
222 #define OPJ_EXTENSION_NONE 0x0000
223 #define OPJ_EXTENSION_MCT 0x0100
228 #define OPJ_IS_CINEMA(v) (((v) >= OPJ_PROFILE_CINEMA_2K)&&((v) <= OPJ_PROFILE_CINEMA_S4K))
229 #define OPJ_IS_STORAGE(v) ((v) == OPJ_PROFILE_CINEMA_LTS)
230 #define OPJ_IS_BROADCAST(v) (((v) >= OPJ_PROFILE_BC_SINGLE)&&((v) <= ((OPJ_PROFILE_BC_MULTI_R) | (0x000b))))
231 #define OPJ_IS_IMF(v) (((v) >= OPJ_PROFILE_IMF_2K)&&((v) <= ((OPJ_PROFILE_IMF_8K_R) | (0x009b))))
232 #define OPJ_IS_PART2(v) ((v) & OPJ_PROFILE_PART2)
234 #define OPJ_GET_IMF_PROFILE(v) ((v) & 0xff00)
235 #define OPJ_GET_IMF_MAINLEVEL(v) ((v) & 0xf)
236 #define OPJ_GET_IMF_SUBLEVEL(v) (((v) >> 4) & 0xf)
238 #define OPJ_IMF_MAINLEVEL_MAX 11
241 #define OPJ_IMF_MAINLEVEL_1_MSAMPLESEC 65
242 #define OPJ_IMF_MAINLEVEL_2_MSAMPLESEC 130
243 #define OPJ_IMF_MAINLEVEL_3_MSAMPLESEC 195
244 #define OPJ_IMF_MAINLEVEL_4_MSAMPLESEC 260
245 #define OPJ_IMF_MAINLEVEL_5_MSAMPLESEC 520
246 #define OPJ_IMF_MAINLEVEL_6_MSAMPLESEC 1200
247 #define OPJ_IMF_MAINLEVEL_7_MSAMPLESEC 2400
248 #define OPJ_IMF_MAINLEVEL_8_MSAMPLESEC 4800
249 #define OPJ_IMF_MAINLEVEL_9_MSAMPLESEC 9600
250 #define OPJ_IMF_MAINLEVEL_10_MSAMPLESEC 19200
251 #define OPJ_IMF_MAINLEVEL_11_MSAMPLESEC 38400
254 #define OPJ_IMF_SUBLEVEL_1_MBITSSEC 200
255 #define OPJ_IMF_SUBLEVEL_2_MBITSSEC 400
256 #define OPJ_IMF_SUBLEVEL_3_MBITSSEC 800
257 #define OPJ_IMF_SUBLEVEL_4_MBITSSEC 1600
258 #define OPJ_IMF_SUBLEVEL_5_MBITSSEC 3200
259 #define OPJ_IMF_SUBLEVEL_6_MBITSSEC 6400
260 #define OPJ_IMF_SUBLEVEL_7_MBITSSEC 12800
261 #define OPJ_IMF_SUBLEVEL_8_MBITSSEC 25600
262 #define OPJ_IMF_SUBLEVEL_9_MBITSSEC 51200
267 #define OPJ_CINEMA_24_CS 1302083
268 #define OPJ_CINEMA_48_CS 651041
269 #define OPJ_CINEMA_24_COMP 1041666
270 #define OPJ_CINEMA_48_COMP 520833
357 #ifndef OPJ_UINT32_SEMANTICALLY_BUT_INT32
358 #define OPJ_UINT32_SEMANTICALLY_BUT_INT32 OPJ_INT32
546 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
547 #define OPJ_DPARAMETERS_DUMP_FLAG 0x0002
630 #define OPJ_STREAM_READ OPJ_TRUE
632 #define OPJ_STREAM_WRITE OPJ_FALSE
638 void * p_user_data) ;
650 void * p_user_data) ;
656 void * p_user_data) ;
1253 const char *fname,
OPJ_BOOL p_is_read_stream);
1278 void * p_user_data);
1287 void * p_user_data);
1296 void * p_user_data);
1633 const char*
const* p_options);
1687 FILE* output_stream);
#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:152
struct opj_codestream_index opj_codestream_index_t
Index structure of the codestream (FIXME should be expand and enhance)
struct opj_dparameters opj_dparameters_t
Decompression parameters.
OPJ_UINT32 cblkw
log2 of code-blocks width
Definition: openjpeg.h:914
struct opj_image_comptparm opj_image_cmptparm_t
Component parameters structure used by the opj_image_create function.
opj_msg_callback warning_handler
Warning message callback if available, NULL otherwise.
Definition: event.h:60
OPJ_UINT32 compE
Definition: openjpeg.h:383
OPJ_SIZE_T(* opj_stream_read_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:637
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_compress(opj_codec_t *p_codec, opj_stream_t *p_stream)
End to compress the current image.
Definition: openjpeg.c:902
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:715
unsigned char OPJ_BYTE
Definition: openjpeg.h:123
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:831
void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info)
Destroy Codestream information after compression or decompression.
Definition: openjpeg.c:1041
float OPJ_FLOAT32
Definition: openjpeg.h:121
struct opj_jp2_index opj_jp2_index_t
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx1
Definition: openjpeg.h:379
OPJ_BOOL jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:602
#define OPJ_COMP_PARAM_DEFAULT_PROG_ORDER
Definition: opj_common.h:44
OPJ_UINT32 compS
Definition: openjpeg.h:381
int numcomps
component numbers
Definition: openjpeg.h:877
OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the error handler use by openjpeg.
Definition: openjpeg.c:74
int tw
number of tiles in X
Definition: openjpeg.h:873
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
OPJ_API opj_codestream_index_t *OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec)
Get the codestream index from the codec.
Definition: openjpeg.c:1058
OPJ_BOOL opj_jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
Setup the encoder parameters using the current image and using user parameters.
Definition: jp2.c:1918
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
static OPJ_SIZE_T opj_write_from_file(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.c:111
void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters)
Set encoding parameters to default values, that means :
Definition: openjpeg.c:766
opj_codestream_info_v2_t *(* opj_get_codec_info)(void *p_codec)
Definition: opj_codec.h:169
#define JPWL_MAXIMUM_TILES
Expect this maximum number of tiles, to avoid some crashes.
Definition: openjpeg.h:167
float tcp_rates[100]
rates of layers - might be subsequently limited by the max_cs_size field.
Definition: openjpeg.h:427
@ OPJ_CLRSPC_EYCC
e-YCC
Definition: openjpeg.h:321
OPJ_BOOL(* opj_stream_seek_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:655
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:839
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:681
OPJ_UINT32 nb_of_tiles
Definition: openjpeg.h:1056
struct opj_image opj_image_t
Defines image data and characteristics.
OPJ_API int OPJ_CALLCONV opj_get_num_cpus(void)
Return the number of virtual CPUs.
Definition: thread.c:438
int decod_format
input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
Definition: openjpeg.h:471
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor)
Set the resolution factor of the decoded image.
Definition: openjpeg.c:634
int ph[33]
precinct number for each resolution level (height)
Definition: openjpeg.h:825
struct opj_codec_private::@2::opj_decompression m_decompression
OPJ_UINT32 precno0
Definition: openjpeg.h:371
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:194
OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image, OPJ_UINT32 tile_index)
Get the decoded tile from the codec.
Definition: openjpeg.c:610
int image_w
image width
Definition: openjpeg.h:859
OPJ_OFF_T main_head_start
main header start position (SOC position)
Definition: openjpeg.h:1039
double distotile
add fixed_quality
Definition: openjpeg.h:835
struct opj_image_comp opj_image_comp_t
Defines a single image component.
OPJ_API opj_codestream_info_v2_t *OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec)
Get the codestream information from the codec.
Definition: openjpeg.c:1030
static OPJ_UINT64 opj_get_data_length_from_file(void *p_user_data)
Definition: openjpeg.c:99
OPJ_UINT32 tyS
Definition: openjpeg.h:385
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:9178
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:857
OPJ_BOOL opj_jp2_set_decode_area(opj_jp2_t *p_jp2, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, opj_event_mgr_t *p_manager)
Sets the given area to be decoded.
Definition: jp2.c:3095
OPJ_UINT32 res_t
Definition: openjpeg.h:387
OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the info handler use by openjpeg.
Definition: openjpeg.c:44
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:853
@ OPJ_CINEMA2K_48
2K Digital Cinema at 24 fps
Definition: openjpeg.h:296
char index[OPJ_PATH_LEN]
DEPRECATED.
Definition: openjpeg.h:461
OPJ_UINT32 lay_t
Temporary values for Tile parts, initialised in pi_create_encode.
Definition: openjpeg.h:387
int cp_tx0
XTOsiz.
Definition: openjpeg.h:397
OPJ_BOOL opj_jp2_set_decoded_components(opj_jp2_t *p_jp2, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, opj_event_mgr_t *p_manager)
Sets the indices of the components to decode.
Definition: jp2.c:3085
int tp_end_header
end position of tile part header
Definition: openjpeg.h:799
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:717
int tcp_numlayers
number of layers
Definition: openjpeg.h:423
OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Ends the decompression procedures and possibiliy add data to be read after the codestream.
Definition: j2k.c:8379
#define OPJ_PROFILE_NONE
JPEG 2000 Profiles, see Table A.10 from 15444-1 (updated in various AMD) These values help choosing t...
Definition: openjpeg.h:200
OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters, OPJ_FLOAT32 *pEncodingMatrix, OPJ_INT32 *p_dc_shift, OPJ_UINT32 pNbComp)
Sets the MCT matrix to use.
Definition: openjpeg.c:939
OPJ_UINT32 DA_y1
Decoding area bottom boundary.
Definition: openjpeg.h:587
OPJ_UINT32 qntsty
quantisation style
Definition: openjpeg.h:922
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6710
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:719
void(* opj_dump_codec)(void *p_codec, OPJ_INT32 info_flag, FILE *output_stream)
Definition: opj_codec.h:167
OPJ_UINT32 current_nb_tps
current nb of tile part (allocated)
Definition: openjpeg.h:1012
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_has_thread_support(void)
Returns if the library is built with thread support.
Definition: thread.c:433
OPJ_OFF_T end_pos
end position
Definition: openjpeg.h:998
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:469
opj_stream_t *OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL l_is_input)
Creates an abstract stream.
Definition: cio.c:158
OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters)
Setup the decoder with decompression parameters provided by the user and with the message handler pro...
Definition: openjpeg.c:416
float tcp_distoratio[100]
different psnr for successive layers.
Definition: openjpeg.h:430
OPJ_BOOL opj_j2k_end_compress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Ends the compression procedures and possibiliy add data to be read after the codestream.
Definition: j2k.c:12339
OPJ_INT32 * data
image component data
Definition: openjpeg.h:701
@ OPJ_CODEC_JPX
JPX file format (JPEG 2000 Part-2) : to be coded.
Definition: openjpeg.h:334
OPJ_BOOL opj_event_msg(opj_event_mgr_t *p_event_mgr, OPJ_INT32 event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:91
int image_h
image height
Definition: openjpeg.h:861
int maxmarknum
actual size of markers array
Definition: openjpeg.h:888
OPJ_BOOL opj_jp2_encode(opj_jp2_t *jp2, opj_stream_private_t *stream, opj_event_mgr_t *p_manager)
Encode an image into a JPEG-2000 file stream.
Definition: jp2.c:2105
int64_t OPJ_INT64
Definition: openjpeg.h:133
struct opj_poc opj_poc_t
Progression order changes.
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:142
opj_codestream_info_v2_t *OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec)
Get the codestream information from the codec.
Definition: openjpeg.c:1030
void opj_jp2_destroy(opj_jp2_t *jp2)
Destroy a JP2 decompressor handle.
Definition: jp2.c:3017
OPJ_UINT32 compno
component index
Definition: openjpeg.h:908
#define OPJ_API
Definition: openjpeg.h:95
OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y)
Sets the given area to be decoded.
Definition: openjpeg.c:530
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:436
OPJ_UINT32 txE
Definition: openjpeg.h:385
OPJ_BOOL opj_jp2_read_tile_header(opj_jp2_t *p_jp2, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a tile header.
Definition: jp2.c:2968
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(opj_codec_t *p_codec, const char *const *p_options)
Specify extra options for the encoder.
Definition: openjpeg.c:847
int cod_format
output file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:473
@ OPJ_CINEMA4K
Profile name for a 2K image.
Definition: openjpeg.h:285
OPJ_UINT16 rsiz
RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.
Definition: openjpeg.h:543
double disto
packet distorsion
Definition: openjpeg.h:774
OPJ_BOOL jpip_on
Enable JPIP indexing.
Definition: openjpeg.h:530
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1024
OPJ_INT32 not_used
Definition: openjpeg.h:1085
void(* opj_stream_free_user_data_fn)(void *p_user_data)
Definition: openjpeg.h:661
int res_spec
Definition: openjpeg.h:446
OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, opj_cparameters_t *parameters, opj_image_t *p_image)
Setup the encoder parameters using the current image and using user parameters.
Definition: openjpeg.c:827
@ OPJ_CINEMA2K
Standard JPEG2000 profile.
Definition: openjpeg.h:284
OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Ends the decompression procedures and possibiliy add data to be read after the codestream.
Definition: jp2.c:2112
OPJ_BOOL opj_j2k_get_tile(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index)
Definition: j2k.c:12020
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:409
void *OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size)
Allocator for opj_image_t->comps[].data To be paired with opj_image_data_free.
Definition: openjpeg.c:1128
#define OPJ_FTELL(stream)
Definition: opj_includes.h:87
int numlayers
number of layer
Definition: openjpeg.h:879
OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(opj_codec_t *p_codec, opj_stream_t *p_stream, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_should_go_on)
Reads a tile header.
Definition: openjpeg.c:553
opj_codestream_info_v2_t * jp2_get_cstr_info(opj_jp2_t *p_jp2)
Get the codestream info from a JPEG2000 codec.
Definition: jp2.c:3236
Component parameters structure used by the opj_image_create function.
Definition: openjpeg.h:734
OPJ_UINT32 layno0
Layer num start,Precinct num start, Precinct num end.
Definition: openjpeg.h:371
OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Decode an image from a JPEG-2000 file stream.
Definition: jp2.c:1597
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the info handler use by openjpeg.
Definition: openjpeg.c:44
int64_t OPJ_OFF_T
Definition: openjpeg.h:136
OPJ_CHAR progorder[5]
Progression order string.
Definition: openjpeg.h:375
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
Definition: openjpeg.c:1069
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:502
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:306
int main_head_start
main header position
Definition: openjpeg.h:891
Message handler object used for.
Definition: event.h:50
opj_tccp_info_t * tccp_info
information concerning tile component parameters
Definition: openjpeg.h:955
int pdy[33]
precinct size (in power of 2), in Y for each resolution level
Definition: openjpeg.h:829
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition: openjpeg.h:721
OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead")
obsolete: use prec instead
OPJ_UINT32 nb_tile_to_decode
Nb of tile to decode.
Definition: openjpeg.h:594
@ OPJ_STD_RSIZ
Definition: openjpeg.h:283
OPJ_UINT32 cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:567
void * opj_stream_t
Definition: openjpeg.h:666
opj_packet_info_t * packet_index
information concerning packets inside tile
Definition: openjpeg.h:1030
OPJ_UINT32 ty0_t
Definition: openjpeg.h:387
char * cp_comment
comment for coding
Definition: openjpeg.h:413
struct opj_tccp_info opj_tccp_info_t
Tile-component coding parameters information.
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:494
OPJ_PROG_ORDER prog_order
progression order (default OPJ_LRCP)
Definition: openjpeg.h:417
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:618
int tileno
number (index) of tile
Definition: openjpeg.h:944
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:746
OPJ_BOOL opj_j2k_encode(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Encodes an image into a JPEG-2000 codestream.
Definition: j2k.c:12231
uint8_t OPJ_UINT8
Definition: openjpeg.h:128
Defines a single image component.
Definition: openjpeg.h:677
int start_pos
start position
Definition: openjpeg.h:817
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t *p_stream, void *p_data, opj_stream_free_user_data_fn p_function)
Sets the given data to be used as a user data for the stream.
Definition: cio.c:260
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:455
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:652
OPJ_BOOL opj_jp2_encoder_set_extra_options(opj_jp2_t *p_jp2, const char *const *p_options, opj_event_mgr_t *p_manager)
Specify extra options for the encoder.
Definition: jp2.c:3250
OPJ_OFF_T main_head_end
main header end position (first SOT position)
Definition: openjpeg.h:1041
opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:652
@ OPJ_CLRSPC_GRAY
grayscale
Definition: openjpeg.h:319
Byte input-output stream.
Definition: cio.h:81
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:309
OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, OPJ_BOOL apply_color_transforms)
Restrict the number of components to decode.
Definition: openjpeg.c:480
#define OPJ_COMP_PARAM_DEFAULT_CBLOCKW
Definition: opj_common.h:42
#define OPJ_J2K_MAXBANDS
Number of maximum sub-band linked to number of resolution level.
Definition: openjpeg.h:153
OPJ_OFF_T end_header
end position of the header
Definition: openjpeg.h:996
@ OPJ_CLRSPC_CMYK
CMYK.
Definition: openjpeg.h:322
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:488
OPJ_UINT32 qmfbid
discrete wavelet transform identifier: 0 = 9-7 irreversible, 1 = 5-3 reversible
Definition: openjpeg.h:920
double OPJ_FLOAT64
Definition: openjpeg.h:122
OPJ_UINT32 nb_packet
packet number
Definition: openjpeg.h:1028
Index structure about a tile.
Definition: openjpeg.h:1005
OPJ_UINT32 cblksty
code-block coding style
Definition: openjpeg.h:918
int maxmarknum
actual size of markers array
Definition: openjpeg.h:841
int numresolution
number of resolutions
Definition: openjpeg.h:432
OPJ_BOOL opj_jp2_write_tile(opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes a tile.
Definition: jp2.c:2992
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:604
Compression parameters.
Definition: openjpeg.h:393
OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor)
Set the resolution factor of the decoded image.
Definition: openjpeg.c:634
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:509
OPJ_PROG_ORDER prg
progression order
Definition: openjpeg.h:948
void OPJ_CALLCONV opj_dump_codec(opj_codec_t *p_codec, OPJ_INT32 info_flag, FILE *output_stream)
Dump the codec information into the output stream.
Definition: openjpeg.c:1014
OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec, int num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: openjpeg.c:405
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters)
Setup the decoder with decompression parameters provided by the user and with the message handler pro...
Definition: openjpeg.c:416
void(* opj_msg_callback)(const char *msg, void *client_data)
Callback function prototype for events.
Definition: openjpeg.h:349
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:768
@ OPJ_CINEMA2K_24
Not Digital Cinema.
Definition: openjpeg.h:295
@ OPJ_CLRSPC_UNKNOWN
not supported by the library
Definition: openjpeg.h:316
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the warning handler use by openjpeg.
Definition: openjpeg.c:59
int cp_tdx
XTsiz.
Definition: openjpeg.h:401
struct opj_codestream_info opj_codestream_info_t
Index structure of the codestream.
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:1022
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:440
int index_on
DEPRECATED.
Definition: openjpeg.h:459
OPJ_BYTE * icc_profile_buf
'restricted' ICC profile
Definition: openjpeg.h:725
OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
Definition: j2k.c:12135
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info)
Destroy Codestream information after compression or decompression.
Definition: openjpeg.c:1041
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters, OPJ_FLOAT32 *pEncodingMatrix, OPJ_INT32 *p_dc_shift, OPJ_UINT32 pNbComp)
Sets the MCT matrix to use.
Definition: openjpeg.c:939
OPJ_UINT32 precno1
Definition: openjpeg.h:371
CODEC_FORMAT
Supported codec.
Definition: openjpeg.h:328
@ OPJ_CLRSPC_SRGB
sRGB
Definition: openjpeg.h:318
OPJ_BOOL opj_jp2_end_compress(opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Ends the compression procedures and possibiliy add data to be read after the codestream.
Definition: jp2.c:2135
enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Rsiz Capabilities.
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: openjpeg.h:932
struct opj_packet_info opj_packet_info_t
Index structure : Information concerning a packet inside tile.
OPJ_BOOL opj_j2k_set_decode_area(opj_j2k_t *p_j2k, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, opj_event_mgr_t *p_manager)
Sets the given area to be decoded.
Definition: j2k.c:10256
int cp_ty0
YTOsiz.
Definition: openjpeg.h:399
OPJ_CINEMA_MODE cp_cinema
DEPRECATED: use RSIZ, OPJ_PROFILE_* and MAX_COMP_SIZE instead Digital Cinema compliance 0-not complia...
Definition: openjpeg.h:512
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1052
int end_header
end position of the header
Definition: openjpeg.h:819
OPJ_UINT32 numgbits
number of guard bits
Definition: openjpeg.h:928
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1048
int OPJ_BOOL
Definition: openjpeg.h:116
OPJ_UINT32 cp_reduce
Set the number of highest resolution levels to be discarded.
Definition: openjpeg.h:560
OPJ_UINT32 ty0
tile origin in y = YTOsiz
Definition: openjpeg.h:967
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
unsigned int flags
Definition: openjpeg.h:610
OPJ_PROG_ORDER prg
Definition: openjpeg.h:373
OPJ_UINT32 dy
Definition: openjpeg.h:385
void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t *p_stream, OPJ_UINT64 data_length)
Sets the length of the user data for the stream.
Definition: cio.c:271
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:910
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:304
opj_codestream_index_t * jp2_get_cstr_index(opj_jp2_t *p_jp2)
Get the codestream index from a JPEG2000 codec.
Definition: jp2.c:3231
OPJ_OFF_T end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:770
int tp_start_pos
start position of tile part
Definition: openjpeg.h:797
OPJ_BOOL opj_jp2_read_header(opj_stream_private_t *p_stream, opj_jp2_t *jp2, opj_image_t **p_image, opj_event_mgr_t *p_manager)
Reads a jpeg2000 file header structure.
Definition: jp2.c:2840
OPJ_BOOL(* opj_set_threads)(void *p_codec, OPJ_UINT32 num_threads)
Set number of threads.
Definition: opj_codec.h:173
OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:996
@ OPJ_PCRL
precinct-component-resolution-layer order
Definition: openjpeg.h:308
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Writes a tile with the given data.
Definition: openjpeg.c:969
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:886
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y)
Sets the given area to be decoded.
Definition: openjpeg.c:530
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Creates an image without allocating memory for the image (used in the new version of the library).
Definition: image.c:227
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:687
Index structure : Information concerning tile-parts.
Definition: openjpeg.h:795
OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
Definition: jp2.c:3241
OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Decode tile data.
Definition: j2k.c:9827
#define OPJ_PROFILE_PART2
Definition: openjpeg.h:203
opj_codestream_info_v2_t * j2k_get_cstr_info(opj_j2k_t *p_j2k)
Get the codestream info from a JPEG2000 codec.
Definition: j2k.c:11381
#define OPJ_FSEEK(stream, offset, whence)
Definition: opj_includes.h:85
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty1
Definition: openjpeg.h:379
const OPJ_API char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:171
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image, OPJ_UINT32 tile_index)
Get the decoded tile from the codec.
Definition: openjpeg.c:610
char OPJ_CHAR
Definition: openjpeg.h:120
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:744
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict)
Set strict decoding parameter for this decoder.
Definition: openjpeg.c:436
opj_tile_index_t * tile_index
Definition: openjpeg.h:1058
OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
Encode an image into a JPEG-2000 codestream.
Definition: openjpeg.c:885
#define OPJ_PATH_LEN
Maximum allowed size for filenames.
Definition: openjpeg.h:150
int len
length, marker val included
Definition: openjpeg.h:788
OPJ_UINT32 tw
number of tiles in X
Definition: openjpeg.h:973
uint64_t OPJ_UINT64
Definition: openjpeg.h:134
opj_msg_callback info_handler
Debug message callback if available, NULL otherwise.
Definition: event.h:62
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:695
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:581
Information structure about the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:962
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Create an image.
Definition: image.c:40
OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Starts a compression scheme, i.e.
Definition: j2k.c:12355
int32_t OPJ_INT32
Definition: openjpeg.h:131
OPJ_BOOL opj_jp2_get_tile(opj_jp2_t *p_jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index)
Definition: jp2.c:3106
OPJ_UINT32 resE
Definition: openjpeg.h:383
void * m_info_data
Data to call the event manager upon.
Definition: event.h:56
struct opj_codec_private::@2::opj_compression m_compression
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: openjpeg.h:934
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6758
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the error handler use by openjpeg.
Definition: openjpeg.c:74
OPJ_UINT32 nb_tps
number of tile parts
Definition: openjpeg.h:1010
OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:924
OPJ_API void OPJ_CALLCONV opj_dump_codec(opj_codec_t *p_codec, OPJ_INT32 info_flag, FILE *output_stream)
Dump the codec information into the output stream.
Definition: openjpeg.c:1014
OPJ_UINT32 h
data height
Definition: openjpeg.h:685
OPJ_BOOL tile_size_on
size of tile: tile_size_on = false (not in argument) or = true (in argument)
Definition: openjpeg.h:395
opj_tile_info_v2_t * tile_info
information regarding tiles inside image
Definition: openjpeg.h:984
OPJ_API void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t *p_stream, opj_stream_write_fn p_function)
Sets the given function to be used as a write function.
Definition: cio.c:236
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:526
void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: jp2.c:1893
OPJ_BOOL m_verbose
Verbose mode.
Definition: openjpeg.h:589
#define OPJ_IS_PART2(v)
Definition: openjpeg.h:232
const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:171
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Reads a tile data.
Definition: openjpeg.c:584
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:498
OPJ_UINT32 prec
precision: number of bits per component per pixel
Definition: openjpeg.h:691
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:465
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:504
opj_jp2_t * opj_jp2_create(OPJ_BOOL p_is_decoder)
Creates a jpeg2000 file decompressor.
Definition: jp2.c:3179
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:786
int pdx[33]
precinct size (in power of 2), in X for each resolution level
Definition: openjpeg.h:827
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: openjpeg.c:827
OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Reads a tile data.
Definition: openjpeg.c:584
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:500
OPJ_UINT32 y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: openjpeg.h:713
static OPJ_BOOL opj_seek_from_file(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.c:128
struct opj_tp_info opj_tp_info_t
Index structure : Information concerning tile-parts.
int tileno
number of tile
Definition: openjpeg.h:815
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:467
OPJ_UINT32 current_tpsno
current tile-part index
Definition: openjpeg.h:1014
void opj_j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: j2k.c:6688
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:689
int num_tps
number of tile parts
Definition: openjpeg.h:843
@ OPJ_CLRSPC_SYCC
YUV.
Definition: openjpeg.h:320
void * m_codec
FIXME DOC.
Definition: opj_codec.h:162
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec, opj_stream_t *p_stream)
Read after the codestream if necessary.
Definition: openjpeg.c:919
Tile-component coding parameters information.
Definition: openjpeg.h:906
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:158
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec, int num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: openjpeg.c:405
int packno
packet number
Definition: openjpeg.h:855
int tile_Ox
Definition: openjpeg.h:869
OPJ_UINT32 tx0
tile origin in x = XTOsiz
Definition: openjpeg.h:965
opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1077
int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: openjpeg.h:492
#define OPJ_TRUE
Definition: openjpeg.h:117
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: openjpeg.h:496
OPJ_BOOL opj_j2k_set_decoded_components(opj_j2k_t *p_j2k, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, opj_event_mgr_t *p_manager)
Sets the indices of the components to decode.
Definition: j2k.c:10196
static void opj_close_from_file(void *p_user_data)
Definition: openjpeg.c:138
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:442
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, OPJ_BOOL apply_color_transforms)
Restrict the number of components to decode.
Definition: openjpeg.c:480
OPJ_INT32 roishift
Region Of Interest shift.
Definition: openjpeg.h:930
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
OPJ_UINT32 nbcomps
number of components
Definition: openjpeg.h:978
OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(opj_codec_t *p_codec, const char *const *options)
Specify extra options for the encoder.
Definition: openjpeg.c:847
void OPJ_CALLCONV opj_image_data_free(void *ptr)
Destructor for opj_image_t->comps[].data To be paired with opj_image_data_alloc.
Definition: openjpeg.c:1135
OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, opj_image_t **p_image)
Decodes an image header.
Definition: openjpeg.c:456
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:419
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t *p_stream, OPJ_UINT64 data_length)
Sets the length of the user data for the stream.
Definition: cio.c:271
Tile coding parameters information.
Definition: openjpeg.h:941
OPJ_API void OPJ_CALLCONV opj_image_data_free(void *ptr)
Destructor for opj_image_t->comps[].data To be paired with opj_image_data_alloc.
Definition: openjpeg.c:1135
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:383
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:752
OPJ_UINT32 compno0
Definition: openjpeg.h:367
OPJ_API void *OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size)
Allocator for opj_image_t->comps[].data To be paired with opj_image_data_free.
Definition: openjpeg.c:1128
OPJ_UINT32 prcS
Definition: openjpeg.h:381
int cod_format
output file format 0: PGX, 1: PxM, 2: BMP
Definition: openjpeg.h:578
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:528
void * m_error_data
Data to call the event manager upon.
Definition: event.h:52
Main codec handler used for compression or decompression.
Definition: opj_codec.h:42
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
int cp_fixed_alloc
allocation by fixed layer
Definition: openjpeg.h:407
OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:382
void opj_jp2_decoder_set_strict_mode(opj_jp2_t *jp2, OPJ_BOOL strict)
Set the strict mode parameter.
Definition: jp2.c:1904
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:574
OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:509
int max_cs_size
Maximum size (in bytes) for the whole codestream.
Definition: openjpeg.h:540
void * mct_data
Naive implementation of MCT restricted to a single reversible array based encoding without offset con...
Definition: openjpeg.h:533
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:307
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:697
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:1037
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: openjpeg.h:484
COLOR_SPACE
Supported image color spaces.
Definition: openjpeg.h:315
OPJ_BOOL is_decompressor
Flag to indicate if the codec is used to decode or encode.
Definition: opj_codec.h:166
OPJ_BOOL opj_jp2_start_compress(opj_jp2_t *jp2, opj_stream_private_t *stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Starts a compression scheme, i.e.
Definition: jp2.c:2463
OPJ_UINT16 alpha
alpha channel
Definition: openjpeg.h:703
int prch_init[OPJ_J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:450
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
Definition: openjpeg.h:1083
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:179
opj_codestream_index_t * j2k_get_cstr_index(opj_j2k_t *p_j2k)
Get the codestream index from a JPEG2000 codec.
Definition: j2k.c:11457
OPJ_BOOL OPJ_CALLCONV opj_end_compress(opj_codec_t *p_codec, opj_stream_t *p_stream)
End to compress the current image.
Definition: openjpeg.c:902
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:766
int numpix
add fixed_quality
Definition: openjpeg.h:833
@ OPJ_CODEC_UNKNOWN
place-holder
Definition: openjpeg.h:329
OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:91
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:10411
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:572
OPJ_UINT32 compno1
Definition: openjpeg.h:369
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty0
Definition: openjpeg.h:379
OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:926
int main_head_end
main header position
Definition: openjpeg.h:893
RSIZ_CAPABILITIES
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Rsiz Capabilities.
Definition: openjpeg.h:282
struct opj_tile_index opj_tile_index_t
Index structure about a tile.
OPJ_UINT32 w
data width
Definition: openjpeg.h:740
void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
Definition: openjpeg.c:1069
OPJ_UINT32 comp_t
Definition: openjpeg.h:387
OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the warning handler use by openjpeg.
Definition: openjpeg.c:59
uint16_t OPJ_UINT16
Definition: openjpeg.h:130
OPJ_UINT32 tdy
tile size in y = YTsiz
Definition: openjpeg.h:971
unsigned short int type
marker type
Definition: openjpeg.h:784
OPJ_API void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t *p_stream, opj_stream_skip_fn p_function)
Sets the given function to be used as a skip function.
Definition: cio.c:248
struct opj_tile_v2_info opj_tile_info_v2_t
Tile coding parameters information.
@ OPJ_OFF
Definition: openjpeg.h:294
int8_t OPJ_INT8
Definition: openjpeg.h:127
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:405
OPJ_UINT32 txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition: openjpeg.h:385
@ OPJ_CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:297
void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t *p_stream, opj_stream_write_fn p_function)
Sets the given function to be used as a write function.
Definition: cio.c:236
enum CINEMA_MODE OPJ_CINEMA_MODE
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Digital cinema operation mode.
OPJ_UINT32 prcE
Definition: openjpeg.h:383
void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t *p_stream, opj_stream_read_fn p_function)
Sets the given function to be used as a read function.
Definition: cio.c:213
OPJ_UINT32 w
data width
Definition: openjpeg.h:683
OPJ_OFF_T start_pos
start position
Definition: openjpeg.h:994
void opj_aligned_free(void *ptr)
Definition: opj_malloc.c:225
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:382
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:444
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(opj_codec_t *p_codec, opj_stream_t *p_stream, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_should_go_on)
Reads a tile header.
Definition: openjpeg.c:553
struct opj_tp_index opj_tp_index_t
Index structure about a tile part.
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:434
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_file_stream(const char *fname, OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with a specific buffer size.
Definition: openjpeg.c:1084
int marknum
number of markers
Definition: openjpeg.h:837
enum COLOR_SPACE OPJ_COLOR_SPACE
Supported image color spaces.
OPJ_UINT32 x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: openjpeg.h:711
@ OPJ_CODEC_JPP
JPP-stream (JPEG 2000, JPIP) : to be coded.
Definition: openjpeg.h:333
@ OPJ_MCT
Profile name for a 4K image.
Definition: openjpeg.h:286
OPJ_BOOL OPJ_CALLCONV opj_write_tile(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Writes a tile with the given data.
Definition: openjpeg.c:969
Decompression parameters.
Definition: openjpeg.h:552
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:9248
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1077
struct opj_codestream_info_v2 opj_codestream_info_v2_t
Information structure about the codestream (FIXME should be expand and enhance)
opj_tile_info_v2_t m_default_tile_info
Default information regarding tiles inside image.
Definition: openjpeg.h:981
opj_image_comp_t * comps
image components
Definition: openjpeg.h:723
OPJ_UINT32 icc_profile_len
size of ICC profile
Definition: openjpeg.h:727
OPJ_PROG_ORDER prog
progression order
Definition: openjpeg.h:863
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:1050
PROG_ORDER
Progression order.
Definition: openjpeg.h:303
double * thresh
value of thresh for each layer by tile cfr.
Definition: openjpeg.h:813
OPJ_UINT32 tyE
Definition: openjpeg.h:385
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:897
void * opj_aligned_malloc(size_t size)
Allocate memory aligned to a 16 byte boundary.
Definition: opj_malloc.c:207
OPJ_OFF_T end_pos
packet end position
Definition: openjpeg.h:772
OPJ_OFF_T(* opj_stream_skip_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:649
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition: openjpeg.h:163
CINEMA_MODE
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Digital cinema operation mode.
Definition: openjpeg.h:293
@ OPJ_CLRSPC_UNSPECIFIED
not specified in the codestream
Definition: openjpeg.h:317
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition: openjpeg.h:162
int tile_Oy
Definition: openjpeg.h:871
Index structure of the codestream.
Definition: openjpeg.h:851
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:996
OPJ_BOOL opj_j2k_encoder_set_extra_options(opj_j2k_t *p_j2k, const char *const *p_options, opj_event_mgr_t *p_manager)
Specify extra options for the encoder.
Definition: j2k.c:12168
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx0
Start and end values for Tile width and height.
Definition: openjpeg.h:379
OPJ_UINT32 numlayers
number of layers
Definition: openjpeg.h:950
#define OPJ_COMP_PARAM_DEFAULT_CBLOCKH
Definition: opj_common.h:43
void opj_j2k_decoder_set_strict_mode(opj_j2k_t *j2k, OPJ_BOOL strict)
Definition: j2k.c:6703
OPJ_UINT32 tileno
tile index
Definition: openjpeg.h:1007
union opj_codec_private::@2 m_codec_data
FIXME DOC.
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:606
#define EVT_ERROR
Error event type.
Definition: event.h:66
struct opj_marker_info opj_marker_info_t
Marker structure.
OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t *p_stream, opj_stream_seek_fn p_function)
Sets the given function to be used as a seek function, the stream is then seekable,...
Definition: cio.c:225
static OPJ_OFF_T opj_skip_from_file(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.c:118
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
OPJ_UINT32 factor
number of division by 2 of the out image compared to the original size of image
Definition: openjpeg.h:699
opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:179
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:463
OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t *p_stream)
Destroys a stream created by opj_create_stream.
Definition: cio.c:199
void j2k_dump(opj_j2k_t *p_j2k, OPJ_INT32 flag, FILE *out_stream)
Dump some elements from the J2K decompression structure .
Definition: j2k.c:11190
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:679
char tp_on
Tile part generation.
Definition: openjpeg.h:524
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_codec, opj_stream_t *p_stream)
Encode an image into a JPEG-2000 codestream.
Definition: openjpeg.c:885
OPJ_DEPRECATED_STRUCT_MEMBER(OPJ_UINT32 bpp, "Use prec instead")
obsolete: use prec instead
int mode
mode switch (cblk_style)
Definition: openjpeg.h:438
opj_tp_info_t * tp
information concerning tile parts
Definition: openjpeg.h:845
Index structure : information regarding tiles.
Definition: openjpeg.h:811
OPJ_BOOL OPJ_CALLCONV opj_start_compress(opj_codec_t *p_codec, opj_image_t *p_image, opj_stream_t *p_stream)
Start to compress the current image.
Definition: openjpeg.c:866
OPJ_UINT32 tile_index
tile number of the decoded tile
Definition: openjpeg.h:592
OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
Definition: j2k.c:7616
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:490
OPJ_BOOL opj_j2k_decode(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Decode an image from a JPEG-2000 codestream.
Definition: j2k.c:11962
#define OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION
Definition: opj_common.h:45
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:736
#define OPJ_J2K_STREAM_CHUNK_SIZE
Definition: openjpeg.h:156
#define OPJ_UINT32_SEMANTICALLY_BUT_INT32
Definition: openjpeg.h:358
OPJ_UINT64 codestream_size
codestream's size
Definition: openjpeg.h:1044
opj_stream_t *OPJ_CALLCONV opj_stream_create_file_stream(const char *fname, OPJ_SIZE_T p_size, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with a specific buffer size.
Definition: openjpeg.c:1084
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:946
int cp_tdy
YTsiz.
Definition: openjpeg.h:403
static OPJ_SIZE_T opj_read_from_file(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.c:91
OPJ_UINT32 mct
multi-component transform identifier
Definition: openjpeg.h:952
opj_tp_index_t * tp_index
information concerning tile parts
Definition: openjpeg.h:1016
OPJ_UINT32 prc_t
Definition: openjpeg.h:387
int csty
csty : coding style
Definition: openjpeg.h:415
OPJ_BOOL opj_j2k_write_tile(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes a tile.
Definition: j2k.c:13148
OPJ_UINT32 h
data height
Definition: openjpeg.h:742
OPJ_SIZE_T(* opj_stream_write_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:643
#define OPJ_FALSE
Definition: openjpeg.h:118
OPJ_UINT32 th
number of tiles in Y
Definition: openjpeg.h:975
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:373
Index structure about a tile part.
Definition: openjpeg.h:992
int tile_y
tile size in y
Definition: openjpeg.h:867
int16_t OPJ_INT16
Definition: openjpeg.h:129
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_start_compress(opj_codec_t *p_codec, opj_image_t *p_image, opj_stream_t *p_stream)
Start to compress the current image.
Definition: openjpeg.c:866
opj_codestream_index_t *OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec)
Get the codestream index from the codec.
Definition: openjpeg.c:1058
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:305
int decod_format
input file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:576
OPJ_RSIZ_CAPABILITIES cp_rsiz
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.
Definition: openjpeg.h:522
@ OPJ_CODEC_JPT
JPT-stream (JPEG 2000, JPIP) : read only.
Definition: openjpeg.h:331
int * numdecompos
number of decomposition for each component
Definition: openjpeg.h:881
struct opj_jp2_metadata opj_jp2_metadata_t
Info structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
opj_codestream_index_t *(* opj_get_codec_index)(void *p_codec)
Definition: opj_codec.h:170
OPJ_BOOL opj_j2k_read_header(opj_stream_private_t *p_stream, opj_j2k_t *p_j2k, opj_image_t **p_image, opj_event_mgr_t *p_manager)
Reads a jpeg2000 codestream header structure.
Definition: j2k.c:8390
OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t *p_j2k, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a tile header.
Definition: j2k.c:9518
OPJ_UINT32 tx0_t
Definition: openjpeg.h:387
OPJ_UINT32 resS
Definition: openjpeg.h:381
OPJ_API opj_jp2_index_t *OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec)
Get the JP2 file index from the codec FIXME.
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:369
void jp2_dump(opj_jp2_t *p_jp2, OPJ_INT32 flag, FILE *out_stream)
Dump some elements from the JP2 decompression structure .
Definition: jp2.c:3221
#define OPJ_EXTENSION_MCT
Definition: openjpeg.h:223
OPJ_UINT32 tile
Tile number (starting at 1)
Definition: openjpeg.h:377
#define JPWL_EXPECTED_COMPONENTS
Expect this number of components, so you'll find better the first EPB.
Definition: openjpeg.h:166
OPJ_UINT32 DA_y0
Decoding area up boundary.
Definition: openjpeg.h:585
void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t *p_stream, opj_stream_seek_fn p_function)
Sets the given function to be used as a seek function, the stream is then seekable,...
Definition: cio.c:225
OPJ_UINT32 cblkh
log2 of code-blocks height
Definition: openjpeg.h:916
OPJ_API opj_jp2_metadata_t *OPJ_CALLCONV opj_get_jp2_metadata(opj_codec_t *p_codec)
Get the JP2 file information from the codec FIXME.
OPJ_UINT32 prec
precision: number of bits per component per pixel
Definition: openjpeg.h:748
OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t *p_stream, opj_stream_read_fn p_function)
Sets the given function to be used as a read function.
Definition: cio.c:213
opj_event_mgr_t m_event_mgr
Event handler.
Definition: opj_codec.h:164
@ OPJ_CODEC_JP2
JP2 file format : read/write.
Definition: openjpeg.h:332
OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters)
Set encoding parameters to default values, that means :
Definition: openjpeg.c:766
int prcw_init[OPJ_J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:448
OPJ_UINT32 numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:421
OPJ_BOOL opj_jp2_set_threads(opj_jp2_t *jp2, OPJ_UINT32 num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: jp2.c:1909
OPJ_UINT32 resno1
Definition: openjpeg.h:369
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, opj_image_t **p_image)
Decodes an image header.
Definition: openjpeg.c:456
int th
number of tiles in Y
Definition: openjpeg.h:875
void * m_warning_data
Data to call the event manager upon.
Definition: event.h:54
#define OPJ_CALLCONV
Definition: openjpeg.h:98
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:738
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:457
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:583
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1020
int tp_end_pos
end position of tile part
Definition: openjpeg.h:801
Defines image data and characteristics.
Definition: openjpeg.h:709
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: openjpeg.h:486
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:367
OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec, opj_stream_t *p_stream)
Read after the codestream if necessary.
Definition: openjpeg.c:919
@ OPJ_CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:330
OPJ_BOOL jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:480
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:482
Progression order changes.
Definition: openjpeg.h:365
void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t *p_stream, void *p_data, opj_stream_free_user_data_fn p_function)
Sets the given data to be used as a user data for the stream.
Definition: cio.c:260
Marker structure.
Definition: openjpeg.h:782
int tp_numpacks
number of packets of tile part
Definition: openjpeg.h:805
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict)
Set strict decoding parameter for this decoder.
Definition: openjpeg.c:436
struct opj_tile_info opj_tile_info_t
Index structure : information regarding tiles.
int tile_x
tile size in x
Definition: openjpeg.h:865
int * cp_matrice
fixed layer
Definition: openjpeg.h:411
OPJ_UINT32 tdx
tile size in x = XTsiz
Definition: openjpeg.h:969
OPJ_UINT32 layS
Start value, initialised in pi_initialise_encode.
Definition: openjpeg.h:381
OPJ_UINT32 dx
Definition: openjpeg.h:385
void opj_set_default_event_handler(opj_event_mgr_t *p_manager)
Set the event manager with the default callback function for the 3 levels.
Definition: event.c:142
opj_msg_callback error_handler
Error message callback if available, NULL otherwise.
Definition: event.h:58
int marknum
number of markers
Definition: openjpeg.h:884
OPJ_UINT32 numresolutions
number of resolutions
Definition: openjpeg.h:912
OPJ_BOOL opj_jp2_decode_tile(opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Decode tile data.
Definition: jp2.c:3005
int max_comp_size
Maximum size (in bytes) for each component.
Definition: openjpeg.h:517
int tp_start_pack
start packet of tile part
Definition: openjpeg.h:803
void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t *p_stream, opj_stream_skip_fn p_function)
Sets the given function to be used as a skip function.
Definition: cio.c:248
int end_pos
end position
Definition: openjpeg.h:821
int pw[33]
precinct number for each resolution level (width)
Definition: openjpeg.h:823
struct opj_cparameters opj_cparameters_t
Compression parameters.
int codestream_size
codestream's size
Definition: openjpeg.h:895