OpenJPEG 1.5.2
openjpeg.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
3 * Copyright (c) 2002-2007, Professor Benoit Macq
4 * Copyright (c) 2001-2003, David Janssens
5 * Copyright (c) 2002-2003, Yannick Verschueren
6 * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
7 * Copyright (c) 2005, Herve Drolon, FreeImage Team
8 * Copyright (c) 2006-2007, Parvatha Elangovan
9 * Copyright (c) 2010-2011, Kaori Hagihara
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
32 */
33#ifndef OPENJPEG_H
34#define OPENJPEG_H
35
36
37/*
38==========================================================
39 Compiler directives
40==========================================================
41*/
42
43#if defined(OPJ_STATIC) || !defined(_WIN32)
44#define OPJ_API
45#define OPJ_CALLCONV
46#else
47#define OPJ_CALLCONV __stdcall
48/*
49The following ifdef block is the standard way of creating macros which make exporting
50from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
51symbol defined on the command line. this symbol should not be defined on any project
52that uses this DLL. This way any other project whose source files include this file see
53OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
54defined with this macro as being exported.
55*/
56#if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
57#define OPJ_API __declspec(dllexport)
58#else
59#define OPJ_API __declspec(dllimport)
60#endif /* OPJ_EXPORTS */
61#endif /* !OPJ_STATIC || !_WIN32 */
62
63typedef int opj_bool;
64#define OPJ_TRUE 1
65#define OPJ_FALSE 0
66
67/* Avoid compile-time warning because parameter is not used */
68#define OPJ_ARG_NOT_USED(x) (void)(x)
69/*
70==========================================================
71 Useful constant definitions
72==========================================================
73*/
74
75#define OPJ_PATH_LEN 4096
77#define J2K_MAXRLVLS 33
78#define J2K_MAXBANDS (3*J2K_MAXRLVLS-2)
80/* UniPG>> */
81#define JPWL_MAX_NO_TILESPECS 16
82#define JPWL_MAX_NO_PACKSPECS 16
83#define JPWL_MAX_NO_MARKERS 512
84#define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename"
85#define JPWL_EXPECTED_COMPONENTS 3
86#define JPWL_MAXIMUM_TILES 8192
87#define JPWL_MAXIMUM_HAMMING 2
88#define JPWL_MAXIMUM_EPB_ROOM 65450
89/* <<UniPG */
90
91/*
92==========================================================
93 enum definitions
94==========================================================
95*/
104
114
118typedef enum PROG_ORDER {
120 LRCP = 0,
121 RLCP = 1,
122 RPCL = 2,
123 PCRL = 3,
124 CPRL = 4
126
137
138#define ENUMCS_SRGB 16
139#define ENUMCS_GRAY 17
140#define ENUMCS_SYCC 18
141
151
160
161/*
162==========================================================
163 event manager typedef definitions
164==========================================================
165*/
166
172typedef void (*opj_msg_callback) (const char *msg, void *client_data);
173
191
192
193/*
194==========================================================
195 codec typedef definitions
196==========================================================
197*/
198
226
230typedef struct opj_cparameters {
252 int csty;
262 float tcp_rates[100];
264 float tcp_distoratio[100];
272 int mode;
279 /* number of precinct size specifications */
285
310/* UniPG>> */
340/* <<UniPG */
341
349 char tp_on;
357
358#define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
359
414
417#define opj_common_fields \
418 opj_event_mgr_t *event_mgr; \
419 void * client_data; \
420 opj_bool is_decompressor; \
421 OPJ_CODEC_FORMAT codec_format; \
422 void *j2k_handle; \
423 void *jp2_handle; \
424 void *mj2_handle
426/* Routines that are to be used by both halves of the library are declared
427 * to receive a pointer to this structure. There are no actual instances of
428 * opj_common_struct_t, only of opj_cinfo_t and opj_dinfo_t.
429 */
430typedef struct opj_common_struct {
431 opj_common_fields; /* Fields common to both master struct types */
432 /* Additional fields follow in an actual opj_cinfo_t or
433 * opj_dinfo_t. All three structs must agree on these
434 * initial fields! (This would be a lot cleaner in C++.)
435 */
437
439
443typedef struct opj_cinfo {
446 /* other specific fields go here */
448
452typedef struct opj_dinfo {
455 /* other specific fields go here */
457
458/*
459==========================================================
460 I/O stream typedef definitions
461==========================================================
462*/
463
464/*
465 * Stream open flags.
466 */
468#define OPJ_STREAM_READ 0x0001
470#define OPJ_STREAM_WRITE 0x0002
471
475typedef struct opj_cio {
478
482 unsigned char *buffer;
485
487 unsigned char *start;
489 unsigned char *end;
491 unsigned char *bp;
493
494/*
495==========================================================
496 image typedef definitions
497==========================================================
498*/
499
503typedef struct opj_image_comp {
505 int dx;
507 int dy;
509 int w;
511 int h;
513 int x0;
515 int y0;
517 int prec;
519 int bpp;
521 int sgnd;
527 int *data;
529
553
557typedef struct opj_image_comptparm {
559 int dx;
561 int dy;
563 int w;
565 int h;
567 int x0;
569 int y0;
571 int prec;
573 int bpp;
575 int sgnd;
577
578/*
579==========================================================
580 Information on the JPEG 2000 codestream
581==========================================================
582*/
583
597
598
599/* UniPG>> */
603typedef struct opj_marker_info_t {
605 unsigned short int type;
607 int pos;
609 int len;
611/* <<UniPG */
612
628
668
720
721#ifdef __cplusplus
722extern "C" {
723#endif
724
725
726/*
727==========================================================
728 openjpeg version
729==========================================================
730*/
731
732OPJ_API const char * OPJ_CALLCONV opj_version(void);
733
734/*
735==========================================================
736 image functions definitions
737==========================================================
738*/
739
748
754
755/*
756==========================================================
757 stream functions definitions
758==========================================================
759*/
760
772OPJ_API opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length);
773
779
791OPJ_API void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos);
792
793/*
794==========================================================
795 event manager functions definitions
796==========================================================
797*/
798
800
801/*
802==========================================================
803 codec functions definitions
804==========================================================
805*/
836
893OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index);
908
909
910#ifdef __cplusplus
911}
912#endif
913
914#endif /* OPENJPEG_H */
struct opj_image_comp opj_image_comp_t
Defines a single image component.
enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
Rsiz Capabilities.
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition openjpeg.h:81
struct opj_codestream_info opj_codestream_info_t
Index structure of the codestream.
OPJ_API opj_cio_t *OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length)
Open and allocate a memory stream for read / write.
Definition cio.c:37
struct opj_dparameters opj_dparameters_t
Decompression parameters.
CODEC_FORMAT
Supported codec.
Definition openjpeg.h:145
@ CODEC_JP2
JPEG-2000 file format : read/write.
Definition openjpeg.h:149
@ CODEC_J2K
JPEG-2000 codestream : read/write.
Definition openjpeg.h:147
@ CODEC_JPT
JPT-stream (JPEG 2000, JPIP) : read only.
Definition openjpeg.h:148
@ CODEC_UNKNOWN
place-holder
Definition openjpeg.h:146
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
OPJ_API opj_image_t *OPJ_CALLCONV opj_decode(opj_dinfo_t *dinfo, opj_cio_t *cio)
Decode an image from a JPEG-2000 codestream.
Definition openjpeg.c:156
struct opj_dinfo opj_dinfo_t
Decompression context info.
struct opj_tile_info opj_tile_info_t
Index structure : information regarding tiles.
OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition openjpeg.c:118
OPJ_API void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos)
Set position in byte stream.
Definition cio.c:109
struct opj_image_comptparm opj_image_cmptparm_t
Component parameters structure used by the opj_image_create function.
struct opj_common_struct opj_common_struct_t
struct opj_cinfo opj_cinfo_t
Compression context info.
RSIZ_CAPABILITIES
Rsiz Capabilities.
Definition openjpeg.h:99
@ CINEMA2K
Standard JPEG2000 profile.
Definition openjpeg.h:101
@ CINEMA4K
Profile name for a 2K image.
Definition openjpeg.h:102
@ STD_RSIZ
Definition openjpeg.h:100
CINEMA_MODE
Digital cinema operation mode.
Definition openjpeg.h:108
@ CINEMA2K_48
2K Digital Cinema at 24 fps
Definition openjpeg.h:111
@ OFF
Definition openjpeg.h:109
@ CINEMA2K_24
Not Digital Cinema.
Definition openjpeg.h:110
@ CINEMA4K_24
2K Digital Cinema at 48 fps
Definition openjpeg.h:112
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, char *index)
Encode an image into a JPEG-2000 codestream 3.
Definition openjpeg.c:305
OPJ_API opj_image_t *OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 codestream and extract the codestream information.
Definition openjpeg.c:160
PROG_ORDER
Progression order.
Definition openjpeg.h:118
@ RLCP
resolution-layer-component-precinct order
Definition openjpeg.h:121
@ RPCL
resolution-precinct-component-layer order
Definition openjpeg.h:122
@ PROG_UNKNOWN
place-holder
Definition openjpeg.h:119
@ LRCP
layer-resolution-component-precinct order
Definition openjpeg.h:120
@ PCRL
precinct-component-resolution-layer order
Definition openjpeg.h:123
@ CPRL
component-precinct-resolution-layer order
Definition openjpeg.h:124
struct opj_cparameters opj_cparameters_t
Compression parameters.
OPJ_API opj_cinfo_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition openjpeg.c:177
struct opj_marker_info_t opj_marker_info_t
Marker structure.
int opj_bool
Definition openjpeg.h:63
OPJ_API opj_dinfo_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format)
Creates a J2K/JPT/JP2 decompression structure.
Definition openjpeg.c:65
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition openjpeg.h:82
opj_common_struct_t * opj_common_ptr
Definition openjpeg.h:438
struct opj_poc opj_poc_t
Progression order changes.
struct opj_event_mgr opj_event_mgr_t
Message handler object used for.
#define OPJ_API
Definition openjpeg.h:44
OPJ_API void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio)
Close and free a CIO handle.
Definition cio.c:83
struct opj_image opj_image_t
Defines image data and characteristics.
COLOR_SPACE
Supported image color spaces.
Definition openjpeg.h:130
@ CLRSPC_UNKNOWN
not supported by the library
Definition openjpeg.h:131
@ CLRSPC_SRGB
sRGB
Definition openjpeg.h:133
@ CLRSPC_GRAY
grayscale
Definition openjpeg.h:134
@ CLRSPC_UNSPECIFIED
not specified in the codestream
Definition openjpeg.h:132
@ CLRSPC_SYCC
YUV.
Definition openjpeg.h:135
enum LIMIT_DECODING OPJ_LIMIT_DECODING
Limit decoding to certain portions of the codestream.
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Create an image.
Definition image.c:34
struct opj_packet_info opj_packet_info_t
Index structure : Information concerning a packet inside tile.
#define J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition openjpeg.h:77
struct opj_tp_info opj_tp_info_t
Index structure : Information concerning tile-parts.
#define OPJ_PATH_LEN
Maximum allowed size for filenames.
Definition openjpeg.h:75
OPJ_API int OPJ_CALLCONV cio_tell(opj_cio_t *cio)
Get position in byte stream.
Definition cio.c:100
OPJ_API opj_bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 codestream and extract the codestream information.
Definition openjpeg.c:313
LIMIT_DECODING
Limit decoding to certain portions of the codestream.
Definition openjpeg.h:155
@ LIMIT_TO_MAIN_HEADER
The decoding is limited to the Main Header.
Definition openjpeg.h:157
@ DECODE_ALL_BUT_PACKETS
Decode everything except the JPEG 2000 packets.
Definition openjpeg.h:158
@ NO_LIMITATION
No limitation for the decoding.
Definition openjpeg.h:156
OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo)
Destroy a compressor handle.
Definition openjpeg.c:210
enum CINEMA_MODE OPJ_CINEMA_MODE
Digital cinema operation mode.
OPJ_API const char *OPJ_CALLCONV opj_version(void)
Definition openjpeg.c:61
OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition image.c:73
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:230
enum COLOR_SPACE OPJ_COLOR_SPACE
Supported image color spaces.
OPJ_API void OPJ_CALLCONV opj_setup_encoder(opj_cinfo_t *cinfo, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition openjpeg.c:288
OPJ_API void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo)
Destroy a decompressor handle.
Definition openjpeg.c:98
void(* opj_msg_callback)(const char *msg, void *client_data)
Callback function prototype for events.
Definition openjpeg.h:172
#define OPJ_CALLCONV
Definition openjpeg.h:45
OPJ_API opj_event_mgr_t *OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_mgr_t *event_mgr, void *context)
Definition event.c:65
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info)
Destroy Codestream information after compression or decompression.
Definition openjpeg.c:329
struct opj_cio opj_cio_t
Byte input-output stream (CIO)
OPJ_API void OPJ_CALLCONV opj_setup_decoder(opj_dinfo_t *dinfo, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition openjpeg.c:139
Compression context info.
Definition openjpeg.h:443
opj_common_fields
Fields shared with opj_dinfo_t.
Definition openjpeg.h:445
Byte input-output stream (CIO)
Definition openjpeg.h:475
unsigned char * end
pointer to the end of the stream
Definition openjpeg.h:489
opj_common_ptr cinfo
codec context
Definition openjpeg.h:477
unsigned char * bp
pointer to the current position
Definition openjpeg.h:491
int openmode
open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE
Definition openjpeg.h:480
int length
buffer size in bytes
Definition openjpeg.h:484
unsigned char * buffer
pointer to the start of the buffer
Definition openjpeg.h:482
unsigned char * start
pointer to the start of the stream
Definition openjpeg.h:487
Index structure of the codestream.
Definition openjpeg.h:672
int numcomps
component numbers
Definition openjpeg.h:698
int tw
number of tiles in X
Definition openjpeg.h:694
int marknum
number of markers
Definition openjpeg.h:705
int * numdecompos
number of decomposition for each component
Definition openjpeg.h:702
int main_head_end
main header position
Definition openjpeg.h:714
int th
number of tiles in Y
Definition openjpeg.h:696
int tile_y
tile size in y
Definition openjpeg.h:688
int index_write
writing the packet in the index with t2_encode_packets
Definition openjpeg.h:678
int tile_Ox
Definition openjpeg.h:690
opj_tile_info_t * tile
information regarding tiles inside image
Definition openjpeg.h:718
OPJ_PROG_ORDER prog
progression order
Definition openjpeg.h:684
int tile_x
tile size in x
Definition openjpeg.h:686
int image_w
image width
Definition openjpeg.h:680
int packno
packet number
Definition openjpeg.h:676
int tile_Oy
Definition openjpeg.h:692
int codestream_size
codestream's size
Definition openjpeg.h:716
int main_head_start
main header position
Definition openjpeg.h:712
int numlayers
number of layer
Definition openjpeg.h:700
int image_h
image height
Definition openjpeg.h:682
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition openjpeg.h:674
opj_marker_info_t * marker
list of markers
Definition openjpeg.h:707
int maxmarknum
actual size of markers array
Definition openjpeg.h:709
Definition openjpeg.h:430
opj_common_fields
Definition openjpeg.h:431
Compression parameters.
Definition openjpeg.h:230
int cp_ty0
YTOsiz.
Definition openjpeg.h:236
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition openjpeg.h:318
char tcp_mct
MCT (multiple component transform)
Definition openjpeg.h:353
int numpocs
number of progression order changes (POC), default to 0
Definition openjpeg.h:258
int roi_shift
region of interest: upshift value
Definition openjpeg.h:278
OPJ_RSIZ_CAPABILITIES cp_rsiz
Profile name.
Definition openjpeg.h:347
OPJ_CINEMA_MODE cp_cinema
Digital Cinema compliance 0-not compliant, 1-compliant.
Definition openjpeg.h:343
int * cp_matrice
fixed layer
Definition openjpeg.h:248
int csty
csty : coding style
Definition openjpeg.h:252
int cp_tdy
YTsiz.
Definition openjpeg.h:240
opj_bool tile_size_on
size of tile: tile_size_on = false (not in argument) or = true (in argument)
Definition openjpeg.h:232
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition openjpeg.h:322
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition openjpeg.h:274
int res_spec
Definition openjpeg.h:280
int jpwl_sens_range
sensitivity range (0-3)
Definition openjpeg.h:332
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition openjpeg.h:330
int cp_fixed_alloc
allocation by fixed layer
Definition openjpeg.h:244
int numresolution
number of resolutions
Definition openjpeg.h:266
int cod_format
output file format 0: J2K, 1: JP2, 2: JPT
Definition openjpeg.h:307
int subsampling_dy
subsampling value for dy
Definition openjpeg.h:303
char tp_flag
Flag for Tile part generation.
Definition openjpeg.h:351
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition openjpeg.h:338
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition openjpeg.h:334
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition openjpeg.h:297
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition openjpeg.h:336
char infile[OPJ_PATH_LEN]
input file name
Definition openjpeg.h:289
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition openjpeg.h:320
int cblockh_init
initial code block height, default to 64
Definition openjpeg.h:270
int cp_disto_alloc
allocation by rate/distortion
Definition openjpeg.h:242
opj_poc_t POC[32]
progression order changes
Definition openjpeg.h:256
int cblockw_init
initial code block width, default to 64
Definition openjpeg.h:268
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition openjpeg.h:316
char tp_on
Tile part generation.
Definition openjpeg.h:349
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition openjpeg.h:328
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition openjpeg.h:324
opj_bool jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition openjpeg.h:314
int tcp_numlayers
number of layers
Definition openjpeg.h:260
int prcw_init[J2K_MAXRLVLS]
initial precinct width
Definition openjpeg.h:282
int cp_fixed_quality
add fixed_quality
Definition openjpeg.h:246
char * cp_comment
comment for coding
Definition openjpeg.h:250
char outfile[OPJ_PATH_LEN]
output file name
Definition openjpeg.h:291
int index_on
DEPRECATED.
Definition openjpeg.h:293
float tcp_rates[100]
rates of layers
Definition openjpeg.h:262
char index[OPJ_PATH_LEN]
DEPRECATED.
Definition openjpeg.h:295
opj_bool jpip_on
Enable JPIP indexing.
Definition openjpeg.h:355
int subsampling_dx
subsampling value for dx
Definition openjpeg.h:301
int prch_init[J2K_MAXRLVLS]
initial precinct height
Definition openjpeg.h:284
int mode
mode switch (cblk_style)
Definition openjpeg.h:272
int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition openjpeg.h:326
int cp_tdx
XTsiz.
Definition openjpeg.h:238
float tcp_distoratio[100]
different psnr for successive layers
Definition openjpeg.h:264
OPJ_PROG_ORDER prog_order
progression order (default LRCP)
Definition openjpeg.h:254
int cp_tx0
XTOsiz.
Definition openjpeg.h:234
int max_comp_size
Maximum rate for each component.
Definition openjpeg.h:345
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition openjpeg.h:276
int decod_format
input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
Definition openjpeg.h:305
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition openjpeg.h:299
Decompression context info.
Definition openjpeg.h:452
opj_common_fields
Fields shared with opj_cinfo_t.
Definition openjpeg.h:454
Decompression parameters.
Definition openjpeg.h:363
OPJ_LIMIT_DECODING cp_limit_decoding
Specify whether the decoding should be done on the entire codestream, or be limited to the main heade...
Definition openjpeg.h:410
int cp_reduce
Set the number of highest resolution levels to be discarded.
Definition openjpeg.h:371
int cod_format
output file format 0: PGX, 1: PxM, 2: BMP
Definition openjpeg.h:389
int jpwl_max_tiles
maximum number of tiles
Definition openjpeg.h:400
int jpwl_exp_comps
expected number of components
Definition openjpeg.h:398
unsigned int flags
Definition openjpeg.h:412
int cp_layer
Set the maximum number of quality layers to decode.
Definition openjpeg.h:378
char outfile[OPJ_PATH_LEN]
output file name
Definition openjpeg.h:385
int decod_format
input file format 0: J2K, 1: JP2, 2: JPT
Definition openjpeg.h:387
opj_bool jpwl_correct
activates the JPWL correction capabilities
Definition openjpeg.h:396
char infile[OPJ_PATH_LEN]
input file name
Definition openjpeg.h:383
Message handler object used for.
Definition openjpeg.h:183
opj_msg_callback error_handler
Error message callback if available, NULL otherwise.
Definition openjpeg.h:185
opj_msg_callback info_handler
Debug message callback if available, NULL otherwise.
Definition openjpeg.h:189
opj_msg_callback warning_handler
Warning message callback if available, NULL otherwise.
Definition openjpeg.h:187
Defines a single image component.
Definition openjpeg.h:503
int w
data width
Definition openjpeg.h:509
int dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition openjpeg.h:507
int y0
y component offset compared to the whole image
Definition openjpeg.h:515
int factor
number of division by 2 of the out image compared to the original size of image
Definition openjpeg.h:525
int * data
image component data
Definition openjpeg.h:527
int x0
x component offset compared to the whole image
Definition openjpeg.h:513
int dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition openjpeg.h:505
int sgnd
signed (1) / unsigned (0)
Definition openjpeg.h:521
int resno_decoded
number of decoded resolution
Definition openjpeg.h:523
int prec
precision
Definition openjpeg.h:517
int bpp
image depth in bits
Definition openjpeg.h:519
int h
data height
Definition openjpeg.h:511
Component parameters structure used by the opj_image_create function.
Definition openjpeg.h:557
int dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition openjpeg.h:559
int bpp
image depth in bits
Definition openjpeg.h:573
int h
data height
Definition openjpeg.h:565
int sgnd
signed (1) / unsigned (0)
Definition openjpeg.h:575
int y0
y component offset compared to the whole image
Definition openjpeg.h:569
int dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition openjpeg.h:561
int prec
precision
Definition openjpeg.h:571
int x0
x component offset compared to the whole image
Definition openjpeg.h:567
int w
data width
Definition openjpeg.h:563
Defines image data and characteristics.
Definition openjpeg.h:533
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition openjpeg.h:545
opj_image_comp_t * comps
image components
Definition openjpeg.h:547
int y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition openjpeg.h:537
int icc_profile_len
size of ICC profile
Definition openjpeg.h:551
int x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition openjpeg.h:535
int numcomps
number of components in the image
Definition openjpeg.h:543
int x1
Xsiz: width of the reference grid.
Definition openjpeg.h:539
int y1
Ysiz: height of the reference grid.
Definition openjpeg.h:541
unsigned char * icc_profile_buf
'restricted' ICC profile
Definition openjpeg.h:549
Marker structure.
Definition openjpeg.h:603
int pos
position in codestream
Definition openjpeg.h:607
int len
length, marker val included
Definition openjpeg.h:609
unsigned short int type
marker type
Definition openjpeg.h:605
Index structure : Information concerning a packet inside tile.
Definition openjpeg.h:587
int end_pos
packet end position
Definition openjpeg.h:593
double disto
packet distorsion
Definition openjpeg.h:595
int start_pos
packet start position (including SOP marker if it exists)
Definition openjpeg.h:589
int end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition openjpeg.h:591
Progression order changes.
Definition openjpeg.h:202
int resno1
Definition openjpeg.h:206
int resno0
Resolution num start, Component num start, given by POC.
Definition openjpeg.h:204
int compno1
Definition openjpeg.h:206
int resS
Definition openjpeg.h:218
int resE
Definition openjpeg.h:220
int tx0_t
Definition openjpeg.h:224
int prc_t
Definition openjpeg.h:224
int dx
Definition openjpeg.h:222
int tx0
Start and end values for Tile width and height.
Definition openjpeg.h:216
int prcE
Definition openjpeg.h:220
int tyE
Definition openjpeg.h:222
int compS
Definition openjpeg.h:218
OPJ_PROG_ORDER prg
Definition openjpeg.h:210
int comp_t
Definition openjpeg.h:224
int tx1
Definition openjpeg.h:216
int dy
Definition openjpeg.h:222
char progorder[5]
Progression order string.
Definition openjpeg.h:212
int txE
Definition openjpeg.h:222
int prcS
Definition openjpeg.h:218
int layE
End value, initialised in pi_initialise_encode.
Definition openjpeg.h:220
int compno0
Definition openjpeg.h:204
int tyS
Definition openjpeg.h:222
int txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition openjpeg.h:222
int compE
Definition openjpeg.h:220
int tile
Tile number.
Definition openjpeg.h:214
int precno1
Definition openjpeg.h:208
int ty1
Definition openjpeg.h:216
int layS
Start value, initialised in pi_initialise_encode.
Definition openjpeg.h:218
int ty0_t
Definition openjpeg.h:224
OPJ_PROG_ORDER prg1
Progression order enum.
Definition openjpeg.h:210
int lay_t
Temporary values for Tile parts, initialised in pi_create_encode.
Definition openjpeg.h:224
int precno0
Definition openjpeg.h:208
int res_t
Definition openjpeg.h:224
int ty0
Definition openjpeg.h:216
int layno0
Layer num start,Precinct num start, Precinct num end.
Definition openjpeg.h:208
int layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition openjpeg.h:206
Index structure : information regarding tiles.
Definition openjpeg.h:632
opj_marker_info_t * marker
list of markers
Definition openjpeg.h:660
int pw[33]
precinct number for each resolution level (width)
Definition openjpeg.h:644
int marknum
number of markers
Definition openjpeg.h:658
int numpix
add fixed_quality
Definition openjpeg.h:654
double distotile
add fixed_quality
Definition openjpeg.h:656
int maxmarknum
actual size of markers array
Definition openjpeg.h:662
opj_tp_info_t * tp
information concerning tile parts
Definition openjpeg.h:666
int tileno
number of tile
Definition openjpeg.h:636
opj_packet_info_t * packet
information concerning packets inside tile
Definition openjpeg.h:652
int start_pos
start position
Definition openjpeg.h:638
int pdy[33]
precinct size (in power of 2), in Y for each resolution level
Definition openjpeg.h:650
int ph[33]
precinct number for each resolution level (height)
Definition openjpeg.h:646
int end_pos
end position
Definition openjpeg.h:642
int num_tps
number of tile parts
Definition openjpeg.h:664
int pdx[33]
precinct size (in power of 2), in X for each resolution level
Definition openjpeg.h:648
double * thresh
value of thresh for each layer by tile cfr.
Definition openjpeg.h:634
int end_header
end position of the header
Definition openjpeg.h:640
Index structure : Information concerning tile-parts.
Definition openjpeg.h:616
int tp_numpacks
number of packets of tile part
Definition openjpeg.h:626
int tp_start_pos
start position of tile part
Definition openjpeg.h:618
int tp_end_pos
end position of tile part
Definition openjpeg.h:622
int tp_start_pack
start packet of tile part
Definition openjpeg.h:624
int tp_end_header
end position of tile part header
Definition openjpeg.h:620