OpenJPEG  2.0.1
openjpeg.h
Go to the documentation of this file.
1  /*
2  * The copyright in this software is being made available under the 2-clauses
3  * BSD License, included below. This software may be subject to other third
4  * party and contributor rights, including patent rights, and no such rights
5  * are granted under this license.
6  *
7  * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8  * Copyright (c) 2002-2014, Professor Benoit Macq
9  * Copyright (c) 2001-2003, David Janssens
10  * Copyright (c) 2002-2003, Yannick Verschueren
11  * Copyright (c) 2003-2007, Francois-Olivier Devaux
12  * Copyright (c) 2003-2014, Antonin Descampe
13  * Copyright (c) 2005, Herve Drolon, FreeImage Team
14  * Copyright (c) 2006-2007, Parvatha Elangovan
15  * Copyright (c) 2008, Jerome Fimes, Communications & Systemes <jerome.fimes@c-s.fr>
16  * Copyright (c) 2010-2011, Kaori Hagihara
17  * Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France
18  * Copyright (c) 2012, CS Systemes d'Information, France
19  * All rights reserved.
20  *
21  * Redistribution and use in source and binary forms, with or without
22  * modification, are permitted provided that the following conditions
23  * are met:
24  * 1. Redistributions of source code must retain the above copyright
25  * notice, this list of conditions and the following disclaimer.
26  * 2. Redistributions in binary form must reproduce the above copyright
27  * notice, this list of conditions and the following disclaimer in the
28  * documentation and/or other materials provided with the distribution.
29  *
30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
31  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
34  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40  * POSSIBILITY OF SUCH DAMAGE.
41  */
42 #ifndef OPENJPEG_H
43 #define OPENJPEG_H
44 
45 
46 /*
47 ==========================================================
48  Compiler directives
49 ==========================================================
50 */
51 
52 /*
53 The inline keyword is supported by C99 but not by C90.
54 Most compilers implement their own version of this keyword ...
55 */
56 #ifndef INLINE
57  #if defined(_MSC_VER)
58  #define INLINE __forceinline
59  #elif defined(__GNUC__)
60  #define INLINE __inline__
61  #elif defined(__MWERKS__)
62  #define INLINE inline
63  #else
64  /* add other compilers here ... */
65  #define INLINE
66  #endif /* defined(<Compiler>) */
67 #endif /* INLINE */
68 
69 /* deprecated attribute */
70 #ifdef __GNUC__
71  #define OPJ_DEPRECATED(func) func __attribute__ ((deprecated))
72 #elif defined(_MSC_VER)
73  #define OPJ_DEPRECATED(func) __declspec(deprecated) func
74 #else
75  #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
76  #define OPJ_DEPRECATED(func) func
77 #endif
78 
79 #if defined(OPJ_STATIC) || !defined(_WIN32)
80 /* http://gcc.gnu.org/wiki/Visibility */
81 #if __GNUC__ >= 4
82 #define OPJ_API __attribute__ ((visibility ("default")))
83 #define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
84 #else
85 #define OPJ_API
86 #define OPJ_LOCAL
87 #endif
88 #define OPJ_CALLCONV
89 #else
90 #define OPJ_CALLCONV __stdcall
91 /*
92 The following ifdef block is the standard way of creating macros which make exporting
93 from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
94 symbol defined on the command line. this symbol should not be defined on any project
95 that uses this DLL. This way any other project whose source files include this file see
96 OPJ_API functions as being imported from a DLL, wheras this DLL sees symbols
97 defined with this macro as being exported.
98 */
99 #if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
100 #define OPJ_API __declspec(dllexport)
101 #else
102 #define OPJ_API __declspec(dllimport)
103 #endif /* OPJ_EXPORTS */
104 #endif /* !OPJ_STATIC || !_WIN32 */
105 
106 typedef int OPJ_BOOL;
107 #define OPJ_TRUE 1
108 #define OPJ_FALSE 0
109 
110 typedef char OPJ_CHAR;
111 typedef float OPJ_FLOAT32;
112 typedef double OPJ_FLOAT64;
113 typedef unsigned char OPJ_BYTE;
114 
115 #include "opj_stdint.h"
116 
117 typedef int8_t OPJ_INT8;
118 typedef uint8_t OPJ_UINT8;
119 typedef int16_t OPJ_INT16;
120 typedef uint16_t OPJ_UINT16;
121 typedef int32_t OPJ_INT32;
122 typedef uint32_t OPJ_UINT32;
123 typedef int64_t OPJ_INT64;
124 typedef uint64_t OPJ_UINT64;
125 
126 typedef int64_t OPJ_OFF_T; /* 64-bit file offset type */
127 
128 #include <stdio.h>
129 typedef size_t OPJ_SIZE_T;
130 
131 /* Avoid compile-time warning because parameter is not used */
132 #define OPJ_ARG_NOT_USED(x) (void)(x)
133 
134 /*
135 ==========================================================
136  Useful constant definitions
137 ==========================================================
138 */
139 
140 #define OPJ_PATH_LEN 4096
142 #define OPJ_J2K_MAXRLVLS 33
143 #define OPJ_J2K_MAXBANDS (3*OPJ_J2K_MAXRLVLS-2)
145 #define OPJ_J2K_DEFAULT_NB_SEGS 10
146 #define OPJ_J2K_STREAM_CHUNK_SIZE 0x100000
147 #define OPJ_J2K_DEFAULT_HEADER_SIZE 1000
148 #define OPJ_J2K_MCC_DEFAULT_NB_RECORDS 10
149 #define OPJ_J2K_MCT_DEFAULT_NB_RECORDS 10
150 
151 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
152 #define JPWL_MAX_NO_TILESPECS 16
153 #define JPWL_MAX_NO_PACKSPECS 16
154 #define JPWL_MAX_NO_MARKERS 512
155 #define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename"
156 #define JPWL_EXPECTED_COMPONENTS 3
157 #define JPWL_MAXIMUM_TILES 8192
158 #define JPWL_MAXIMUM_HAMMING 2
159 #define JPWL_MAXIMUM_EPB_ROOM 65450
160 /* <<UniPG */
161 
166 #define OPJ_IMG_INFO 1
167 #define OPJ_J2K_MH_INFO 2
168 #define OPJ_J2K_TH_INFO 4
169 #define OPJ_J2K_TCH_INFO 8
170 #define OPJ_J2K_MH_IND 16
171 #define OPJ_J2K_TH_IND 32
172 /*FIXME #define OPJ_J2K_CSTR_IND 48*/
173 #define OPJ_JP2_INFO 128
174 #define OPJ_JP2_IND 256
177 /*
178 ==========================================================
179  enum definitions
180 ==========================================================
181 */
182 
185 typedef enum RSIZ_CAPABILITIES {
189  OPJ_MCT = 0x8100
191 
195 typedef enum CINEMA_MODE {
196  OPJ_OFF = 0,
201 
205 typedef enum PROG_ORDER {
207  OPJ_LRCP = 0,
208  OPJ_RLCP = 1,
209  OPJ_RPCL = 2,
210  OPJ_PCRL = 3,
211  OPJ_CPRL = 4
213 
217 typedef enum COLOR_SPACE {
224 
228 typedef enum CODEC_FORMAT {
234 
235 
236 /*
237 ==========================================================
238  event manager typedef definitions
239 ==========================================================
240 */
241 
247 typedef void (*opj_msg_callback) (const char *msg, void *client_data);
248 
249 /*
250 ==========================================================
251  codec typedef definitions
252 ==========================================================
253 */
254 
259 typedef struct opj_poc {
282 } opj_poc_t;
283 
287 typedef struct opj_cparameters {
291  int cp_tx0;
293  int cp_ty0;
295  int cp_tdx;
297  int cp_tdy;
307  char *cp_comment;
309  int csty;
319  float tcp_rates[100];
321  float tcp_distoratio[100];
329  int mode;
336  /* number of precinct size specifications */
337  int res_spec;
342 
350  int index_on;
367 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
397 /* <<UniPG */
398 
406  char tp_on;
408  char tp_flag;
410  char tcp_mct;
415  void * mct_data;
417 
418 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
419 
423 typedef struct opj_dparameters {
439 
450 
461 
466 
469 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
479 /* <<UniPG */
480 
481  unsigned int flags;
482 
484 
485 
489 typedef void * opj_codec_t;
490 
491 /*
492 ==========================================================
493  I/O stream typedef definitions
494 ==========================================================
495 */
496 
501 #define OPJ_STREAM_READ OPJ_TRUE
502 
503 #define OPJ_STREAM_WRITE OPJ_FALSE
504 
505 /*
506  * Callback function prototype for read function
507  */
508 typedef OPJ_SIZE_T (* opj_stream_read_fn) (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data) ;
509 
510 /*
511  * Callback function prototype for write function
512  */
513 typedef OPJ_SIZE_T (* opj_stream_write_fn) (void * p_buffer, OPJ_SIZE_T p_nb_bytes, void * p_user_data) ;
514 
515 /*
516  * Callback function prototype for skip function
517  */
518 typedef OPJ_OFF_T (* opj_stream_skip_fn) (OPJ_OFF_T p_nb_bytes, void * p_user_data) ;
519 
520 /*
521  * Callback function prototype for seek function
522  */
523 typedef OPJ_BOOL (* opj_stream_seek_fn) (OPJ_OFF_T p_nb_bytes, void * p_user_data) ;
524 
525 /*
526  * JPEG2000 Stream.
527  */
528 typedef void * opj_stream_t;
529 
530 /*
531 ==========================================================
532  image typedef definitions
533 ==========================================================
534 */
535 
539 typedef struct opj_image_comp {
565 
569 typedef struct opj_image {
588 } opj_image_t;
589 
590 
594 typedef struct opj_image_comptparm {
614 
615 
616 /*
617 ==========================================================
618  Information on the JPEG 2000 codestream
619 ==========================================================
620 */
621 /* QUITE EXPERIMENTAL FOR THE MOMENT */
622 
626 typedef struct opj_packet_info {
634  double disto;
636 
637 
638 /* UniPG>> */
642 typedef struct opj_marker_info {
644  unsigned short int type;
648  int len;
650 /* <<UniPG */
651 
655 typedef struct opj_tp_info {
666 } opj_tp_info_t;
667 
671 typedef struct opj_tile_info {
673  double *thresh;
675  int tileno;
681  int end_pos;
683  int pw[33];
685  int ph[33];
687  int pdx[33];
689  int pdy[33];
693  int numpix;
695  double distotile;
697  int marknum;
703  int num_tps;
707 
711 typedef struct opj_codestream_info {
713  double D_max;
715  int packno;
719  int image_w;
721  int image_h;
725  int tile_x;
727  int tile_y;
729  int tile_Ox;
731  int tile_Oy;
733  int tw;
735  int th;
737  int numcomps;
742 /* UniPG>> */
744  int marknum;
749 /* <<UniPG */
759 
760 /* <----------------------------------------------------------- */
761 /* new output managment of the codestream information and index */
762 
766 typedef struct opj_tccp_info
767 {
796 }
798 
802 typedef struct opj_tile_v2_info {
803 
805  int tileno;
814 
817 
819 
823 typedef struct opj_codestream_info_v2 {
824  /* Tile info */
837 
840 
843 
845  opj_tile_info_v2_t *tile_info; /* FIXME not used for the moment */
846 
848 
849 
853 typedef struct opj_tp_index {
860 
862 
866 typedef struct opj_tile_index {
869 
878 
879  /* UniPG>> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */
886  /* <<UniPG */
887 
892 
894 
898 typedef struct opj_codestream_index {
903 
906 
907 /* UniPG>> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */
914 /* <<UniPG */
915 
919  opj_tile_index_t *tile_index; /* FIXME not used for the moment */
920 
922 /* -----------------------------------------------------------> */
923 
924 /*
925 ==========================================================
926  Metadata from the JP2file
927 ==========================================================
928 */
929 
934 typedef struct opj_jp2_metadata {
937 
939 
944 typedef struct opj_jp2_index {
947 
949 
950 
951 #ifdef __cplusplus
952 extern "C" {
953 #endif
954 
955 
956 /*
957 ==========================================================
958  openjpeg version
959 ==========================================================
960 */
961 
962 /* Get the version of the openjpeg library*/
963 OPJ_API const char * OPJ_CALLCONV opj_version(void);
964 
965 /*
966 ==========================================================
967  image functions definitions
968 ==========================================================
969 */
970 
980 
987 
998 
999 /*
1000 ==========================================================
1001  stream functions definitions
1002 ==========================================================
1003 */
1004 
1013 
1023 
1031 
1038 
1045 
1052 
1059 
1065 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data);
1066 
1074 
1082 
1089 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (FILE * p_file, OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_read_stream);
1090 
1091 /*
1092 ==========================================================
1093  event manager functions definitions
1094 ==========================================================
1095 */
1103  opj_msg_callback p_callback,
1104  void * p_user_data);
1112  opj_msg_callback p_callback,
1113  void * p_user_data);
1121  opj_msg_callback p_callback,
1122  void * p_user_data);
1123 
1124 /*
1125 ==========================================================
1126  codec functions definitions
1127 ==========================================================
1128 */
1129 
1137 
1144 
1151  opj_stream_t *p_stream);
1152 
1153 
1159 
1170  opj_dparameters_t *parameters );
1171 
1182  opj_codec_t *p_codec,
1183  opj_image_t **p_image);
1184 
1198  opj_image_t* p_image,
1199  OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
1200  OPJ_INT32 p_end_x, OPJ_INT32 p_end_y );
1201 
1211  opj_stream_t *p_stream,
1212  opj_image_t *p_image);
1213 
1225  opj_stream_t *p_stream,
1226  opj_image_t *p_image,
1227  OPJ_UINT32 tile_index);
1228 
1237 
1251  OPJ_UINT32 p_tile_index,
1252  OPJ_BYTE * p_data,
1253  OPJ_UINT32 p_data_size,
1254  opj_stream_t *p_stream );
1255 
1278  opj_stream_t * p_stream,
1279  OPJ_UINT32 * p_tile_index,
1280  OPJ_UINT32 * p_data_size,
1281  OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
1282  OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
1283  OPJ_UINT32 * p_nb_comps,
1284  OPJ_BOOL * p_should_go_on );
1285 
1299  OPJ_UINT32 p_tile_index,
1300  OPJ_BYTE * p_data,
1301  OPJ_UINT32 p_data_size,
1302  opj_stream_t *p_stream );
1303 
1304 /* COMPRESSION FUNCTIONS*/
1305 
1312 
1335 
1343  opj_cparameters_t *parameters,
1344  opj_image_t *image);
1345 
1353  opj_image_t * p_image,
1354  opj_stream_t *p_stream);
1355 
1362  opj_stream_t *p_stream);
1363 
1372  opj_stream_t *p_stream);
1373 /*
1374 ==========================================================
1375  codec output functions definitions
1376 ==========================================================
1377 */
1378 /* EXPERIMENTAL FUNCTIONS FOR NOW, USED ONLY IN J2K_DUMP*/
1379 
1385 
1386 
1396  OPJ_INT32 info_flag,
1397  FILE* output_stream);
1398 
1408 
1418 
1420 
1421 
1431 
1441 
1442 
1443 /*
1444 ==========================================================
1445  MCT functions
1446 ==========================================================
1447 */
1448 
1460  OPJ_FLOAT32 * pEncodingMatrix,
1461  OPJ_INT32 * p_dc_shift,
1462  OPJ_UINT32 pNbComp);
1463 
1464 
1465 
1466 #ifdef __cplusplus
1467 }
1468 #endif
1469 
1470 #endif /* OPENJPEG_H */
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid...
Definition: openjpeg.h:598
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:373
OPJ_UINT32 current_nb_tps
current nb of tile part (allocated)
Definition: openjpeg.h:873
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:381
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(FILE *p_file, OPJ_BOOL p_is_read_stream)
Helper function.
Definition: openjpeg.c:921
int * cp_matrice
fixed layer
Definition: openjpeg.h:305
Not Digital Cinema.
Definition: openjpeg.h:197
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:327
OPJ_UINT32 tdy
tile size in y = YTsiz
Definition: openjpeg.h:832
int max_comp_size
Maximum rate for each component.
Definition: openjpeg.h:402
struct opj_tile_index opj_tile_index_t
Index structure about a tile.
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:261
int64_t OPJ_OFF_T
Definition: openjpeg.h:126
int decod_format
input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
Definition: openjpeg.h:362
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition: openjpeg.h:152
#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:142
int res_spec
Definition: openjpeg.h:337
double OPJ_FLOAT64
Definition: openjpeg.h:112
not specified in the codestream
Definition: openjpeg.h:219
OPJ_UINT32 layno0
Layer num start,Precinct num start, Precinct num end.
Definition: openjpeg.h:265
OPJ_OFF_T end_header
end position of the header
Definition: openjpeg.h:857
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:746
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:575
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:691
OPJ_BOOL jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:473
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:151
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:303
OPJ_UINT32 tw
number of tiles in X
Definition: openjpeg.h:834
OPJ_UINT32 prec
precision
Definition: openjpeg.h:608
float tcp_rates[100]
rates of layers
Definition: openjpeg.h:319
2K Digital Cinema at 48 fps
Definition: openjpeg.h:199
OPJ_UINT32 cblkh
code-blocks height
Definition: openjpeg.h:777
OPJ_UINT32 tile
Tile number.
Definition: openjpeg.h:271
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid...
Definition: openjpeg.h:543
layer-resolution-component-precinct order
Definition: openjpeg.h:207
OPJ_INT32 * data
image component data
Definition: openjpeg.h:563
int tcp_numlayers
number of layers
Definition: openjpeg.h:317
double disto
packet distorsion
Definition: openjpeg.h:634
OPJ_BOOL jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:371
OPJ_UINT32 tdx
tile size in x = XTsiz
Definition: openjpeg.h:830
Index structure : information regarding tiles.
Definition: openjpeg.h:671
YUV.
Definition: openjpeg.h:222
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_start_compress(opj_codec_t *p_codec, opj_image_t *p_image, opj_stream_t *p_stream)
Start to compress the current image.
Definition: openjpeg.c:715
OPJ_UINT32 compno
component index
Definition: openjpeg.h:769
Profile name for a 2K image.
Definition: openjpeg.h:188
Progression order changes.
Definition: openjpeg.h:259
int tile_Ox
Definition: openjpeg.h:729
int packno
packet number
Definition: openjpeg.h:715
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_file_stream(FILE *p_file, OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_read_stream)
FIXME DOC.
Definition: openjpeg.c:926
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: openjpeg.h:377
OPJ_UINT32 nb_tile_to_decode
Nb of tile to decode.
Definition: openjpeg.h:465
struct opj_codestream_info opj_codestream_info_t
Index structure of the codestream.
struct opj_dparameters opj_dparameters_t
Decompression parameters.
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:699
int OPJ_BOOL
Definition: openjpeg.h:106
OPJ_UINT32 cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:438
int start_pos
start position
Definition: openjpeg.h:677
JPEG-2000 file format : read/write.
Definition: openjpeg.h:232
OPJ_BOOL jpip_on
Enable JPIP indexing.
Definition: openjpeg.h:412
int cod_format
output file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:364
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:230
char index[OPJ_PATH_LEN]
DEPRECATED.
Definition: openjpeg.h:352
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
OPJ_UINT32 numresolutions
number of resolutions
Definition: openjpeg.h:773
OPJ_UINT32 nb_packet
packet number
Definition: openjpeg.h:889
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info)
Destroy Codestream information after compression or decompression.
Definition: openjpeg.c:885
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:379
resolution-layer-component-precinct order
Definition: openjpeg.h:208
OPJ_API opj_jp2_index_t *OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec)
Get the JP2 file index from the codec FIXME.
int end_pos
end position
Definition: openjpeg.h:681
enum COLOR_SPACE OPJ_COLOR_SPACE
Supported image color spaces.
double distotile
add fixed_quality
Definition: openjpeg.h:695
grayscale
Definition: openjpeg.h:221
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Creates an image without allocating memory for the image (used in the new version of the library)...
Definition: image.c:204
unsigned char OPJ_BYTE
Definition: openjpeg.h:113
OPJ_UINT32 compE
Definition: openjpeg.h:277
OPJ_OFF_T main_head_start
main header start position (SOC position)
Definition: openjpeg.h:900
Index structure : Information concerning tile-parts.
Definition: openjpeg.h:655
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:579
OPJ_UINT32 comp_t
Definition: openjpeg.h:281
OPJ_UINT32 lay_t
Temporary values for Tile parts, initialised in pi_create_encode.
Definition: openjpeg.h:281
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Writes a tile with the given data.
Definition: openjpeg.c:813
int cp_tdx
XTsiz.
Definition: openjpeg.h:295
struct opj_image opj_image_t
Defines image data and characteristics.
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y)
Sets the given area to be decoded.
Definition: openjpeg.c:422
uint16_t OPJ_UINT16
Definition: openjpeg.h:120
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:606
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: openjpeg.c:696
OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:78
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:346
int index_on
DEPRECATED.
Definition: openjpeg.h:350
int32_t OPJ_INT32
Definition: openjpeg.h:121
Information structure about the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:823
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:489
char * cp_comment
comment for coding
Definition: openjpeg.h:307
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:277
OPJ_UINT32 numgbits
number of guard bits
Definition: openjpeg.h:789
OPJ_INT32 tx0
Start and end values for Tile width and height.
Definition: openjpeg.h:273
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:401
int main_head_end
main header position
Definition: openjpeg.h:753
Info structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
Definition: openjpeg.h:934
OPJ_UINT32 qmfbid
discrete wavelet transform identifier
Definition: openjpeg.h:781
OPJ_UINT32 tyE
Definition: openjpeg.h:279
OPJ_API void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t *p_stream, opj_stream_write_fn p_function)
Sets the given function to be used as a write function.
Definition: cio.c:225
int * numdecompos
number of decomposition for each component
Definition: openjpeg.h:741
OPJ_UINT32 dx
Definition: openjpeg.h:279
OPJ_UINT32 DA_y1
Decoding area bottom boundary.
Definition: openjpeg.h:458
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:577
OPJ_UINT32 tyS
Definition: openjpeg.h:279
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:164
struct opj_poc opj_poc_t
Progression order changes.
size_t OPJ_SIZE_T
Definition: openjpeg.h:129
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:188
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition: openjpeg.h:581
int th
number of tiles in Y
Definition: openjpeg.h:735
struct opj_cparameters opj_cparameters_t
Compression parameters.
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:913
Marker structure.
Definition: openjpeg.h:642
Standard JPEG2000 profile.
Definition: openjpeg.h:187
struct opj_codestream_index opj_codestream_index_t
Index structure of the codestream (FIXME should be expand and enhance)
uint64_t OPJ_UINT64
Definition: openjpeg.h:124
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters, OPJ_FLOAT32 *pEncodingMatrix, OPJ_INT32 *p_dc_shift, OPJ_UINT32 pNbComp)
Sets the MCT matrix to use.
Definition: openjpeg.c:787
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:360
CODEC_FORMAT
Supported codec.
Definition: openjpeg.h:228
OPJ_PROG_ORDER prog_order
progression order (default OPJ_LRCP)
Definition: openjpeg.h:311
OPJ_CINEMA_MODE cp_cinema
Digital Cinema compliance 0-not compliant, 1-compliant.
Definition: openjpeg.h:400
float tcp_distoratio[100]
different psnr for successive layers
Definition: openjpeg.h:321
int tile_Oy
Definition: openjpeg.h:731
OPJ_OFF_T(* opj_stream_skip_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:518
int marknum
number of markers
Definition: openjpeg.h:744
OPJ_OFF_T end_pos
packet end position
Definition: openjpeg.h:632
opj_packet_info_t * packet_index
information concerning packets inside tile
Definition: openjpeg.h:891
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:385
Defines image data and characteristics.
Definition: openjpeg.h:569
float OPJ_FLOAT32
Definition: openjpeg.h:111
OPJ_API opj_jp2_metadata_t *OPJ_CALLCONV opj_get_jp2_metadata(opj_codec_t *p_codec)
Get the JP2 file information from the codec FIXME.
struct opj_image_comptparm opj_image_cmptparm_t
Component parameters structure used by the opj_image_create function.
OPJ_UINT32 tx0
tile origin in x = XTOsiz
Definition: openjpeg.h:826
RSIZ_CAPABILITIES
Rsiz Capabilities.
Definition: openjpeg.h:185
OPJ_UINT32 compS
Definition: openjpeg.h:275
unsigned int flags
Definition: openjpeg.h:481
int cp_ty0
YTOsiz.
Definition: openjpeg.h:293
#define OPJ_PATH_LEN
Maximum allowed size for filenames.
Definition: openjpeg.h:140
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:408
OPJ_UINT32 ty0_t
Definition: openjpeg.h:281
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:885
void(* opj_msg_callback)(const char *msg, void *client_data)
Callback function prototype for events.
Definition: openjpeg.h:247
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:395
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:263
resolution-precinct-component-layer order
Definition: openjpeg.h:209
OPJ_INT32 tx1
Definition: openjpeg.h:273
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:391
Index structure about a tile.
Definition: openjpeg.h:866
struct opj_tp_info opj_tp_info_t
Index structure : Information concerning tile-parts.
OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t *p_stream, opj_stream_read_fn p_function)
Sets the given function to be used as a read function.
Definition: cio.c:204
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:549
OPJ_UINT32 precno1
Definition: openjpeg.h:265
OPJ_UINT32 cblksty
code-block coding style
Definition: openjpeg.h:779
OPJ_PROG_ORDER prog
progression order
Definition: openjpeg.h:723
struct opj_tile_info opj_tile_info_t
Index structure : information regarding tiles.
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:557
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:393
OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t *p_stream)
Destroys a stream created by opj_create_stream.
Definition: cio.c:193
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:638
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:757
Decompression parameters.
Definition: openjpeg.h:423
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec, opj_stream_t *p_stream)
Read after the codestream if necessary.
Definition: openjpeg.c:768
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:333
int tile_x
tile size in x
Definition: openjpeg.h:725
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:610
OPJ_BYTE * icc_profile_buf
'restricted' ICC profile
Definition: openjpeg.h:585
int pdy[33]
precinct size (in power of 2), in Y for each resolution level
Definition: openjpeg.h:689
OPJ_INT32 roishift
Region Of Interest shift.
Definition: openjpeg.h:791
int tp_end_pos
end position of tile part
Definition: openjpeg.h:661
int tile_y
tile size in y
Definition: openjpeg.h:727
opj_tile_info_v2_t * tile_info
information regarding tiles inside image
Definition: openjpeg.h:845
OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:785
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:452
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:612
OPJ_OFF_T main_head_end
main header end position (first SOT position)
Definition: openjpeg.h:902
int codestream_size
codestream's size
Definition: openjpeg.h:755
OPJ_UINT32 nb_tps
number of tile parts
Definition: openjpeg.h:871
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
Definition: openjpeg.c:912
OPJ_BOOL tile_size_on
size of tile: tile_size_on = false (not in argument) or = true (in argument)
Definition: openjpeg.h:289
OPJ_UINT32 h
data height
Definition: openjpeg.h:547
OPJ_UINT32 resS
Definition: openjpeg.h:275
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_codec, opj_stream_t *p_stream)
Encode an image into a JPEG-2000 codestream.
Definition: openjpeg.c:734
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:713
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:313
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:356
int cod_format
output file format 0: PGX, 1: PxM, 2: BMP
Definition: openjpeg.h:449
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:389
int tw
number of tiles in X
Definition: openjpeg.h:733
int end_header
end position of the header
Definition: openjpeg.h:679
OPJ_OFF_T end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:630
OPJ_UINT32 cp_reduce
Set the number of highest resolution levels to be discarded.
Definition: openjpeg.h:431
int tileno
number of tile
Definition: openjpeg.h:675
OPJ_UINT32 y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area...
Definition: openjpeg.h:573
int numcomps
component numbers
Definition: openjpeg.h:737
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Create an image.
Definition: image.c:39
OPJ_API const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:157
Profile name for a 4K image.
Definition: openjpeg.h:189
void * opj_stream_t
Definition: openjpeg.h:528
uint8_t OPJ_UINT8
Definition: openjpeg.h:118
int numresolution
number of resolutions
Definition: openjpeg.h:323
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:909
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:883
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: openjpeg.h:387
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:267
int image_h
image height
Definition: openjpeg.h:721
not supported by the library
Definition: openjpeg.h:218
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:475
int maxmarknum
actual size of markers array
Definition: openjpeg.h:701
OPJ_INT32 ty1
Definition: openjpeg.h:273
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
struct opj_marker_info opj_marker_info_t
Marker structure.
OPJ_UINT32 numlayers
number of layers
Definition: openjpeg.h:811
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:331
OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:787
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:604
int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: openjpeg.h:383
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_compress(opj_codec_t *p_codec, opj_stream_t *p_stream)
End to compress the current image.
Definition: openjpeg.c:751
int tp_numpacks
number of packets of tile part
Definition: openjpeg.h:665
int image_w
image width
Definition: openjpeg.h:719
int cp_fixed_alloc
allocation by fixed layer
Definition: openjpeg.h:301
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: openjpeg.h:793
int tileno
number (index) of tile
Definition: openjpeg.h:805
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:299
enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
Rsiz Capabilities.
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the info handler use by openjpeg.
Definition: openjpeg.c:44
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:807
struct opj_tp_index opj_tp_index_t
Index structure about a tile part.
void * mct_data
Naive implementation of MCT restricted to a single reversible array based encoding without offset con...
Definition: openjpeg.h:415
OPJ_INT32 ty0
Definition: openjpeg.h:273
Tile coding parameters information.
Definition: openjpeg.h:802
OPJ_INT32 not_used
Definition: openjpeg.h:946
int tp_start_pack
start packet of tile part
Definition: openjpeg.h:663
OPJ_UINT32 mct
multi-component transform identifier
Definition: openjpeg.h:813
2K Digital Cinema at 24 fps
Definition: openjpeg.h:198
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:445
opj_tile_index_t * tile_index
Definition: openjpeg.h:919
struct opj_jp2_metadata opj_jp2_metadata_t
Info structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:771
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:646
OPJ_UINT32 prec
precision
Definition: openjpeg.h:553
Component parameters structure used by the opj_image_create function.
Definition: openjpeg.h:594
int pdx[33]
precinct size (in power of 2), in X for each resolution level
Definition: openjpeg.h:687
int main_head_start
main header position
Definition: openjpeg.h:751
OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t *p_stream, opj_stream_seek_fn p_function)
Sets the given function to be used as a seek function, the stream is then seekable.
Definition: cio.c:215
Defines a single image component.
Definition: openjpeg.h:539
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: openjpeg.h:375
double * thresh
value of thresh for each layer by tile cfr.
Definition: openjpeg.h:673
int tp_end_header
end position of tile part header
Definition: openjpeg.h:659
int prch_init[OPJ_J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:341
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:551
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t *p_stream, void *p_data)
Sets the given data to be used as a user data for the stream.
Definition: cio.c:247
OPJ_UINT32 prcE
Definition: openjpeg.h:277
OPJ_INT32 not_used
Definition: openjpeg.h:936
OPJ_UINT32 res_t
Definition: openjpeg.h:281
OPJ_OFF_T start_pos
start position
Definition: openjpeg.h:855
Definition: openjpeg.h:196
struct opj_tile_v2_info opj_tile_info_v2_t
Tile coding parameters information.
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:443
COLOR_SPACE
Supported image color spaces.
Definition: openjpeg.h:217
int16_t OPJ_INT16
Definition: openjpeg.h:119
struct opj_tccp_info opj_tccp_info_t
Tile-component coding parameters information.
OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:840
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: openjpeg.h:795
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the error handler use by openjpeg.
Definition: openjpeg.c:74
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:911
OPJ_UINT32 nbcomps
number of components
Definition: openjpeg.h:839
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:410
OPJ_UINT32 resE
Definition: openjpeg.h:277
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:325
#define OPJ_CALLCONV
Definition: openjpeg.h:88
OPJ_BOOL(* opj_stream_seek_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:523
int cp_tdy
YTsiz.
Definition: openjpeg.h:297
OPJ_UINT32 prc_t
Definition: openjpeg.h:281
int csty
csty : coding style
Definition: openjpeg.h:309
OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:338
PROG_ORDER
Progression order.
Definition: openjpeg.h:205
OPJ_UINT64 codestream_size
codestream's size
Definition: openjpeg.h:905
OPJ_SIZE_T(* opj_stream_read_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:508
OPJ_BOOL m_verbose
Verbose mode.
Definition: openjpeg.h:460
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:358
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:559
struct opj_codestream_info_v2 opj_codestream_info_v2_t
Information structure about the codestream (FIXME should be expand and enhance)
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:898
OPJ_UINT32 prcS
Definition: openjpeg.h:275
OPJ_PROG_ORDER prg
progression order
Definition: openjpeg.h:809
int maxmarknum
actual size of markers array
Definition: openjpeg.h:748
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image, OPJ_UINT32 tile_index)
Get the decoded tile from the codec.
Definition: openjpeg.c:499
OPJ_API opj_codestream_index_t *OPJ_CALLCONV opj_get_cstr_index(opj_codec_t *p_codec)
Get the codestream index from the codec.
Definition: openjpeg.c:901
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the warning handler use by openjpeg.
Definition: openjpeg.c:59
OPJ_UINT32 current_tpsno
current tile-part index
Definition: openjpeg.h:875
int num_tps
number of tile parts
Definition: openjpeg.h:703
place-holder
Definition: openjpeg.h:229
struct opj_image_comp opj_image_comp_t
Defines a single image component.
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_t *p_stream)
Reads a tile data.
Definition: openjpeg.c:474
OPJ_API opj_codestream_info_v2_t *OPJ_CALLCONV opj_get_cstr_info(opj_codec_t *p_codec)
Get the codestream information from the codec.
Definition: openjpeg.c:874
int numpix
add fixed_quality
Definition: openjpeg.h:693
OPJ_RSIZ_CAPABILITIES cp_rsiz
Profile name.
Definition: openjpeg.h:404
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:717
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid...
Definition: openjpeg.h:541
#define OPJ_API
Definition: openjpeg.h:85
OPJ_UINT32 w
data width
Definition: openjpeg.h:600
uint32_t OPJ_UINT32
Definition: openjpeg.h:122
component-precinct-resolution-layer order
Definition: openjpeg.h:211
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:555
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:477
int8_t OPJ_INT8
Definition: openjpeg.h:117
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters)
Setup the decoder with decompression parameters provided by the user and with the message handler pro...
Definition: openjpeg.c:358
OPJ_UINT32 tileno
tile index
Definition: openjpeg.h:868
Definition: openjpeg.h:186
char OPJ_CHAR
Definition: openjpeg.h:110
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:354
OPJ_UINT32 compno1
Definition: openjpeg.h:263
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:626
OPJ_UINT32 compno0
Definition: openjpeg.h:261
OPJ_OFF_T end_pos
end position
Definition: openjpeg.h:859
int numlayers
number of layer
Definition: openjpeg.h:739
OPJ_PROG_ORDER prg
Definition: openjpeg.h:267
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:628
OPJ_CHAR progorder[5]
Progression order string.
Definition: openjpeg.h:269
int64_t OPJ_INT64
Definition: openjpeg.h:123
OPJ_UINT32 w
data width
Definition: openjpeg.h:545
opj_tile_info_v2_t m_default_tile_info
Default information regarding tiles inside image.
Definition: openjpeg.h:842
OPJ_UINT32 layS
Start value, initialised in pi_initialise_encode.
Definition: openjpeg.h:275
OPJ_UINT32 x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area...
Definition: openjpeg.h:571
int tp_start_pos
start position of tile part
Definition: openjpeg.h:657
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:348
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:335
struct opj_jp2_index opj_jp2_index_t
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
int len
length, marker val included
Definition: openjpeg.h:648
int marknum
number of markers
Definition: openjpeg.h:697
Compression parameters.
Definition: openjpeg.h:287
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
Definition: openjpeg.h:944
OPJ_UINT32 icc_profile_len
size of ICC profile
Definition: openjpeg.h:587
int pw[33]
precinct number for each resolution level (width)
Definition: openjpeg.h:683
Index structure about a tile part.
Definition: openjpeg.h:853
JPT-stream (JPEG 2000, JPIP) : read only.
Definition: openjpeg.h:231
Tile-component coding parameters information.
Definition: openjpeg.h:766
enum CINEMA_MODE OPJ_CINEMA_MODE
Digital cinema operation mode.
OPJ_UINT32 th
number of tiles in Y
Definition: openjpeg.h:836
CINEMA_MODE
Digital cinema operation mode.
Definition: openjpeg.h:195
#define OPJ_J2K_MAXBANDS
Number of maximum sub-band linked to number of resolution level.
Definition: openjpeg.h:143
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:541
OPJ_UINT32 DA_y0
Decoding area up boundary.
Definition: openjpeg.h:456
OPJ_UINT32 numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:315
OPJ_UINT32 tile_index
tile number ot the decoded tile
Definition: openjpeg.h:463
OPJ_UINT32 ty0
tile origin in y = YTOsiz
Definition: openjpeg.h:828
OPJ_UINT32 factor
number of division by 2 of the out image compared to the original size of image
Definition: openjpeg.h:561
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:881
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition: openjpeg.h:153
sRGB
Definition: openjpeg.h:220
int prcw_init[OPJ_J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:339
unsigned short int type
marker type
Definition: openjpeg.h:644
OPJ_UINT32 txE
Definition: openjpeg.h:279
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid...
Definition: openjpeg.h:596
int ph[33]
precinct number for each resolution level (height)
Definition: openjpeg.h:685
Index structure of the codestream.
Definition: openjpeg.h:711
OPJ_UINT32 resno1
Definition: openjpeg.h:263
OPJ_API void OPJ_CALLCONV opj_dump_codec(opj_codec_t *p_codec, OPJ_INT32 info_flag, FILE *output_stream)
Dump the codec information into the output stream.
Definition: openjpeg.c:859
int decod_format
input file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:447
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor)
Set the resolution factor of the decoded image.
Definition: openjpeg.c:522
OPJ_UINT32 tx0_t
Definition: openjpeg.h:281
opj_image_comp_t * comps
image components
Definition: openjpeg.h:583
opj_tp_index_t * tp_index
information concerning tile parts
Definition: openjpeg.h:877
precinct-component-resolution-layer order
Definition: openjpeg.h:210
OPJ_SIZE_T(* opj_stream_write_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:513
place-holder
Definition: openjpeg.h:206
OPJ_UINT32 h
data height
Definition: openjpeg.h:602
OPJ_UINT32 cblkw
code-blocks width
Definition: openjpeg.h:775
OPJ_UINT32 nb_of_tiles
Definition: openjpeg.h:917
OPJ_UINT32 dy
Definition: openjpeg.h:279
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, opj_image_t **p_image)
Decodes an image header.
Definition: openjpeg.c:378
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(opj_codec_t *p_codec, opj_stream_t *p_stream, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_should_go_on)
Reads a tile header.
Definition: openjpeg.c:444
int mode
mode switch (cblk_style)
Definition: openjpeg.h:329
OPJ_API void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t *p_stream, opj_stream_skip_fn p_function)
Sets the given function to be used as a skip function.
Definition: cio.c:236
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t *p_stream, OPJ_UINT64 data_length)
Sets the length of the user data for the stream.
Definition: cio.c:255
struct opj_packet_info opj_packet_info_t
Index structure : Information concerning a packet inside tile.
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:454
OPJ_UINT32 qntsty
quantisation style
Definition: openjpeg.h:783
opj_tccp_info_t * tccp_info
information concerning tile component parameters
Definition: openjpeg.h:816
OPJ_UINT32 precno0
Definition: openjpeg.h:265
char tp_on
Tile part generation.
Definition: openjpeg.h:406
int cp_tx0
XTOsiz.
Definition: openjpeg.h:291
OPJ_UINT32 txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition: openjpeg.h:279
opj_tp_info_t * tp
information concerning tile parts
Definition: openjpeg.h:705