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