OpenJPEG 2.3.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 # if defined(OPJ_STATIC) /* static library uses "hidden" */
83 # define OPJ_API __attribute__ ((visibility ("hidden")))
84 # else
85 # define OPJ_API __attribute__ ((visibility ("default")))
86 # endif
87 # define OPJ_LOCAL __attribute__ ((visibility ("hidden")))
88 # else
89 # define OPJ_API
90 # define OPJ_LOCAL
91 # endif
92 # define OPJ_CALLCONV
93 #else
94 # define OPJ_CALLCONV __stdcall
95 /*
96 The following ifdef block is the standard way of creating macros which make exporting
97 from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
98 symbol defined on the command line. this symbol should not be defined on any project
99 that uses this DLL. This way any other project whose source files include this file see
100 OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
101 defined with this macro as being exported.
102 */
103 # if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
104 # define OPJ_API __declspec(dllexport)
105 # else
106 # define OPJ_API __declspec(dllimport)
107 # endif /* OPJ_EXPORTS */
108 #endif /* !OPJ_STATIC || !_WIN32 */
109
110 typedef int OPJ_BOOL;
111 #define OPJ_TRUE 1
112 #define OPJ_FALSE 0
113
114 typedef char OPJ_CHAR;
115 typedef float OPJ_FLOAT32;
116 typedef double OPJ_FLOAT64;
117 typedef unsigned char OPJ_BYTE;
118
119 #include "opj_stdint.h"
120
121 typedef int8_t OPJ_INT8;
122 typedef uint8_t OPJ_UINT8;
123 typedef int16_t OPJ_INT16;
124 typedef uint16_t OPJ_UINT16;
125 typedef int32_t OPJ_INT32;
126 typedef uint32_t OPJ_UINT32;
127 typedef int64_t OPJ_INT64;
128 typedef uint64_t OPJ_UINT64;
129
130 typedef int64_t OPJ_OFF_T; /* 64-bit file offset type */
131
132 #include <stdio.h>
133 typedef size_t OPJ_SIZE_T;
134
135 /* Avoid compile-time warning because parameter is not used */
136 #define OPJ_ARG_NOT_USED(x) (void)(x)
137
138 /*
139 ==========================================================
140 Useful constant definitions
141 ==========================================================
142 */
143
144 #define OPJ_PATH_LEN 4096
146 #define OPJ_J2K_MAXRLVLS 33
147 #define OPJ_J2K_MAXBANDS (3*OPJ_J2K_MAXRLVLS-2)
149 #define OPJ_J2K_DEFAULT_NB_SEGS 10
150 #define OPJ_J2K_STREAM_CHUNK_SIZE 0x100000
151 #define OPJ_J2K_DEFAULT_HEADER_SIZE 1000
152 #define OPJ_J2K_MCC_DEFAULT_NB_RECORDS 10
153 #define OPJ_J2K_MCT_DEFAULT_NB_RECORDS 10
154
155 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
156 #define JPWL_MAX_NO_TILESPECS 16
157 #define JPWL_MAX_NO_PACKSPECS 16
158 #define JPWL_MAX_NO_MARKERS 512
159 #define JPWL_PRIVATEINDEX_NAME "jpwl_index_privatefilename"
160 #define JPWL_EXPECTED_COMPONENTS 3
161 #define JPWL_MAXIMUM_TILES 8192
162 #define JPWL_MAXIMUM_HAMMING 2
163 #define JPWL_MAXIMUM_EPB_ROOM 65450
164 /* <<UniPG */
165
170 #define OPJ_IMG_INFO 1
171 #define OPJ_J2K_MH_INFO 2
172 #define OPJ_J2K_TH_INFO 4
173 #define OPJ_J2K_TCH_INFO 8
174 #define OPJ_J2K_MH_IND 16
175 #define OPJ_J2K_TH_IND 32
176 /*FIXME #define OPJ_J2K_CSTR_IND 48*/
177 #define OPJ_JP2_INFO 128
178 #define OPJ_JP2_IND 256
194 #define OPJ_PROFILE_NONE 0x0000
195 #define OPJ_PROFILE_0 0x0001
196 #define OPJ_PROFILE_1 0x0002
197 #define OPJ_PROFILE_PART2 0x8000
198 #define OPJ_PROFILE_CINEMA_2K 0x0003
199 #define OPJ_PROFILE_CINEMA_4K 0x0004
200 #define OPJ_PROFILE_CINEMA_S2K 0x0005
201 #define OPJ_PROFILE_CINEMA_S4K 0x0006
202 #define OPJ_PROFILE_CINEMA_LTS 0x0007
203 #define OPJ_PROFILE_BC_SINGLE 0x0100
204 #define OPJ_PROFILE_BC_MULTI 0x0200
205 #define OPJ_PROFILE_BC_MULTI_R 0x0300
206 #define OPJ_PROFILE_IMF_2K 0x0400
207 #define OPJ_PROFILE_IMF_4K 0x0500
208 #define OPJ_PROFILE_IMF_8K 0x0600
209 #define OPJ_PROFILE_IMF_2K_R 0x0700
210 #define OPJ_PROFILE_IMF_4K_R 0x0800
211 #define OPJ_PROFILE_IMF_8K_R 0x0900
216 #define OPJ_EXTENSION_NONE 0x0000
217 #define OPJ_EXTENSION_MCT 0x0100
222 #define OPJ_IS_CINEMA(v) (((v) >= OPJ_PROFILE_CINEMA_2K)&&((v) <= OPJ_PROFILE_CINEMA_S4K))
223 #define OPJ_IS_STORAGE(v) ((v) == OPJ_PROFILE_CINEMA_LTS)
224 #define OPJ_IS_BROADCAST(v) (((v) >= OPJ_PROFILE_BC_SINGLE)&&((v) <= ((OPJ_PROFILE_BC_MULTI_R) | (0x000b))))
225 #define OPJ_IS_IMF(v) (((v) >= OPJ_PROFILE_IMF_2K)&&((v) <= ((OPJ_PROFILE_IMF_8K_R) | (0x009b))))
226 #define OPJ_IS_PART2(v) ((v) & OPJ_PROFILE_PART2)
227
228 #define OPJ_GET_IMF_PROFILE(v) ((v) & 0xff00)
229 #define OPJ_GET_IMF_MAINLEVEL(v) ((v) & 0xf)
230 #define OPJ_GET_IMF_SUBLEVEL(v) (((v) >> 4) & 0xf)
232 #define OPJ_IMF_MAINLEVEL_MAX 11
235 #define OPJ_IMF_MAINLEVEL_1_MSAMPLESEC 65
236 #define OPJ_IMF_MAINLEVEL_2_MSAMPLESEC 130
237 #define OPJ_IMF_MAINLEVEL_3_MSAMPLESEC 195
238 #define OPJ_IMF_MAINLEVEL_4_MSAMPLESEC 260
239 #define OPJ_IMF_MAINLEVEL_5_MSAMPLESEC 520
240 #define OPJ_IMF_MAINLEVEL_6_MSAMPLESEC 1200
241 #define OPJ_IMF_MAINLEVEL_7_MSAMPLESEC 2400
242 #define OPJ_IMF_MAINLEVEL_8_MSAMPLESEC 4800
243 #define OPJ_IMF_MAINLEVEL_9_MSAMPLESEC 9600
244 #define OPJ_IMF_MAINLEVEL_10_MSAMPLESEC 19200
245 #define OPJ_IMF_MAINLEVEL_11_MSAMPLESEC 38400
248 #define OPJ_IMF_SUBLEVEL_1_MBITSSEC 200
249 #define OPJ_IMF_SUBLEVEL_2_MBITSSEC 400
250 #define OPJ_IMF_SUBLEVEL_3_MBITSSEC 800
251 #define OPJ_IMF_SUBLEVEL_4_MBITSSEC 1600
252 #define OPJ_IMF_SUBLEVEL_5_MBITSSEC 3200
253 #define OPJ_IMF_SUBLEVEL_6_MBITSSEC 6400
254 #define OPJ_IMF_SUBLEVEL_7_MBITSSEC 12800
255 #define OPJ_IMF_SUBLEVEL_8_MBITSSEC 25600
256 #define OPJ_IMF_SUBLEVEL_9_MBITSSEC 51200
261 #define OPJ_CINEMA_24_CS 1302083
262 #define OPJ_CINEMA_48_CS 651041
263 #define OPJ_CINEMA_24_COMP 1041666
264 #define OPJ_CINEMA_48_COMP 520833
266 /*
267 ==========================================================
268 enum definitions
269 ==========================================================
270 */
271
276 typedef enum RSIZ_CAPABILITIES {
277 OPJ_STD_RSIZ = 0,
278 OPJ_CINEMA2K = 3,
279 OPJ_CINEMA4K = 4,
280 OPJ_MCT = 0x8100
281 } OPJ_RSIZ_CAPABILITIES;
282
287 typedef enum CINEMA_MODE {
288 OPJ_OFF = 0,
289 OPJ_CINEMA2K_24 = 1,
290 OPJ_CINEMA2K_48 = 2,
291 OPJ_CINEMA4K_24 = 3
292 } OPJ_CINEMA_MODE;
293
297 typedef enum PROG_ORDER {
298 OPJ_PROG_UNKNOWN = -1,
299 OPJ_LRCP = 0,
300 OPJ_RLCP = 1,
301 OPJ_RPCL = 2,
302 OPJ_PCRL = 3,
303 OPJ_CPRL = 4
304 } OPJ_PROG_ORDER;
305
309 typedef enum COLOR_SPACE {
310 OPJ_CLRSPC_UNKNOWN = -1,
311 OPJ_CLRSPC_UNSPECIFIED = 0,
312 OPJ_CLRSPC_SRGB = 1,
313 OPJ_CLRSPC_GRAY = 2,
314 OPJ_CLRSPC_SYCC = 3,
315 OPJ_CLRSPC_EYCC = 4,
316 OPJ_CLRSPC_CMYK = 5
317 } OPJ_COLOR_SPACE;
318
322 typedef enum CODEC_FORMAT {
323 OPJ_CODEC_UNKNOWN = -1,
324 OPJ_CODEC_J2K = 0,
325 OPJ_CODEC_JPT = 1,
326 OPJ_CODEC_JP2 = 2,
327 OPJ_CODEC_JPP = 3,
328 OPJ_CODEC_JPX = 4
329 } OPJ_CODEC_FORMAT;
330
331
332 /*
333 ==========================================================
334 event manager typedef definitions
335 ==========================================================
336 */
337
343 typedef void (*opj_msg_callback)(const char *msg, void *client_data);
344
345 /*
346 ==========================================================
347 codec typedef definitions
348 ==========================================================
349 */
350
351 #ifndef OPJ_UINT32_SEMANTICALLY_BUT_INT32
352 #define OPJ_UINT32_SEMANTICALLY_BUT_INT32 OPJ_INT32
353 #endif
354
359 typedef struct opj_poc {
361 OPJ_UINT32 resno0, compno0;
363 OPJ_UINT32 layno1, resno1, compno1;
365 OPJ_UINT32 layno0, precno0, precno1;
367 OPJ_PROG_ORDER prg1, prg;
369 OPJ_CHAR progorder[5];
371 OPJ_UINT32 tile;
373 OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx0, tx1, ty0, ty1;
375 OPJ_UINT32 layS, resS, compS, prcS;
377 OPJ_UINT32 layE, resE, compE, prcE;
379 OPJ_UINT32 txS, txE, tyS, tyE, dx, dy;
381 OPJ_UINT32 lay_t, res_t, comp_t, prc_t, tx0_t, ty0_t;
382 } opj_poc_t;
383
387 typedef struct opj_cparameters {
389 OPJ_BOOL tile_size_on;
391 int cp_tx0;
393 int cp_ty0;
395 int cp_tdx;
397 int cp_tdy;
399 int cp_disto_alloc;
401 int cp_fixed_alloc;
403 int cp_fixed_quality;
405 int *cp_matrice;
407 char *cp_comment;
409 int csty;
411 OPJ_PROG_ORDER prog_order;
413 opj_poc_t POC[32];
415 OPJ_UINT32 numpocs;
417 int tcp_numlayers;
421 float tcp_rates[100];
424 float tcp_distoratio[100];
426 int numresolution;
428 int cblockw_init;
430 int cblockh_init;
432 int mode;
434 int irreversible;
436 int roi_compno;
438 int roi_shift;
439 /* number of precinct size specifications */
440 int res_spec;
442 int prcw_init[OPJ_J2K_MAXRLVLS];
444 int prch_init[OPJ_J2K_MAXRLVLS];
445
449 char infile[OPJ_PATH_LEN];
451 char outfile[OPJ_PATH_LEN];
453 int index_on;
455 char index[OPJ_PATH_LEN];
457 int image_offset_x0;
459 int image_offset_y0;
461 int subsampling_dx;
463 int subsampling_dy;
465 int decod_format;
467 int cod_format;
470 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
474 OPJ_BOOL jpwl_epc_on;
476 int jpwl_hprot_MH;
478 int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS];
480 int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS];
482 int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS];
484 int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS];
486 int jpwl_pprot[JPWL_MAX_NO_PACKSPECS];
488 int jpwl_sens_size;
490 int jpwl_sens_addr;
492 int jpwl_sens_range;
494 int jpwl_sens_MH;
496 int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS];
498 int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS];
500 /* <<UniPG */
501
506 OPJ_CINEMA_MODE cp_cinema;
511 int max_comp_size;
516 OPJ_RSIZ_CAPABILITIES cp_rsiz;
518 char tp_on;
520 char tp_flag;
522 char tcp_mct;
524 OPJ_BOOL jpip_on;
527 void * mct_data;
534 int max_cs_size;
537 OPJ_UINT16 rsiz;
538 } opj_cparameters_t;
539
540 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG 0x0001
541 #define OPJ_DPARAMETERS_DUMP_FLAG 0x0002
542
546 typedef struct opj_dparameters {
554 OPJ_UINT32 cp_reduce;
561 OPJ_UINT32 cp_layer;
562
566 char infile[OPJ_PATH_LEN];
568 char outfile[OPJ_PATH_LEN];
570 int decod_format;
572 int cod_format;
573
575 OPJ_UINT32 DA_x0;
577 OPJ_UINT32 DA_x1;
579 OPJ_UINT32 DA_y0;
581 OPJ_UINT32 DA_y1;
583 OPJ_BOOL m_verbose;
584
586 OPJ_UINT32 tile_index;
588 OPJ_UINT32 nb_tile_to_decode;
589
592 /* UniPG>> */ /* NOT YET USED IN THE V2 VERSION OF OPENJPEG */
596 OPJ_BOOL jpwl_correct;
598 int jpwl_exp_comps;
600 int jpwl_max_tiles;
602 /* <<UniPG */
603
604 unsigned int flags;
605
606 } opj_dparameters_t;
607
608
612 typedef void * opj_codec_t;
613
614 /*
615 ==========================================================
616 I/O stream typedef definitions
617 ==========================================================
618 */
619
624 #define OPJ_STREAM_READ OPJ_TRUE
625
626 #define OPJ_STREAM_WRITE OPJ_FALSE
627
628 /*
629 * Callback function prototype for read function
630 */
631 typedef OPJ_SIZE_T(* opj_stream_read_fn)(void * p_buffer, OPJ_SIZE_T p_nb_bytes,
632 void * p_user_data) ;
633
634 /*
635 * Callback function prototype for write function
636 */
637 typedef OPJ_SIZE_T(* opj_stream_write_fn)(void * p_buffer,
638 OPJ_SIZE_T p_nb_bytes, void * p_user_data) ;
639
640 /*
641 * Callback function prototype for skip function
642 */
643 typedef OPJ_OFF_T(* opj_stream_skip_fn)(OPJ_OFF_T p_nb_bytes,
644 void * p_user_data) ;
645
646 /*
647 * Callback function prototype for seek function
648 */
649 typedef OPJ_BOOL(* opj_stream_seek_fn)(OPJ_OFF_T p_nb_bytes,
650 void * p_user_data) ;
651
652 /*
653 * Callback function prototype for free user data function
654 */
655 typedef void (* opj_stream_free_user_data_fn)(void * p_user_data) ;
656
657 /*
658 * JPEG2000 Stream.
659 */
660 typedef void * opj_stream_t;
661
662 /*
663 ==========================================================
664 image typedef definitions
665 ==========================================================
666 */
667
671 typedef struct opj_image_comp {
673 OPJ_UINT32 dx;
675 OPJ_UINT32 dy;
677 OPJ_UINT32 w;
679 OPJ_UINT32 h;
681 OPJ_UINT32 x0;
683 OPJ_UINT32 y0;
685 OPJ_UINT32 prec;
687 OPJ_UINT32 bpp;
689 OPJ_UINT32 sgnd;
691 OPJ_UINT32 resno_decoded;
693 OPJ_UINT32 factor;
695 OPJ_INT32 *data;
697 OPJ_UINT16 alpha;
698 } opj_image_comp_t;
699
703 typedef struct opj_image {
705 OPJ_UINT32 x0;
707 OPJ_UINT32 y0;
709 OPJ_UINT32 x1;
711 OPJ_UINT32 y1;
713 OPJ_UINT32 numcomps;
715 OPJ_COLOR_SPACE color_space;
717 opj_image_comp_t *comps;
719 OPJ_BYTE *icc_profile_buf;
721 OPJ_UINT32 icc_profile_len;
722 } opj_image_t;
723
724
728 typedef struct opj_image_comptparm {
730 OPJ_UINT32 dx;
732 OPJ_UINT32 dy;
734 OPJ_UINT32 w;
736 OPJ_UINT32 h;
738 OPJ_UINT32 x0;
740 OPJ_UINT32 y0;
742 OPJ_UINT32 prec;
744 OPJ_UINT32 bpp;
746 OPJ_UINT32 sgnd;
747 } opj_image_cmptparm_t;
748
749
750 /*
751 ==========================================================
752 Information on the JPEG 2000 codestream
753 ==========================================================
754 */
755 /* QUITE EXPERIMENTAL FOR THE MOMENT */
756
760 typedef struct opj_packet_info {
762 OPJ_OFF_T start_pos;
764 OPJ_OFF_T end_ph_pos;
766 OPJ_OFF_T end_pos;
768 double disto;
769 } opj_packet_info_t;
770
771
772 /* UniPG>> */
776 typedef struct opj_marker_info {
778 unsigned short int type;
780 OPJ_OFF_T pos;
782 int len;
783 } opj_marker_info_t;
784 /* <<UniPG */
785
789 typedef struct opj_tp_info {
791 int tp_start_pos;
793 int tp_end_header;
795 int tp_end_pos;
797 int tp_start_pack;
799 int tp_numpacks;
800 } opj_tp_info_t;
801
805 typedef struct opj_tile_info {
807 double *thresh;
809 int tileno;
811 int start_pos;
813 int end_header;
815 int end_pos;
817 int pw[33];
819 int ph[33];
821 int pdx[33];
823 int pdy[33];
825 opj_packet_info_t *packet;
827 int numpix;
829 double distotile;
831 int marknum;
833 opj_marker_info_t *marker;
835 int maxmarknum;
837 int num_tps;
839 opj_tp_info_t *tp;
840 } opj_tile_info_t;
841
845 typedef struct opj_codestream_info {
847 double D_max;
849 int packno;
851 int index_write;
853 int image_w;
855 int image_h;
857 OPJ_PROG_ORDER prog;
859 int tile_x;
861 int tile_y;
863 int tile_Ox;
865 int tile_Oy;
867 int tw;
869 int th;
871 int numcomps;
873 int numlayers;
875 int *numdecompos;
876 /* UniPG>> */
878 int marknum;
880 opj_marker_info_t *marker;
882 int maxmarknum;
883 /* <<UniPG */
885 int main_head_start;
887 int main_head_end;
889 int codestream_size;
891 opj_tile_info_t *tile;
892 } opj_codestream_info_t;
893
894 /* <----------------------------------------------------------- */
895 /* new output management of the codestream information and index */
896
900 typedef struct opj_tccp_info {
902 OPJ_UINT32 compno;
904 OPJ_UINT32 csty;
906 OPJ_UINT32 numresolutions;
908 OPJ_UINT32 cblkw;
910 OPJ_UINT32 cblkh;
912 OPJ_UINT32 cblksty;
914 OPJ_UINT32 qmfbid;
916 OPJ_UINT32 qntsty;
918 OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS];
920 OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS];
922 OPJ_UINT32 numgbits;
924 OPJ_INT32 roishift;
926 OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS];
928 OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS];
929 }
930 opj_tccp_info_t;
931
935 typedef struct opj_tile_v2_info {
936
938 int tileno;
940 OPJ_UINT32 csty;
942 OPJ_PROG_ORDER prg;
944 OPJ_UINT32 numlayers;
946 OPJ_UINT32 mct;
947
949 opj_tccp_info_t *tccp_info;
950
951 } opj_tile_info_v2_t;
952
956 typedef struct opj_codestream_info_v2 {
957 /* Tile info */
959 OPJ_UINT32 tx0;
961 OPJ_UINT32 ty0;
963 OPJ_UINT32 tdx;
965 OPJ_UINT32 tdy;
967 OPJ_UINT32 tw;
969 OPJ_UINT32 th;
970
972 OPJ_UINT32 nbcomps;
973
975 opj_tile_info_v2_t m_default_tile_info;
976
978 opj_tile_info_v2_t *tile_info; /* FIXME not used for the moment */
979
980 } opj_codestream_info_v2_t;
981
982
986 typedef struct opj_tp_index {
988 OPJ_OFF_T start_pos;
990 OPJ_OFF_T end_header;
992 OPJ_OFF_T end_pos;
993
994 } opj_tp_index_t;
995
999 typedef struct opj_tile_index {
1001 OPJ_UINT32 tileno;
1002
1004 OPJ_UINT32 nb_tps;
1006 OPJ_UINT32 current_nb_tps;
1008 OPJ_UINT32 current_tpsno;
1010 opj_tp_index_t *tp_index;
1011
1012 /* UniPG>> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */
1014 OPJ_UINT32 marknum;
1016 opj_marker_info_t *marker;
1018 OPJ_UINT32 maxmarknum;
1019 /* <<UniPG */
1020
1022 OPJ_UINT32 nb_packet;
1024 opj_packet_info_t *packet_index;
1025
1026 } opj_tile_index_t;
1027
1031 typedef struct opj_codestream_index {
1033 OPJ_OFF_T main_head_start;
1035 OPJ_OFF_T main_head_end;
1036
1038 OPJ_UINT64 codestream_size;
1039
1040 /* UniPG>> */ /* NOT USED FOR THE MOMENT IN THE V2 VERSION */
1042 OPJ_UINT32 marknum;
1044 opj_marker_info_t *marker;
1046 OPJ_UINT32 maxmarknum;
1047 /* <<UniPG */
1048
1050 OPJ_UINT32 nb_of_tiles;
1052 opj_tile_index_t *tile_index; /* FIXME not used for the moment */
1053
1054 } opj_codestream_index_t;
1055 /* -----------------------------------------------------------> */
1056
1057 /*
1058 ==========================================================
1059 Metadata from the JP2file
1060 ==========================================================
1061 */
1062
1067 typedef struct opj_jp2_metadata {
1069 OPJ_INT32 not_used;
1070
1071 } opj_jp2_metadata_t;
1072
1077 typedef struct opj_jp2_index {
1079 OPJ_INT32 not_used;
1080
1081 } opj_jp2_index_t;
1082
1083
1084 #ifdef __cplusplus
1085 extern "C" {
1086 #endif
1087
1088
1089 /*
1090 ==========================================================
1091 openjpeg version
1092 ==========================================================
1093 */
1094
1095 /* Get the version of the openjpeg library*/
1096 OPJ_API const char * OPJ_CALLCONV opj_version(void);
1097
1098 /*
1099 ==========================================================
1100 image functions definitions
1101 ==========================================================
1102 */
1103
1112 OPJ_API opj_image_t* OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts,
1113 opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc);
1114
1120 OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image);
1121
1131 OPJ_API opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts,
1132 opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc);
1133
1143 OPJ_API void* OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size);
1144
1153 OPJ_API void OPJ_CALLCONV opj_image_data_free(void* ptr);
1154
1155 /*
1156 ==========================================================
1157 stream functions definitions
1158 ==========================================================
1159 */
1160
1168 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(
1169 OPJ_BOOL p_is_input);
1170
1179 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size,
1180 OPJ_BOOL p_is_input);
1181
1188 OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t* p_stream);
1189
1195 OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t* p_stream,
1196 opj_stream_read_fn p_function);
1197
1203 OPJ_API void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t* p_stream,
1204 opj_stream_write_fn p_function);
1205
1211 OPJ_API void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t* p_stream,
1212 opj_stream_skip_fn p_function);
1213
1220 OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream,
1221 opj_stream_seek_fn p_function);
1222
1229 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream,
1230 void * p_data, opj_stream_free_user_data_fn p_function);
1231
1238 OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(
1239 opj_stream_t* p_stream, OPJ_UINT64 data_length);
1240
1246 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream(
1247 const char *fname, OPJ_BOOL p_is_read_stream);
1248
1254 OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream(
1255 const char *fname,
1256 OPJ_SIZE_T p_buffer_size,
1257 OPJ_BOOL p_is_read_stream);
1258
1259 /*
1260 ==========================================================
1261 event manager functions definitions
1262 ==========================================================
1263 */
1270 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec,
1271 opj_msg_callback p_callback,
1272 void * p_user_data);
1279 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec,
1280 opj_msg_callback p_callback,
1281 void * p_user_data);
1288 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec,
1289 opj_msg_callback p_callback,
1290 void * p_user_data);
1291
1292 /*
1293 ==========================================================
1294 codec functions definitions
1295 ==========================================================
1296 */
1297
1304 OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_decompress(
1305 OPJ_CODEC_FORMAT format);
1306
1312 OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t * p_codec);
1313
1319 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec,
1320 opj_stream_t *p_stream);
1321
1322
1327 OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(
1328 opj_dparameters_t *parameters);
1329
1339 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
1340 opj_dparameters_t *parameters);
1341
1360 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec,
1361 int num_threads);
1362
1372 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream,
1373 opj_codec_t *p_codec,
1374 opj_image_t **p_image);
1375
1376
1402 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec,
1403 OPJ_UINT32 numcomps,
1404 const OPJ_UINT32* comps_indices,
1405 OPJ_BOOL apply_color_transforms);
1406
1429 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec,
1430 opj_image_t* p_image,
1431 OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
1432 OPJ_INT32 p_end_x, OPJ_INT32 p_end_y);
1433
1442 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor,
1443 opj_stream_t *p_stream,
1444 opj_image_t *p_image);
1445
1456 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(opj_codec_t *p_codec,
1457 opj_stream_t *p_stream,
1458 opj_image_t *p_image,
1459 OPJ_UINT32 tile_index);
1460
1468 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(
1469 opj_codec_t *p_codec, OPJ_UINT32 res_factor);
1470
1483 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile(opj_codec_t *p_codec,
1484 OPJ_UINT32 p_tile_index,
1485 OPJ_BYTE * p_data,
1486 OPJ_UINT32 p_data_size,
1487 opj_stream_t *p_stream);
1488
1510 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(opj_codec_t *p_codec,
1511 opj_stream_t * p_stream,
1512 OPJ_UINT32 * p_tile_index,
1513 OPJ_UINT32 * p_data_size,
1514 OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
1515 OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
1516 OPJ_UINT32 * p_nb_comps,
1517 OPJ_BOOL * p_should_go_on);
1518
1533 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec,
1534 OPJ_UINT32 p_tile_index,
1535 OPJ_BYTE * p_data,
1536 OPJ_UINT32 p_data_size,
1537 opj_stream_t *p_stream);
1538
1539 /* COMPRESSION FUNCTIONS*/
1540
1546 OPJ_API opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format);
1547
1569 OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(
1570 opj_cparameters_t *parameters);
1571
1578 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec,
1579 opj_cparameters_t *parameters,
1580 opj_image_t *image);
1581
1582
1605 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(
1606 opj_codec_t *p_codec,
1607 const char* const* p_options);
1608
1615 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_start_compress(opj_codec_t *p_codec,
1616 opj_image_t * p_image,
1617 opj_stream_t *p_stream);
1618
1624 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_compress(opj_codec_t *p_codec,
1625 opj_stream_t *p_stream);
1626
1634 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_codec,
1635 opj_stream_t *p_stream);
1636 /*
1637 ==========================================================
1638 codec output functions definitions
1639 ==========================================================
1640 */
1641 /* EXPERIMENTAL FUNCTIONS FOR NOW, USED ONLY IN J2K_DUMP*/
1642
1647 OPJ_API void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t
1648 **cstr_info);
1649
1650
1659 OPJ_API void OPJ_CALLCONV opj_dump_codec(opj_codec_t *p_codec,
1660 OPJ_INT32 info_flag,
1661 FILE* output_stream);
1662
1671 OPJ_API opj_codestream_info_v2_t* OPJ_CALLCONV opj_get_cstr_info(
1672 opj_codec_t *p_codec);
1673
1682 OPJ_API opj_codestream_index_t * OPJ_CALLCONV opj_get_cstr_index(
1683 opj_codec_t *p_codec);
1684
1685 OPJ_API void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t
1686 **p_cstr_index);
1687
1688
1697 OPJ_API opj_jp2_metadata_t* OPJ_CALLCONV opj_get_jp2_metadata(
1698 opj_codec_t *p_codec);
1699
1708 OPJ_API opj_jp2_index_t* OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec);
1709
1710
1711 /*
1712 ==========================================================
1713 MCT functions
1714 ==========================================================
1715 */
1716
1727 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
1728 OPJ_FLOAT32 * pEncodingMatrix,
1729 OPJ_INT32 * p_dc_shift,
1730 OPJ_UINT32 pNbComp);
1731
1732 /*
1733 ==========================================================
1734 Thread functions
1735 ==========================================================
1736 */
1737
1741 OPJ_API OPJ_BOOL OPJ_CALLCONV opj_has_thread_support(void);
1742
1744 OPJ_API int OPJ_CALLCONV opj_get_num_cpus(void);
1745
1746
1747 #ifdef __cplusplus
1748 }
1749 #endif
1750
1751 #endif /* OPENJPEG_H */
OPJ_J2K_MAXRLVLS
#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:146
opj_codestream_index_t
struct opj_codestream_index opj_codestream_index_t
Index structure of the codestream (FIXME should be expand and enhance)
opj_dparameters_t
struct opj_dparameters opj_dparameters_t
Decompression parameters.
opj_tccp_info::cblkw
OPJ_UINT32 cblkw
log2 of code-blocks width
Definition: openjpeg.h:908
opj_image_cmptparm_t
struct opj_image_comptparm opj_image_cmptparm_t
Component parameters structure used by the opj_image_create function.
opj_event_mgr::warning_handler
opj_msg_callback warning_handler
Warning message callback if available, NULL otherwise.
Definition: event.h:60
opj_poc::compE
OPJ_UINT32 compE
Definition: openjpeg.h:377
opj_stream_read_fn
OPJ_SIZE_T(* opj_stream_read_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:631
opj_end_compress
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:864
opj_image::x1
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:709
OPJ_BYTE
unsigned char OPJ_BYTE
Definition: openjpeg.h:117
opj_tile_info::packet
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:825
opj_destroy_cstr_info
void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_v2_t **cstr_info)
Destroy Codestream information after compression or decompression.
Definition: openjpeg.c:1003
OPJ_FLOAT32
float OPJ_FLOAT32
Definition: openjpeg.h:115
opj_jp2_index_t
struct opj_jp2_index opj_jp2_index_t
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
opj_poc::tx1
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx1
Definition: openjpeg.h:373
opj_dparameters::jpwl_correct
OPJ_BOOL jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:596
OPJ_COMP_PARAM_DEFAULT_PROG_ORDER
#define OPJ_COMP_PARAM_DEFAULT_PROG_ORDER
Definition: opj_common.h:44
opj_poc::compS
OPJ_UINT32 compS
Definition: openjpeg.h:375
opj_codestream_info::numcomps
int numcomps
component numbers
Definition: openjpeg.h:871
opj_set_error_handler
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_codestream_info::tw
int tw
number of tiles in X
Definition: openjpeg.h:867
opj_calloc
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
OPJ_CODEC_FORMAT
enum CODEC_FORMAT OPJ_CODEC_FORMAT
Supported codec.
opj_get_cstr_index
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:1020
opj_jp2_setup_encoder
OPJ_BOOL opj_jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
Setup the encoder parameters using the current image and using user parameters.
Definition: jp2.c:1913
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:728
opj_codec_private::opj_get_codec_info
opj_codestream_info_v2_t *(* opj_get_codec_info)(void *p_codec)
Definition: opj_codec.h:166
JPWL_MAXIMUM_TILES
#define JPWL_MAXIMUM_TILES
Expect this maximum number of tiles, to avoid some crashes.
Definition: openjpeg.h:161
opj_cparameters::tcp_rates
float tcp_rates[100]
rates of layers - might be subsequently limited by the max_cs_size field.
Definition: openjpeg.h:421
OPJ_CLRSPC_EYCC
@ OPJ_CLRSPC_EYCC
e-YCC
Definition: openjpeg.h:315
opj_stream_seek_fn
OPJ_BOOL(* opj_stream_seek_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:649
opj_tile_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:833
opj_image_comp::dy
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:675
opj_codestream_index::nb_of_tiles
OPJ_UINT32 nb_of_tiles
Definition: openjpeg.h:1050
opj_image_t
struct opj_image opj_image_t
Defines image data and characteristics.
opj_get_num_cpus
OPJ_API int OPJ_CALLCONV opj_get_num_cpus(void)
Return the number of virtual CPUs.
Definition: thread.c:438
opj_cparameters::decod_format
int decod_format
input file format 0: PGX, 1: PxM, 2: BMP 3:TIF
Definition: openjpeg.h:465
opj_set_decoded_resolution_factor
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:596
opj_tile_info::ph
int ph[33]
precinct number for each resolution level (height)
Definition: openjpeg.h:819
opj_codec_private::m_decompression
struct opj_codec_private::@2::opj_decompression m_decompression
opj_poc::precno0
OPJ_UINT32 precno0
Definition: openjpeg.h:365
opj_stream_default_create
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:194
opj_get_decoded_tile
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:572
opj_codestream_info::image_w
int image_w
image width
Definition: openjpeg.h:853
opj_codestream_index::main_head_start
OPJ_OFF_T main_head_start
main header start position (SOC position)
Definition: openjpeg.h:1033
opj_tile_info::distotile
double distotile
add fixed_quality
Definition: openjpeg.h:829
opj_image_comp_t
struct opj_image_comp opj_image_comp_t
Defines a single image component.
opj_get_cstr_info
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:992
opj_poc::tyS
OPJ_UINT32 tyS
Definition: openjpeg.h:379
opj_j2k_destroy
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:9043
opj_codestream_info::index_write
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:851
opj_jp2_set_decode_area
OPJ_BOOL opj_jp2_set_decode_area(opj_jp2_t *p_jp2, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, opj_event_mgr_t *p_manager)
Sets the given area to be decoded.
Definition: jp2.c:3090
opj_poc::res_t
OPJ_UINT32 res_t
Definition: openjpeg.h:381
opj_set_info_handler
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_codestream_info::D_max
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:847
OPJ_CINEMA2K_48
@ OPJ_CINEMA2K_48
2K Digital Cinema at 24 fps
Definition: openjpeg.h:290
opj_cparameters::index
char index[OPJ_PATH_LEN]
DEPRECATED.
Definition: openjpeg.h:455
opj_poc::lay_t
OPJ_UINT32 lay_t
Temporary values for Tile parts, initialised in pi_create_encode.
Definition: openjpeg.h:381
opj_cparameters::cp_tx0
int cp_tx0
XTOsiz.
Definition: openjpeg.h:391
opj_jp2_set_decoded_components
OPJ_BOOL opj_jp2_set_decoded_components(opj_jp2_t *p_jp2, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, opj_event_mgr_t *p_manager)
Sets the indices of the components to decode.
Definition: jp2.c:3080
opj_tp_info::tp_end_header
int tp_end_header
end position of tile part header
Definition: openjpeg.h:793
opj_image::y1
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:711
opj_cparameters::tcp_numlayers
int tcp_numlayers
number of layers
Definition: openjpeg.h:417
opj_j2k_end_decompress
OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Ends the decompression procedures and possibiliy add data to be read after the codestream.
Definition: j2k.c:8244
OPJ_PROFILE_NONE
#define OPJ_PROFILE_NONE
JPEG 2000 Profiles, see Table A.10 from 15444-1 (updated in various AMD) These values help choosing t...
Definition: openjpeg.h:194
opj_set_MCT
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:901
opj_dparameters::DA_y1
OPJ_UINT32 DA_y1
Decoding area bottom boundary.
Definition: openjpeg.h:581
opj_tccp_info::qntsty
OPJ_UINT32 qntsty
quantisation style
Definition: openjpeg.h:916
opj_j2k_set_threads
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6586
opj_image::numcomps
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:713
opj_codec_private::opj_dump_codec
void(* opj_dump_codec)(void *p_codec, OPJ_INT32 info_flag, FILE *output_stream)
Definition: opj_codec.h:164
opj_tile_index::current_nb_tps
OPJ_UINT32 current_nb_tps
current nb of tile part (allocated)
Definition: openjpeg.h:1006
opj_has_thread_support
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_has_thread_support(void)
Returns if the library is built with thread support.
Definition: thread.c:433
opj_stdint.h
opj_tp_index::end_pos
OPJ_OFF_T end_pos
end position
Definition: openjpeg.h:992
opj_cparameters::subsampling_dy
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:463
opj_stream_create
opj_stream_t *OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL l_is_input)
Creates an abstract stream.
Definition: cio.c:158
opj_setup_decoder
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:398
opj_cparameters::tcp_distoratio
float tcp_distoratio[100]
different psnr for successive layers.
Definition: openjpeg.h:424
opj_j2k_end_compress
OPJ_BOOL opj_j2k_end_compress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Ends the compression procedures and possibiliy add data to be read after the codestream.
Definition: j2k.c:12171
opj_image_comp::data
OPJ_INT32 * data
image component data
Definition: openjpeg.h:695
OPJ_CODEC_JPX
@ OPJ_CODEC_JPX
JPX file format (JPEG 2000 Part-2) : to be coded.
Definition: openjpeg.h:328
opj_event_msg
OPJ_BOOL opj_event_msg(opj_event_mgr_t *p_event_mgr, OPJ_INT32 event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:91
opj_codestream_info::image_h
int image_h
image height
Definition: openjpeg.h:855
opj_codestream_info::maxmarknum
int maxmarknum
actual size of markers array
Definition: openjpeg.h:882
opj_jp2_encode
OPJ_BOOL opj_jp2_encode(opj_jp2_t *jp2, opj_stream_private_t *stream, opj_event_mgr_t *p_manager)
Encode an image into a JPEG-2000 file stream.
Definition: jp2.c:2100
OPJ_INT64
int64_t OPJ_INT64
Definition: openjpeg.h:127
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:136
opj_get_cstr_info
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:992
opj_jp2_destroy
void opj_jp2_destroy(opj_jp2_t *jp2)
Destroy a JP2 decompressor handle.
Definition: jp2.c:3012
opj_tccp_info::compno
OPJ_UINT32 compno
component index
Definition: openjpeg.h:902
OPJ_API
#define OPJ_API
Definition: openjpeg.h:89
opj_set_decode_area
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:492
opj_cparameters::cblockh_init
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:430
opj_poc::txE
OPJ_UINT32 txE
Definition: openjpeg.h:379
opj_jp2_read_tile_header
OPJ_BOOL opj_jp2_read_tile_header(opj_jp2_t *p_jp2, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a tile header.
Definition: jp2.c:2963
opj_encoder_set_extra_options
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(opj_codec_t *p_codec, const char *const *p_options)
Specify extra options for the encoder.
Definition: openjpeg.c:809
opj_cparameters::cod_format
int cod_format
output file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:467
OPJ_CINEMA4K
@ OPJ_CINEMA4K
Profile name for a 2K image.
Definition: openjpeg.h:279
opj_cparameters::rsiz
OPJ_UINT16 rsiz
RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.
Definition: openjpeg.h:537
opj_packet_info::disto
double disto
packet distorsion
Definition: openjpeg.h:768
opj_cparameters::jpip_on
OPJ_BOOL jpip_on
Enable JPIP indexing.
Definition: openjpeg.h:524
opj_tile_index::maxmarknum
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1018
opj_jp2_index::not_used
OPJ_INT32 not_used
Definition: openjpeg.h:1079
opj_stream_free_user_data_fn
void(* opj_stream_free_user_data_fn)(void *p_user_data)
Definition: openjpeg.h:655
opj_cparameters::res_spec
int res_spec
Definition: openjpeg.h:440
opj_setup_encoder
OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, opj_cparameters_t *parameters, opj_image_t *p_image)
Setup the encoder parameters using the current image and using user parameters.
Definition: openjpeg.c:789
OPJ_CINEMA2K
@ OPJ_CINEMA2K
Standard JPEG2000 profile.
Definition: openjpeg.h:278
opj_jp2_end_decompress
OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Ends the decompression procedures and possibiliy add data to be read after the codestream.
Definition: jp2.c:2107
opj_j2k_get_tile
OPJ_BOOL opj_j2k_get_tile(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index)
Definition: j2k.c:11881
opj_cparameters::cp_fixed_quality
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:403
opj_image_data_alloc
void *OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size)
Allocator for opj_image_t->comps[].data To be paired with opj_image_data_free.
Definition: openjpeg.c:1091
OPJ_FTELL
#define OPJ_FTELL(stream)
Definition: opj_includes.h:87
opj_codestream_info::numlayers
int numlayers
number of layer
Definition: openjpeg.h:873
opj_read_tile_header
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:515
jp2_get_cstr_info
opj_codestream_info_v2_t * jp2_get_cstr_info(opj_jp2_t *p_jp2)
Get the codestream info from a JPEG2000 codec.
Definition: jp2.c:3231
opj_image_comptparm
Component parameters structure used by the opj_image_create function.
Definition: openjpeg.h:728
opj_poc::layno0
OPJ_UINT32 layno0
Layer num start,Precinct num start, Precinct num end.
Definition: openjpeg.h:365
opj_jp2_decode
OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Decode an image from a JPEG-2000 file stream.
Definition: jp2.c:1597
opj_set_info_handler
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_OFF_T
int64_t OPJ_OFF_T
Definition: openjpeg.h:130
opj_poc::progorder
OPJ_CHAR progorder[5]
Progression order string.
Definition: openjpeg.h:369
opj_destroy_cstr_index
OPJ_API void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
Definition: openjpeg.c:1031
opj_cparameters::jpwl_sens_TPH_tileno
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:496
OPJ_RLCP
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:300
opj_codestream_info::main_head_start
int main_head_start
main header position
Definition: openjpeg.h:885
opj_event_mgr
Message handler object used for.
Definition: event.h:50
opj_tile_v2_info::tccp_info
opj_tccp_info_t * tccp_info
information concerning tile component parameters
Definition: openjpeg.h:949
opj_image_comptparm::bpp
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:744
opj_tile_info::pdy
int pdy[33]
precinct size (in power of 2), in Y for each resolution level
Definition: openjpeg.h:823
opj_image::color_space
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition: openjpeg.h:715
opj_dparameters::nb_tile_to_decode
OPJ_UINT32 nb_tile_to_decode
Nb of tile to decode.
Definition: openjpeg.h:588
OPJ_STD_RSIZ
@ OPJ_STD_RSIZ
Definition: openjpeg.h:277
opj_dparameters::cp_layer
OPJ_UINT32 cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:561
opj_stream_t
void * opj_stream_t
Definition: openjpeg.h:660
opj_tile_index::packet_index
opj_packet_info_t * packet_index
information concerning packets inside tile
Definition: openjpeg.h:1024
opj_poc::ty0_t
OPJ_UINT32 ty0_t
Definition: openjpeg.h:381
opj_cparameters::cp_comment
char * cp_comment
comment for coding
Definition: openjpeg.h:407
opj_tccp_info_t
struct opj_tccp_info opj_tccp_info_t
Tile-component coding parameters information.
opj_cparameters::jpwl_sens_size
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:488
opj_cparameters::prog_order
OPJ_PROG_ORDER prog_order
progression order (default OPJ_LRCP)
Definition: openjpeg.h:411
opj_jp2_metadata::not_used
OPJ_INT32 not_used
Definition: openjpeg.h:1069
opj_codec_t
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:612
opj_tile_v2_info::tileno
int tileno
number (index) of tile
Definition: openjpeg.h:938
opj_image_comptparm::y0
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:740
opj_j2k_encode
OPJ_BOOL opj_j2k_encode(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Encodes an image into a JPEG-2000 codestream.
Definition: j2k.c:12063
OPJ_UINT8
uint8_t OPJ_UINT8
Definition: openjpeg.h:122
opj_image_comp
Defines a single image component.
Definition: openjpeg.h:671
opj_tile_info::start_pos
int start_pos
start position
Definition: openjpeg.h:811
opj_stream_set_user_data
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t *p_stream, void *p_data, opj_stream_free_user_data_fn p_function)
Sets the given data to be used as a user data for the stream.
Definition: cio.c:260
opj_cparameters::infile
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:449
opj_create_compress
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:614
opj_jp2_encoder_set_extra_options
OPJ_BOOL opj_jp2_encoder_set_extra_options(opj_jp2_t *p_jp2, const char *const *p_options, opj_event_mgr_t *p_manager)
Specify extra options for the encoder.
Definition: jp2.c:3245
opj_codestream_index::main_head_end
OPJ_OFF_T main_head_end
main header end position (first SOT position)
Definition: openjpeg.h:1035
opj_create_compress
opj_codec_t *OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 compression structure.
Definition: openjpeg.c:614
OPJ_CLRSPC_GRAY
@ OPJ_CLRSPC_GRAY
grayscale
Definition: openjpeg.h:313
opj_jp2_metadata
Info structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
Definition: openjpeg.h:1067
opj_stream_private
Byte input-output stream.
Definition: cio.h:81
OPJ_CPRL
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:303
opj_set_decoded_components
OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, OPJ_BOOL apply_color_transforms)
Restrict the number of components to decode.
Definition: openjpeg.c:442
OPJ_COMP_PARAM_DEFAULT_CBLOCKW
#define OPJ_COMP_PARAM_DEFAULT_CBLOCKW
Definition: opj_common.h:42
OPJ_J2K_MAXBANDS
#define OPJ_J2K_MAXBANDS
Number of maximum sub-band linked to number of resolution level.
Definition: openjpeg.h:147
opj_tp_index::end_header
OPJ_OFF_T end_header
end position of the header
Definition: openjpeg.h:990
OPJ_CLRSPC_CMYK
@ OPJ_CLRSPC_CMYK
CMYK.
Definition: openjpeg.h:316
opj_cparameters::jpwl_pprot_tileno
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:482
opj_tccp_info::qmfbid
OPJ_UINT32 qmfbid
discrete wavelet transform identifier: 0 = 9-7 irreversible, 1 = 5-3 reversible
Definition: openjpeg.h:914
OPJ_FLOAT64
double OPJ_FLOAT64
Definition: openjpeg.h:116
opj_tile_index::nb_packet
OPJ_UINT32 nb_packet
packet number
Definition: openjpeg.h:1022
opj_tile_index
Index structure about a tile.
Definition: openjpeg.h:999
opj_tccp_info::cblksty
OPJ_UINT32 cblksty
code-block coding style
Definition: openjpeg.h:912
opj_tile_info::maxmarknum
int maxmarknum
actual size of markers array
Definition: openjpeg.h:835
opj_cparameters::numresolution
int numresolution
number of resolutions
Definition: openjpeg.h:426
opj_jp2_write_tile
OPJ_BOOL opj_jp2_write_tile(opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes a tile.
Definition: jp2.c:2987
opj_dparameters::jpwl_exp_comps
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:598
opj_cparameters
Compression parameters.
Definition: openjpeg.h:387
opj_set_decoded_resolution_factor
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:596
opj_decode
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:471
opj_tile_v2_info::prg
OPJ_PROG_ORDER prg
progression order
Definition: openjpeg.h:942
opj_dump_codec
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:976
opj_codec_set_threads
OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec, int num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: openjpeg.c:387
opj_setup_decoder
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:398
opj_msg_callback
void(* opj_msg_callback)(const char *msg, void *client_data)
Callback function prototype for events.
Definition: openjpeg.h:343
opj_packet_info::start_pos
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:762
OPJ_CINEMA2K_24
@ OPJ_CINEMA2K_24
Not Digital Cinema.
Definition: openjpeg.h:289
OPJ_CLRSPC_UNKNOWN
@ OPJ_CLRSPC_UNKNOWN
not supported by the library
Definition: openjpeg.h:310
opj_set_warning_handler
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_cparameters::cp_tdx
int cp_tdx
XTsiz.
Definition: openjpeg.h:395
opj_codestream_info_t
struct opj_codestream_info opj_codestream_info_t
Index structure of the codestream.
opj_tile_index::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:1016
opj_cparameters::irreversible
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:434
opj_cparameters::index_on
int index_on
DEPRECATED.
Definition: openjpeg.h:453
opj_image::icc_profile_buf
OPJ_BYTE * icc_profile_buf
'restricted' ICC profile
Definition: openjpeg.h:719
opj_j2k_set_decoded_resolution_factor
OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
Definition: j2k.c:11996
opj_destroy_cstr_info
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:1003
opj_set_MCT
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:901
opj_poc::precno1
OPJ_UINT32 precno1
Definition: openjpeg.h:365
CODEC_FORMAT
CODEC_FORMAT
Supported codec.
Definition: openjpeg.h:322
OPJ_CLRSPC_SRGB
@ OPJ_CLRSPC_SRGB
sRGB
Definition: openjpeg.h:312
opj_jp2_end_compress
OPJ_BOOL opj_jp2_end_compress(opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Ends the compression procedures and possibiliy add data to be read after the codestream.
Definition: jp2.c:2130
OPJ_RSIZ_CAPABILITIES
enum RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Rsiz Capabilities.
opj_tccp_info::prcw
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: openjpeg.h:926
opj_packet_info_t
struct opj_packet_info opj_packet_info_t
Index structure : Information concerning a packet inside tile.
opj_j2k_set_decode_area
OPJ_BOOL opj_j2k_set_decode_area(opj_j2k_t *p_j2k, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, opj_event_mgr_t *p_manager)
Sets the given area to be decoded.
Definition: j2k.c:10121
opj_cparameters::cp_ty0
int cp_ty0
YTOsiz.
Definition: openjpeg.h:393
opj_cparameters::cp_cinema
OPJ_CINEMA_MODE cp_cinema
DEPRECATED: use RSIZ, OPJ_PROFILE_* and MAX_COMP_SIZE instead Digital Cinema compliance 0-not complia...
Definition: openjpeg.h:506
opj_codestream_index::maxmarknum
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1046
opj_tile_info::end_header
int end_header
end position of the header
Definition: openjpeg.h:813
opj_tccp_info::numgbits
OPJ_UINT32 numgbits
number of guard bits
Definition: openjpeg.h:922
opj_codestream_index::marknum
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1042
OPJ_BOOL
int OPJ_BOOL
Definition: openjpeg.h:110
opj_dparameters::cp_reduce
OPJ_UINT32 cp_reduce
Set the number of highest resolution levels to be discarded.
Definition: openjpeg.h:554
opj_codestream_info_v2::ty0
OPJ_UINT32 ty0
tile origin in y = YTOsiz
Definition: openjpeg.h:961
OPJ_SIZE_T
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
opj_dparameters::flags
unsigned int flags
Definition: openjpeg.h:604
opj_read_from_file
static OPJ_SIZE_T opj_read_from_file(void *p_buffer, OPJ_SIZE_T p_nb_bytes, FILE *p_file)
Definition: openjpeg.c:91
opj_poc::prg
OPJ_PROG_ORDER prg
Definition: openjpeg.h:367
opj_poc::dy
OPJ_UINT32 dy
Definition: openjpeg.h:379
opj_stream_set_user_data_length
void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t *p_stream, OPJ_UINT64 data_length)
Sets the length of the user data for the stream.
Definition: cio.c:271
opj_tccp_info::csty
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:904
OPJ_PROG_UNKNOWN
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:298
opj_includes.h
jp2_get_cstr_index
opj_codestream_index_t * jp2_get_cstr_index(opj_jp2_t *p_jp2)
Get the codestream index from a JPEG2000 codec.
Definition: jp2.c:3226
opj_packet_info::end_ph_pos
OPJ_OFF_T end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:764
opj_tp_info::tp_start_pos
int tp_start_pos
start position of tile part
Definition: openjpeg.h:791
opj_jp2_read_header
OPJ_BOOL opj_jp2_read_header(opj_stream_private_t *p_stream, opj_jp2_t *jp2, opj_image_t **p_image, opj_event_mgr_t *p_manager)
Reads a jpeg2000 file header structure.
Definition: jp2.c:2835
opj_codec_private::opj_set_threads
OPJ_BOOL(* opj_set_threads)(void *p_codec, OPJ_UINT32 num_threads)
Set number of threads.
Definition: opj_codec.h:170
opj_destroy_codec
OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:958
OPJ_PCRL
@ OPJ_PCRL
precinct-component-resolution-layer order
Definition: openjpeg.h:302
opj_write_tile
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:931
opj_codestream_info::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:880
opj_set_decode_area
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:492
opj_image_tile_create
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:228
opj_image_comp::x0
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:681
opj_tp_info
Index structure : Information concerning tile-parts.
Definition: openjpeg.h:789
opj_jp2_set_decoded_resolution_factor
OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
Definition: jp2.c:3236
opj_j2k_decode_tile
OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Decode tile data.
Definition: j2k.c:9692
OPJ_PROFILE_PART2
#define OPJ_PROFILE_PART2
Definition: openjpeg.h:197
j2k_get_cstr_info
opj_codestream_info_v2_t * j2k_get_cstr_info(opj_j2k_t *p_j2k)
Get the codestream info from a JPEG2000 codec.
Definition: j2k.c:11242
OPJ_FSEEK
#define OPJ_FSEEK(stream, offset, whence)
Definition: opj_includes.h:85
opj_poc::ty1
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty1
Definition: openjpeg.h:373
opj_get_decoded_tile
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:572
OPJ_CHAR
char OPJ_CHAR
Definition: openjpeg.h:114
opj_image_comptparm::x0
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:738
opj_codestream_index::tile_index
opj_tile_index_t * tile_index
Definition: openjpeg.h:1052
opj_encode
OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
Encode an image into a JPEG-2000 codestream.
Definition: openjpeg.c:847
OPJ_PATH_LEN
#define OPJ_PATH_LEN
Maximum allowed size for filenames.
Definition: openjpeg.h:144
opj_marker_info::len
int len
length, marker val included
Definition: openjpeg.h:782
opj_codestream_info_v2::tw
OPJ_UINT32 tw
number of tiles in X
Definition: openjpeg.h:967
OPJ_UINT64
uint64_t OPJ_UINT64
Definition: openjpeg.h:128
opj_event_mgr::info_handler
opj_msg_callback info_handler
Debug message callback if available, NULL otherwise.
Definition: event.h:62
opj_image_comp::sgnd
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:689
opj_dparameters::DA_x0
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:575
opj_codestream_info_v2
Information structure about the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:956
opj_image_create
OPJ_API opj_image_t *OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts, opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc)
Create an image.
Definition: image.c:40
opj_j2k_start_compress
OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Starts a compression scheme, i.e.
Definition: j2k.c:12187
OPJ_INT32
int32_t OPJ_INT32
Definition: openjpeg.h:125
opj_jp2_get_tile
OPJ_BOOL opj_jp2_get_tile(opj_jp2_t *p_jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index)
Definition: jp2.c:3101
opj_poc::resE
OPJ_UINT32 resE
Definition: openjpeg.h:377
opj_event_mgr::m_info_data
void * m_info_data
Data to call the event manager upon.
Definition: event.h:56
opj_codec_private::m_compression
struct opj_codec_private::@2::opj_compression m_compression
opj_tccp_info::prch
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: openjpeg.h:928
opj_j2k_create_compress
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6634
opj_set_error_handler
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_tile_index::nb_tps
OPJ_UINT32 nb_tps
number of tile parts
Definition: openjpeg.h:1004
opj_tccp_info::stepsizes_mant
OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:918
opj_dump_codec
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:976
opj_image_comp::h
OPJ_UINT32 h
data height
Definition: openjpeg.h:679
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:389
opj_skip_from_file
static OPJ_OFF_T opj_skip_from_file(OPJ_OFF_T p_nb_bytes, FILE *p_user_data)
Definition: openjpeg.c:115
opj_codestream_info_v2::tile_info
opj_tile_info_v2_t * tile_info
information regarding tiles inside image
Definition: openjpeg.h:978
opj_stream_set_write_function
OPJ_API void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t *p_stream, opj_stream_write_fn p_function)
Sets the given function to be used as a write function.
Definition: cio.c:236
opj_cparameters::tp_flag
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:520
opj_jp2_setup_decoder
void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: jp2.c:1893
opj_dparameters::m_verbose
OPJ_BOOL m_verbose
Verbose mode.
Definition: openjpeg.h:583
OPJ_IS_PART2
#define OPJ_IS_PART2(v)
Definition: openjpeg.h:226
opj_version
const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:160
opj_decode_tile_data
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:546
opj_cparameters::jpwl_sens_range
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:492
opj_image_comp::prec
OPJ_UINT32 prec
precision
Definition: openjpeg.h:685
opj_cparameters::image_offset_y0
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:459
opj_cparameters::jpwl_sens_TPH
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:498
opj_jp2_create
opj_jp2_t * opj_jp2_create(OPJ_BOOL p_is_decoder)
Creates a jpeg2000 file decompressor.
Definition: jp2.c:3174
opj_marker_info::pos
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:780
opj_tile_info::pdx
int pdx[33]
precinct size (in power of 2), in X for each resolution level
Definition: openjpeg.h:821
opj_setup_encoder
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:789
opj_get_data_length_from_file
static OPJ_UINT64 opj_get_data_length_from_file(FILE *p_file)
Definition: openjpeg.c:98
opj_decode_tile_data
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:546
opj_cparameters::jpwl_sens_MH
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:494
opj_image::y0
OPJ_UINT32 y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: openjpeg.h:707
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:809
opj_cparameters::subsampling_dx
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:461
opj_tile_index::current_tpsno
OPJ_UINT32 current_tpsno
current tile-part index
Definition: openjpeg.h:1008
opj_j2k_setup_decoder
void opj_j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: j2k.c:6571
opj_image_comp::y0
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:683
opj_tile_info::num_tps
int num_tps
number of tile parts
Definition: openjpeg.h:837
OPJ_CLRSPC_SYCC
@ OPJ_CLRSPC_SYCC
YUV.
Definition: openjpeg.h:314
opj_codec_private::m_codec
void * m_codec
FIXME DOC.
Definition: opj_codec.h:159
opj_end_decompress
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:881
opj_tccp_info
Tile-component coding parameters information.
Definition: openjpeg.h:900
opj_stream_create
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_input)
Creates an abstract stream.
Definition: cio.c:158
opj_codec_set_threads
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_codec_set_threads(opj_codec_t *p_codec, int num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: openjpeg.c:387
opj_codestream_info::packno
int packno
packet number
Definition: openjpeg.h:849
opj_codestream_info::tile_Ox
int tile_Ox
Definition: openjpeg.h:863
opj_codestream_info_v2::tx0
OPJ_UINT32 tx0
tile origin in x = XTOsiz
Definition: openjpeg.h:959
opj_stream_create_default_file_stream
opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1039
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:486
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:111
opj_cparameters::jpwl_sens_addr
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: openjpeg.h:490
opj_j2k_set_decoded_components
OPJ_BOOL opj_j2k_set_decoded_components(opj_j2k_t *p_j2k, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, opj_event_mgr_t *p_manager)
Sets the indices of the components to decode.
Definition: j2k.c:10061
opj_cparameters::roi_compno
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:436
opj_set_decoded_components
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_components(opj_codec_t *p_codec, OPJ_UINT32 numcomps, const OPJ_UINT32 *comps_indices, OPJ_BOOL apply_color_transforms)
Restrict the number of components to decode.
Definition: openjpeg.c:442
opj_tccp_info::roishift
OPJ_INT32 roishift
Region Of Interest shift.
Definition: openjpeg.h:924
opj_malloc
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
opj_codestream_info_v2::nbcomps
OPJ_UINT32 nbcomps
number of components
Definition: openjpeg.h:972
opj_encoder_set_extra_options
OPJ_BOOL OPJ_CALLCONV opj_encoder_set_extra_options(opj_codec_t *p_codec, const char *const *options)
Specify extra options for the encoder.
Definition: openjpeg.c:809
opj_image_data_free
void OPJ_CALLCONV opj_image_data_free(void *ptr)
Destructor for opj_image_t->comps[].data To be paired with opj_image_data_alloc.
Definition: openjpeg.c:1098
opj_read_header
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:418
opj_cparameters::POC
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:413
opj_stream_set_user_data_length
OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t *p_stream, OPJ_UINT64 data_length)
Sets the length of the user data for the stream.
Definition: cio.c:271
opj_tile_v2_info
Tile coding parameters information.
Definition: openjpeg.h:935
opj_image_data_free
OPJ_API void OPJ_CALLCONV opj_image_data_free(void *ptr)
Destructor for opj_image_t->comps[].data To be paired with opj_image_data_alloc.
Definition: openjpeg.c:1098
opj_poc::layE
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:377
opj_image_comptparm::sgnd
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:746
opj_poc::compno0
OPJ_UINT32 compno0
Definition: openjpeg.h:361
opj_image_data_alloc
OPJ_API void *OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size)
Allocator for opj_image_t->comps[].data To be paired with opj_image_data_free.
Definition: openjpeg.c:1091
opj_poc::prcS
OPJ_UINT32 prcS
Definition: openjpeg.h:375
opj_version
OPJ_API const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:160
opj_dparameters::cod_format
int cod_format
output file format 0: PGX, 1: PxM, 2: BMP
Definition: openjpeg.h:572
opj_cparameters::tcp_mct
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:522
opj_event_mgr::m_error_data
void * m_error_data
Data to call the event manager upon.
Definition: event.h:52
opj_codec_private
Main codec handler used for compression or decompression.
Definition: opj_codec.h:42
opj_free
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
opj_cparameters::cp_fixed_alloc
int cp_fixed_alloc
allocation by fixed layer
Definition: openjpeg.h:401
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:364
opj_dparameters::outfile
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:568
opj_decode
OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:471
opj_cparameters::max_cs_size
int max_cs_size
Maximum size (in bytes) for the whole codestream.
Definition: openjpeg.h:534
opj_cparameters::mct_data
void * mct_data
Naive implementation of MCT restricted to a single reversible array based encoding without offset con...
Definition: openjpeg.h:527
OPJ_RPCL
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:301
opj_image_comp::resno_decoded
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:691
opj_codestream_index
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:1031
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:478
COLOR_SPACE
COLOR_SPACE
Supported image color spaces.
Definition: openjpeg.h:309
opj_codec_private::is_decompressor
OPJ_BOOL is_decompressor
Flag to indicate if the codec is used to decode or encode.
Definition: opj_codec.h:163
opj_jp2_start_compress
OPJ_BOOL opj_jp2_start_compress(opj_jp2_t *jp2, opj_stream_private_t *stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Starts a compression scheme, i.e.
Definition: jp2.c:2458
opj_image_comp::alpha
OPJ_UINT16 alpha
alpha channel
Definition: openjpeg.h:697
opj_cparameters::prch_init
int prch_init[OPJ_J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:444
opj_jp2_index
Index structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
Definition: openjpeg.h:1077
opj_create_decompress
OPJ_API opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:168
j2k_get_cstr_index
opj_codestream_index_t * j2k_get_cstr_index(opj_j2k_t *p_j2k)
Get the codestream index from a JPEG2000 codec.
Definition: j2k.c:11318
opj_end_compress
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:864
opj_packet_info
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:760
opj_tile_info::numpix
int numpix
add fixed_quality
Definition: openjpeg.h:827
OPJ_CODEC_UNKNOWN
@ OPJ_CODEC_UNKNOWN
place-holder
Definition: openjpeg.h:323
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:92
opj_j2k_create_decompress
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:10276
opj_dparameters::infile
char infile[OPJ_PATH_LEN]
input file name
Definition: openjpeg.h:566
opj_poc::compno1
OPJ_UINT32 compno1
Definition: openjpeg.h:363
opj_poc::ty0
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty0
Definition: openjpeg.h:373
opj_tccp_info::stepsizes_expn
OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:920
opj_codestream_info::main_head_end
int main_head_end
main header position
Definition: openjpeg.h:887
RSIZ_CAPABILITIES
RSIZ_CAPABILITIES
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Rsiz Capabilities.
Definition: openjpeg.h:276
opj_tile_index_t
struct opj_tile_index opj_tile_index_t
Index structure about a tile.
opj_image_comptparm::w
OPJ_UINT32 w
data width
Definition: openjpeg.h:734
opj_destroy_cstr_index
void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
Definition: openjpeg.c:1031
opj_poc::comp_t
OPJ_UINT32 comp_t
Definition: openjpeg.h:381
opj_set_warning_handler
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_UINT16
uint16_t OPJ_UINT16
Definition: openjpeg.h:124
opj_codestream_info_v2::tdy
OPJ_UINT32 tdy
tile size in y = YTsiz
Definition: openjpeg.h:965
opj_marker_info::type
unsigned short int type
marker type
Definition: openjpeg.h:778
opj_stream_set_skip_function
OPJ_API void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t *p_stream, opj_stream_skip_fn p_function)
Sets the given function to be used as a skip function.
Definition: cio.c:248
opj_tile_info_v2_t
struct opj_tile_v2_info opj_tile_info_v2_t
Tile coding parameters information.
OPJ_OFF
@ OPJ_OFF
Definition: openjpeg.h:288
OPJ_INT8
int8_t OPJ_INT8
Definition: openjpeg.h:121
opj_cparameters::cp_disto_alloc
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:399
opj_poc::txS
OPJ_UINT32 txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition: openjpeg.h:379
OPJ_CINEMA4K_24
@ OPJ_CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:291
opj_stream_set_write_function
void OPJ_CALLCONV opj_stream_set_write_function(opj_stream_t *p_stream, opj_stream_write_fn p_function)
Sets the given function to be used as a write function.
Definition: cio.c:236
OPJ_CINEMA_MODE
enum CINEMA_MODE OPJ_CINEMA_MODE
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Digital cinema operation mode.
opj_poc::prcE
OPJ_UINT32 prcE
Definition: openjpeg.h:377
opj_stream_set_read_function
void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t *p_stream, opj_stream_read_fn p_function)
Sets the given function to be used as a read function.
Definition: cio.c:213
opj_image_comp::w
OPJ_UINT32 w
data width
Definition: openjpeg.h:677
opj_tp_index::start_pos
OPJ_OFF_T start_pos
start position
Definition: openjpeg.h:988
opj_aligned_free
void opj_aligned_free(void *ptr)
Definition: opj_malloc.c:225
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:364
opj_cparameters::roi_shift
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:438
opj_read_tile_header
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:515
opj_tp_index_t
struct opj_tp_index opj_tp_index_t
Index structure about a tile part.
opj_cparameters::cblockw_init
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:428
opj_stream_create_file_stream
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_file_stream(const char *fname, OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with a specific buffer size.
Definition: openjpeg.c:1046
opj_tile_info::marknum
int marknum
number of markers
Definition: openjpeg.h:831
OPJ_COLOR_SPACE
enum COLOR_SPACE OPJ_COLOR_SPACE
Supported image color spaces.
opj_image::x0
OPJ_UINT32 x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: openjpeg.h:705
OPJ_CODEC_JPP
@ OPJ_CODEC_JPP
JPP-stream (JPEG 2000, JPIP) : to be coded.
Definition: openjpeg.h:327
OPJ_MCT
@ OPJ_MCT
Profile name for a 4K image.
Definition: openjpeg.h:280
opj_write_tile
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:931
opj_dparameters
Decompression parameters.
Definition: openjpeg.h:546
j2k_destroy_cstr_index
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:9113
opj_stream_create_default_file_stream
OPJ_API opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1039
opj_codestream_info_v2_t
struct opj_codestream_info_v2 opj_codestream_info_v2_t
Information structure about the codestream (FIXME should be expand and enhance)
opj_codestream_info_v2::m_default_tile_info
opj_tile_info_v2_t m_default_tile_info
Default information regarding tiles inside image.
Definition: openjpeg.h:975
opj_image::comps
opj_image_comp_t * comps
image components
Definition: openjpeg.h:717
opj_image::icc_profile_len
OPJ_UINT32 icc_profile_len
size of ICC profile
Definition: openjpeg.h:721
opj_codestream_info::prog
OPJ_PROG_ORDER prog
progression order
Definition: openjpeg.h:857
opj_codestream_index::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:1044
PROG_ORDER
PROG_ORDER
Progression order.
Definition: openjpeg.h:297
opj_tile_info::thresh
double * thresh
value of thresh for each layer by tile cfr.
Definition: openjpeg.h:807
opj_poc::tyE
OPJ_UINT32 tyE
Definition: openjpeg.h:379
opj_codestream_info::tile
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:891
opj_aligned_malloc
void * opj_aligned_malloc(size_t size)
Allocate memory aligned to a 16 byte boundary.
Definition: opj_malloc.c:207
opj_seek_from_file
static OPJ_BOOL opj_seek_from_file(OPJ_OFF_T p_nb_bytes, FILE *p_user_data)
Definition: openjpeg.c:124
opj_packet_info::end_pos
OPJ_OFF_T end_pos
packet end position
Definition: openjpeg.h:766
opj_stream_skip_fn
OPJ_OFF_T(* opj_stream_skip_fn)(OPJ_OFF_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:643
JPWL_MAX_NO_PACKSPECS
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition: openjpeg.h:157
CINEMA_MODE
CINEMA_MODE
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Digital cinema operation mode.
Definition: openjpeg.h:287
OPJ_CLRSPC_UNSPECIFIED
@ OPJ_CLRSPC_UNSPECIFIED
not specified in the codestream
Definition: openjpeg.h:311
JPWL_MAX_NO_TILESPECS
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition: openjpeg.h:156
opj_codestream_info::tile_Oy
int tile_Oy
Definition: openjpeg.h:865
opj_codestream_info
Index structure of the codestream.
Definition: openjpeg.h:845
opj_destroy_codec
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:958
opj_j2k_encoder_set_extra_options
OPJ_BOOL opj_j2k_encoder_set_extra_options(opj_j2k_t *p_j2k, const char *const *p_options, opj_event_mgr_t *p_manager)
Specify extra options for the encoder.
Definition: j2k.c:12029
opj_poc::tx0
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx0
Start and end values for Tile width and height.
Definition: openjpeg.h:373
opj_tile_v2_info::numlayers
OPJ_UINT32 numlayers
number of layers
Definition: openjpeg.h:944
opj_write_from_file
static OPJ_SIZE_T opj_write_from_file(void *p_buffer, OPJ_SIZE_T p_nb_bytes, FILE *p_file)
Definition: openjpeg.c:109
OPJ_COMP_PARAM_DEFAULT_CBLOCKH
#define OPJ_COMP_PARAM_DEFAULT_CBLOCKH
Definition: opj_common.h:43
opj_image_comp::bpp
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:687
opj_tile_index::tileno
OPJ_UINT32 tileno
tile index
Definition: openjpeg.h:1001
opj_codec_private::m_codec_data
union opj_codec_private::@2 m_codec_data
FIXME DOC.
opj_dparameters::jpwl_max_tiles
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:600
EVT_ERROR
#define EVT_ERROR
Error event type.
Definition: event.h:66
opj_marker_info_t
struct opj_marker_info opj_marker_info_t
Marker structure.
opj_stream_set_seek_function
OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t *p_stream, opj_stream_seek_fn p_function)
Sets the given function to be used as a seek function, the stream is then seekable,...
Definition: cio.c:225
OPJ_UINT32
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
opj_image_comp::factor
OPJ_UINT32 factor
number of division by 2 of the out image compared to the original size of image
Definition: openjpeg.h:693
opj_create_decompress
opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:168
opj_cparameters::image_offset_x0
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:457
opj_stream_destroy
OPJ_API void OPJ_CALLCONV opj_stream_destroy(opj_stream_t *p_stream)
Destroys a stream created by opj_create_stream.
Definition: cio.c:199
j2k_dump
void j2k_dump(opj_j2k_t *p_j2k, OPJ_INT32 flag, FILE *out_stream)
Dump some elements from the J2K decompression structure .
Definition: j2k.c:11051
opj_image_comp::dx
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:673
opj_cparameters::tp_on
char tp_on
Tile part generation.
Definition: openjpeg.h:518
opj_encode
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:847
opj_cparameters::mode
int mode
mode switch (cblk_style)
Definition: openjpeg.h:432
opj_tile_info::tp
opj_tp_info_t * tp
information concerning tile parts
Definition: openjpeg.h:839
opj_tile_info
Index structure : information regarding tiles.
Definition: openjpeg.h:805
opj_start_compress
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:828
opj_dparameters::tile_index
OPJ_UINT32 tile_index
tile number of the decoded tile
Definition: openjpeg.h:586
opj_j2k_setup_encoder
OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
Definition: j2k.c:7494
opj_cparameters::jpwl_pprot_packno
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:484
opj_j2k_decode
OPJ_BOOL opj_j2k_decode(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager)
Decode an image from a JPEG-2000 codestream.
Definition: j2k.c:11823
OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION
#define OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION
Definition: opj_common.h:45
opj_image_comptparm::dx
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:730
OPJ_J2K_STREAM_CHUNK_SIZE
#define OPJ_J2K_STREAM_CHUNK_SIZE
Definition: openjpeg.h:150
OPJ_UINT32_SEMANTICALLY_BUT_INT32
#define OPJ_UINT32_SEMANTICALLY_BUT_INT32
Definition: openjpeg.h:352
opj_codestream_index::codestream_size
OPJ_UINT64 codestream_size
codestream's size
Definition: openjpeg.h:1038
opj_stream_create_file_stream
opj_stream_t *OPJ_CALLCONV opj_stream_create_file_stream(const char *fname, OPJ_SIZE_T p_size, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with a specific buffer size.
Definition: openjpeg.c:1046
opj_tile_v2_info::csty
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:940
opj_cparameters::cp_tdy
int cp_tdy
YTsiz.
Definition: openjpeg.h:397
opj_tile_v2_info::mct
OPJ_UINT32 mct
multi-component transform identifier
Definition: openjpeg.h:946
opj_tile_index::tp_index
opj_tp_index_t * tp_index
information concerning tile parts
Definition: openjpeg.h:1010
opj_poc::prc_t
OPJ_UINT32 prc_t
Definition: openjpeg.h:381
opj_cparameters::csty
int csty
csty : coding style
Definition: openjpeg.h:409
opj_j2k_write_tile
OPJ_BOOL opj_j2k_write_tile(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes a tile.
Definition: j2k.c:12977
opj_image_comptparm::h
OPJ_UINT32 h
data height
Definition: openjpeg.h:736
opj_stream_write_fn
OPJ_SIZE_T(* opj_stream_write_fn)(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data)
Definition: openjpeg.h:637
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:112
opj_codestream_info_v2::th
OPJ_UINT32 th
number of tiles in Y
Definition: openjpeg.h:969
opj_poc::prg1
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:367
opj_tp_index
Index structure about a tile part.
Definition: openjpeg.h:986
opj_codestream_info::tile_y
int tile_y
tile size in y
Definition: openjpeg.h:861
OPJ_INT16
int16_t OPJ_INT16
Definition: openjpeg.h:123
opj_start_compress
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:828
opj_get_cstr_index
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:1020
OPJ_LRCP
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:299
opj_dparameters::decod_format
int decod_format
input file format 0: J2K, 1: JP2, 2: JPT
Definition: openjpeg.h:570
opj_cparameters::cp_rsiz
OPJ_RSIZ_CAPABILITIES cp_rsiz
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.
Definition: openjpeg.h:516
OPJ_CODEC_JPT
@ OPJ_CODEC_JPT
JPT-stream (JPEG 2000, JPIP) : read only.
Definition: openjpeg.h:325
opj_codestream_info::numdecompos
int * numdecompos
number of decomposition for each component
Definition: openjpeg.h:875
opj_jp2_metadata_t
struct opj_jp2_metadata opj_jp2_metadata_t
Info structure of the JP2 file EXPERIMENTAL FOR THE MOMENT.
opj_codec_private::opj_get_codec_index
opj_codestream_index_t *(* opj_get_codec_index)(void *p_codec)
Definition: opj_codec.h:167
opj_j2k_read_header
OPJ_BOOL opj_j2k_read_header(opj_stream_private_t *p_stream, opj_j2k_t *p_j2k, opj_image_t **p_image, opj_event_mgr_t *p_manager)
Reads a jpeg2000 codestream header structure.
Definition: j2k.c:8255
opj_j2k_read_tile_header
OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t *p_j2k, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a tile header.
Definition: j2k.c:9383
opj_poc::tx0_t
OPJ_UINT32 tx0_t
Definition: openjpeg.h:381
opj_poc::resS
OPJ_UINT32 resS
Definition: openjpeg.h:375
opj_get_jp2_index
OPJ_API opj_jp2_index_t *OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec)
Get the JP2 file index from the codec FIXME.
opj_poc::layno1
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:363
jp2_dump
void jp2_dump(opj_jp2_t *p_jp2, OPJ_INT32 flag, FILE *out_stream)
Dump some elements from the JP2 decompression structure .
Definition: jp2.c:3216
OPJ_EXTENSION_MCT
#define OPJ_EXTENSION_MCT
Definition: openjpeg.h:217
opj_poc::tile
OPJ_UINT32 tile
Tile number (starting at 1)
Definition: openjpeg.h:371
JPWL_EXPECTED_COMPONENTS
#define JPWL_EXPECTED_COMPONENTS
Expect this number of components, so you'll find better the first EPB.
Definition: openjpeg.h:160
opj_dparameters::DA_y0
OPJ_UINT32 DA_y0
Decoding area up boundary.
Definition: openjpeg.h:579
opj_stream_set_seek_function
void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t *p_stream, opj_stream_seek_fn p_function)
Sets the given function to be used as a seek function, the stream is then seekable,...
Definition: cio.c:225
opj_tccp_info::cblkh
OPJ_UINT32 cblkh
log2 of code-blocks height
Definition: openjpeg.h:910
opj_get_jp2_metadata
OPJ_API opj_jp2_metadata_t *OPJ_CALLCONV opj_get_jp2_metadata(opj_codec_t *p_codec)
Get the JP2 file information from the codec FIXME.
opj_image_comptparm::prec
OPJ_UINT32 prec
precision
Definition: openjpeg.h:742
opj_stream_set_read_function
OPJ_API void OPJ_CALLCONV opj_stream_set_read_function(opj_stream_t *p_stream, opj_stream_read_fn p_function)
Sets the given function to be used as a read function.
Definition: cio.c:213
opj_codec_private::m_event_mgr
opj_event_mgr_t m_event_mgr
Event handler.
Definition: opj_codec.h:161
OPJ_CODEC_JP2
@ OPJ_CODEC_JP2
JP2 file format : read/write.
Definition: openjpeg.h:326
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:728
opj_cparameters::prcw_init
int prcw_init[OPJ_J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:442
opj_cparameters::numpocs
OPJ_UINT32 numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:415
opj_jp2_set_threads
OPJ_BOOL opj_jp2_set_threads(opj_jp2_t *jp2, OPJ_UINT32 num_threads)
Allocates worker threads for the compressor/decompressor.
Definition: jp2.c:1904
opj_poc::resno1
OPJ_UINT32 resno1
Definition: openjpeg.h:363
opj_read_header
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:418
opj_codestream_info::th
int th
number of tiles in Y
Definition: openjpeg.h:869
opj_event_mgr::m_warning_data
void * m_warning_data
Data to call the event manager upon.
Definition: event.h:54
OPJ_CALLCONV
#define OPJ_CALLCONV
Definition: openjpeg.h:92
opj_image_comptparm::dy
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:732
opj_cparameters::outfile
char outfile[OPJ_PATH_LEN]
output file name
Definition: openjpeg.h:451
opj_dparameters::DA_x1
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:577
opj_tile_index::marknum
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1014
opj_tp_info::tp_end_pos
int tp_end_pos
end position of tile part
Definition: openjpeg.h:795
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:703
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:480
opj_poc::resno0
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:361
opj_end_decompress
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:881
OPJ_CODEC_J2K
@ OPJ_CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:324
opj_cparameters::jpwl_epc_on
OPJ_BOOL jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:474
opj_cparameters::jpwl_hprot_MH
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:476
opj_poc
Progression order changes.
Definition: openjpeg.h:359
opj_stream_set_user_data
void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t *p_stream, void *p_data, opj_stream_free_user_data_fn p_function)
Sets the given data to be used as a user data for the stream.
Definition: cio.c:260
opj_marker_info
Marker structure.
Definition: openjpeg.h:776
opj_tp_info::tp_numpacks
int tp_numpacks
number of packets of tile part
Definition: openjpeg.h:799
opj_tile_info_t
struct opj_tile_info opj_tile_info_t
Index structure : information regarding tiles.
opj_codestream_info::tile_x
int tile_x
tile size in x
Definition: openjpeg.h:859
opj_cparameters::cp_matrice
int * cp_matrice
fixed layer
Definition: openjpeg.h:405
opj_codestream_info_v2::tdx
OPJ_UINT32 tdx
tile size in x = XTsiz
Definition: openjpeg.h:963
opj_poc::layS
OPJ_UINT32 layS
Start value, initialised in pi_initialise_encode.
Definition: openjpeg.h:375
opj_poc::dx
OPJ_UINT32 dx
Definition: openjpeg.h:379
opj_set_default_event_handler
void opj_set_default_event_handler(opj_event_mgr_t *p_manager)
Set the event manager with the default callback function for the 3 levels.
Definition: event.c:142
opj_event_mgr::error_handler
opj_msg_callback error_handler
Error message callback if available, NULL otherwise.
Definition: event.h:58
opj_codestream_info::marknum
int marknum
number of markers
Definition: openjpeg.h:878
opj_tccp_info::numresolutions
OPJ_UINT32 numresolutions
number of resolutions
Definition: openjpeg.h:906
opj_jp2_decode_tile
OPJ_BOOL opj_jp2_decode_tile(opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Decode tile data.
Definition: jp2.c:3000
opj_cparameters::max_comp_size
int max_comp_size
Maximum size (in bytes) for each component.
Definition: openjpeg.h:511
opj_tp_info::tp_start_pack
int tp_start_pack
start packet of tile part
Definition: openjpeg.h:797
opj_stream_set_skip_function
void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t *p_stream, opj_stream_skip_fn p_function)
Sets the given function to be used as a skip function.
Definition: cio.c:248
opj_tile_info::end_pos
int end_pos
end position
Definition: openjpeg.h:815
opj_tile_info::pw
int pw[33]
precinct number for each resolution level (width)
Definition: openjpeg.h:817
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:889