OpenJPEG  1.5.1
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 /*
49 The following ifdef block is the standard way of creating macros which make exporting
50 from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
51 symbol defined on the command line. this symbol should not be defined on any project
52 that uses this DLL. This way any other project whose source files include this file see
53 OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
54 defined 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 
63 typedef 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 */
99 typedef enum RSIZ_CAPABILITIES {
100  STD_RSIZ = 0,
101  CINEMA2K = 3,
102  CINEMA4K = 4
104 
108 typedef enum CINEMA_MODE {
109  OFF = 0,
112  CINEMA4K_24 = 3
114 
118 typedef enum PROG_ORDER {
120  LRCP = 0,
121  RLCP = 1,
122  RPCL = 2,
123  PCRL = 3,
124  CPRL = 4
126 
130 typedef enum COLOR_SPACE {
135  CLRSPC_SYCC = 3
137 
138 #define ENUMCS_SRGB 16
139 #define ENUMCS_GRAY 17
140 #define ENUMCS_SYCC 18
141 
145 typedef enum CODEC_FORMAT {
147  CODEC_J2K = 0,
148  CODEC_JPT = 1,
149  CODEC_JP2 = 2
151 
155 typedef enum LIMIT_DECODING {
160 
161 /*
162 ==========================================================
163  event manager typedef definitions
164 ==========================================================
165 */
166 
172 typedef void (*opj_msg_callback) (const char *msg, void *client_data);
173 
183 typedef struct opj_event_mgr {
191 
192 
193 /*
194 ==========================================================
195  codec typedef definitions
196 ==========================================================
197 */
198 
202 typedef struct opj_poc {
212  char progorder[5];
214  int tile;
216  int tx0,tx1,ty0,ty1;
218  int layS, resS, compS, prcS;
220  int layE, resE, compE, prcE;
226 
230 typedef struct opj_cparameters {
234  int cp_tx0;
236  int cp_ty0;
238  int cp_tdx;
240  int cp_tdy;
250  char *cp_comment;
252  int csty;
258  int numpocs;
262  float tcp_rates[100];
264  float tcp_distoratio[100];
272  int mode;
279  /* number of precinct size specifications */
280  int res_spec;
285 
293  int index_on;
310 /* UniPG>> */
340 /* <<UniPG */
341 
349  char tp_on;
351  char tp_flag;
353  char tcp_mct;
357 
358 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
359 
363 typedef struct opj_dparameters {
378  int cp_layer;
379 
392 /* UniPG>> */
402 /* <<UniPG */
403 
411 
412  unsigned int flags;
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  */
430 typedef 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 
443 typedef struct opj_cinfo {
446  /* other specific fields go here */
448 
452 typedef 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
469 
470 #define OPJ_STREAM_WRITE 0x0002
471 
475 typedef struct opj_cio {
478 
480  int openmode;
482  unsigned char *buffer;
484  int length;
485 
487  unsigned char *start;
489  unsigned char *end;
491  unsigned char *bp;
493 
494 /*
495 ==========================================================
496  image typedef definitions
497 ==========================================================
498 */
499 
503 typedef 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;
525  int factor;
527  int *data;
529 
533 typedef struct opj_image {
535  int x0;
537  int y0;
539  int x1;
541  int y1;
543  int numcomps;
549  unsigned char *icc_profile_buf;
553 
557 typedef 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 
587 typedef struct opj_packet_info {
593  int end_pos;
595  double disto;
597 
598 
599 /* UniPG>> */
603 typedef struct opj_marker_info_t {
605  unsigned short int type;
607  int pos;
609  int len;
611 /* <<UniPG */
612 
616 typedef struct opj_tp_info {
628 
632 typedef struct opj_tile_info {
634  double *thresh;
636  int tileno;
642  int end_pos;
644  int pw[33];
646  int ph[33];
648  int pdx[33];
650  int pdy[33];
654  int numpix;
656  double distotile;
658  int marknum;
664  int num_tps;
668 
672 typedef struct opj_codestream_info {
674  double D_max;
676  int packno;
680  int image_w;
682  int image_h;
686  int tile_x;
688  int tile_y;
690  int tile_Ox;
692  int tile_Oy;
694  int tw;
696  int th;
698  int numcomps;
703 /* UniPG>> */
705  int marknum;
710 /* <<UniPG */
720 
721 #ifdef __cplusplus
722 extern "C" {
723 #endif
724 
725 
726 /*
727 ==========================================================
728  openjpeg version
729 ==========================================================
730 */
731 
732 OPJ_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 
772 OPJ_API opj_cio_t* OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length);
773 
779 
791 OPJ_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 
893 OPJ_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 */
opj_poc::compE
int compE
Definition: openjpeg.h:220
opj_dparameters_t
struct opj_dparameters opj_dparameters_t
Decompression parameters.
opj_image_cmptparm_t
struct opj_image_comptparm opj_image_cmptparm_t
Component parameters structure used by the opj_image_create function.
opj_image_comptparm::dx
int dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:559
opj_event_mgr::warning_handler
opj_msg_callback warning_handler
Warning message callback if available, NULL otherwise.
Definition: openjpeg.h:187
opj_tile_info::packet
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:652
opj_destroy_cstr_info
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
opj_cinfo_t
struct opj_cinfo opj_cinfo_t
Compression context info.
opj_codestream_info::numcomps
int numcomps
component numbers
Definition: openjpeg.h:698
opj_codestream_info::tw
int tw
number of tiles in X
Definition: openjpeg.h:694
OPJ_CODEC_FORMAT
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
OPJ_PROG_ORDER
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
opj_set_default_encoder_parameters
void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *parameters)
Set encoding parameters to default values, that means :
Definition: openjpeg.c:230
opj_poc::prcS
int prcS
Definition: openjpeg.h:218
JPWL_MAXIMUM_TILES
#define JPWL_MAXIMUM_TILES
Expect this maximum number of tiles, to avoid some crashes.
Definition: openjpeg.h:86
opj_cparameters::tcp_rates
float tcp_rates[100]
rates of layers
Definition: openjpeg.h:262
opj_free
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
opj_tile_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:660
opj_image::x1
int x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:539
opj_image_t
struct opj_image opj_image_t
Defines image data and characteristics.
opj_poc::ty0_t
int ty0_t
Definition: openjpeg.h:224
jp2_setup_decoder
void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: jp2.c:1105
opj_cparameters::decod_format
int decod_format
input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
Definition: openjpeg.h:305
opj_poc::layE
int layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:220
opj_tile_info::ph
int ph[33]
precinct number for each resolution level (height)
Definition: openjpeg.h:646
opj_marker_info_t::type
unsigned short int type
marker type
Definition: openjpeg.h:605
opj_codestream_info::image_w
int image_w
image width
Definition: openjpeg.h:680
PROG_UNKNOWN
@ PROG_UNKNOWN
place-holder
Definition: openjpeg.h:119
opj_tile_info::distotile
double distotile
add fixed_quality
Definition: openjpeg.h:656
opj_image_comp_t
struct opj_image_comp opj_image_comp_t
Defines a single image component.
j2k_decode_jpt_stream
opj_image_t * j2k_decode_jpt_stream(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image form a JPT-stream (JPEG 2000, JPIP)
Definition: j2k.c:2029
opj_dinfo
Decompression context info.
Definition: openjpeg.h:452
opj_codestream_info::index_write
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:678
CLRSPC_SYCC
@ CLRSPC_SYCC
YUV.
Definition: openjpeg.h:135
opj_codestream_info::D_max
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:674
opj_cparameters::index
char index[OPJ_PATH_LEN]
DEPRECATED.
Definition: openjpeg.h:295
opj_cparameters::cp_tx0
int cp_tx0
XTOsiz.
Definition: openjpeg.h:234
opj_j2k
JPEG-2000 codestream reader/writer.
Definition: j2k.h:314
opj_poc::lay_t
int lay_t
Temporary values for Tile parts, initialised in pi_create_encode.
Definition: openjpeg.h:224
opj_tp_info::tp_end_header
int tp_end_header
end position of tile part header
Definition: openjpeg.h:620
opj_poc::tyS
int tyS
Definition: openjpeg.h:222
OPJ_LIMIT_DECODING
enum LIMIT_DECODING OPJ_LIMIT_DECODING
Limit decoding to certain portions of the codestream.
opj_cparameters::tcp_numlayers
int tcp_numlayers
number of layers
Definition: openjpeg.h:260
opj_marker_info_t::len
int len
length, marker val included
Definition: openjpeg.h:609
NO_LIMITATION
@ NO_LIMITATION
No limitation for the decoding.
Definition: openjpeg.h:156
opj_marker_info_t
Marker structure.
Definition: openjpeg.h:603
opj_cparameters::subsampling_dy
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:303
opj_jp2
JPEG-2000 file format reader/writer.
Definition: jp2.h:120
opj_cparameters::tcp_distoratio
float tcp_distoratio[100]
different psnr for successive layers
Definition: openjpeg.h:264
opj_codestream_info::image_h
int image_h
image height
Definition: openjpeg.h:682
opj_codestream_info::maxmarknum
int maxmarknum
actual size of markers array
Definition: openjpeg.h:709
opj_poc_t
struct opj_poc opj_poc_t
Progression order changes.
OPJ_ARG_NOT_USED
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:68
opj_cio::length
int length
buffer size in bytes
Definition: openjpeg.h:484
opj_create_decompress
opj_dinfo_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format)
Creates a J2K/JPT/JP2 decompression structure.
Definition: openjpeg.c:65
opj_image_comp::prec
int prec
precision
Definition: openjpeg.h:517
OPJ_API
#define OPJ_API
Definition: openjpeg.h:44
opj_common_struct_t
struct opj_common_struct opj_common_struct_t
opj_cparameters::cblockh_init
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:270
opj_cparameters::jpip_on
opj_bool jpip_on
Enable JPIP indexing.
Definition: openjpeg.h:355
opj_image_create
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
opj_poc::dy
int dy
Definition: openjpeg.h:222
opj_packet_info::end_pos
int end_pos
packet end position
Definition: openjpeg.h:593
opj_decode_with_info
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
opj_cparameters::cod_format
int cod_format
output file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:307
opj_packet_info::disto
double disto
packet distorsion
Definition: openjpeg.h:595
opj_poc::compno1
int compno1
Definition: openjpeg.h:206
opj_encode
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_cparameters::res_spec
int res_spec
Definition: openjpeg.h:280
j2k_destroy_decompress
void j2k_destroy_decompress(opj_j2k_t *j2k)
Destroy a J2K decompressor handle.
Definition: j2k.c:1835
opj_cparameters::cp_fixed_quality
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:246
opj_codestream_info::numlayers
int numlayers
number of layer
Definition: openjpeg.h:700
CINEMA2K_48
@ CINEMA2K_48
2K Digital Cinema at 24 fps
Definition: openjpeg.h:111
j2k_create_decompress
opj_j2k_t * j2k_create_decompress(opj_common_ptr cinfo)
Creates a J2K decompression structure.
Definition: j2k.c:1818
opj_cparameters::prcw_init
int prcw_init[J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:282
opj_image_comptparm
Component parameters structure used by the opj_image_create function.
Definition: openjpeg.h:557
opj_poc::layS
int layS
Start value, initialised in pi_initialise_encode.
Definition: openjpeg.h:218
CODEC_JP2
@ CODEC_JP2
JPEG-2000 file format : read/write.
Definition: openjpeg.h:149
PCRL
@ PCRL
precinct-component-resolution-layer order
Definition: openjpeg.h:123
opj_poc::tx0_t
int tx0_t
Definition: openjpeg.h:224
opj_cparameters::jpwl_sens_TPH_tileno
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:336
cio_tell
OPJ_API int OPJ_CALLCONV cio_tell(opj_cio_t *cio)
Get position in byte stream.
Definition: cio.c:100
opj_cparameters::prch_init
int prch_init[J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:284
opj_codestream_info::main_head_start
int main_head_start
main header position
Definition: openjpeg.h:712
opj_poc::compno0
int compno0
Definition: openjpeg.h:204
opj_event_mgr
Message handler object used for.
Definition: openjpeg.h:183
opj_tile_info::pdy
int pdy[33]
precinct size (in power of 2), in Y for each resolution level
Definition: openjpeg.h:650
opj_image::color_space
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition: openjpeg.h:545
opj_poc::layno0
int layno0
Layer num start,Precinct num start, Precinct num end.
Definition: openjpeg.h:208
CLRSPC_UNSPECIFIED
@ CLRSPC_UNSPECIFIED
not specified in the codestream
Definition: openjpeg.h:132
opj_cparameters::cp_comment
char * cp_comment
comment for coding
Definition: openjpeg.h:250
opj_poc::txS
int txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition: openjpeg.h:222
opj_cparameters::jpwl_sens_size
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:328
opj_cparameters::prog_order
OPJ_PROG_ORDER prog_order
progression order (default LRCP)
Definition: openjpeg.h:254
opj_packet_info::start_pos
int start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:589
opj_image_comp::dx
int dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:505
opj_cparameters::numpocs
int numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:258
opj_image_comp
Defines a single image component.
Definition: openjpeg.h:503
opj_calloc
#define opj_calloc(num, size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.h:63
opj_tile_info::start_pos
int start_pos
start position
Definition: openjpeg.h:638
opj_cio_open
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
opj_cparameters::infile
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:289
opj_image_comp::sgnd
int sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:521
opj_set_event_mgr
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_poc::resE
int resE
Definition: openjpeg.h:220
opj_image_comptparm::w
int w
data width
Definition: openjpeg.h:563
opj_decode
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
jp2_destroy_compress
void jp2_destroy_compress(opj_jp2_t *jp2)
Destroy a JP2 compressor handle.
Definition: jp2.c:1130
opj_cparameters::jpwl_pprot_tileno
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:322
opj_cparameters::tile_size_on
opj_bool tile_size_on
size of tile: tile_size_on = false (not in argument) or = true (in argument)
Definition: openjpeg.h:232
opj_destroy_compress
void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo)
Destroy a compressor handle.
Definition: openjpeg.c:210
opj_packet_info::end_ph_pos
int end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:591
j2k_create_compress
opj_j2k_t * j2k_create_compress(opj_common_ptr cinfo)
Creates a J2K compression structure.
Definition: j2k.c:2119
opj_poc::resno0
int resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:204
CINEMA2K_24
@ CINEMA2K_24
Not Digital Cinema.
Definition: openjpeg.h:110
opj_tile_info::maxmarknum
int maxmarknum
actual size of markers array
Definition: openjpeg.h:662
opj_cparameters::numresolution
int numresolution
number of resolutions
Definition: openjpeg.h:266
opj_dparameters::jpwl_exp_comps
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:398
opj_cparameters
Compression parameters.
Definition: openjpeg.h:230
opj_msg_callback
void(* opj_msg_callback)(const char *msg, void *client_data)
Callback function prototype for events.
Definition: openjpeg.h:172
opj_image_comp::bpp
int bpp
image depth in bits
Definition: openjpeg.h:519
opj_cparameters::cp_tdx
int cp_tdx
XTsiz.
Definition: openjpeg.h:238
opj_codestream_info_t
struct opj_codestream_info opj_codestream_info_t
Index structure of the codestream.
opj_dinfo::opj_common_fields
opj_common_fields
Fields shared with opj_cinfo_t.
Definition: openjpeg.h:454
EVT_WARNING
#define EVT_WARNING
Warning event type.
Definition: event.h:36
opj_cparameters::irreversible
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:274
opj_marker_info_t
struct opj_marker_info_t opj_marker_info_t
Marker structure.
opj_decode_with_info
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
opj_cparameters::index_on
int index_on
DEPRECATED.
Definition: openjpeg.h:293
opj_decode
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
CODEC_FORMAT
CODEC_FORMAT
Supported codec.
Definition: openjpeg.h:145
OPJ_RSIZ_CAPABILITIES
enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
Rsiz Capabilities.
opj_image_comp::w
int w
data width
Definition: openjpeg.h:509
opj_image::x0
int x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: openjpeg.h:535
opj_poc::prc_t
int prc_t
Definition: openjpeg.h:224
opj_packet_info_t
struct opj_packet_info opj_packet_info_t
Index structure : Information concerning a packet inside tile.
opj_cparameters::cp_ty0
int cp_ty0
YTOsiz.
Definition: openjpeg.h:236
opj_cparameters::cp_cinema
OPJ_CINEMA_MODE cp_cinema
Digital Cinema compliance 0-not compliant, 1-compliant.
Definition: openjpeg.h:343
opj_tile_info::end_header
int end_header
end position of the header
Definition: openjpeg.h:640
LRCP
@ LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:120
opj_poc::comp_t
int comp_t
Definition: openjpeg.h:224
opj_dparameters::flags
unsigned int flags
Definition: openjpeg.h:412
opj_image_comp::x0
int x0
x component offset compared to the whole image
Definition: openjpeg.h:513
opj_destroy_compress
OPJ_API void OPJ_CALLCONV opj_destroy_compress(opj_cinfo_t *cinfo)
Destroy a compressor handle.
Definition: openjpeg.c:210
opj_common_struct::opj_common_fields
opj_common_fields
Definition: openjpeg.h:431
opj_poc::prg
OPJ_PROG_ORDER prg
Definition: openjpeg.h:210
opj_cio::openmode
int openmode
open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE
Definition: openjpeg.h:480
opj_includes.h
opj_cio
Byte input-output stream (CIO)
Definition: openjpeg.h:475
opj_poc::precno0
int precno0
Definition: openjpeg.h:208
opj_tp_info::tp_start_pos
int tp_start_pos
start position of tile part
Definition: openjpeg.h:618
opj_codestream_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:707
opj_poc::progorder
char progorder[5]
Progression order string.
Definition: openjpeg.h:212
opj_tp_info
Index structure : Information concerning tile-parts.
Definition: openjpeg.h:616
opj_setup_decoder
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
opj_encode
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_poc::resno1
int resno1
Definition: openjpeg.h:206
OPJ_PATH_LEN
#define OPJ_PATH_LEN
Maximum allowed size for filenames.
Definition: openjpeg.h:75
opj_event_mgr::info_handler
opj_msg_callback info_handler
Debug message callback if available, NULL otherwise.
Definition: openjpeg.h:189
opj_image_comp::y0
int y0
y component offset compared to the whole image
Definition: openjpeg.h:515
opj_image::y0
int y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: openjpeg.h:537
opj_dparameters::jpwl_correct
opj_bool jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:396
CLRSPC_GRAY
@ CLRSPC_GRAY
grayscale
Definition: openjpeg.h:134
opj_destroy_cstr_info
void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info)
Destroy Codestream information after compression or decompression.
Definition: openjpeg.c:329
opj_cparameters::tp_flag
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:351
opj_dparameters::cp_limit_decoding
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
opj_version
const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:61
opj_cparameters::jpwl_sens_range
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:332
opj_cio::end
unsigned char * end
pointer to the end of the stream
Definition: openjpeg.h:489
opj_cparameters::jpwl_epc_on
opj_bool jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:314
LIMIT_TO_MAIN_HEADER
@ LIMIT_TO_MAIN_HEADER
The decoding is limited to the Main Header.
Definition: openjpeg.h:157
CODEC_UNKNOWN
@ CODEC_UNKNOWN
place-holder
Definition: openjpeg.h:146
opj_cparameters::image_offset_y0
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:299
opj_cparameters::jpwl_sens_TPH
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:338
opj_create_compress
opj_cinfo_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:177
opj_tile_info::pdx
int pdx[33]
precinct size (in power of 2), in X for each resolution level
Definition: openjpeg.h:648
opj_cparameters::jpwl_sens_MH
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:334
opj_tp_info_t
struct opj_tp_info opj_tp_info_t
Index structure : Information concerning tile-parts.
opj_tile_info::tileno
int tileno
number of tile
Definition: openjpeg.h:636
cio_seek
OPJ_API void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos)
Set position in byte stream.
Definition: cio.c:109
jp2_create_decompress
opj_jp2_t * jp2_create_decompress(opj_common_ptr cinfo)
Creates a JP2 decompression structure.
Definition: jp2.c:1076
opj_jp2_decode
opj_image_t * opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 file stream.
Definition: jp2.c:744
opj_image_comptparm::y0
int y0
y component offset compared to the whole image
Definition: openjpeg.h:569
opj_cparameters::subsampling_dx
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:301
opj_poc::txE
int txE
Definition: openjpeg.h:222
opj_tile_info::num_tps
int num_tps
number of tile parts
Definition: openjpeg.h:664
opj_common_ptr
opj_common_struct_t * opj_common_ptr
Definition: openjpeg.h:438
opj_codestream_info::packno
int packno
packet number
Definition: openjpeg.h:676
opj_image_comp::dy
int dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:507
opj_codestream_info::tile_Ox
int tile_Ox
Definition: openjpeg.h:690
opj_image_comptparm::prec
int prec
precision
Definition: openjpeg.h:571
opj_poc::resS
int resS
Definition: openjpeg.h:218
opj_cparameters::jpwl_pprot
int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: openjpeg.h:326
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:64
opj_cparameters::jpwl_sens_addr
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: openjpeg.h:330
opj_poc::ty1
int ty1
Definition: openjpeg.h:216
opj_cparameters::roi_compno
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:276
opj_dparameters::cp_layer
int cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:378
opj_image_comp::data
int * data
image component data
Definition: openjpeg.h:527
opj_cparameters::POC
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:256
opj_poc::layno1
int layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:206
opj_setup_encoder
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
CINEMA2K
@ CINEMA2K
Standard JPEG2000 profile.
Definition: openjpeg.h:101
opj_version
OPJ_API const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:61
opj_dparameters::cod_format
int cod_format
output file format 0: PGX, 1: PxM, 2: BMP
Definition: openjpeg.h:389
opj_cparameters::tcp_mct
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:353
opj_poc::prcE
int prcE
Definition: openjpeg.h:220
opj_cparameters::cp_fixed_alloc
int cp_fixed_alloc
allocation by fixed layer
Definition: openjpeg.h:244
opj_set_default_decoder_parameters
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_event_msg
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:76
opj_common_struct
Definition: openjpeg.h:430
opj_dparameters::outfile
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:385
opj_image_comptparm::bpp
int bpp
image depth in bits
Definition: openjpeg.h:573
opj_encode_with_info
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
opj_setup_decoder
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
opj_cparameters::jpwl_hprot_TPH_tileno
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: openjpeg.h:318
COLOR_SPACE
COLOR_SPACE
Supported image color spaces.
Definition: openjpeg.h:130
opj_packet_info
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:587
opj_poc::res_t
int res_t
Definition: openjpeg.h:224
opj_tile_info::numpix
int numpix
add fixed_quality
Definition: openjpeg.h:654
jp2_destroy_decompress
void jp2_destroy_decompress(opj_jp2_t *jp2)
Destroy a JP2 decompressor handle.
Definition: jp2.c:1090
opj_image_destroy
OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:73
opj_cio::bp
unsigned char * bp
pointer to the current position
Definition: openjpeg.h:491
opj_create_decompress
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
opj_poc::tx1
int tx1
Definition: openjpeg.h:216
opj_dparameters::infile
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:383
opj_event_mgr_t
struct opj_event_mgr opj_event_mgr_t
Message handler object used for.
CPRL
@ CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:124
opj_codestream_info::main_head_end
int main_head_end
main header position
Definition: openjpeg.h:714
CINEMA4K_24
@ CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:112
RSIZ_CAPABILITIES
RSIZ_CAPABILITIES
Rsiz Capabilities.
Definition: openjpeg.h:99
opj_cio::start
unsigned char * start
pointer to the start of the stream
Definition: openjpeg.h:487
opj_cinfo
Compression context info.
Definition: openjpeg.h:443
opj_cinfo::opj_common_fields
opj_common_fields
Fields shared with opj_dinfo_t.
Definition: openjpeg.h:445
opj_poc::ty0
int ty0
Definition: openjpeg.h:216
opj_bool
int opj_bool
Definition: openjpeg.h:63
opj_cparameters::cp_disto_alloc
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:242
opj_image_comp::factor
int factor
number of division by 2 of the out image compared to the original size of image
Definition: openjpeg.h:525
opj_image_comp::resno_decoded
int resno_decoded
number of decoded resolution
Definition: openjpeg.h:523
OPJ_CINEMA_MODE
enum CINEMA_MODE OPJ_CINEMA_MODE
Digital cinema operation mode.
j2k_setup_encoder
void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: j2k.c:2150
LIMIT_DECODING
LIMIT_DECODING
Limit decoding to certain portions of the codestream.
Definition: openjpeg.h:155
opj_setup_encoder
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_set_default_decoder_parameters
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:118
opj_cio::cinfo
opj_common_ptr cinfo
codec context
Definition: openjpeg.h:477
opj_cparameters::roi_shift
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:278
opj_poc::tile
int tile
Tile number.
Definition: openjpeg.h:214
opj_cparameters::cblockw_init
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:268
opj_tile_info::marknum
int marknum
number of markers
Definition: openjpeg.h:658
opj_destroy_decompress
void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo)
Destroy a decompressor handle.
Definition: openjpeg.c:98
OPJ_COLOR_SPACE
enum COLOR_SPACE OPJ_COLOR_SPACE
Supported image color spaces.
opj_marker_info_t::pos
int pos
position in codestream
Definition: openjpeg.h:607
opj_dparameters
Decompression parameters.
Definition: openjpeg.h:363
opj_image_comp::h
int h
data height
Definition: openjpeg.h:511
CODEC_JPT
@ CODEC_JPT
JPT-stream (JPEG 2000, JPIP) : read only.
Definition: openjpeg.h:148
opj_destroy_decompress
OPJ_API void OPJ_CALLCONV opj_destroy_decompress(opj_dinfo_t *dinfo)
Destroy a decompressor handle.
Definition: openjpeg.c:98
opj_image::comps
opj_image_comp_t * comps
image components
Definition: openjpeg.h:547
opj_codestream_info::prog
OPJ_PROG_ORDER prog
progression order
Definition: openjpeg.h:684
PROG_ORDER
PROG_ORDER
Progression order.
Definition: openjpeg.h:118
opj_tile_info::thresh
double * thresh
value of thresh for each layer by tile cfr.
Definition: openjpeg.h:634
opj_codestream_info::tile
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:718
opj_poc::compS
int compS
Definition: openjpeg.h:218
JPWL_MAX_NO_PACKSPECS
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition: openjpeg.h:82
CINEMA_MODE
CINEMA_MODE
Digital cinema operation mode.
Definition: openjpeg.h:108
JPWL_MAX_NO_TILESPECS
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition: openjpeg.h:81
opj_codestream_info::tile_Oy
int tile_Oy
Definition: openjpeg.h:692
opj_codestream_info
Index structure of the codestream.
Definition: openjpeg.h:672
opj_poc::dx
int dx
Definition: openjpeg.h:222
opj_dparameters::jpwl_max_tiles
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:400
opj_jp2_encode
opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 file stream.
Definition: jp2.c:1212
opj_image_comptparm::h
int h
data height
Definition: openjpeg.h:565
opj_cparameters::image_offset_x0
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:297
RPCL
@ RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:122
opj_cparameters::tp_on
char tp_on
Tile part generation.
Definition: openjpeg.h:349
opj_poc::precno1
int precno1
Definition: openjpeg.h:208
opj_cparameters::mode
int mode
mode switch (cblk_style)
Definition: openjpeg.h:272
opj_tile_info::tp
opj_tp_info_t * tp
information concerning tile parts
Definition: openjpeg.h:666
opj_tile_info
Index structure : information regarding tiles.
Definition: openjpeg.h:632
opj_cparameters::jpwl_pprot_packno
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:324
STD_RSIZ
@ STD_RSIZ
Definition: openjpeg.h:100
opj_image_comptparm::dy
int dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:561
jp2_setup_encoder
void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: jp2.c:1145
opj_poc::tyE
int tyE
Definition: openjpeg.h:222
opj_cparameters::cp_tdy
int cp_tdy
YTsiz.
Definition: openjpeg.h:240
opj_cparameters::csty
int csty
csty : coding style
Definition: openjpeg.h:252
OFF
@ OFF
Definition: openjpeg.h:109
opj_cio_close
OPJ_API void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio)
Close and free a CIO handle.
Definition: cio.c:83
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:65
opj_poc::prg1
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:210
opj_codestream_info::tile_y
int tile_y
tile size in y
Definition: openjpeg.h:688
opj_poc::tx0
int tx0
Start and end values for Tile width and height.
Definition: openjpeg.h:216
CLRSPC_SRGB
@ CLRSPC_SRGB
sRGB
Definition: openjpeg.h:133
j2k_decode
opj_image_t * j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 codestream.
Definition: j2k.c:1912
opj_image_comptparm::sgnd
int sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:575
opj_image::icc_profile_len
int icc_profile_len
size of ICC profile
Definition: openjpeg.h:551
opj_image::y1
int y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:541
opj_dparameters::decod_format
int decod_format
input file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:387
opj_cio_t
struct opj_cio opj_cio_t
Byte input-output stream (CIO)
opj_cparameters::cp_rsiz
OPJ_RSIZ_CAPABILITIES cp_rsiz
Profile name.
Definition: openjpeg.h:347
CINEMA4K
@ CINEMA4K
Profile name for a 2K image.
Definition: openjpeg.h:102
opj_codestream_info::numdecompos
int * numdecompos
number of decomposition for each component
Definition: openjpeg.h:702
opj_encode_with_info
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
opj_dinfo_t
struct opj_dinfo opj_dinfo_t
Decompression context info.
JPWL_EXPECTED_COMPONENTS
#define JPWL_EXPECTED_COMPONENTS
Expect this number of components, so you'll find better the first EPB.
Definition: openjpeg.h:85
j2k_encode
opj_bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 codestream.
Definition: j2k.c:2408
jp2_create_compress
opj_jp2_t * jp2_create_compress(opj_common_ptr cinfo)
Creates a JP2 compression structure.
Definition: jp2.c:1116
opj_set_default_encoder_parameters
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
opj_image::icc_profile_buf
unsigned char * icc_profile_buf
'restricted' ICC profile
Definition: openjpeg.h:549
J2K_MAXRLVLS
#define J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:77
opj_codestream_info::th
int th
number of tiles in Y
Definition: openjpeg.h:696
OPJ_CALLCONV
#define OPJ_CALLCONV
Definition: openjpeg.h:45
opj_cparameters::outfile
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:291
opj_tp_info::tp_end_pos
int tp_end_pos
end position of tile part
Definition: openjpeg.h:622
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:533
opj_cparameters::jpwl_hprot_TPH
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: openjpeg.h:320
opj_cparameters::jpwl_hprot_MH
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:316
opj_create_compress
OPJ_API opj_cinfo_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:177
opj_poc
Progression order changes.
Definition: openjpeg.h:202
opj_tp_info::tp_numpacks
int tp_numpacks
number of packets of tile part
Definition: openjpeg.h:626
j2k_setup_decoder
void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: j2k.c:1892
CLRSPC_UNKNOWN
@ CLRSPC_UNKNOWN
not supported by the library
Definition: openjpeg.h:131
opj_tile_info_t
struct opj_tile_info opj_tile_info_t
Index structure : information regarding tiles.
RLCP
@ RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:121
opj_codestream_info::tile_x
int tile_x
tile size in x
Definition: openjpeg.h:686
opj_cparameters::cp_matrice
int * cp_matrice
fixed layer
Definition: openjpeg.h:248
DECODE_ALL_BUT_PACKETS
@ DECODE_ALL_BUT_PACKETS
Decode everything except the JPEG 2000 packets.
Definition: openjpeg.h:158
opj_dparameters::cp_reduce
int cp_reduce
Set the number of highest resolution levels to be discarded.
Definition: openjpeg.h:371
opj_image::numcomps
int numcomps
number of components in the image
Definition: openjpeg.h:543
CODEC_J2K
@ CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:147
opj_image_comptparm::x0
int x0
x component offset compared to the whole image
Definition: openjpeg.h:567
opj_event_mgr::error_handler
opj_msg_callback error_handler
Error message callback if available, NULL otherwise.
Definition: openjpeg.h:185
opj_codestream_info::marknum
int marknum
number of markers
Definition: openjpeg.h:705
opj_cio::buffer
unsigned char * buffer
pointer to the start of the buffer
Definition: openjpeg.h:482
j2k_destroy_compress
void j2k_destroy_compress(opj_j2k_t *j2k)
Destroy a J2K compressor handle.
Definition: j2k.c:2127
opj_cparameters::max_comp_size
int max_comp_size
Maximum rate for each component.
Definition: openjpeg.h:345
opj_tp_info::tp_start_pack
int tp_start_pack
start packet of tile part
Definition: openjpeg.h:624
opj_tile_info::end_pos
int end_pos
end position
Definition: openjpeg.h:642
opj_tile_info::pw
int pw[33]
precinct number for each resolution level (width)
Definition: openjpeg.h:644
opj_cparameters_t
struct opj_cparameters opj_cparameters_t
Compression parameters.
opj_codestream_info::codestream_size
int codestream_size
codestream's size
Definition: openjpeg.h:716