OpenJPEG  2.3.1
j2k.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) 2011-2012, Centre National d'Etudes Spatiales (CNES), France
17  * Copyright (c) 2012, CS Systemes d'Information, France
18  *
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 OPJ_J2K_H
43 #define OPJ_J2K_H
44 
53 
54 #define J2K_CP_CSTY_PRT 0x01
55 #define J2K_CP_CSTY_SOP 0x02
56 #define J2K_CP_CSTY_EPH 0x04
57 #define J2K_CCP_CSTY_PRT 0x01
58 #define J2K_CCP_CBLKSTY_LAZY 0x01
59 #define J2K_CCP_CBLKSTY_RESET 0x02
60 #define J2K_CCP_CBLKSTY_TERMALL 0x04
61 #define J2K_CCP_CBLKSTY_VSC 0x08
62 #define J2K_CCP_CBLKSTY_PTERM 0x10
63 #define J2K_CCP_CBLKSTY_SEGSYM 0x20
64 #define J2K_CCP_QNTSTY_NOQNT 0
65 #define J2K_CCP_QNTSTY_SIQNT 1
66 #define J2K_CCP_QNTSTY_SEQNT 2
67 
68 /* ----------------------------------------------------------------------- */
69 
70 #define J2K_MS_SOC 0xff4f
71 #define J2K_MS_SOT 0xff90
72 #define J2K_MS_SOD 0xff93
73 #define J2K_MS_EOC 0xffd9
74 #define J2K_MS_SIZ 0xff51
75 #define J2K_MS_COD 0xff52
76 #define J2K_MS_COC 0xff53
77 #define J2K_MS_RGN 0xff5e
78 #define J2K_MS_QCD 0xff5c
79 #define J2K_MS_QCC 0xff5d
80 #define J2K_MS_POC 0xff5f
81 #define J2K_MS_TLM 0xff55
82 #define J2K_MS_PLM 0xff57
83 #define J2K_MS_PLT 0xff58
84 #define J2K_MS_PPM 0xff60
85 #define J2K_MS_PPT 0xff61
86 #define J2K_MS_SOP 0xff91
87 #define J2K_MS_EPH 0xff92
88 #define J2K_MS_CRG 0xff63
89 #define J2K_MS_COM 0xff64
90 #define J2K_MS_CBD 0xff78
91 #define J2K_MS_MCC 0xff75
92 #define J2K_MS_MCT 0xff74
93 #define J2K_MS_MCO 0xff77
95 #define J2K_MS_UNK 0
97 /* UniPG>> */
98 #ifdef USE_JPWL
99 #define J2K_MS_EPC 0xff68
100 #define J2K_MS_EPB 0xff66
101 #define J2K_MS_ESD 0xff67
102 #define J2K_MS_RED 0xff69
103 #endif /* USE_JPWL */
104 #ifdef USE_JPSEC
105 #define J2K_MS_SEC 0xff65
106 #define J2K_MS_INSEC 0xff94
107 #endif /* USE_JPSEC */
108 /* <<UniPG */
109 
110 #define J2K_MAX_POCS 32
112 /* ----------------------------------------------------------------------- */
113 
118 typedef enum J2K_STATUS {
119  J2K_STATE_NONE = 0x0000,
120  J2K_STATE_MHSOC = 0x0001,
121  J2K_STATE_MHSIZ = 0x0002,
122  J2K_STATE_MH = 0x0004,
123  J2K_STATE_TPHSOT = 0x0008,
124  J2K_STATE_TPH = 0x0010,
125  J2K_STATE_MT = 0x0020,
126  J2K_STATE_NEOC = 0x0040,
127  J2K_STATE_DATA = 0x0080,
129  J2K_STATE_EOC = 0x0100,
130  J2K_STATE_ERR = 0x8000
132 
136 typedef enum MCT_ELEMENT_TYPE {
140  MCT_TYPE_DOUBLE = 3
142 
146 typedef enum MCT_ARRAY_TYPE {
149  MCT_TYPE_OFFSET = 2
151 
152 /* ----------------------------------------------------------------------- */
153 
157 typedef enum T2_MODE {
159  FINAL_PASS = 1
161 
165 typedef struct opj_stepsize {
171 
175 typedef struct opj_tccp {
202 }
204 
205 
206 
210 typedef struct opj_mct_data {
216 }
218 
228 }
230 
231 typedef struct opj_ppx_struct {
232  OPJ_BYTE* m_data; /* m_data == NULL => Zppx not read yet */
235 
241 typedef struct opj_tcp {
257 
262 
301 
302 
303  /***** FLAGS *******/
311 
312 
313 
314 
315 typedef struct opj_encoding_param {
332 }
334 
335 typedef struct opj_decoding_param {
340 }
342 
343 
347 typedef struct opj_cp {
349  /*int img_size;*/
353  OPJ_UINT32 tx0; /* MSD see norm */
355  OPJ_UINT32 ty0; /* MSD see norm */
366 
371 
378 
380 
391 
394 
395  union {
398  }
400 
401 
402  /* UniPG>> */
403 #ifdef USE_JPWL
404 
415  int hprot_MH;
433  int sens_MH;
444 #endif /* USE_JPWL */
445 
446  /******** FLAGS *********/
453  /* <<UniPG */
455 
456 
457 typedef struct opj_j2k_dec {
473 
478 
485 
488 
496 
498 
499 typedef struct opj_j2k_enc {
502 
505 
519 
523 
524  /* encoded data for a tile */
526 
527  /* size of the encoded_data */
529 
530  /* encoded data for a tile */
532 
533  /* size of the encoded_data */
535 
536 
538 
539 
540 
541 struct opj_tcd;
545 typedef struct opj_j2k {
546  /* J2K codestream is decoded*/
548 
549  /* FIXME DOC*/
550  union {
553  }
555 
558 
559  /* pointer to the output image (decoded)*/
561 
564 
567 
570 
573 
576 
578  struct opj_tcd * m_tcd;
579 
582 
585 
589  unsigned int dump_state;
590 }
592 
593 
594 
595 
598 /* ----------------------------------------------------------------------- */
599 
606 void opj_j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters);
607 
609 
616 
617 
619  opj_cparameters_t *parameters,
621  opj_event_mgr_t * p_manager);
622 
627 
628 /* ----------------------------------------------------------------------- */
632 
638  opj_stream_private_t *p_stream,
639  opj_event_mgr_t * p_manager);
640 
652  opj_j2k_t* p_j2k,
653  opj_image_t** p_image,
654  opj_event_mgr_t* p_manager);
655 
656 
662 void opj_j2k_destroy(opj_j2k_t *p_j2k);
663 
670 
681  OPJ_UINT32 p_tile_index,
682  OPJ_BYTE * p_data,
683  OPJ_UINT32 p_data_size,
684  opj_stream_private_t *p_stream,
685  opj_event_mgr_t * p_manager);
686 
702  OPJ_UINT32 * p_tile_index,
703  OPJ_UINT32 * p_data_size,
704  OPJ_INT32 * p_tile_x0,
705  OPJ_INT32 * p_tile_y0,
706  OPJ_INT32 * p_tile_x1,
707  OPJ_INT32 * p_tile_y1,
708  OPJ_UINT32 * p_nb_comps,
709  OPJ_BOOL * p_go_on,
710  opj_stream_private_t *p_stream,
711  opj_event_mgr_t * p_manager);
712 
713 
725  OPJ_UINT32 numcomps,
726  const OPJ_UINT32* comps_indices,
727  opj_event_mgr_t * p_manager);
728 
743  opj_image_t* p_image,
744  OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
745  OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
746  opj_event_mgr_t * p_manager);
747 
754 
755 
764 void j2k_dump(opj_j2k_t* p_j2k, OPJ_INT32 flag, FILE* out_stream);
765 
766 
767 
775 void j2k_dump_image_header(opj_image_t* image, OPJ_BOOL dev_dump_flag,
776  FILE* out_stream);
777 
785 void j2k_dump_image_comp_header(opj_image_comp_t* comp, OPJ_BOOL dev_dump_flag,
786  FILE* out_stream);
787 
796 
805 
815  opj_stream_private_t *p_stream,
816  opj_image_t *p_image,
817  opj_event_mgr_t *p_manager);
818 
819 
821  opj_stream_private_t *p_stream,
822  opj_image_t* p_image,
823  opj_event_mgr_t * p_manager,
824  OPJ_UINT32 tile_index);
825 
827  OPJ_UINT32 res_factor,
828  opj_event_mgr_t * p_manager);
829 
830 
841  OPJ_UINT32 p_tile_index,
842  OPJ_BYTE * p_data,
843  OPJ_UINT32 p_data_size,
844  opj_stream_private_t *p_stream,
845  opj_event_mgr_t * p_manager);
846 
852  opj_event_mgr_t * p_manager);
853 
865  opj_stream_private_t *p_stream,
866  opj_image_t * p_image,
867  opj_event_mgr_t * p_manager);
868 
875  opj_event_mgr_t * p_manager);
876 
878 
879 
880 #endif /* OPJ_J2K_H */
OPJ_J2K_MAXRLVLS
#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:146
opj_j2k_dump_MH_info
static void opj_j2k_dump_MH_info(opj_j2k_t *p_j2k, FILE *out_stream)
Definition: j2k.c:10384
opj_j2k::m_procedure_list
opj_procedure_list_t * m_procedure_list
the list of procedures to exec
Definition: j2k.h:566
opj_tccp_info::cblkw
OPJ_UINT32 cblkw
log2 of code-blocks width
Definition: openjpeg.h:874
opj_read_double
#define opj_read_double
Definition: cio.h:67
opj_j2k_read_cbd
static OPJ_BOOL opj_j2k_read_cbd(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a CBD marker (Component bit depth definition)
Definition: j2k.c:6360
opj_j2k_dec::m_comps_indices_to_decode
OPJ_UINT32 * m_comps_indices_to_decode
Definition: j2k.h:487
opj_tcp::num_layers_to_decode
OPJ_UINT32 num_layers_to_decode
Definition: j2k.h:248
opj_tcd_tilecomp::ownsData
OPJ_BOOL ownsData
Definition: tcd.h:206
opj_poc::compE
OPJ_UINT32 compE
Definition: openjpeg.h:343
opj_image::x1
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:675
OPJ_BYTE
unsigned char OPJ_BYTE
Definition: openjpeg.h:117
opj_encoding_param::m_fixed_quality
OPJ_BITFIELD m_fixed_quality
add fixed_quality
Definition: j2k.h:329
opj_j2k_write_float_to_float64
static void opj_j2k_write_float_to_float64(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1589
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:966
OPJ_FLOAT32
float OPJ_FLOAT32
Definition: openjpeg.h:115
opj_j2k_update_image_data
static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t *p_tcd, opj_image_t *p_output_image)
Definition: j2k.c:9012
opj_j2k_write_mct_record
static OPJ_BOOL opj_j2k_write_mct_record(opj_j2k_t *p_j2k, opj_mct_data_t *p_mct_record, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the MCT marker (Multiple Component Transform)
Definition: j2k.c:5512
opj_dparameters::jpwl_correct
OPJ_BOOL jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:562
opj_j2k_dec::m_header_data
OPJ_BYTE * m_header_data
Definition: j2k.h:464
opj_j2k::m_decoder
opj_j2k_dec_t m_decoder
Definition: j2k.h:551
opj_stream_write_data
OPJ_SIZE_T opj_stream_write_data(opj_stream_private_t *p_stream, const OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t *p_event_mgr)
Writes some bytes to the stream.
Definition: cio.c:385
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_j2k_write_qcd
static OPJ_BOOL opj_j2k_write_qcd(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the QCD marker (quantization default)
Definition: j2k.c:2965
opj_tcd_copy_tile_data
OPJ_BOOL opj_tcd_copy_tile_data(opj_tcd_t *p_tcd, OPJ_BYTE *p_src, OPJ_SIZE_T p_src_length)
Copies tile data from the given memory block onto the system.
Definition: tcd.c:2609
opj_tcd_encode_tile
OPJ_BOOL opj_tcd_encode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, OPJ_BYTE *p_dest, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_max_length, opj_codestream_info_t *p_cstr_info, opj_event_mgr_t *p_manager)
Encodes a tile from the raw image into the given buffer.
Definition: tcd.c:1369
opj_tcp::m_mct_coding_matrix
OPJ_FLOAT32 * m_mct_coding_matrix
the mct coding matrix
Definition: j2k.h:288
opj_j2k_get_max_toc_size
static OPJ_UINT32 opj_j2k_get_max_toc_size(opj_j2k_t *p_j2k)
Gets the maximum size taken by the toc headers of all the tile parts of any given tile.
Definition: j2k.c:3417
opj_cp::hprot_MH
int hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: j2k.h:415
opj_tcp::prg
OPJ_PROG_ORDER prg
progression order
Definition: j2k.h:245
opj_ppx_struct::m_data
OPJ_BYTE * m_data
Definition: j2k.h:232
opj_encoding_param::m_fixed_alloc
OPJ_BITFIELD m_fixed_alloc
allocation by fixed layer
Definition: j2k.h:327
OPJ_PROG_ORDER
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
opj_tcd::cur_pino
OPJ_UINT32 cur_pino
Current Packet iterator number.
Definition: tcd.h:261
OPJ_EXTENSION_NONE
#define OPJ_EXTENSION_NONE
JPEG 2000 Part-2 extensions.
Definition: openjpeg.h:216
opj_cparameters::tcp_rates
float tcp_rates[100]
rates of layers - might be subsequently limited by the max_cs_size field.
Definition: openjpeg.h:387
opj_mct_data::m_index
OPJ_UINT32 m_index
Definition: j2k.h:213
opj_tcd::image
opj_image_t * image
image header
Definition: tcd.h:265
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:641
opj_mct_data::m_data_size
OPJ_UINT32 m_data_size
Definition: j2k.h:215
opj_tcp::pocs
opj_poc_t pocs[J2K_MAX_POCS]
progression order changes
Definition: j2k.h:256
opj_codestream_index::nb_of_tiles
OPJ_UINT32 nb_of_tiles
Definition: openjpeg.h:1016
opj_dwt_calc_explicit_stepsizes
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1280
opj_thread_pool_destroy
void opj_thread_pool_destroy(opj_thread_pool_t *tp)
Destroy a thread pool.
Definition: thread.c:919
opj_encoding_param::m_tp_flag
OPJ_BYTE m_tp_flag
Flag determining tile part generation.
Definition: j2k.h:323
opj_j2k_read_SPCod_SPCoc
static OPJ_BOOL opj_j2k_read_SPCod_SPCoc(opj_j2k_t *p_j2k, OPJ_UINT32 compno, OPJ_BYTE *p_header_data, OPJ_UINT32 *p_header_size, opj_event_mgr_t *p_manager)
Reads a SPCod or SPCoc element, i.e.
Definition: j2k.c:9731
OPJ_COMMON_CBLK_DATA_EXTRA
#define OPJ_COMMON_CBLK_DATA_EXTRA
Margin for a fake FFFF marker.
Definition: opj_common.h:39
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_cp::comment
OPJ_CHAR * comment
comment
Definition: j2k.h:361
opj_dec_memory_marker_handler::states
OPJ_UINT32 states
value of the state when the marker can appear
Definition: j2k.c:1356
opj_tccp::roishift
OPJ_INT32 roishift
Region Of Interest shift.
Definition: j2k.h:195
opj_int_floorlog2
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:215
J2K_MAX_POCS
#define J2K_MAX_POCS
Maximum number of POCs.
Definition: j2k.h:110
opj_j2k_write_mcc_record
static OPJ_BOOL opj_j2k_write_mcc_record(opj_j2k_t *p_j2k, opj_simple_mcc_decorrelation_data_t *p_mcc_record, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the MCC marker (Multiple Component Collection)
Definition: j2k.c:5719
opj_j2k_write_mco
static OPJ_BOOL opj_j2k_write_mco(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the MCO marker (Multiple component transformation ordering)
Definition: j2k.c:6067
opj_simple_mcc_decorrelation_data::m_offset_array
opj_mct_data_t * m_offset_array
Definition: j2k.h:226
J2K_MS_ESD
#define J2K_MS_ESD
ESD marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:101
opj_codestream_index::main_head_start
OPJ_OFF_T main_head_start
main header start position (SOC position)
Definition: openjpeg.h:999
opj_tccp::numresolutions
OPJ_UINT32 numresolutions
number of resolutions
Definition: j2k.h:179
opj_j2k_enc::m_encoded_tile_data
OPJ_BYTE * m_encoded_tile_data
Definition: j2k.h:525
opj_j2k::m_tcd
struct opj_tcd * m_tcd
the current tile coder/decoder
Definition: j2k.h:578
opj_j2k::m_cp
opj_cp_t m_cp
Coding parameters.
Definition: j2k.h:563
opj_j2k_write_rgn
static OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no, OPJ_UINT32 nb_comps, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the RGN marker (Region Of Interest)
Definition: j2k.c:4846
opj_j2k_t
struct opj_j2k opj_j2k_t
JPEG-2000 codestream reader/writer.
opj_write_double
#define opj_write_double
Definition: cio.h:66
opj_j2k_write_siz
static OPJ_BOOL opj_j2k_write_siz(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the SIZ marker (image and tile size)
Definition: j2k.c:1941
opj_j2k_update_tlm
static void opj_j2k_update_tlm(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_part_size)
Updates the Tile Length Marker.
Definition: j2k.c:909
opj_int_min
static INLINE OPJ_INT32 opj_int_min(OPJ_INT32 a, OPJ_INT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:56
opj_j2k_destroy
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:8277
opj_j2k_dec::m_can_decode
OPJ_BITFIELD m_can_decode
to tell that a tile can be decoded.
Definition: j2k.h:490
opj_tcd_resolution::x0
OPJ_INT32 x0
Definition: tcd.h:173
opj_j2k_get_tp_stride
static OPJ_FLOAT32 opj_j2k_get_tp_stride(opj_tcp_t *p_tcp)
Definition: j2k.c:5024
opj_j2k_create_tcd
static OPJ_BOOL opj_j2k_create_tcd(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Creates a tile-coder encoder.
Definition: j2k.c:12077
J2K_MS_PLT
#define J2K_MS_PLT
PLT marker value.
Definition: j2k.h:83
opj_j2k_exec
static OPJ_BOOL opj_j2k_exec(opj_j2k_t *p_j2k, opj_procedure_list_t *p_procedure_list, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Excutes the given procedures on the given codec.
Definition: j2k.c:8084
opj_j2k_write_all_qcc
static OPJ_BOOL opj_j2k_write_all_qcc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes QCC marker for each component.
Definition: j2k.c:5357
opj_cp::m_enc
opj_encoding_param_t m_enc
Definition: j2k.h:397
OPJ_CINEMA2K_48
@ OPJ_CINEMA2K_48
2K Digital Cinema at 24 fps
Definition: openjpeg.h:260
opj_j2k_setup_decoding_validation
static OPJ_BOOL opj_j2k_setup_decoding_validation(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the validation ,i.e.
Definition: j2k.c:7572
opj_j2k::dump_state
unsigned int dump_state
Definition: j2k.h:589
opj_cparameters::cp_tx0
int cp_tx0
XTOsiz.
Definition: openjpeg.h:357
opj_tcd_resolution::y1
OPJ_INT32 y1
Definition: tcd.h:173
opj_j2k
JPEG-2000 codestream reader/writer.
Definition: j2k.h:545
OPJ_DPARAMETERS_DUMP_FLAG
#define OPJ_DPARAMETERS_DUMP_FLAG
Definition: openjpeg.h:507
opj_j2k_read_qcd
static OPJ_BOOL opj_j2k_read_qcd(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a QCD marker (Quantization defaults)
Definition: j2k.c:3033
opj_j2k_copy_tile_quantization_parameters
static void opj_j2k_copy_tile_quantization_parameters(opj_j2k_t *p_j2k)
Copies the tile quantization parameters of all the component from the first tile component.
Definition: j2k.c:10179
opj_mct_data::m_array_type
J2K_MCT_ARRAY_TYPE m_array_type
Definition: j2k.h:212
opj_stream_has_seek
OPJ_BOOL opj_stream_has_seek(const opj_stream_private_t *p_stream)
Tells if the given stream is seekable.
Definition: cio.c:648
opj_tcd_resolution::x1
OPJ_INT32 x1
Definition: tcd.h:173
opj_image::y1
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:677
J2K_STATUS
J2K_STATUS
Values that specify the status of the decoding process when decoding the main header.
Definition: j2k.h:118
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:7480
opj_cparameters::tcp_numlayers
int tcp_numlayers
number of layers
Definition: openjpeg.h:383
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_j2k_write_cbd
static OPJ_BOOL opj_j2k_write_cbd(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the CBD marker (Component bit depth definition)
Definition: j2k.c:6291
opj_cp::max_tiles
OPJ_UINT32 max_tiles
maximum number of tiles at the decoder
Definition: j2k.h:443
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:7491
opj_encoding_param::m_tp_pos
OPJ_INT32 m_tp_pos
Position of tile part flag in progression order.
Definition: j2k.h:319
opj_simple_mcc_decorrelation_data::m_is_irreversible
OPJ_BITFIELD m_is_irreversible
Definition: j2k.h:227
opj_tccp_info::qntsty
OPJ_UINT32 qntsty
quantisation style
Definition: openjpeg.h:882
opj_procedure_list_destroy
void opj_procedure_list_destroy(opj_procedure_list_t *p_list)
Destroys a validation list.
Definition: function_list.c:58
opj_j2k_set_threads
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6431
opj_image::numcomps
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:679
opj_uint_ceildiv
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:170
opj_j2k_read_coc
static OPJ_BOOL opj_j2k_read_coc(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a COC marker (Coding Style Component)
Definition: j2k.c:2906
opj_tile_index::current_nb_tps
OPJ_UINT32 current_nb_tps
current nb of tile part (allocated)
Definition: openjpeg.h:972
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:6756
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_j2k_dec::m_sot_length
OPJ_UINT32 m_sot_length
to tell the tile part length
Definition: j2k.h:467
opj_j2k_get_max_coc_size
static OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k)
Gets the maximum size taken by a coc.
Definition: j2k.c:2878
opj_tp_index::end_pos
OPJ_OFF_T end_pos
end position
Definition: openjpeg.h:958
opj_cparameters::subsampling_dy
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:429
opj_j2k_read_SQcd_SQcc
static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k, OPJ_UINT32 compno, OPJ_BYTE *p_header_data, OPJ_UINT32 *p_header_size, opj_event_mgr_t *p_manager)
Reads a SQcd or SQcc element, i.e.
Definition: j2k.c:10060
opj_tcd_init_encode_tile
OPJ_BOOL opj_tcd_init_encode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, opj_event_mgr_t *p_manager)
Initialize the tile coder and may reuse some meory.
Definition: tcd.c:1190
opj_cparameters::tcp_distoratio
float tcp_distoratio[100]
different psnr for successive layers.
Definition: openjpeg.h:390
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:11301
J2K_STATE_MT
@ J2K_STATE_MT
the EOC marker has just been read
Definition: j2k.h:125
SIZE_MAX
#define SIZE_MAX
Definition: opj_malloc.c:40
OPJ_CINEMA_48_COMP
#define OPJ_CINEMA_48_COMP
Definition: openjpeg.h:234
OPJ_J2K_TH_INFO
#define OPJ_J2K_TH_INFO
Tile information based on the current tile header.
Definition: openjpeg.h:172
opj_image_comp::data
OPJ_INT32 * data
image component data
Definition: openjpeg.h:661
OPJ_IS_IMF
#define OPJ_IS_IMF(v)
Definition: openjpeg.h:225
opj_cp::pprot_tileno
int pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: j2k.h:421
THRESH_CALC
@ THRESH_CALC
Definition: j2k.h:158
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_PROFILE_CINEMA_S4K
#define OPJ_PROFILE_CINEMA_S4K
Definition: openjpeg.h:201
opj_cp::ppm_len
OPJ_UINT32 ppm_len
size of the ppm_data
Definition: j2k.h:375
OPJ_J2K_TCH_INFO
#define OPJ_J2K_TCH_INFO
Tile/Component information of all tiles.
Definition: openjpeg.h:173
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:12106
opj_stream_get_number_byte_left
OPJ_OFF_T opj_stream_get_number_byte_left(const opj_stream_private_t *p_stream)
Get the number of bytes left before the end of the stream (similar to cio_numbytesleft).
Definition: cio.c:584
J2K_STATE_MHSOC
@ J2K_STATE_MHSOC
a SOC marker is expected
Definition: j2k.h:120
opj_j2k_compare_SPCod_SPCoc
static OPJ_BOOL opj_j2k_compare_SPCod_SPCoc(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
Compare 2 a SPCod/ SPCoc elements, i.e.
Definition: j2k.c:9615
j2k_prog_order_list
static const j2k_prog_order_t j2k_prog_order_list[]
Definition: j2k.c:1309
OPJ_INT64
int64_t OPJ_INT64
Definition: openjpeg.h:127
opj_j2k_move_data_from_codec_to_output_image
static OPJ_BOOL opj_j2k_move_data_from_codec_to_output_image(opj_j2k_t *p_j2k, opj_image_t *p_image)
Definition: j2k.c:10929
opj_j2k::m_specific_param
union opj_j2k::@1 m_specific_param
opj_j2k_setup_header_reading
static OPJ_BOOL opj_j2k_setup_header_reading(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the procedures to do on reading header.
Definition: j2k.c:7551
opj_j2k_write_sod
static OPJ_BOOL opj_j2k_write_sod(opj_j2k_t *p_j2k, opj_tcd_t *p_tile_coder, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, const opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the SOD marker (Start of data)
Definition: j2k.c:4614
opj_cparameters::cblockh_init
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:396
j2k_mct_read_functions_to_float
static const opj_j2k_mct_function j2k_mct_read_functions_to_float[]
Definition: j2k.c:1331
opj_j2k_write_tlm
static OPJ_BOOL opj_j2k_write_tlm(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the TLM marker (Tile Length Marker)
Definition: j2k.c:4145
opj_tcp::ppt
OPJ_BITFIELD ppt
If ppt == 1 --> there was a PPT marker for the present tile.
Definition: j2k.h:307
opj_j2k_enc::m_tlm_sot_offsets_buffer
OPJ_BYTE * m_tlm_sot_offsets_buffer
Stores the sizes of the tlm.
Definition: j2k.h:514
opj_j2k_get_max_qcc_size
static OPJ_UINT32 opj_j2k_get_max_qcc_size(opj_j2k_t *p_j2k)
Gets the maximum size taken by a qcc.
Definition: j2k.c:3163
opj_j2k_read_ppt
static OPJ_BOOL opj_j2k_read_ppt(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a PPT marker (Packed packet headers, tile-part header)
Definition: j2k.c:4007
OPJ_PROFILE_CINEMA_4K
#define OPJ_PROFILE_CINEMA_4K
Definition: openjpeg.h:199
J2K_MS_PPT
#define J2K_MS_PPT
PPT marker value.
Definition: j2k.h:85
opj_cp::sens_MH
int sens_MH
sensitivity method for MH (-1,0-7)
Definition: j2k.h:433
OPJ_CINEMA4K
@ OPJ_CINEMA4K
Profile name for a 2K image.
Definition: openjpeg.h:249
opj_cparameters::rsiz
OPJ_UINT16 rsiz
RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.
Definition: openjpeg.h:503
opj_j2k_read_qcc
static OPJ_BOOL opj_j2k_read_qcc(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a QCC marker (Quantization component)
Definition: j2k.c:3175
opj_j2k_write_SPCod_SPCoc
static OPJ_BOOL opj_j2k_write_SPCod_SPCoc(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no, OPJ_BYTE *p_data, OPJ_UINT32 *p_header_size, opj_event_mgr_t *p_manager)
Writes a SPCod or SPCoc element, i.e.
Definition: j2k.c:9662
opj_cp::info_on
OPJ_BOOL info_on
enables writing of informative techniques of ESD, in case of activated JPWL
Definition: j2k.h:411
OPJ_J2K_DEFAULT_HEADER_SIZE
#define OPJ_J2K_DEFAULT_HEADER_SIZE
Definition: openjpeg.h:151
opj_tile_index::maxmarknum
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:984
J2K_MS_COC
#define J2K_MS_COC
COC marker value.
Definition: j2k.h:76
opj_procedure_list_get_nb_procedures
OPJ_UINT32 opj_procedure_list_get_nb_procedures(opj_procedure_list_t *p_validation_list)
Gets the number of validation procedures.
Definition: function_list.c:102
opj_cp::ppm_buffer
OPJ_BYTE * ppm_buffer
packet header storage original buffer
Definition: j2k.h:382
opj_tcp::m_nb_mcc_records
OPJ_UINT32 m_nb_mcc_records
the number of mct records.
Definition: j2k.h:298
opj_j2k::ihdr_h
OPJ_UINT32 ihdr_h
Definition: j2k.h:587
opj_mct_data::m_data
OPJ_BYTE * m_data
Definition: j2k.h:214
opj_simple_mcc_decorrelation_data::m_index
OPJ_UINT32 m_index
Definition: j2k.h:223
opj_j2k_add_mct
static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t *p_tcp, opj_image_t *p_image, OPJ_UINT32 p_index)
Definition: j2k.c:6204
opj_cparameters::res_spec
int res_spec
Definition: openjpeg.h:406
opj_j2k_dec::m_end_tile_x
OPJ_UINT32 m_end_tile_x
Definition: j2k.h:471
OPJ_CINEMA2K
@ OPJ_CINEMA2K
Standard JPEG2000 profile.
Definition: openjpeg.h:248
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:8912
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:11047
opj_cparameters::cp_fixed_quality
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:369
J2K_MS_SEC
#define J2K_MS_SEC
SEC marker value (Part 8: Secure JPEG 2000)
Definition: j2k.h:105
opj_j2k_read_siz
static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a SIZ marker (image and tile size)
Definition: j2k.c:2047
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:1054
opj_j2k_copy_tile_component_parameters
static void opj_j2k_copy_tile_component_parameters(opj_j2k_t *p_j2k)
Copies the tile component parameters of all the component from the first tile component.
Definition: j2k.c:9872
opj_j2k_read_sot
static OPJ_BOOL opj_j2k_read_sot(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a SOT marker (Start of tile-part)
Definition: j2k.c:4295
tcp
@ tcp
Definition: query_parser.h:41
opj_tcd_update_tile_data
OPJ_BOOL opj_tcd_update_tile_data(opj_tcd_t *p_tcd, OPJ_BYTE *p_dest, OPJ_UINT32 p_dest_length)
Copies tile data from the system onto the given memory block.
Definition: tcd.c:1718
opj_j2k_read_plt
static OPJ_BOOL opj_j2k_read_plt(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a PLT marker (Packet length, tile-part header)
Definition: j2k.c:3735
opj_j2k_dec::m_last_tile_part
OPJ_BOOL m_last_tile_part
Indicate that the current tile-part is assume as the last tile part of the codestream.
Definition: j2k.h:484
opj_tcp::ppt_data
OPJ_BYTE * ppt_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:264
OPJ_OFF_T
int64_t OPJ_OFF_T
Definition: openjpeg.h:130
J2K_MS_SOP
#define J2K_MS_SOP
SOP marker value.
Definition: j2k.h:86
opj_cp::ppm
OPJ_BITFIELD ppm
if ppm == 1 --> there was a PPM marker
Definition: j2k.h:448
opj_stream_skip
OPJ_OFF_T opj_stream_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, opj_event_mgr_t *p_event_mgr)
Skips a number of bytes from the stream.
Definition: cio.c:593
opj_stream_seek
OPJ_BOOL opj_stream_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)
Seeks a number of bytes from the stream.
Definition: cio.c:641
opj_cp::red_on
OPJ_BOOL red_on
enables writing of RED, in case of activated JPWL
Definition: j2k.h:413
opj_cp::exp_comps
int exp_comps
expected number of components at the decoder
Definition: j2k.h:441
J2K_MS_INSEC
#define J2K_MS_INSEC
INSEC marker value (Part 8: Secure JPEG 2000)
Definition: j2k.h:106
opj_cparameters::jpwl_sens_TPH_tileno
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:462
OPJ_RLCP
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:270
opj_tcp::rates
OPJ_FLOAT32 rates[100]
rates of layers
Definition: j2k.h:252
opj_tcd_tilecomp::x1
OPJ_INT32 x1
Definition: tcd.h:191
MCT_TYPE_DEPENDENCY
@ MCT_TYPE_DEPENDENCY
Definition: j2k.h:147
opj_event_mgr
Message handler object used for.
Definition: event.h:50
OPJ_J2K_MCC_DEFAULT_NB_RECORDS
#define OPJ_J2K_MCC_DEFAULT_NB_RECORDS
Definition: openjpeg.h:152
opj_j2k_create_decompress
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:9496
opj_tile_v2_info::tccp_info
opj_tccp_info_t * tccp_info
information concerning tile component parameters
Definition: openjpeg.h:915
j2k_dump_image_comp_header
void j2k_dump_image_comp_header(opj_image_comp_t *comp_header, OPJ_BOOL dev_dump_flag, FILE *out_stream)
Dump a component image header structure.
Definition: j2k.c:10429
j2k_mct_write_functions_from_float
static const opj_j2k_mct_function j2k_mct_write_functions_from_float[]
Definition: j2k.c:1345
J2K_CCP_QNTSTY_SEQNT
#define J2K_CCP_QNTSTY_SEQNT
Definition: j2k.h:66
OPJ_STD_RSIZ
@ OPJ_STD_RSIZ
Definition: openjpeg.h:247
opj_dparameters::cp_layer
OPJ_UINT32 cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:527
J2K_MCT_ARRAY_TYPE
enum MCT_ARRAY_TYPE J2K_MCT_ARRAY_TYPE
Type of MCT array.
opj_j2k_dec::m_nb_tile_parts_correction
OPJ_BITFIELD m_nb_tile_parts_correction
Definition: j2k.h:495
opj_j2k_convert_progression_order
const char * opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order)
Converts an enum type progression order to string type.
Definition: j2k.c:1606
opj_tile_index::packet_index
opj_packet_info_t * packet_index
information concerning packets inside tile
Definition: openjpeg.h:990
OPJ_IS_BROADCAST
#define OPJ_IS_BROADCAST(v)
Definition: openjpeg.h:224
opj_cp::sens_TPH
int sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1,0-7)
Definition: j2k.h:437
opj_stream_tell
OPJ_OFF_T opj_stream_tell(const opj_stream_private_t *p_stream)
Tells the byte offset on the stream (similar to ftell).
Definition: cio.c:579
opj_cp::allow_different_bit_depth_sign
OPJ_BITFIELD allow_different_bit_depth_sign
whether different bit depth or sign per component is allowed.
Definition: j2k.h:452
opj_tccp::m_dc_level_shift
OPJ_INT32 m_dc_level_shift
the dc_level_shift
Definition: j2k.h:201
opj_cparameters::cp_comment
char * cp_comment
comment for coding
Definition: openjpeg.h:373
opj_cp::ppm_data_first
OPJ_BYTE * ppm_data_first
pointer remaining on the first byte of the first header if ppm is used
Definition: j2k.h:384
j2k_prog_order::str_prog
char str_prog[5]
Definition: j2k.c:1306
opj_tcd::cur_tp_num
OPJ_UINT32 cur_tp_num
Current tile part number.
Definition: tcd.h:257
opj_j2k_create_compress
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6479
opj_j2k_check_poc_val
static OPJ_BOOL opj_j2k_check_poc_val(const opj_poc_t *p_pocs, OPJ_UINT32 p_nb_pocs, OPJ_UINT32 p_nb_resolutions, OPJ_UINT32 numcomps, OPJ_UINT32 numlayers, opj_event_mgr_t *p_manager)
Checks the progression order changes values.
Definition: j2k.c:1617
opj_cparameters::jpwl_sens_size
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:454
opj_j2k_setup_header_writing
static OPJ_BOOL opj_j2k_setup_header_writing(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the procedures to do on writing header.
Definition: j2k.c:11625
opj_cparameters::prog_order
OPJ_PROG_ORDER prog_order
progression order (default OPJ_LRCP)
Definition: openjpeg.h:377
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:11193
opj_encoding_param::m_max_comp_size
OPJ_UINT32 m_max_comp_size
Maximum rate for each component.
Definition: j2k.h:317
opj_j2k_dump_tile_info
static void opj_j2k_dump_tile_info(opj_tcp_t *l_default_tile, OPJ_INT32 numcomps, FILE *out_stream)
Definition: j2k.c:10208
opj_j2k_setup_end_compress
static OPJ_BOOL opj_j2k_setup_end_compress(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the validation ,i.e.
Definition: j2k.c:11565
opj_image_comp
Defines a single image component.
Definition: openjpeg.h:637
opj_j2k_write_eoc
static OPJ_BOOL opj_j2k_write_eoc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the EOC marker (End of Codestream)
Definition: j2k.c:4909
opj_j2k_read_cod
static OPJ_BOOL opj_j2k_read_cod(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a COD marker (Coding style defaults)
Definition: j2k.c:2635
opj_j2k::m_validation_list
opj_procedure_list_t * m_validation_list
the list of validation procedures to follow to make sure the code is valid
Definition: j2k.h:569
opj_decoding_param::m_layer
OPJ_UINT32 m_layer
if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers ...
Definition: j2k.h:339
opj_calculate_norms
void opj_calculate_norms(OPJ_FLOAT64 *pNorms, OPJ_UINT32 pNbComps, OPJ_FLOAT32 *pMatrix)
FIXME DOC.
Definition: mct.c:547
opj_codestream_index::main_head_end
OPJ_OFF_T main_head_end
main header end position (first SOT position)
Definition: openjpeg.h:1001
opj_j2k_write_poc_in_memory
static void opj_j2k_write_poc_in_memory(opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, opj_event_mgr_t *p_manager)
Writes the POC marker (Progression Order Change)
Definition: j2k.c:3310
J2K_MS_EPC
#define J2K_MS_EPC
EPC marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:99
opj_cp::ppm_data_read
OPJ_UINT32 ppm_data_read
size of the ppm_data
Definition: j2k.h:377
opj_stream_private
Byte input-output stream.
Definition: cio.h:81
OPJ_CPRL
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:273
opj_tcd_tilecomp::resolutions
opj_tcd_resolution_t * resolutions
Definition: tcd.h:199
opj_tcp::m_nb_max_mct_records
OPJ_UINT32 m_nb_max_mct_records
the max number of mct records.
Definition: j2k.h:294
opj_j2k_get_tile_data
static void opj_j2k_get_tile_data(opj_tcd_t *p_tcd, OPJ_BYTE *p_data)
Definition: j2k.c:11432
opj_cp::pprot_packno
int pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: j2k.h:423
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:956
opj_cparameters::jpwl_pprot_tileno
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:448
opj_j2k_read_int16_to_float
static void opj_j2k_read_int16_to_float(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1402
opj_tccp_info::qmfbid
OPJ_UINT32 qmfbid
discrete wavelet transform identifier: 0 = 9-7 irreversible, 1 = 5-3 reversible
Definition: openjpeg.h:880
MCT_TYPE_DOUBLE
@ MCT_TYPE_DOUBLE
MCT data is stored as floats.
Definition: j2k.h:140
opj_tcp::m_nb_max_mcc_records
OPJ_UINT32 m_nb_max_mcc_records
the max number of mct records.
Definition: j2k.h:300
OPJ_FLOAT64
double OPJ_FLOAT64
Definition: openjpeg.h:116
opj_cp
Coding parameters.
Definition: j2k.h:347
opj_tccp::stepsizes
opj_stepsize_t stepsizes[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: j2k.h:191
opj_tile_index::nb_packet
OPJ_UINT32 nb_packet
packet number
Definition: openjpeg.h:988
opj_tcd_tilecomp::x0
OPJ_INT32 x0
Definition: tcd.h:191
OPJ_CINEMA_24_COMP
#define OPJ_CINEMA_24_COMP
Definition: openjpeg.h:233
opj_tile_index
Index structure about a tile.
Definition: openjpeg.h:965
J2K_STATE_MH
@ J2K_STATE_MH
the decoding process is in the main header
Definition: j2k.h:122
opj_tccp_info::cblksty
OPJ_UINT32 cblksty
code-block coding style
Definition: openjpeg.h:878
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:10528
opj_j2k_dec::m_discard_tiles
OPJ_BITFIELD m_discard_tiles
Definition: j2k.h:491
opj_cparameters::numresolution
int numresolution
number of resolutions
Definition: openjpeg.h:392
opj_j2k_setup_decoding
static OPJ_BOOL opj_j2k_setup_decoding(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the procedures to do on decoding data.
Definition: j2k.c:10785
opj_simple_mcc_decorrelation_data::m_nb_comps
OPJ_UINT32 m_nb_comps
Definition: j2k.h:224
opj_j2k_enc::m_tlm_start
OPJ_OFF_T m_tlm_start
locate the start position of the TLM marker after encoding the tilepart, a jump (in j2k_write_sod) is...
Definition: j2k.h:510
opj_dparameters::jpwl_exp_comps
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:564
opj_tcp::csty
OPJ_UINT32 csty
coding style
Definition: j2k.h:243
opj_cparameters
Compression parameters.
Definition: openjpeg.h:353
opj_j2k::m_current_tile_number
OPJ_UINT32 m_current_tile_number
number of the tile currently concern by coding/decoding
Definition: j2k.h:575
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:9281
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:11317
opj_j2k_dec::m_start_tile_y
OPJ_UINT32 m_start_tile_y
Definition: j2k.h:470
opj_j2k_write_coc
static OPJ_BOOL opj_j2k_write_coc(opj_j2k_t *p_j2k, OPJ_UINT32 p_comp_no, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the COC marker (Coding style component)
Definition: j2k.c:2756
opj_tile_v2_info::prg
OPJ_PROG_ORDER prg
progression order
Definition: openjpeg.h:908
j2k_destroy_cstr_index
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:8347
j2k_dump_image_comp_header
void j2k_dump_image_comp_header(opj_image_comp_t *comp, OPJ_BOOL dev_dump_flag, FILE *out_stream)
Dump a component image header structure.
Definition: j2k.c:10429
J2K_MS_PPM
#define J2K_MS_PPM
PPM marker value.
Definition: j2k.h:84
j2k_mct_read_functions_to_int32
static const opj_j2k_mct_function j2k_mct_read_functions_to_int32[]
Definition: j2k.c:1338
opj_j2k_read_poc
static OPJ_BOOL opj_j2k_read_poc(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a POC marker (Progression Order Change)
Definition: j2k.c:3468
opj_simple_mcc_decorrelation_data_t
struct opj_simple_mcc_decorrelation_data opj_simple_mcc_decorrelation_data_t
FIXME DOC.
OPJ_CINEMA2K_24
@ OPJ_CINEMA2K_24
Not Digital Cinema.
Definition: openjpeg.h:259
opj_j2k::m_output_image
opj_image_t * m_output_image
Definition: j2k.h:560
opj_cp::esd_on
OPJ_BOOL esd_on
enables writing of ESD, in case of activated JPWL
Definition: j2k.h:409
opj_tcd_init
OPJ_BOOL opj_tcd_init(opj_tcd_t *p_tcd, opj_image_t *p_image, opj_cp_t *p_cp, opj_thread_pool_t *p_tp)
Initialize the tile coder and may reuse some memory.
Definition: tcd.c:643
opj_cparameters::cp_tdx
int cp_tdx
XTsiz.
Definition: openjpeg.h:361
opj_j2k_write_poc
static OPJ_BOOL opj_j2k_write_poc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the POC marker (Progression Order Change)
Definition: j2k.c:3255
opj_tcd_tile::x1
OPJ_INT32 x1
Definition: tcd.h:230
opj_stepsize
Quantization stepsize.
Definition: j2k.h:165
opj_tile_index::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:982
opj_j2k_enc::m_total_tile_parts
OPJ_UINT32 m_total_tile_parts
Total num of tile parts in whole image = num tiles* num tileparts in each tile.
Definition: j2k.h:522
opj_cp::hprot_TPH_tileno
int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: j2k.h:417
EVT_WARNING
#define EVT_WARNING
Warning event type.
Definition: event.h:67
opj_cp::ppm_store
OPJ_INT32 ppm_store
use in case of multiple marker PPM (number of info already store)
Definition: j2k.h:388
opj_cparameters::irreversible
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:400
OPJ_IS_STORAGE
#define OPJ_IS_STORAGE(v)
Definition: openjpeg.h:223
opj_j2k::ihdr_w
OPJ_UINT32 ihdr_w
Definition: j2k.h:586
opj_j2k_read_float32_to_int32
static void opj_j2k_read_float32_to_int32(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1504
opj_tcd::whole_tile_decoding
OPJ_BOOL whole_tile_decoding
Only valid for decoding.
Definition: tcd.h:282
opj_j2k_merge_ppm
static OPJ_BOOL opj_j2k_merge_ppm(opj_cp_t *p_cp, opj_event_mgr_t *p_manager)
Merges all PPM markers read (Packed headers, main header)
Definition: j2k.c:3867
opj_j2k_set_threads
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6431
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:11162
opj_cp::tdy
OPJ_UINT32 tdy
YTsiz.
Definition: j2k.h:359
opj_j2k_get_specific_header_sizes
static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k)
Gets the maximum size taken by the headers of the SOT.
Definition: j2k.c:3436
opj_cp::tx0
OPJ_UINT32 tx0
XTOsiz.
Definition: j2k.h:353
opj_j2k::m_is_decoder
OPJ_BOOL m_is_decoder
Definition: j2k.h:547
opj_ppx_struct
Definition: j2k.h:231
J2K_MS_TLM
#define J2K_MS_TLM
TLM marker value.
Definition: j2k.h:81
opj_cp::ppm_markers_count
OPJ_UINT32 ppm_markers_count
number of ppm markers (reserved size)
Definition: j2k.h:368
opj_j2k_dec_t
struct opj_j2k_dec opj_j2k_dec_t
opj_tcp::m_mct_decoding_matrix
OPJ_FLOAT32 * m_mct_decoding_matrix
the mct decoding matrix
Definition: j2k.h:286
opj_tccp::prch
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: j2k.h:199
opj_stepsize::mant
OPJ_INT32 mant
mantissa
Definition: j2k.h:169
J2K_MS_RED
#define J2K_MS_RED
RED marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:102
opj_matrix_inversion_f
OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 *pSrcMatrix, OPJ_FLOAT32 *pDestMatrix, OPJ_UINT32 nb_compo)
Matrix inversion.
Definition: invert.c:70
opj_stepsize::expn
OPJ_INT32 expn
exponent
Definition: j2k.h:167
opj_j2k_decode
OPJ_BOOL opj_j2k_decode(opj_j2k_t *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:10989
opj_tccp_info::prcw
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: openjpeg.h:892
opj_j2k_decoding_validation
static OPJ_BOOL opj_j2k_decoding_validation(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
The default decoding validation procedure without any extension.
Definition: j2k.c:7866
OPJ_IMG_INFO
#define OPJ_IMG_INFO
EXPERIMENTAL FOR THE MOMENT Supported options about file information used only in j2k_dump.
Definition: openjpeg.h:170
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:9341
opj_tcp::numpocs
OPJ_UINT32 numpocs
number of progression order changes
Definition: j2k.h:254
opj_cparameters::cp_ty0
int cp_ty0
YTOsiz.
Definition: openjpeg.h:359
opj_tcd_tilecomp::minimum_num_resolutions
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:197
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:472
opj_cp::tdx
OPJ_UINT32 tdx
XTsiz.
Definition: j2k.h:357
opj_codestream_index::maxmarknum
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1012
opj_tccp_info::numgbits
OPJ_UINT32 numgbits
number of guard bits
Definition: openjpeg.h:888
opj_j2k_encoding_validation
static OPJ_BOOL opj_j2k_encoding_validation(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
The default encoding validation procedure without any extension.
Definition: j2k.c:7815
OPJ_UNUSED
#define OPJ_UNUSED(x)
Definition: jp2.c:47
opj_j2k_read_unk
static OPJ_BOOL opj_j2k_read_unk(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, OPJ_UINT32 *output_marker, opj_event_mgr_t *p_manager)
Reads an unknown marker.
Definition: j2k.c:5449
T2_MODE
T2_MODE
T2 encoding mode.
Definition: j2k.h:157
opj_j2k_get_end_header
static OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Gets the offset of the header.
Definition: j2k.c:5269
opj_uint_adds
static INLINE OPJ_UINT32 opj_uint_adds(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated sum of two unsigned integers.
Definition: opj_intmath.h:92
MCT_TYPE_OFFSET
@ MCT_TYPE_OFFSET
Definition: j2k.h:149
opj_codestream_index::marknum
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1008
opj_cp::sens_TPH_tileno
int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: j2k.h:435
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:520
J2K_MS_QCC
#define J2K_MS_QCC
QCC marker value.
Definition: j2k.h:79
opj_cp::ppm_data_size
OPJ_UINT32 ppm_data_size
Number of bytes actually stored inside the ppm_data.
Definition: j2k.h:386
opj_codestream_info_v2::ty0
OPJ_UINT32 ty0
tile origin in y = YTOsiz
Definition: openjpeg.h:927
opj_cp::tcps
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:393
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:6416
OPJ_SIZE_T
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
opj_dparameters::flags
unsigned int flags
Definition: openjpeg.h:570
opj_j2k_decode_one_tile
static OPJ_BOOL opj_j2k_decode_one_tile(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Definition: j2k.c:10804
OPJ_J2K_MH_INFO
#define OPJ_J2K_MH_INFO
Codestream information based only on the main header.
Definition: openjpeg.h:171
J2K_MS_SIZ
#define J2K_MS_SIZ
SIZ marker value.
Definition: j2k.h:74
opj_j2k_read_header_procedure
static OPJ_BOOL opj_j2k_read_header_procedure(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
The read header procedure.
Definition: j2k.c:7899
opj_dec_memory_marker_handler::handler
OPJ_BOOL(* handler)(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
action linked to the marker
Definition: j2k.c:1358
opj_j2k_write_mct_data_group
static OPJ_BOOL opj_j2k_write_mct_data_group(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the CBD-MCT-MCC-MCO markers (Multi components transform)
Definition: j2k.c:5285
opj_poc::prg
OPJ_PROG_ORDER prg
Definition: openjpeg.h:333
opj_tccp_info::csty
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:870
OPJ_PROG_UNKNOWN
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:268
opj_j2k_tcp_destroy
static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp)
Destroys a tile coding parameter structure.
Definition: j2k.c:8386
opj_j2k_enc::m_header_tile_data
OPJ_BYTE * m_header_tile_data
Definition: j2k.h:531
opj_includes.h
J2K_MS_SOT
#define J2K_MS_SOT
SOT marker value.
Definition: j2k.h:71
opj_cp_t
struct opj_cp opj_cp_t
Coding parameters.
opj_j2k_write_coc_in_memory
static void opj_j2k_write_coc_in_memory(opj_j2k_t *p_j2k, OPJ_UINT32 p_comp_no, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, opj_event_mgr_t *p_manager)
Writes the COC marker (Coding style component)
Definition: j2k.c:2828
MCT_TYPE_INT16
@ MCT_TYPE_INT16
Definition: j2k.h:137
opj_j2k_setup_encoding_validation
static OPJ_BOOL opj_j2k_setup_encoding_validation(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the validation ,i.e.
Definition: j2k.c:11600
opj_cp::ppm_data_current
OPJ_BYTE * ppm_data_current
Definition: j2k.h:379
opj_j2k_write_qcc_in_memory
static void opj_j2k_write_qcc_in_memory(opj_j2k_t *p_j2k, OPJ_UINT32 p_comp_no, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, opj_event_mgr_t *p_manager)
Writes the QCC marker (quantization component)
Definition: j2k.c:3113
opj_procedure_list_create
opj_procedure_list_t * opj_procedure_list_create()
Creates a validation list.
Definition: function_list.c:39
OPJ_J2K_MH_IND
#define OPJ_J2K_MH_IND
Codestream index based only on the main header.
Definition: openjpeg.h:174
opj_j2k_calculate_tp
static OPJ_BOOL opj_j2k_calculate_tp(opj_j2k_t *p_j2k, opj_cp_t *cp, OPJ_UINT32 *p_nb_tiles, opj_image_t *image, opj_event_mgr_t *p_manager)
Calculates the total number of tile parts needed by the encoder to encode such an image.
Definition: j2k.c:1779
OPJ_PCRL
@ OPJ_PCRL
precinct-component-resolution-layer order
Definition: openjpeg.h:272
opj_decoding_param
Definition: j2k.h:335
opj_stream_flush
OPJ_BOOL opj_stream_flush(opj_stream_private_t *p_stream, opj_event_mgr_t *p_event_mgr)
Writes the content of the stream buffer to the stream.
Definition: cio.c:433
opj_j2k_dec::m_skip_data
OPJ_BITFIELD m_skip_data
Definition: j2k.h:492
opj_tccp::prcw
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: j2k.h:197
opj_procedure_list_add_procedure
OPJ_BOOL opj_procedure_list_add_procedure(opj_procedure_list_t *p_validation_list, opj_procedure p_procedure, opj_event_mgr_t *p_manager)
Adds a new validation procedure.
Definition: function_list.c:70
opj_dec_memory_marker_handler_t
struct opj_dec_memory_marker_handler opj_dec_memory_marker_handler_t
opj_image_comp::x0
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:647
opj_j2k_add_tlmarker
static OPJ_BOOL opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
Add tile header marker information.
Definition: j2k.c:7427
opj_cp::ppm_markers
opj_ppx * ppm_markers
ppm markers data (table indexed by Zppm)
Definition: j2k.h:370
opj_j2k_read_rgn
static OPJ_BOOL opj_j2k_read_rgn(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a RGN marker (Region Of Interest)
Definition: j2k.c:4950
OPJ_J2K_MCT_DEFAULT_NB_RECORDS
#define OPJ_J2K_MCT_DEFAULT_NB_RECORDS
Definition: openjpeg.h:153
opj_image_destroy
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:92
J2K_MS_SOC
#define J2K_MS_SOC
SOC marker value.
Definition: j2k.h:70
opj_j2k_read_float32_to_float
static void opj_j2k_read_float32_to_float(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1436
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:8912
OPJ_PROFILE_PART2
#define OPJ_PROFILE_PART2
Definition: openjpeg.h:197
OPJ_IS_CINEMA
#define OPJ_IS_CINEMA(v)
JPEG 2000 profile macros.
Definition: openjpeg.h:222
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:10452
opj_j2k_write_all_coc
static OPJ_BOOL opj_j2k_write_all_coc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes COC marker for each component.
Definition: j2k.c:5333
opj_tcp::ppt_buffer
OPJ_BYTE * ppt_buffer
used to keep a track of the allocated memory
Definition: j2k.h:266
j2k_prog_order_t
struct j2k_prog_order j2k_prog_order_t
opj_j2k_need_nb_tile_parts_correction
static OPJ_BOOL opj_j2k_need_nb_tile_parts_correction(opj_stream_private_t *p_stream, OPJ_UINT32 tile_no, OPJ_BOOL *p_correction_needed, opj_event_mgr_t *p_manager)
Checks for invalid number of tile-parts in SOT marker (TPsot==TNsot).
Definition: j2k.c:8509
opj_tcd_resolution
Tile-component resolution structure.
Definition: tcd.h:171
opj_tcp::ppt_markers
opj_ppx * ppt_markers
ppt markers data (table indexed by Zppt)
Definition: j2k.h:261
opj_j2k_is_cinema_compliant
static OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, opj_event_mgr_t *p_manager)
Definition: j2k.c:6693
OPJ_CHAR
char OPJ_CHAR
Definition: openjpeg.h:114
opj_read_float
#define opj_read_float
Definition: cio.h:69
opj_j2k_dec::m_numcomps_to_decode
OPJ_UINT32 m_numcomps_to_decode
Definition: j2k.h:486
opj_codestream_index::tile_index
opj_tile_index_t * tile_index
Definition: openjpeg.h:1018
opj_tcd_image::tiles
opj_tcd_tile_t * tiles
Definition: tcd.h:243
opj_tcd_tilecomp
Tile-component structure.
Definition: tcd.h:189
opj_marker_info::len
int len
length, marker val included
Definition: openjpeg.h:748
opj_codestream_info_v2::tw
OPJ_UINT32 tw
number of tiles in X
Definition: openjpeg.h:933
opj_j2k_write_epc
static OPJ_BOOL opj_j2k_write_epc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes EPC ????
Definition: j2k.c:5409
J2K_T2_MODE
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
j2k_prog_order::enum_prog
OPJ_PROG_ORDER enum_prog
Definition: j2k.c:1305
OPJ_UINT64
uint64_t OPJ_UINT64
Definition: openjpeg.h:128
opj_image_comp::sgnd
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:655
opj_j2k_get_marker_handler
static const struct opj_dec_memory_marker_handler * opj_j2k_get_marker_handler(OPJ_UINT32 p_id)
Reads the lookup table containing all the marker, status and action, and returns the handler associat...
Definition: j2k.c:8265
opj_procedure_list_clear
void opj_procedure_list_clear(opj_procedure_list_t *p_validation_list)
Clears the list of validation procedures.
Definition: function_list.c:114
opj_tcd_tilecomp::data_win
OPJ_INT32 * data_win
data of the component limited to window of interest.
Definition: tcd.h:213
opj_j2k::m_tp
opj_thread_pool_t * m_tp
Thread pool.
Definition: j2k.h:584
opj_j2k_write_all_tile_parts
static OPJ_BOOL opj_j2k_write_all_tile_parts(opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
Definition: j2k.c:11800
opj_codestream_info_v2
Information structure about the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:922
opj_encoding_param::m_tp_on
OPJ_BITFIELD m_tp_on
Enabling Tile part generation.
Definition: j2k.h:331
opj_j2k_read_ppm
static OPJ_BOOL opj_j2k_read_ppm(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a PPM marker (Packed headers, main header)
Definition: j2k.c:3789
MCT_ARRAY_TYPE
MCT_ARRAY_TYPE
Type of MCT array.
Definition: j2k.h:146
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:11317
OPJ_INT32
int32_t OPJ_INT32
Definition: openjpeg.h:125
opj_j2k_mct_function
void(* opj_j2k_mct_function)(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1328
opj_cp::th
OPJ_UINT32 th
number of tiles in height
Definition: j2k.h:365
opj_j2k_enc::m_current_tile_part_number
OPJ_UINT32 m_current_tile_part_number
Tile part number currently coding, taking into account POC.
Definition: j2k.h:504
opj_cp::m_dec
opj_decoding_param_t m_dec
Definition: j2k.h:396
opj_poc::resE
OPJ_UINT32 resE
Definition: openjpeg.h:343
J2K_MS_UNK
#define J2K_MS_UNK
UNKNOWN marker value.
Definition: j2k.h:95
opj_mct_data
FIXME DOC.
Definition: j2k.h:210
opj_j2k_read_sod
static OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a SOD marker (Start Of Data)
Definition: j2k.c:4703
opj_tccp_info::prch
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: openjpeg.h:894
opj_j2k_create_compress
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6479
opj_tcp::mct
OPJ_UINT32 mct
multi-component transform identifier
Definition: j2k.h:250
opj_tile_index::nb_tps
OPJ_UINT32 nb_tps
number of tile parts
Definition: openjpeg.h:970
J2K_STATE_TPH
@ J2K_STATE_TPH
the decoding process is in a tile part header
Definition: j2k.h:124
opj_tccp_info::stepsizes_mant
OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:884
opj_encoding_param
Definition: j2k.h:315
opj_image_comp::h
OPJ_UINT32 h
data height
Definition: openjpeg.h:645
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:355
opj_cp::ppm_data
OPJ_BYTE * ppm_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:373
J2K_STATE_DATA
@ J2K_STATE_DATA
a tile header has been successfully read and codestream is expected
Definition: j2k.h:127
opj_codestream_info_v2::tile_info
opj_tile_info_v2_t * tile_info
information regarding tiles inside image
Definition: openjpeg.h:944
opj_j2k_end_decompress
OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *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:7480
opj_procedure_list
A list of procedures.
Definition: function_list.h:57
J2K_MS_RGN
#define J2K_MS_RGN
RGN marker value.
Definition: j2k.h:77
opj_tcd_resolution::win_x0
OPJ_UINT32 win_x0
Definition: tcd.h:182
opj_j2k_setup_mct_encoding
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t *p_tcp, opj_image_t *p_image)
Definition: j2k.c:7628
opj_cparameters::tp_flag
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:486
opj_cp::epb_on
OPJ_BOOL epb_on
enables writing of EPB, in case of activated JPWL
Definition: j2k.h:407
opj_tcd_resolution::y0
OPJ_INT32 y0
Definition: tcd.h:173
opj_image_create0
opj_image_t * opj_image_create0(void)
Create an empty image.
Definition: image.c:34
opj_tcp::numlayers
OPJ_UINT32 numlayers
number of layers
Definition: j2k.h:247
opj_j2k_add_mhmarker
static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
Add main header marker information.
Definition: j2k.c:7396
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_cparameters::jpwl_sens_range
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:458
opj_image_comp::prec
OPJ_UINT32 prec
precision
Definition: openjpeg.h:651
OPJ_CINEMA_24_CS
#define OPJ_CINEMA_24_CS
JPEG 2000 codestream and component size limits in cinema profiles.
Definition: openjpeg.h:231
opj_cparameters::image_offset_y0
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:425
opj_cparameters::jpwl_sens_TPH
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:464
opj_marker_info::pos
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:746
OPJ_JP2_INFO
#define OPJ_JP2_INFO
<
Definition: openjpeg.h:177
opj_j2k_write_qcc
static OPJ_BOOL opj_j2k_write_qcc(opj_j2k_t *p_j2k, OPJ_UINT32 p_comp_no, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the QCC marker (quantization component)
Definition: j2k.c:3061
opj_tcd_tile::x0
OPJ_INT32 x0
Definition: tcd.h:230
opj_j2k_compare_qcc
static OPJ_BOOL opj_j2k_compare_qcc(opj_j2k_t *p_j2k, OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
Compare QCC markers (quantization component)
Definition: j2k.c:3106
opj_j2k_write_SQcd_SQcc
static OPJ_BOOL opj_j2k_write_SQcd_SQcc(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no, OPJ_BYTE *p_data, OPJ_UINT32 *p_header_size, opj_event_mgr_t *p_manager)
Writes a SQcd or SQcc element, i.e.
Definition: j2k.c:9985
opj_j2k_read_float64_to_int32
static void opj_j2k_read_float64_to_int32(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1521
opj_cparameters::jpwl_sens_MH
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:460
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:673
opj_j2k_read_tlm
static OPJ_BOOL opj_j2k_read_tlm(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a TLM marker (Tile Length Marker)
Definition: j2k.c:3601
opj_realloc
void * opj_realloc(void *ptr, size_t new_size)
Reallocate memory blocks.
Definition: opj_malloc.c:239
opj_cparameters::subsampling_dx
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:427
J2K_CCP_CSTY_PRT
#define J2K_CCP_CSTY_PRT
Definition: j2k.h:57
opj_tile_index::current_tpsno
OPJ_UINT32 current_tpsno
current tile-part index
Definition: openjpeg.h:974
opj_j2k_setup_mct_encoding
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t *p_tcp, opj_image_t *p_image)
Definition: j2k.c:7628
opj_tcp::POC
OPJ_BITFIELD POC
indicates if a POC marker has been used O:NO, 1:YES
Definition: j2k.h:309
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:6416
opj_image_comp::y0
OPJ_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:649
J2K_MS_EOC
#define J2K_MS_EOC
EOC marker value.
Definition: j2k.h:73
MCT_TYPE_DECORRELATION
@ MCT_TYPE_DECORRELATION
Definition: j2k.h:148
J2K_STATE_TPHSOT
@ J2K_STATE_TPHSOT
the decoding process is in a tile part header and expects a SOT marker
Definition: j2k.h:123
opj_tccp::cblkw
OPJ_UINT32 cblkw
code-blocks width
Definition: j2k.h:181
OPJ_PROFILE_CINEMA_S2K
#define OPJ_PROFILE_CINEMA_S2K
Definition: openjpeg.h:200
opj_cp::pprot
int pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: j2k.h:425
opj_j2k_get_default_thread_count
static int opj_j2k_get_default_thread_count()
Definition: j2k.c:6450
opj_tcp::m_nb_mct_records
OPJ_UINT32 m_nb_mct_records
the number of mct records.
Definition: j2k.h:292
opj_j2k_write_float_to_int32
static void opj_j2k_write_float_to_int32(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1555
opj_tccp_info
Tile-component coding parameters information.
Definition: openjpeg.h:866
opj_j2k_merge_ppt
static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t *p_manager)
Merges all PPT markers read (Packed headers, tile-part header)
Definition: j2k.c:4092
opj_codestream_info::packno
int packno
packet number
Definition: openjpeg.h:815
opj_codestream_info_v2::tx0
OPJ_UINT32 tx0
tile origin in x = XTOsiz
Definition: openjpeg.h:925
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:452
opj_uint_min
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
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:456
opj_j2k_get_SPCod_SPCoc_size
static OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no)
Gets the size taken by writing a SPCod or SPCoc for the given tile and component.
Definition: j2k.c:9589
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:9281
opj_cparameters::roi_compno
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:402
opj_j2k_enc::m_tlm_sot_offsets_current
OPJ_BYTE * m_tlm_sot_offsets_current
The current offset of the tlm buffer.
Definition: j2k.h:518
opj_uint_max
static INLINE OPJ_UINT32 opj_uint_max(OPJ_UINT32 a, OPJ_UINT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:83
opj_tccp_info::roishift
OPJ_INT32 roishift
Region Of Interest shift.
Definition: openjpeg.h:890
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:938
opj_j2k_destroy_header_memory
static OPJ_BOOL opj_j2k_destroy_header_memory(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Destroys the memory associated with the decoding of headers.
Definition: j2k.c:11989
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:1061
opj_j2k_write_com
static OPJ_BOOL opj_j2k_write_com(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the COM marker (comment)
Definition: j2k.c:2468
J2K_STATE_ERR
@ J2K_STATE_ERR
the decoding process has encountered an error (FIXME warning V1 = 0x0080)
Definition: j2k.h:130
opj_cparameters::POC
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:379
opj_stream_read_seek
OPJ_BOOL opj_stream_read_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, opj_event_mgr_t *p_event_mgr)
Skips a number of bytes from the stream.
Definition: cio.c:600
opj_tcd_tile::y1
OPJ_INT32 y1
Definition: tcd.h:230
J2K_MS_COM
#define J2K_MS_COM
COM marker value.
Definition: j2k.h:89
J2K_MS_MCO
#define J2K_MS_MCO
MCO marker value.
Definition: j2k.h:93
opj_poc::layE
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:343
opj_tcd_tilecomp::y0
OPJ_INT32 y0
Definition: tcd.h:191
opj_tcd_decode_tile
OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 win_x0, OPJ_UINT32 win_y0, OPJ_UINT32 win_x1, OPJ_UINT32 win_y1, OPJ_UINT32 numcomps_to_decode, const OPJ_UINT32 *comps_indices, OPJ_BYTE *p_src, OPJ_UINT32 p_max_length, OPJ_UINT32 p_tile_no, opj_codestream_index_t *p_cstr_index, opj_event_mgr_t *p_manager)
Decode a tile from a buffer into a raw image.
Definition: tcd.c:1464
J2K_CP_CSTY_SOP
#define J2K_CP_CSTY_SOP
Definition: j2k.h:55
opj_poc::compno0
OPJ_UINT32 compno0
Definition: openjpeg.h:327
opj_procedure_list_get_first_procedure
opj_procedure * opj_procedure_list_get_first_procedure(opj_procedure_list_t *p_validation_list)
Gets the pointer on the first validation procedure.
Definition: function_list.c:108
opj_cparameters::tcp_mct
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:488
opj_j2k_end_compress
OPJ_BOOL opj_j2k_end_compress(opj_j2k_t *p_j2k, 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: j2k.c:11301
opj_stepsize_t
struct opj_stepsize opj_stepsize_t
Quantization stepsize.
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:367
MCT_TYPE_FLOAT
@ MCT_TYPE_FLOAT
MCT data is stored as signed integers.
Definition: j2k.h:139
opj_j2k_compare_SQcd_SQcc
static OPJ_BOOL opj_j2k_compare_SQcd_SQcc(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
Compares 2 SQcd or SQcc element, i.e.
Definition: j2k.c:9937
opj_tcd_tile::numcomps
OPJ_UINT32 numcomps
Definition: tcd.h:231
J2K_MS_PLM
#define J2K_MS_PLM
PLM marker value.
Definition: j2k.h:82
opj_encoding_param_t
struct opj_encoding_param opj_encoding_param_t
opj_cparameters::max_cs_size
int max_cs_size
Maximum size (in bytes) for the whole codestream.
Definition: openjpeg.h:500
J2K_CP_CSTY_EPH
#define J2K_CP_CSTY_EPH
Definition: j2k.h:56
opj_j2k_tcp_data_destroy
static void opj_j2k_tcp_data_destroy(opj_tcp_t *p_tcp)
Destroys the data inside a tile coding parameter structure.
Definition: j2k.c:8457
opj_j2k_dec::m_last_sot_read_pos
OPJ_OFF_T m_last_sot_read_pos
Position of the last SOT marker read.
Definition: j2k.h:477
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:493
OPJ_RPCL
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:271
opj_image_comp::resno_decoded
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:657
opj_tcp::ppt_data_size
OPJ_UINT32 ppt_data_size
Number of bytes stored inside ppt_data.
Definition: j2k.h:268
opj_j2k_read_plm
static OPJ_BOOL opj_j2k_read_plm(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a PLM marker (Packet length, main header marker)
Definition: j2k.c:3662
opj_j2k_dec::m_state
OPJ_UINT32 m_state
locate in which part of the codestream the decoder is (main header, tile header, end)
Definition: j2k.h:459
opj_j2k_update_rates
static OPJ_BOOL opj_j2k_update_rates(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Updates the rates of the tcp.
Definition: j2k.c:5035
J2K_STATE_EOC
@ J2K_STATE_EOC
the decoding process has encountered the EOC marker
Definition: j2k.h:129
opj_j2k_initialise_4K_poc
static int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres)
Definition: j2k.c:6526
opj_j2k_mct_validation
static OPJ_BOOL opj_j2k_mct_validation(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
The mct encoding validation procedure.
Definition: j2k.c:7592
opj_codestream_index
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:997
opj_cp::rsiz
OPJ_UINT16 rsiz
Size of the image in bits.
Definition: j2k.h:351
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:444
opj_tcd_destroy
void opj_tcd_destroy(opj_tcd_t *tcd)
Destroy a previously created TCD handle.
Definition: tcd.c:673
opj_cparameters::prch_init
int prch_init[OPJ_J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:410
opj_j2k_update_image_dimensions
static OPJ_BOOL opj_j2k_update_image_dimensions(opj_image_t *p_image, opj_event_mgr_t *p_manager)
Definition: j2k.c:9229
opj_j2k_setup_decoding_tile
static OPJ_BOOL opj_j2k_setup_decoding_tile(opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
Sets up the procedures to do on decoding one tile.
Definition: j2k.c:10913
opj_j2k_write_first_tile_part
static OPJ_BOOL opj_j2k_write_first_tile_part(opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
Definition: j2k.c:11715
J2K_STATE_NONE
@ J2K_STATE_NONE
a SOC marker is expected
Definition: j2k.h:119
J2K_MS_CBD
#define J2K_MS_CBD
CBD marker value.
Definition: j2k.h:90
opj_j2k_create_cstr_index
static opj_codestream_index_t * opj_j2k_create_cstr_index(void)
Definition: j2k.c:9567
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:10528
opj_tccp::qntsty
OPJ_UINT32 qntsty
quantisation style
Definition: j2k.h:189
opj_j2k_enc::m_header_tile_data_size
OPJ_UINT32 m_header_tile_data_size
Definition: j2k.h:534
opj_tccp::qmfbid
OPJ_UINT32 qmfbid
discrete wavelet transform identifier
Definition: j2k.h:187
opj_j2k_write_updated_tlm
static OPJ_BOOL opj_j2k_write_updated_tlm(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the updated tlm.
Definition: j2k.c:11922
opj_j2k_decode_tiles
static OPJ_BOOL opj_j2k_decode_tiles(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads the tiles.
Definition: j2k.c:10668
opj_tcp
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: j2k.h:241
opj_tcp::tccps
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:274
opj_j2k::cstr_index
opj_codestream_index_t * cstr_index
helper used to write the index file
Definition: j2k.h:572
opj_j2k_allocate_tile_element_cstr_index
static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
Definition: j2k.c:10643
opj_j2k_create_decompress
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:9496
opj_tcp::ppt_len
OPJ_UINT32 ppt_len
size of ppt_data
Definition: j2k.h:270
opj_poc::compno1
OPJ_UINT32 compno1
Definition: openjpeg.h:329
opj_j2k_set_cinema_parameters
static void opj_j2k_set_cinema_parameters(opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
Definition: j2k.c:6545
opj_j2k_enc::m_encoded_tile_size
OPJ_UINT32 m_encoded_tile_size
Definition: j2k.h:528
J2K_CP_CSTY_PRT
#define J2K_CP_CSTY_PRT
Definition: j2k.h:54
opj_j2k_dec::m_nb_tile_parts_correction_checked
OPJ_BITFIELD m_nb_tile_parts_correction_checked
TNsot correction : see issue 254.
Definition: j2k.h:494
opj_tcp::ppt_markers_count
OPJ_UINT32 ppt_markers_count
number of ppt markers (reserved size)
Definition: j2k.h:259
opj_tccp_info::stepsizes_expn
OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:886
opj_j2k_read_mct
static OPJ_BOOL opj_j2k_read_mct(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a MCT marker (Multiple Component Transform)
Definition: j2k.c:5586
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:11162
opj_ppx
struct opj_ppx_struct opj_ppx
J2K_MCT_ELEMENT_TYPE
enum MCT_ELEMENT_TYPE J2K_MCT_ELEMENT_TYPE
Type of elements storing in the MCT data.
J2K_MS_MCT
#define J2K_MS_MCT
MCT marker value.
Definition: j2k.h:92
opj_j2k_read_int32_to_int32
static void opj_j2k_read_int32_to_int32(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1487
opj_tccp::cblksty
OPJ_UINT32 cblksty
code-block coding style
Definition: j2k.h:185
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:931
opj_marker_info::type
unsigned short int type
marker type
Definition: openjpeg.h:744
opj_int_max
static INLINE OPJ_INT32 opj_int_max(OPJ_INT32 a, OPJ_INT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:74
opj_get_tile_dimensions
static void opj_get_tile_dimensions(opj_image_t *l_image, opj_tcd_tilecomp_t *l_tilec, opj_image_comp_t *l_img_comp, OPJ_UINT32 *l_size_comp, OPJ_UINT32 *l_width, OPJ_UINT32 *l_height, OPJ_UINT32 *l_offset_x, OPJ_UINT32 *l_offset_y, OPJ_UINT32 *l_image_width, OPJ_UINT32 *l_stride, OPJ_UINT32 *l_tile_offset)
Definition: j2k.c:11396
opj_tcd_get_decoded_tile_size
OPJ_UINT32 opj_tcd_get_decoded_tile_size(opj_tcd_t *p_tcd, OPJ_BOOL take_into_account_partial_decoding)
Gets the maximum tile size that will be taken by the tile once decoded.
Definition: tcd.c:1314
opj_j2k_enc::m_current_poc_tile_part_number
OPJ_UINT32 m_current_poc_tile_part_number
Tile part number, regardless of poc, for each new poc, tp is reset to 1.
Definition: j2k.h:501
opj_j2k_read_mco
static OPJ_BOOL opj_j2k_read_mco(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a MCO marker (Multiple Component Transform Ordering)
Definition: j2k.c:6138
opj_j2k::m_num_threads
int m_num_threads
Number of threads to use.
Definition: j2k.h:581
opj_tcp::m_current_tile_part_number
OPJ_INT32 m_current_tile_part_number
current tile part number or -1 if first time into this tile
Definition: j2k.h:276
OPJ_OFF
@ OPJ_OFF
Definition: openjpeg.h:258
opj_cp::correct
OPJ_BOOL correct
enables JPWL correction at the decoder
Definition: j2k.h:439
opj_j2k_read_float64_to_float
static void opj_j2k_read_float64_to_float(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1453
EVT_INFO
#define EVT_INFO
Debug event type.
Definition: event.h:68
opj_cparameters::cp_disto_alloc
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:365
OPJ_CINEMA4K_24
@ OPJ_CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:261
opj_tccp
Tile-component coding parameters.
Definition: j2k.h:175
opj_tcd_tilecomp::data
OPJ_INT32 * data
Definition: tcd.h:204
OPJ_J2K_TH_IND
#define OPJ_J2K_TH_IND
Tile index based on the current tile.
Definition: openjpeg.h:175
OPJ_PROFILE_CINEMA_2K
#define OPJ_PROFILE_CINEMA_2K
Definition: openjpeg.h:198
opj_j2k_read_com
static OPJ_BOOL opj_j2k_read_com(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a COM marker (comments)
Definition: j2k.c:2533
OPJ_JP2_IND
#define OPJ_JP2_IND
JP2 file index.
Definition: openjpeg.h:178
j2k_dump_image_header
void j2k_dump_image_header(opj_image_t *img_header, OPJ_BOOL dev_dump_flag, FILE *out_stream)
Dump an image header structure.
Definition: j2k.c:10397
opj_poc::prcE
OPJ_UINT32 prcE
Definition: openjpeg.h:343
opj_tcd::tcd_image
opj_tcd_image_t * tcd_image
info on each image tile
Definition: tcd.h:263
opj_j2k_enc
Definition: j2k.h:499
opj_image_comp::w
OPJ_UINT32 w
data width
Definition: openjpeg.h:643
opj_ppx_struct::m_data_size
OPJ_UINT32 m_data_size
Definition: j2k.h:233
opj_tcp::distoratio
OPJ_FLOAT32 distoratio[100]
add fixed_quality
Definition: j2k.h:272
opj_tp_index::start_pos
OPJ_OFF_T start_pos
start position
Definition: openjpeg.h:954
opj_j2k_dump_MH_index
static void opj_j2k_dump_MH_index(opj_j2k_t *p_j2k, FILE *out_stream)
Definition: j2k.c:10313
j2k_prog_order
Definition: j2k.c:1304
opj_cp::epc_on
OPJ_BOOL epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: j2k.h:405
OPJ_BITFIELD
unsigned int OPJ_BITFIELD
Definition: opj_includes.h:217
opj_j2k_write_float_to_float
static void opj_j2k_write_float_to_float(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1572
opj_cparameters::roi_shift
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:404
opj_thread_pool_create
opj_thread_pool_t * opj_thread_pool_create(int num_threads)
Create a new thread pool.
Definition: thread.c:625
MCT_ELEMENT_SIZE
static const OPJ_UINT32 MCT_ELEMENT_SIZE[]
FIXME DOC.
Definition: j2k.c:1321
opj_cp::sens_size
int sens_size
enables writing of ESD, (0/2/4 bytes)
Definition: j2k.h:427
opj_cparameters::cblockw_init
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:394
opj_tcd_create
opj_tcd_t * opj_tcd_create(OPJ_BOOL p_is_decoder)
Create a new TCD handle.
Definition: tcd.c:202
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:671
OPJ_MCT
@ OPJ_MCT
Profile name for a 4K image.
Definition: openjpeg.h:250
opj_cp::hprot_TPH
int hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: j2k.h:419
opj_j2k_init_info
static OPJ_BOOL opj_j2k_init_info(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Inits the Info.
Definition: j2k.c:12012
opj_uint_ceildivpow2
static INLINE OPJ_UINT32 opj_uint_ceildivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:198
opj_dparameters
Decompression parameters.
Definition: openjpeg.h:512
j2k_destroy_cstr_index
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:8347
opj_j2k_get_max_poc_size
static OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k)
Gets the maximum size taken by the writing of a POC.
Definition: j2k.c:3397
opj_j2k_enc_t
struct opj_j2k_enc opj_j2k_enc_t
opj_write_float
#define opj_write_float
Definition: cio.h:68
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:941
opj_tcp::m_nb_tile_parts
OPJ_UINT32 m_nb_tile_parts
number of tile parts for the tile.
Definition: j2k.h:278
opj_image::comps
opj_image_comp_t * comps
image components
Definition: openjpeg.h:683
opj_int_ceildiv
static INLINE OPJ_INT32 opj_int_ceildiv(OPJ_INT32 a, OPJ_INT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:160
opj_codestream_index::marker
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:1010
opj_tcd_tile::packno
OPJ_UINT32 packno
Definition: tcd.h:236
opj_j2k_pre_write_tile
static OPJ_BOOL opj_j2k_pre_write_tile(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_index, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Definition: j2k.c:11369
j2k_dump_image_header
void j2k_dump_image_header(opj_image_t *image, OPJ_BOOL dev_dump_flag, FILE *out_stream)
Dump an image header structure.
Definition: j2k.c:10397
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
FINAL_PASS
@ FINAL_PASS
Function called in Rate allocation process.
Definition: j2k.h:159
opj_tccp_t
struct opj_tccp opj_tccp_t
Tile-component coding parameters.
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
Index structure of the codestream.
Definition: openjpeg.h:811
opj_tcd_tilecomp::y1
OPJ_INT32 y1
Definition: tcd.h:191
MCT_TYPE_INT32
@ MCT_TYPE_INT32
MCT data is stored as signed shorts.
Definition: j2k.h:138
opj_tile_v2_info::numlayers
OPJ_UINT32 numlayers
number of layers
Definition: openjpeg.h:910
opj_alloc_tile_component_data
OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec)
Allocates tile component data.
Definition: tcd.c:689
opj_cp::ppm_previous
OPJ_INT32 ppm_previous
use in case of multiple marker PPM (case on non-finished previous info)
Definition: j2k.h:390
opj_tcp::m_mct_records
opj_mct_data_t * m_mct_records
mct records
Definition: j2k.h:290
opj_image_comp::bpp
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:653
opj_j2k_read_int32_to_float
static void opj_j2k_read_int32_to_float(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1419
opj_tcp_t
struct opj_tcp opj_tcp_t
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
opj_tccp::numgbits
OPJ_UINT32 numgbits
number of guard bits
Definition: j2k.h:193
opj_tile_index::tileno
OPJ_UINT32 tileno
tile index
Definition: openjpeg.h:967
opj_tcp::mct_norms
OPJ_FLOAT64 * mct_norms
encoding norms
Definition: j2k.h:284
opj_dparameters::jpwl_max_tiles
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:566
opj_read_bytes
#define opj_read_bytes
Definition: cio.h:65
opj_tcd::cur_totnum_tp
OPJ_UINT32 cur_totnum_tp
Total number of tileparts of the current tile.
Definition: tcd.h:259
opj_decoding_param::m_reduce
OPJ_UINT32 m_reduce
if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decoded to the ...
Definition: j2k.h:337
EVT_ERROR
#define EVT_ERROR
Error event type.
Definition: event.h:66
opj_cp::tw
OPJ_UINT32 tw
number of tiles in width
Definition: j2k.h:363
opj_mct_data::m_element_type
J2K_MCT_ELEMENT_TYPE m_element_type
Definition: j2k.h:211
OPJ_UINT32
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
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:11047
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:659
opj_tcp::m_data
OPJ_BYTE * m_data
data for the tile
Definition: j2k.h:280
opj_j2k_compare_coc
static OPJ_BOOL opj_j2k_compare_coc(opj_j2k_t *p_j2k, OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
Compares 2 COC markers (Coding style component)
Definition: j2k.c:2807
opj_cparameters::image_offset_x0
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:423
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:10261
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:639
opj_j2k_get_num_tp
static OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno)
Gets the number of tile parts used for the given change of progression (if any) and the given tile.
Definition: j2k.c:1722
opj_cparameters::tp_on
char tp_on
Tile part generation.
Definition: openjpeg.h:484
opj_j2k::enumcs
OPJ_UINT32 enumcs
Definition: j2k.h:588
opj_cparameters::mode
int mode
mode switch (cblk_style)
Definition: openjpeg.h:398
opj_j2k_read_crg
static OPJ_BOOL opj_j2k_read_crg(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a CRG marker (Component registration)
Definition: j2k.c:3559
opj_j2k_get_SQcd_SQcc_size
static OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no)
Gets the size taken by writing SQcd or SQcc element, i.e.
Definition: j2k.c:9906
opj_cp::ty0
OPJ_UINT32 ty0
YTOsiz.
Definition: j2k.h:355
opj_simple_mcc_decorrelation_data::m_decorrelation_array
opj_mct_data_t * m_decorrelation_array
Definition: j2k.h:225
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:6756
opj_mct_data_t
struct opj_mct_data opj_mct_data_t
FIXME DOC.
opj_cparameters::jpwl_pprot_packno
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:450
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:10989
opj_j2k_dec::m_start_tile_x
OPJ_UINT32 m_start_tile_x
Only tiles index in the correct range will be decoded.
Definition: j2k.h:469
opj_codestream_index::codestream_size
OPJ_UINT64 codestream_size
codestream's size
Definition: openjpeg.h:1004
opj_j2k::m_encoder
opj_j2k_enc_t m_encoder
Definition: j2k.h:552
opj_j2k_get_default_stride
static OPJ_FLOAT32 opj_j2k_get_default_stride(opj_tcp_t *p_tcp)
Definition: j2k.c:5029
J2K_STATE_MHSIZ
@ J2K_STATE_MHSIZ
a SIZ marker is expected
Definition: j2k.h:121
opj_j2k_cp_destroy
static void opj_j2k_cp_destroy(opj_cp_t *p_cp)
Destroys a coding parameter structure.
Definition: j2k.c:8466
opj_tile_v2_info::csty
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:906
opj_cparameters::cp_tdy
int cp_tdy
YTsiz.
Definition: openjpeg.h:363
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:8617
opj_tile_v2_info::mct
OPJ_UINT32 mct
multi-component transform identifier
Definition: openjpeg.h:912
OPJ_CINEMA_48_CS
#define OPJ_CINEMA_48_CS
Definition: openjpeg.h:232
opj_tile_index::tp_index
opj_tp_index_t * tp_index
information concerning tile parts
Definition: openjpeg.h:976
opj_cparameters::csty
int csty
csty : coding style
Definition: openjpeg.h:375
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:12106
opj_encoding_param::m_matrice
OPJ_INT32 * m_matrice
fixed layer
Definition: j2k.h:321
opj_j2k_end_encoding
static OPJ_BOOL opj_j2k_end_encoding(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Ends the encoding, i.e.
Definition: j2k.c:11955
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:112
opj_cp::m_is_decoder
OPJ_BITFIELD m_is_decoder
tells if the parameter is a coding or decoding one
Definition: j2k.h:450
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:10261
opj_codestream_info_v2::th
OPJ_UINT32 th
number of tiles in Y
Definition: openjpeg.h:935
opj_poc::prg1
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:333
opj_tcd_tile::y0
OPJ_INT32 y0
Definition: tcd.h:230
opj_tp_index
Index structure about a tile part.
Definition: openjpeg.h:952
opj_tcp::m_data_size
OPJ_UINT32 m_data_size
size of data
Definition: j2k.h:282
opj_encoding_param::m_disto_alloc
OPJ_BITFIELD m_disto_alloc
allocation by rate/distortion
Definition: j2k.h:325
opj_decoding_param_t
struct opj_decoding_param opj_decoding_param_t
opj_j2k_copy_default_tcp_and_create_tcd
static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Copies the decoding tile parameters onto all the tile parameters.
Definition: j2k.c:8115
opj_j2k_read_mcc
static OPJ_BOOL opj_j2k_read_mcc(opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
Reads a MCC marker (Multiple Component Collection)
Definition: j2k.c:5834
opj_copy_image_header
void opj_copy_image_header(const opj_image_t *p_image_src, opj_image_t *p_image_dest)
Copy only header of image and its component header (no data are copied) if dest image have data,...
Definition: image.c:165
OPJ_INT16
int16_t OPJ_INT16
Definition: openjpeg.h:123
OPJ_LRCP
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:269
j2k_memory_marker_handler_tab
static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab[]
Definition: j2k.c:1365
opj_j2k_destroy
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:8277
opj_dec_memory_marker_handler
Definition: j2k.c:1352
opj_j2k_get_sot_values
static OPJ_BOOL opj_j2k_get_sot_values(OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, OPJ_UINT32 *p_tile_no, OPJ_UINT32 *p_tot_len, OPJ_UINT32 *p_current_part, OPJ_UINT32 *p_num_parts, opj_event_mgr_t *p_manager)
Reads values from a SOT marker (Start of tile-part)
Definition: j2k.c:4266
opj_j2k_write_float_to_int16
static void opj_j2k_write_float_to_int16(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1538
opj_tccp::cblkh
OPJ_UINT32 cblkh
code-blocks height
Definition: j2k.h:183
opj_j2k_read_int16_to_int32
static void opj_j2k_read_int16_to_int32(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1470
opj_tcd_resolution::win_y1
OPJ_UINT32 win_y1
Definition: tcd.h:185
opj_cparameters::cp_rsiz
OPJ_RSIZ_CAPABILITIES cp_rsiz
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.
Definition: openjpeg.h:482
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:7491
opj_simple_mcc_decorrelation_data
FIXME DOC.
Definition: j2k.h:222
opj_image_comp_header_update
void opj_image_comp_header_update(opj_image_t *p_image_header, const struct opj_cp *p_cp)
Updates the components characteristics of the image from the coding parameters.
Definition: image.c:122
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:8617
opj_write_bytes
#define opj_write_bytes
Definition: cio.h:64
opj_poc::layno1
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:329
opj_tcp::cod
OPJ_BITFIELD cod
If cod == 1 --> there was a COD marker for the present tile.
Definition: j2k.h:305
OPJ_EXTENSION_MCT
#define OPJ_EXTENSION_MCT
Definition: openjpeg.h:217
opj_poc::tile
OPJ_UINT32 tile
Tile number.
Definition: openjpeg.h:337
opj_pi_update_encoding_parameters
void opj_pi_update_encoding_parameters(const opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no)
Updates the encoding parameters of the codec.
Definition: pi.c:2074
opj_j2k_dec::m_default_tcp
opj_tcp_t * m_default_tcp
store decoding parameters common to all tiles (information like COD, COC in main header)
Definition: j2k.h:463
opj_tcd::tp_num
OPJ_UINT32 tp_num
Tile part number.
Definition: tcd.h:255
opj_tccp_info::cblkh
OPJ_UINT32 cblkh
log2 of code-blocks height
Definition: openjpeg.h:876
opj_j2k_encode
OPJ_BOOL opj_j2k_encode(opj_j2k_t *p_j2k, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Encodes an image into a JPEG-2000 codestream.
Definition: j2k.c:11193
opj_cparameters::prcw_init
int prcw_init[OPJ_J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:408
opj_j2k::m_private_image
opj_image_t * m_private_image
pointer to the internal/private encoded / decoded image
Definition: j2k.h:557
opj_cparameters::numpocs
OPJ_UINT32 numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:381
opj_j2k_write_cod
static OPJ_BOOL opj_j2k_write_cod(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the COD marker (Coding style default)
Definition: j2k.c:2552
opj_poc::resno1
OPJ_UINT32 resno1
Definition: openjpeg.h:329
opj_j2k_dec::m_end_tile_y
OPJ_UINT32 m_end_tile_y
Definition: j2k.h:472
J2K_MS_MCC
#define J2K_MS_MCC
MCC marker value.
Definition: j2k.h:91
MCT_ELEMENT_TYPE
MCT_ELEMENT_TYPE
Type of elements storing in the MCT data.
Definition: j2k.h:136
J2K_CCP_QNTSTY_SIQNT
#define J2K_CCP_QNTSTY_SIQNT
Definition: j2k.h:65
opj_tcp::m_mcc_records
opj_simple_mcc_decorrelation_data_t * m_mcc_records
mcc records
Definition: j2k.h:296
J2K_CCP_QNTSTY_NOQNT
#define J2K_CCP_QNTSTY_NOQNT
Definition: j2k.h:64
opj_tile_index::marknum
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:980
J2K_MS_COD
#define J2K_MS_COD
COD marker value.
Definition: j2k.h:75
opj_tccp::csty
OPJ_UINT32 csty
coding style
Definition: j2k.h:177
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:669
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:446
opj_poc::resno0
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:327
opj_tcd_init_decode_tile
OPJ_BOOL opj_tcd_init_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, opj_event_mgr_t *p_manager)
Allocates memory for decoding a specific tile.
Definition: tcd.c:1197
J2K_MS_POC
#define J2K_MS_POC
POC marker value.
Definition: j2k.h:80
opj_cparameters::jpwl_epc_on
OPJ_BOOL jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:440
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:10452
opj_cparameters::jpwl_hprot_MH
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:442
opj_poc
Progression order changes.
Definition: openjpeg.h:325
opj_tcd_tile::comps
opj_tcd_tilecomp_t * comps
Definition: tcd.h:232
J2K_MS_CRG
#define J2K_MS_CRG
CRG marker value.
Definition: j2k.h:88
opj_marker_info
Marker structure.
Definition: openjpeg.h:742
opj_dec_memory_marker_handler::id
OPJ_UINT32 id
marker value
Definition: j2k.c:1354
opj_j2k_dec::m_tile_ind_to_dec
OPJ_INT32 m_tile_ind_to_dec
Index of the tile to decode (used in get_tile)
Definition: j2k.h:475
J2K_STATE_NEOC
@ J2K_STATE_NEOC
the decoding process must not expect a EOC marker because the codestream is truncated
Definition: j2k.h:126
opj_stream_read_data
OPJ_SIZE_T opj_stream_read_data(opj_stream_private_t *p_stream, OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t *p_event_mgr)
Reads some bytes from the stream.
Definition: cio.c:281
opj_tcd_get_encoded_tile_size
OPJ_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd)
Definition: tcd.c:2353
opj_cparameters::cp_matrice
int * cp_matrice
fixed layer
Definition: openjpeg.h:371
opj_j2k_convert_progression_order
const char * opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order)
Converts an enum type progression order to string type.
Definition: j2k.c:1606
opj_codestream_info_v2::tdx
OPJ_UINT32 tdx
tile size in x = XTsiz
Definition: openjpeg.h:929
opj_j2k_read_soc
static OPJ_BOOL opj_j2k_read_soc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Reads a SOC marker (Start of Codestream)
Definition: j2k.c:1900
opj_cp::sens_addr
int sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: j2k.h:429
opj_j2k_write_sot
static OPJ_BOOL opj_j2k_write_sot(opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 p_total_data_size, OPJ_UINT32 *p_data_written, const opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the SOT marker (Start of tile-part)
Definition: j2k.c:4206
opj_j2k_dec::m_header_data_size
OPJ_UINT32 m_header_data_size
Definition: j2k.h:465
opj_int_ceildivpow2
static INLINE OPJ_INT32 opj_int_ceildivpow2(OPJ_INT32 a, OPJ_INT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:180
opj_tccp_info::numresolutions
OPJ_UINT32 numresolutions
number of resolutions
Definition: openjpeg.h:872
opj_thread_pool_t
Definition: thread.c:605
opj_j2k_build_encoder
static OPJ_BOOL opj_j2k_build_encoder(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Builds the tcd encoder to use to encode tile.
Definition: j2k.c:7803
opj_tcd
Tile coder/decoder.
Definition: tcd.h:251
opj_j2k_write_regions
static OPJ_BOOL opj_j2k_write_regions(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes regions of interests.
Definition: j2k.c:5380
opj_cp::m_specific_param
union opj_cp::@0 m_specific_param
J2K_MS_QCD
#define J2K_MS_QCD
QCD marker value.
Definition: j2k.h:78
J2K_MS_EPB
#define J2K_MS_EPB
EPB marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:100
opj_j2k_post_write_tile
static OPJ_BOOL opj_j2k_post_write_tile(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Definition: j2k.c:11521
J2K_MS_SOD
#define J2K_MS_SOD
SOD marker value.
Definition: j2k.h:72
opj_j2k_dec
Definition: j2k.h:457
opj_tcd_resolution::win_y0
OPJ_UINT32 win_y0
Definition: tcd.h:183
opj_procedure
void(* opj_procedure)(void)
declare a function pointer
Definition: function_list.h:52
opj_cp::sens_range
int sens_range
sensitivity range (0-3)
Definition: j2k.h:431
opj_cparameters::max_comp_size
int max_comp_size
Maximum size (in bytes) for each component.
Definition: openjpeg.h:477
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:9341
opj_j2k_write_soc
static OPJ_BOOL opj_j2k_write_soc(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Writes the SOC marker (Start Of Codestream)
Definition: j2k.c:1860
opj_tcd_resolution::win_x1
OPJ_UINT32 win_x1
Definition: tcd.h:184
opj_j2k_build_decoder
static OPJ_BOOL opj_j2k_build_decoder(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
Builds the tcd decoder to use to decode tile.
Definition: j2k.c:7791