Go to the documentation of this file.
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
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
99 #define J2K_MS_EPC 0xff68
100 #define J2K_MS_EPB 0xff66
101 #define J2K_MS_ESD 0xff67
102 #define J2K_MS_RED 0xff69
105 #define J2K_MS_SEC 0xff65
106 #define J2K_MS_INSEC 0xff94
110 #define J2K_MAX_POCS 32
#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:146
static void opj_j2k_dump_MH_info(opj_j2k_t *p_j2k, FILE *out_stream)
Definition: j2k.c:10384
opj_procedure_list_t * m_procedure_list
the list of procedures to exec
Definition: j2k.h:566
OPJ_UINT32 cblkw
log2 of code-blocks width
Definition: openjpeg.h:874
#define opj_read_double
Definition: cio.h:67
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_UINT32 * m_comps_indices_to_decode
Definition: j2k.h:487
OPJ_UINT32 num_layers_to_decode
Definition: j2k.h:248
OPJ_BOOL ownsData
Definition: tcd.h:206
OPJ_UINT32 compE
Definition: openjpeg.h:343
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:675
unsigned char OPJ_BYTE
Definition: openjpeg.h:117
OPJ_BITFIELD m_fixed_quality
add fixed_quality
Definition: j2k.h:329
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
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
float OPJ_FLOAT32
Definition: openjpeg.h:115
static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t *p_tcd, opj_image_t *p_output_image)
Definition: j2k.c:9012
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_BOOL jpwl_correct
activates the JPWL correction capabilities
Definition: openjpeg.h:562
OPJ_BYTE * m_header_data
Definition: j2k.h:464
opj_j2k_dec_t m_decoder
Definition: j2k.h:551
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
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
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_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_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_FLOAT32 * m_mct_coding_matrix
the mct coding matrix
Definition: j2k.h:288
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
int hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: j2k.h:415
OPJ_PROG_ORDER prg
progression order
Definition: j2k.h:245
OPJ_BYTE * m_data
Definition: j2k.h:232
OPJ_BITFIELD m_fixed_alloc
allocation by fixed layer
Definition: j2k.h:327
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
OPJ_UINT32 cur_pino
Current Packet iterator number.
Definition: tcd.h:261
#define OPJ_EXTENSION_NONE
JPEG 2000 Part-2 extensions.
Definition: openjpeg.h:216
float tcp_rates[100]
rates of layers - might be subsequently limited by the max_cs_size field.
Definition: openjpeg.h:387
OPJ_UINT32 m_index
Definition: j2k.h:213
opj_image_t * image
image header
Definition: tcd.h:265
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:641
OPJ_UINT32 m_data_size
Definition: j2k.h:215
opj_poc_t pocs[J2K_MAX_POCS]
progression order changes
Definition: j2k.h:256
OPJ_UINT32 nb_of_tiles
Definition: openjpeg.h:1016
void opj_dwt_calc_explicit_stepsizes(opj_tccp_t *tccp, OPJ_UINT32 prec)
Explicit calculation of the Quantization Stepsizes.
Definition: dwt.c:1280
void opj_thread_pool_destroy(opj_thread_pool_t *tp)
Destroy a thread pool.
Definition: thread.c:919
OPJ_BYTE m_tp_flag
Flag determining tile part generation.
Definition: j2k.h:323
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
#define OPJ_COMMON_CBLK_DATA_EXTRA
Margin for a fake FFFF marker.
Definition: opj_common.h:39
OPJ_API int OPJ_CALLCONV opj_get_num_cpus(void)
Return the number of virtual CPUs.
Definition: thread.c:438
OPJ_CHAR * comment
comment
Definition: j2k.h:361
OPJ_UINT32 states
value of the state when the marker can appear
Definition: j2k.c:1356
OPJ_INT32 roishift
Region Of Interest shift.
Definition: j2k.h:195
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:215
#define J2K_MAX_POCS
Maximum number of POCs.
Definition: j2k.h:110
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
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_mct_data_t * m_offset_array
Definition: j2k.h:226
#define J2K_MS_ESD
ESD marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:101
OPJ_OFF_T main_head_start
main header start position (SOC position)
Definition: openjpeg.h:999
OPJ_UINT32 numresolutions
number of resolutions
Definition: j2k.h:179
OPJ_BYTE * m_encoded_tile_data
Definition: j2k.h:525
struct opj_tcd * m_tcd
the current tile coder/decoder
Definition: j2k.h:578
opj_cp_t m_cp
Coding parameters.
Definition: j2k.h:563
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
struct opj_j2k opj_j2k_t
JPEG-2000 codestream reader/writer.
#define opj_write_double
Definition: cio.h:66
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
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
static INLINE OPJ_INT32 opj_int_min(OPJ_INT32 a, OPJ_INT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:56
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:8277
OPJ_BITFIELD m_can_decode
to tell that a tile can be decoded.
Definition: j2k.h:490
OPJ_INT32 x0
Definition: tcd.h:173
static OPJ_FLOAT32 opj_j2k_get_tp_stride(opj_tcp_t *p_tcp)
Definition: j2k.c:5024
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
#define J2K_MS_PLT
PLT marker value.
Definition: j2k.h:83
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
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_encoding_param_t m_enc
Definition: j2k.h:397
@ OPJ_CINEMA2K_48
2K Digital Cinema at 24 fps
Definition: openjpeg.h:260
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
unsigned int dump_state
Definition: j2k.h:589
int cp_tx0
XTOsiz.
Definition: openjpeg.h:357
OPJ_INT32 y1
Definition: tcd.h:173
JPEG-2000 codestream reader/writer.
Definition: j2k.h:545
#define OPJ_DPARAMETERS_DUMP_FLAG
Definition: openjpeg.h:507
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
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
J2K_MCT_ARRAY_TYPE m_array_type
Definition: j2k.h:212
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_INT32 x1
Definition: tcd.h:173
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:677
J2K_STATUS
Values that specify the status of the decoding process when decoding the main header.
Definition: j2k.h:118
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
int tcp_numlayers
number of layers
Definition: openjpeg.h:383
#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
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_UINT32 max_tiles
maximum number of tiles at the decoder
Definition: j2k.h:443
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_INT32 m_tp_pos
Position of tile part flag in progression order.
Definition: j2k.h:319
OPJ_BITFIELD m_is_irreversible
Definition: j2k.h:227
OPJ_UINT32 qntsty
quantisation style
Definition: openjpeg.h:882
void opj_procedure_list_destroy(opj_procedure_list_t *p_list)
Destroys a validation list.
Definition: function_list.c:58
OPJ_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6431
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:679
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:170
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_UINT32 current_nb_tps
current nb of tile part (allocated)
Definition: openjpeg.h:972
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_API OPJ_BOOL OPJ_CALLCONV opj_has_thread_support(void)
Returns if the library is built with thread support.
Definition: thread.c:433
OPJ_UINT32 m_sot_length
to tell the tile part length
Definition: j2k.h:467
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_OFF_T end_pos
end position
Definition: openjpeg.h:958
int subsampling_dy
subsampling value for dy
Definition: openjpeg.h:429
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_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
float tcp_distoratio[100]
different psnr for successive layers.
Definition: openjpeg.h:390
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
the EOC marker has just been read
Definition: j2k.h:125
#define SIZE_MAX
Definition: opj_malloc.c:40
#define OPJ_CINEMA_48_COMP
Definition: openjpeg.h:234
#define OPJ_J2K_TH_INFO
Tile information based on the current tile header.
Definition: openjpeg.h:172
OPJ_INT32 * data
image component data
Definition: openjpeg.h:661
#define OPJ_IS_IMF(v)
Definition: openjpeg.h:225
int pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: j2k.h:421
@ THRESH_CALC
Definition: j2k.h:158
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
#define OPJ_PROFILE_CINEMA_S4K
Definition: openjpeg.h:201
OPJ_UINT32 ppm_len
size of the ppm_data
Definition: j2k.h:375
#define OPJ_J2K_TCH_INFO
Tile/Component information of all tiles.
Definition: openjpeg.h:173
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_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
a SOC marker is expected
Definition: j2k.h:120
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
static const j2k_prog_order_t j2k_prog_order_list[]
Definition: j2k.c:1309
int64_t OPJ_INT64
Definition: openjpeg.h:127
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
union opj_j2k::@1 m_specific_param
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
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
int cblockh_init
initial code block height, default to 64
Definition: openjpeg.h:396
static const opj_j2k_mct_function j2k_mct_read_functions_to_float[]
Definition: j2k.c:1331
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_BITFIELD ppt
If ppt == 1 --> there was a PPT marker for the present tile.
Definition: j2k.h:307
OPJ_BYTE * m_tlm_sot_offsets_buffer
Stores the sizes of the tlm.
Definition: j2k.h:514
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
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
#define OPJ_PROFILE_CINEMA_4K
Definition: openjpeg.h:199
#define J2K_MS_PPT
PPT marker value.
Definition: j2k.h:85
int sens_MH
sensitivity method for MH (-1,0-7)
Definition: j2k.h:433
@ OPJ_CINEMA4K
Profile name for a 2K image.
Definition: openjpeg.h:249
OPJ_UINT16 rsiz
RSIZ value To be used to combine OPJ_PROFILE_*, OPJ_EXTENSION_* and (sub)levels values.
Definition: openjpeg.h:503
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
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_BOOL info_on
enables writing of informative techniques of ESD, in case of activated JPWL
Definition: j2k.h:411
#define OPJ_J2K_DEFAULT_HEADER_SIZE
Definition: openjpeg.h:151
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:984
#define J2K_MS_COC
COC marker value.
Definition: j2k.h:76
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_BYTE * ppm_buffer
packet header storage original buffer
Definition: j2k.h:382
OPJ_UINT32 m_nb_mcc_records
the number of mct records.
Definition: j2k.h:298
OPJ_UINT32 ihdr_h
Definition: j2k.h:587
OPJ_BYTE * m_data
Definition: j2k.h:214
OPJ_UINT32 m_index
Definition: j2k.h:223
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
int res_spec
Definition: openjpeg.h:406
OPJ_UINT32 m_end_tile_x
Definition: j2k.h:471
@ OPJ_CINEMA2K
Standard JPEG2000 profile.
Definition: openjpeg.h:248
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_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
int cp_fixed_quality
add fixed_quality
Definition: openjpeg.h:369
#define J2K_MS_SEC
SEC marker value (Part 8: Secure JPEG 2000)
Definition: j2k.h:105
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
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
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
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
Definition: query_parser.h:41
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
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_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_BYTE * ppt_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:264
int64_t OPJ_OFF_T
Definition: openjpeg.h:130
#define J2K_MS_SOP
SOP marker value.
Definition: j2k.h:86
OPJ_BITFIELD ppm
if ppm == 1 --> there was a PPM marker
Definition: j2k.h:448
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_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_BOOL red_on
enables writing of RED, in case of activated JPWL
Definition: j2k.h:413
int exp_comps
expected number of components at the decoder
Definition: j2k.h:441
#define J2K_MS_INSEC
INSEC marker value (Part 8: Secure JPEG 2000)
Definition: j2k.h:106
int jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: openjpeg.h:462
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:270
OPJ_FLOAT32 rates[100]
rates of layers
Definition: j2k.h:252
OPJ_INT32 x1
Definition: tcd.h:191
@ MCT_TYPE_DEPENDENCY
Definition: j2k.h:147
Message handler object used for.
Definition: event.h:50
#define OPJ_J2K_MCC_DEFAULT_NB_RECORDS
Definition: openjpeg.h:152
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:9496
opj_tccp_info_t * tccp_info
information concerning tile component parameters
Definition: openjpeg.h:915
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
static const opj_j2k_mct_function j2k_mct_write_functions_from_float[]
Definition: j2k.c:1345
#define J2K_CCP_QNTSTY_SEQNT
Definition: j2k.h:66
@ OPJ_STD_RSIZ
Definition: openjpeg.h:247
OPJ_UINT32 cp_layer
Set the maximum number of quality layers to decode.
Definition: openjpeg.h:527
enum MCT_ARRAY_TYPE J2K_MCT_ARRAY_TYPE
Type of MCT array.
OPJ_BITFIELD m_nb_tile_parts_correction
Definition: j2k.h:495
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_packet_info_t * packet_index
information concerning packets inside tile
Definition: openjpeg.h:990
#define OPJ_IS_BROADCAST(v)
Definition: openjpeg.h:224
int sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1,0-7)
Definition: j2k.h:437
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_BITFIELD allow_different_bit_depth_sign
whether different bit depth or sign per component is allowed.
Definition: j2k.h:452
OPJ_INT32 m_dc_level_shift
the dc_level_shift
Definition: j2k.h:201
char * cp_comment
comment for coding
Definition: openjpeg.h:373
OPJ_BYTE * ppm_data_first
pointer remaining on the first byte of the first header if ppm is used
Definition: j2k.h:384
char str_prog[5]
Definition: j2k.c:1306
OPJ_UINT32 cur_tp_num
Current tile part number.
Definition: tcd.h:257
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6479
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
int jpwl_sens_size
enables writing of ESD, (0=no/1/2 bytes)
Definition: openjpeg.h:454
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_PROG_ORDER prog_order
progression order (default OPJ_LRCP)
Definition: openjpeg.h:377
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_UINT32 m_max_comp_size
Maximum rate for each component.
Definition: j2k.h:317
static void opj_j2k_dump_tile_info(opj_tcp_t *l_default_tile, OPJ_INT32 numcomps, FILE *out_stream)
Definition: j2k.c:10208
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
Defines a single image component.
Definition: openjpeg.h:637
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
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_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_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
void opj_calculate_norms(OPJ_FLOAT64 *pNorms, OPJ_UINT32 pNbComps, OPJ_FLOAT32 *pMatrix)
FIXME DOC.
Definition: mct.c:547
OPJ_OFF_T main_head_end
main header end position (first SOT position)
Definition: openjpeg.h:1001
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
#define J2K_MS_EPC
EPC marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:99
OPJ_UINT32 ppm_data_read
size of the ppm_data
Definition: j2k.h:377
Byte input-output stream.
Definition: cio.h:81
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:273
opj_tcd_resolution_t * resolutions
Definition: tcd.h:199
OPJ_UINT32 m_nb_max_mct_records
the max number of mct records.
Definition: j2k.h:294
static void opj_j2k_get_tile_data(opj_tcd_t *p_tcd, OPJ_BYTE *p_data)
Definition: j2k.c:11432
int pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: j2k.h:423
#define OPJ_J2K_MAXBANDS
Number of maximum sub-band linked to number of resolution level.
Definition: openjpeg.h:147
OPJ_OFF_T end_header
end position of the header
Definition: openjpeg.h:956
int jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]
tile number of packet protection specification (>=0)
Definition: openjpeg.h:448
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_UINT32 qmfbid
discrete wavelet transform identifier: 0 = 9-7 irreversible, 1 = 5-3 reversible
Definition: openjpeg.h:880
@ MCT_TYPE_DOUBLE
MCT data is stored as floats.
Definition: j2k.h:140
OPJ_UINT32 m_nb_max_mcc_records
the max number of mct records.
Definition: j2k.h:300
double OPJ_FLOAT64
Definition: openjpeg.h:116
Coding parameters.
Definition: j2k.h:347
opj_stepsize_t stepsizes[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: j2k.h:191
OPJ_UINT32 nb_packet
packet number
Definition: openjpeg.h:988
OPJ_INT32 x0
Definition: tcd.h:191
#define OPJ_CINEMA_24_COMP
Definition: openjpeg.h:233
Index structure about a tile.
Definition: openjpeg.h:965
@ J2K_STATE_MH
the decoding process is in the main header
Definition: j2k.h:122
OPJ_UINT32 cblksty
code-block coding style
Definition: openjpeg.h:878
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_BITFIELD m_discard_tiles
Definition: j2k.h:491
int numresolution
number of resolutions
Definition: openjpeg.h:392
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_UINT32 m_nb_comps
Definition: j2k.h:224
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
int jpwl_exp_comps
expected number of components
Definition: openjpeg.h:564
OPJ_UINT32 csty
coding style
Definition: j2k.h:243
Compression parameters.
Definition: openjpeg.h:353
OPJ_UINT32 m_current_tile_number
number of the tile currently concern by coding/decoding
Definition: j2k.h:575
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_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_UINT32 m_start_tile_y
Definition: j2k.h:470
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_PROG_ORDER prg
progression order
Definition: openjpeg.h:908
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:8347
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
#define J2K_MS_PPM
PPM marker value.
Definition: j2k.h:84
static const opj_j2k_mct_function j2k_mct_read_functions_to_int32[]
Definition: j2k.c:1338
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
struct opj_simple_mcc_decorrelation_data opj_simple_mcc_decorrelation_data_t
FIXME DOC.
@ OPJ_CINEMA2K_24
Not Digital Cinema.
Definition: openjpeg.h:259
opj_image_t * m_output_image
Definition: j2k.h:560
OPJ_BOOL esd_on
enables writing of ESD, in case of activated JPWL
Definition: j2k.h:409
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
int cp_tdx
XTsiz.
Definition: openjpeg.h:361
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_INT32 x1
Definition: tcd.h:230
Quantization stepsize.
Definition: j2k.h:165
opj_marker_info_t * marker
list of markers
Definition: openjpeg.h:982
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
int hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: j2k.h:417
#define EVT_WARNING
Warning event type.
Definition: event.h:67
OPJ_INT32 ppm_store
use in case of multiple marker PPM (number of info already store)
Definition: j2k.h:388
int irreversible
1 : use the irreversible DWT 9-7, 0 : use lossless compression (default)
Definition: openjpeg.h:400
#define OPJ_IS_STORAGE(v)
Definition: openjpeg.h:223
OPJ_UINT32 ihdr_w
Definition: j2k.h:586
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_BOOL whole_tile_decoding
Only valid for decoding.
Definition: tcd.h:282
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_BOOL opj_j2k_set_threads(opj_j2k_t *j2k, OPJ_UINT32 num_threads)
Definition: j2k.c:6431
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_UINT32 tdy
YTsiz.
Definition: j2k.h:359
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_UINT32 tx0
XTOsiz.
Definition: j2k.h:353
OPJ_BOOL m_is_decoder
Definition: j2k.h:547
#define J2K_MS_TLM
TLM marker value.
Definition: j2k.h:81
OPJ_UINT32 ppm_markers_count
number of ppm markers (reserved size)
Definition: j2k.h:368
struct opj_j2k_dec opj_j2k_dec_t
OPJ_FLOAT32 * m_mct_decoding_matrix
the mct decoding matrix
Definition: j2k.h:286
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: j2k.h:199
OPJ_INT32 mant
mantissa
Definition: j2k.h:169
#define J2K_MS_RED
RED marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:102
OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 *pSrcMatrix, OPJ_FLOAT32 *pDestMatrix, OPJ_UINT32 nb_compo)
Matrix inversion.
Definition: invert.c:70
OPJ_INT32 expn
exponent
Definition: j2k.h:167
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_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: openjpeg.h:892
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
#define OPJ_IMG_INFO
EXPERIMENTAL FOR THE MOMENT Supported options about file information used only in j2k_dump.
Definition: openjpeg.h:170
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_UINT32 numpocs
number of progression order changes
Definition: j2k.h:254
int cp_ty0
YTOsiz.
Definition: openjpeg.h:359
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:197
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_UINT32 tdx
XTsiz.
Definition: j2k.h:357
OPJ_UINT32 maxmarknum
actual size of markers array
Definition: openjpeg.h:1012
OPJ_UINT32 numgbits
number of guard bits
Definition: openjpeg.h:888
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
#define OPJ_UNUSED(x)
Definition: jp2.c:47
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 encoding mode.
Definition: j2k.h:157
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
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
Definition: j2k.h:149
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:1008
int sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of sensitivity specification (>=0)
Definition: j2k.h:435
int OPJ_BOOL
Definition: openjpeg.h:110
OPJ_UINT32 cp_reduce
Set the number of highest resolution levels to be discarded.
Definition: openjpeg.h:520
#define J2K_MS_QCC
QCC marker value.
Definition: j2k.h:79
OPJ_UINT32 ppm_data_size
Number of bytes actually stored inside the ppm_data.
Definition: j2k.h:386
OPJ_UINT32 ty0
tile origin in y = YTOsiz
Definition: openjpeg.h:927
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:393
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
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
unsigned int flags
Definition: openjpeg.h:570
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
#define OPJ_J2K_MH_INFO
Codestream information based only on the main header.
Definition: openjpeg.h:171
#define J2K_MS_SIZ
SIZ marker value.
Definition: j2k.h:74
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_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
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_PROG_ORDER prg
Definition: openjpeg.h:333
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:870
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:268
static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp)
Destroys a tile coding parameter structure.
Definition: j2k.c:8386
OPJ_BYTE * m_header_tile_data
Definition: j2k.h:531
#define J2K_MS_SOT
SOT marker value.
Definition: j2k.h:71
struct opj_cp opj_cp_t
Coding parameters.
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
Definition: j2k.h:137
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_BYTE * ppm_data_current
Definition: j2k.h:379
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_t * opj_procedure_list_create()
Creates a validation list.
Definition: function_list.c:39
#define OPJ_J2K_MH_IND
Codestream index based only on the main header.
Definition: openjpeg.h:174
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
precinct-component-resolution-layer order
Definition: openjpeg.h:272
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_BITFIELD m_skip_data
Definition: j2k.h:492
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: j2k.h:197
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
struct opj_dec_memory_marker_handler opj_dec_memory_marker_handler_t
OPJ_UINT32 x0
x component offset compared to the whole image
Definition: openjpeg.h:647
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_ppx * ppm_markers
ppm markers data (table indexed by Zppm)
Definition: j2k.h:370
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
#define OPJ_J2K_MCT_DEFAULT_NB_RECORDS
Definition: openjpeg.h:153
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:92
#define J2K_MS_SOC
SOC marker value.
Definition: j2k.h:70
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_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
#define OPJ_PROFILE_PART2
Definition: openjpeg.h:197
#define OPJ_IS_CINEMA(v)
JPEG 2000 profile macros.
Definition: openjpeg.h:222
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
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_BYTE * ppt_buffer
used to keep a track of the allocated memory
Definition: j2k.h:266
struct j2k_prog_order j2k_prog_order_t
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
Tile-component resolution structure.
Definition: tcd.h:171
opj_ppx * ppt_markers
ppt markers data (table indexed by Zppt)
Definition: j2k.h:261
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
char OPJ_CHAR
Definition: openjpeg.h:114
#define opj_read_float
Definition: cio.h:69
OPJ_UINT32 m_numcomps_to_decode
Definition: j2k.h:486
opj_tile_index_t * tile_index
Definition: openjpeg.h:1018
opj_tcd_tile_t * tiles
Definition: tcd.h:243
Tile-component structure.
Definition: tcd.h:189
int len
length, marker val included
Definition: openjpeg.h:748
OPJ_UINT32 tw
number of tiles in X
Definition: openjpeg.h:933
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
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
OPJ_PROG_ORDER enum_prog
Definition: j2k.c:1305
uint64_t OPJ_UINT64
Definition: openjpeg.h:128
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:655
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
void opj_procedure_list_clear(opj_procedure_list_t *p_validation_list)
Clears the list of validation procedures.
Definition: function_list.c:114
OPJ_INT32 * data_win
data of the component limited to window of interest.
Definition: tcd.h:213
opj_thread_pool_t * m_tp
Thread pool.
Definition: j2k.h:584
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
Information structure about the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:922
OPJ_BITFIELD m_tp_on
Enabling Tile part generation.
Definition: j2k.h:331
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
Type of MCT array.
Definition: j2k.h:146
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
int32_t OPJ_INT32
Definition: openjpeg.h:125
void(* opj_j2k_mct_function)(const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
Definition: j2k.c:1328
OPJ_UINT32 th
number of tiles in height
Definition: j2k.h:365
OPJ_UINT32 m_current_tile_part_number
Tile part number currently coding, taking into account POC.
Definition: j2k.h:504
opj_decoding_param_t m_dec
Definition: j2k.h:396
OPJ_UINT32 resE
Definition: openjpeg.h:343
#define J2K_MS_UNK
UNKNOWN marker value.
Definition: j2k.h:95
FIXME DOC.
Definition: j2k.h:210
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_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: openjpeg.h:894
opj_j2k_t * opj_j2k_create_compress(void)
Creates a J2K compression structure.
Definition: j2k.c:6479
OPJ_UINT32 mct
multi-component transform identifier
Definition: j2k.h:250
OPJ_UINT32 nb_tps
number of tile parts
Definition: openjpeg.h:970
@ J2K_STATE_TPH
the decoding process is in a tile part header
Definition: j2k.h:124
OPJ_UINT32 stepsizes_mant[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:884
OPJ_UINT32 h
data height
Definition: openjpeg.h:645
OPJ_BOOL tile_size_on
size of tile: tile_size_on = false (not in argument) or = true (in argument)
Definition: openjpeg.h:355
OPJ_BYTE * ppm_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:373
@ J2K_STATE_DATA
a tile header has been successfully read and codestream is expected
Definition: j2k.h:127
opj_tile_info_v2_t * tile_info
information regarding tiles inside image
Definition: openjpeg.h:944
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
A list of procedures.
Definition: function_list.h:57
#define J2K_MS_RGN
RGN marker value.
Definition: j2k.h:77
OPJ_UINT32 win_x0
Definition: tcd.h:182
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t *p_tcp, opj_image_t *p_image)
Definition: j2k.c:7628
char tp_flag
Flag for Tile part generation.
Definition: openjpeg.h:486
OPJ_BOOL epb_on
enables writing of EPB, in case of activated JPWL
Definition: j2k.h:407
OPJ_INT32 y0
Definition: tcd.h:173
opj_image_t * opj_image_create0(void)
Create an empty image.
Definition: image.c:34
OPJ_UINT32 numlayers
number of layers
Definition: j2k.h:247
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
#define OPJ_IS_PART2(v)
Definition: openjpeg.h:226
const char *OPJ_CALLCONV opj_version(void)
Definition: openjpeg.c:160
int jpwl_sens_range
sensitivity range (0-3)
Definition: openjpeg.h:458
OPJ_UINT32 prec
precision
Definition: openjpeg.h:651
#define OPJ_CINEMA_24_CS
JPEG 2000 codestream and component size limits in cinema profiles.
Definition: openjpeg.h:231
int image_offset_y0
subimage encoding: origin image offset in y direction
Definition: openjpeg.h:425
int jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]
sensitivity methods for TPHs (-1=no,0-7)
Definition: openjpeg.h:464
OPJ_OFF_T pos
position in codestream
Definition: openjpeg.h:746
#define OPJ_JP2_INFO
<
Definition: openjpeg.h:177
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_INT32 x0
Definition: tcd.h:230
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
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
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
int jpwl_sens_MH
sensitivity method for MH (-1=no,0-7)
Definition: openjpeg.h:460
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
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
void * opj_realloc(void *ptr, size_t new_size)
Reallocate memory blocks.
Definition: opj_malloc.c:239
int subsampling_dx
subsampling value for dx
Definition: openjpeg.h:427
#define J2K_CCP_CSTY_PRT
Definition: j2k.h:57
OPJ_UINT32 current_tpsno
current tile-part index
Definition: openjpeg.h:974
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t *p_tcp, opj_image_t *p_image)
Definition: j2k.c:7628
OPJ_BITFIELD POC
indicates if a POC marker has been used O:NO, 1:YES
Definition: j2k.h:309
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_UINT32 y0
y component offset compared to the whole image
Definition: openjpeg.h:649
#define J2K_MS_EOC
EOC marker value.
Definition: j2k.h:73
@ MCT_TYPE_DECORRELATION
Definition: j2k.h:148
@ J2K_STATE_TPHSOT
the decoding process is in a tile part header and expects a SOT marker
Definition: j2k.h:123
OPJ_UINT32 cblkw
code-blocks width
Definition: j2k.h:181
#define OPJ_PROFILE_CINEMA_S2K
Definition: openjpeg.h:200
int pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: j2k.h:425
static int opj_j2k_get_default_thread_count()
Definition: j2k.c:6450
OPJ_UINT32 m_nb_mct_records
the number of mct records.
Definition: j2k.h:292
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
Tile-component coding parameters information.
Definition: openjpeg.h:866
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
int packno
packet number
Definition: openjpeg.h:815
OPJ_UINT32 tx0
tile origin in x = XTOsiz
Definition: openjpeg.h:925
int jpwl_pprot[JPWL_MAX_NO_PACKSPECS]
error protection methods for packets (0,1,16,32,37-128)
Definition: openjpeg.h:452
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
#define OPJ_TRUE
Definition: openjpeg.h:111
int jpwl_sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: openjpeg.h:456
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_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
int roi_compno
region of interest: affected component in [0..3], -1 means no ROI
Definition: openjpeg.h:402
OPJ_BYTE * m_tlm_sot_offsets_current
The current offset of the tlm buffer.
Definition: j2k.h:518
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_INT32 roishift
Region Of Interest shift.
Definition: openjpeg.h:890
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
OPJ_UINT32 nbcomps
number of components
Definition: openjpeg.h:938
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
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
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
the decoding process has encountered an error (FIXME warning V1 = 0x0080)
Definition: j2k.h:130
opj_poc_t POC[32]
progression order changes
Definition: openjpeg.h:379
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_INT32 y1
Definition: tcd.h:230
#define J2K_MS_COM
COM marker value.
Definition: j2k.h:89
#define J2K_MS_MCO
MCO marker value.
Definition: j2k.h:93
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:343
OPJ_INT32 y0
Definition: tcd.h:191
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
#define J2K_CP_CSTY_SOP
Definition: j2k.h:55
OPJ_UINT32 compno0
Definition: openjpeg.h:327
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
char tcp_mct
MCT (multiple component transform)
Definition: openjpeg.h:488
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
struct opj_stepsize opj_stepsize_t
Quantization stepsize.
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
int cp_fixed_alloc
allocation by fixed layer
Definition: openjpeg.h:367
@ MCT_TYPE_FLOAT
MCT data is stored as signed integers.
Definition: j2k.h:139
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_UINT32 numcomps
Definition: tcd.h:231
#define J2K_MS_PLM
PLM marker value.
Definition: j2k.h:82
struct opj_encoding_param opj_encoding_param_t
int max_cs_size
Maximum size (in bytes) for the whole codestream.
Definition: openjpeg.h:500
#define J2K_CP_CSTY_EPH
Definition: j2k.h:56
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_OFF_T m_last_sot_read_pos
Position of the last SOT marker read.
Definition: j2k.h:477
void * mct_data
Naive implementation of MCT restricted to a single reversible array based encoding without offset con...
Definition: openjpeg.h:493
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:271
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:657
OPJ_UINT32 ppt_data_size
Number of bytes stored inside ppt_data.
Definition: j2k.h:268
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_UINT32 m_state
locate in which part of the codestream the decoder is (main header, tile header, end)
Definition: j2k.h:459
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
the decoding process has encountered the EOC marker
Definition: j2k.h:129
static int opj_j2k_initialise_4K_poc(opj_poc_t *POC, int numres)
Definition: j2k.c:6526
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
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:997
OPJ_UINT16 rsiz
Size of the image in bits.
Definition: j2k.h:351
int jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]
tile number of header protection specification (>=0)
Definition: openjpeg.h:444
void opj_tcd_destroy(opj_tcd_t *tcd)
Destroy a previously created TCD handle.
Definition: tcd.c:673
int prch_init[OPJ_J2K_MAXRLVLS]
initial precinct height
Definition: openjpeg.h:410
static OPJ_BOOL opj_j2k_update_image_dimensions(opj_image_t *p_image, opj_event_mgr_t *p_manager)
Definition: j2k.c:9229
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
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
a SOC marker is expected
Definition: j2k.h:119
#define J2K_MS_CBD
CBD marker value.
Definition: j2k.h:90
static opj_codestream_index_t * opj_j2k_create_cstr_index(void)
Definition: j2k.c:9567
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_UINT32 qntsty
quantisation style
Definition: j2k.h:189
OPJ_UINT32 m_header_tile_data_size
Definition: j2k.h:534
OPJ_UINT32 qmfbid
discrete wavelet transform identifier
Definition: j2k.h:187
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
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
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: j2k.h:241
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:274
opj_codestream_index_t * cstr_index
helper used to write the index file
Definition: j2k.h:572
static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
Definition: j2k.c:10643
opj_j2k_t * opj_j2k_create_decompress(void)
Creates a J2K decompression structure.
Definition: j2k.c:9496
OPJ_UINT32 ppt_len
size of ppt_data
Definition: j2k.h:270
OPJ_UINT32 compno1
Definition: openjpeg.h:329
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_UINT32 m_encoded_tile_size
Definition: j2k.h:528
#define J2K_CP_CSTY_PRT
Definition: j2k.h:54
OPJ_BITFIELD m_nb_tile_parts_correction_checked
TNsot correction : see issue 254.
Definition: j2k.h:494
OPJ_UINT32 ppt_markers_count
number of ppt markers (reserved size)
Definition: j2k.h:259
OPJ_UINT32 stepsizes_expn[OPJ_J2K_MAXBANDS]
stepsizes used for quantization
Definition: openjpeg.h:886
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_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
struct opj_ppx_struct opj_ppx
enum MCT_ELEMENT_TYPE J2K_MCT_ELEMENT_TYPE
Type of elements storing in the MCT data.
#define J2K_MS_MCT
MCT marker value.
Definition: j2k.h:92
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_UINT32 cblksty
code-block coding style
Definition: j2k.h:185
uint16_t OPJ_UINT16
Definition: openjpeg.h:124
OPJ_UINT32 tdy
tile size in y = YTsiz
Definition: openjpeg.h:931
unsigned short int type
marker type
Definition: openjpeg.h:744
static INLINE OPJ_INT32 opj_int_max(OPJ_INT32 a, OPJ_INT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:74
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_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_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
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
int m_num_threads
Number of threads to use.
Definition: j2k.h:581
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
Definition: openjpeg.h:258
OPJ_BOOL correct
enables JPWL correction at the decoder
Definition: j2k.h:439
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
#define EVT_INFO
Debug event type.
Definition: event.h:68
int cp_disto_alloc
allocation by rate/distortion
Definition: openjpeg.h:365
@ OPJ_CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:261
Tile-component coding parameters.
Definition: j2k.h:175
OPJ_INT32 * data
Definition: tcd.h:204
#define OPJ_J2K_TH_IND
Tile index based on the current tile.
Definition: openjpeg.h:175
#define OPJ_PROFILE_CINEMA_2K
Definition: openjpeg.h:198
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
#define OPJ_JP2_IND
JP2 file index.
Definition: openjpeg.h:178
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_UINT32 prcE
Definition: openjpeg.h:343
opj_tcd_image_t * tcd_image
info on each image tile
Definition: tcd.h:263
OPJ_UINT32 w
data width
Definition: openjpeg.h:643
OPJ_UINT32 m_data_size
Definition: j2k.h:233
OPJ_FLOAT32 distoratio[100]
add fixed_quality
Definition: j2k.h:272
OPJ_OFF_T start_pos
start position
Definition: openjpeg.h:954
static void opj_j2k_dump_MH_index(opj_j2k_t *p_j2k, FILE *out_stream)
Definition: j2k.c:10313
OPJ_BOOL epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: j2k.h:405
unsigned int OPJ_BITFIELD
Definition: opj_includes.h:217
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
int roi_shift
region of interest: upshift value
Definition: openjpeg.h:404
opj_thread_pool_t * opj_thread_pool_create(int num_threads)
Create a new thread pool.
Definition: thread.c:625
static const OPJ_UINT32 MCT_ELEMENT_SIZE[]
FIXME DOC.
Definition: j2k.c:1321
int sens_size
enables writing of ESD, (0/2/4 bytes)
Definition: j2k.h:427
int cblockw_init
initial code block width, default to 64
Definition: openjpeg.h:394
opj_tcd_t * opj_tcd_create(OPJ_BOOL p_is_decoder)
Create a new TCD handle.
Definition: tcd.c:202
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
Profile name for a 4K image.
Definition: openjpeg.h:250
int hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: j2k.h:419
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
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
Decompression parameters.
Definition: openjpeg.h:512
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
Destroys a codestream index structure.
Definition: j2k.c:8347
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
struct opj_j2k_enc opj_j2k_enc_t
#define opj_write_float
Definition: cio.h:68
opj_tile_info_v2_t m_default_tile_info
Default information regarding tiles inside image.
Definition: openjpeg.h:941
OPJ_UINT32 m_nb_tile_parts
number of tile parts for the tile.
Definition: j2k.h:278
opj_image_comp_t * comps
image components
Definition: openjpeg.h:683
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_marker_info_t * marker
list of markers
Definition: openjpeg.h:1010
OPJ_UINT32 packno
Definition: tcd.h:236
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
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
#define JPWL_MAX_NO_PACKSPECS
Maximum number of packet parts expected by JPWL: increase at your will.
Definition: openjpeg.h:157
@ FINAL_PASS
Function called in Rate allocation process.
Definition: j2k.h:159
struct opj_tccp opj_tccp_t
Tile-component coding parameters.
#define JPWL_MAX_NO_TILESPECS
Maximum number of tile parts expected by JPWL: increase at your will.
Definition: openjpeg.h:156
Index structure of the codestream.
Definition: openjpeg.h:811
OPJ_INT32 y1
Definition: tcd.h:191
@ MCT_TYPE_INT32
MCT data is stored as signed shorts.
Definition: j2k.h:138
OPJ_UINT32 numlayers
number of layers
Definition: openjpeg.h:910
OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec)
Allocates tile component data.
Definition: tcd.c:689
OPJ_INT32 ppm_previous
use in case of multiple marker PPM (case on non-finished previous info)
Definition: j2k.h:390
opj_mct_data_t * m_mct_records
mct records
Definition: j2k.h:290
OPJ_UINT32 bpp
image depth in bits
Definition: openjpeg.h:653
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
struct opj_tcp opj_tcp_t
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
OPJ_UINT32 numgbits
number of guard bits
Definition: j2k.h:193
OPJ_UINT32 tileno
tile index
Definition: openjpeg.h:967
OPJ_FLOAT64 * mct_norms
encoding norms
Definition: j2k.h:284
int jpwl_max_tiles
maximum number of tiles
Definition: openjpeg.h:566
#define opj_read_bytes
Definition: cio.h:65
OPJ_UINT32 cur_totnum_tp
Total number of tileparts of the current tile.
Definition: tcd.h:259
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
#define EVT_ERROR
Error event type.
Definition: event.h:66
OPJ_UINT32 tw
number of tiles in width
Definition: j2k.h:363
J2K_MCT_ELEMENT_TYPE m_element_type
Definition: j2k.h:211
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
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_UINT32 factor
number of division by 2 of the out image compared to the original size of image
Definition: openjpeg.h:659
OPJ_BYTE * m_data
data for the tile
Definition: j2k.h:280
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
int image_offset_x0
subimage encoding: origin image offset in x direction
Definition: openjpeg.h:423
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_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:639
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
char tp_on
Tile part generation.
Definition: openjpeg.h:484
OPJ_UINT32 enumcs
Definition: j2k.h:588
int mode
mode switch (cblk_style)
Definition: openjpeg.h:398
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
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_UINT32 ty0
YTOsiz.
Definition: j2k.h:355
opj_mct_data_t * m_decorrelation_array
Definition: j2k.h:225
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
struct opj_mct_data opj_mct_data_t
FIXME DOC.
int jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]
packet number of packet protection specification (>=0)
Definition: openjpeg.h:450
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_UINT32 m_start_tile_x
Only tiles index in the correct range will be decoded.
Definition: j2k.h:469
OPJ_UINT64 codestream_size
codestream's size
Definition: openjpeg.h:1004
opj_j2k_enc_t m_encoder
Definition: j2k.h:552
static OPJ_FLOAT32 opj_j2k_get_default_stride(opj_tcp_t *p_tcp)
Definition: j2k.c:5029
@ J2K_STATE_MHSIZ
a SIZ marker is expected
Definition: j2k.h:121
static void opj_j2k_cp_destroy(opj_cp_t *p_cp)
Destroys a coding parameter structure.
Definition: j2k.c:8466
OPJ_UINT32 csty
coding style
Definition: openjpeg.h:906
int cp_tdy
YTsiz.
Definition: openjpeg.h:363
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_UINT32 mct
multi-component transform identifier
Definition: openjpeg.h:912
#define OPJ_CINEMA_48_CS
Definition: openjpeg.h:232
opj_tp_index_t * tp_index
information concerning tile parts
Definition: openjpeg.h:976
int csty
csty : coding style
Definition: openjpeg.h:375
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_INT32 * m_matrice
fixed layer
Definition: j2k.h:321
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
#define OPJ_FALSE
Definition: openjpeg.h:112
OPJ_BITFIELD m_is_decoder
tells if the parameter is a coding or decoding one
Definition: j2k.h:450
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_UINT32 th
number of tiles in Y
Definition: openjpeg.h:935
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:333
OPJ_INT32 y0
Definition: tcd.h:230
Index structure about a tile part.
Definition: openjpeg.h:952
OPJ_UINT32 m_data_size
size of data
Definition: j2k.h:282
OPJ_BITFIELD m_disto_alloc
allocation by rate/distortion
Definition: j2k.h:325
struct opj_decoding_param opj_decoding_param_t
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
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
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
int16_t OPJ_INT16
Definition: openjpeg.h:123
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:269
static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab[]
Definition: j2k.c:1365
void opj_j2k_destroy(opj_j2k_t *p_j2k)
Destroys a jpeg2000 codec.
Definition: j2k.c:8277
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
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_UINT32 cblkh
code-blocks height
Definition: j2k.h:183
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_UINT32 win_y1
Definition: tcd.h:185
OPJ_RSIZ_CAPABILITIES cp_rsiz
DEPRECATED: use RSIZ, OPJ_PROFILE_* and OPJ_EXTENSION_* instead Profile name.
Definition: openjpeg.h:482
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
FIXME DOC.
Definition: j2k.h:222
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_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
#define opj_write_bytes
Definition: cio.h:64
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:329
OPJ_BITFIELD cod
If cod == 1 --> there was a COD marker for the present tile.
Definition: j2k.h:305
#define OPJ_EXTENSION_MCT
Definition: openjpeg.h:217
OPJ_UINT32 tile
Tile number.
Definition: openjpeg.h:337
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_tcp_t * m_default_tcp
store decoding parameters common to all tiles (information like COD, COC in main header)
Definition: j2k.h:463
OPJ_UINT32 tp_num
Tile part number.
Definition: tcd.h:255
OPJ_UINT32 cblkh
log2 of code-blocks height
Definition: openjpeg.h:876
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
int prcw_init[OPJ_J2K_MAXRLVLS]
initial precinct width
Definition: openjpeg.h:408
opj_image_t * m_private_image
pointer to the internal/private encoded / decoded image
Definition: j2k.h:557
OPJ_UINT32 numpocs
number of progression order changes (POC), default to 0
Definition: openjpeg.h:381
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_UINT32 resno1
Definition: openjpeg.h:329
OPJ_UINT32 m_end_tile_y
Definition: j2k.h:472
#define J2K_MS_MCC
MCC marker value.
Definition: j2k.h:91
MCT_ELEMENT_TYPE
Type of elements storing in the MCT data.
Definition: j2k.h:136
#define J2K_CCP_QNTSTY_SIQNT
Definition: j2k.h:65
opj_simple_mcc_decorrelation_data_t * m_mcc_records
mcc records
Definition: j2k.h:296
#define J2K_CCP_QNTSTY_NOQNT
Definition: j2k.h:64
OPJ_UINT32 marknum
number of markers
Definition: openjpeg.h:980
#define J2K_MS_COD
COD marker value.
Definition: j2k.h:75
OPJ_UINT32 csty
coding style
Definition: j2k.h:177
Defines image data and characteristics.
Definition: openjpeg.h:669
int jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]
error protection methods for TPHs (0,1,16,32,37-128)
Definition: openjpeg.h:446
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:327
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
#define J2K_MS_POC
POC marker value.
Definition: j2k.h:80
OPJ_BOOL jpwl_epc_on
enables writing of EPC in MH, thus activating JPWL
Definition: openjpeg.h:440
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
int jpwl_hprot_MH
error protection method for MH (0,1,16,32,37-128)
Definition: openjpeg.h:442
Progression order changes.
Definition: openjpeg.h:325
opj_tcd_tilecomp_t * comps
Definition: tcd.h:232
#define J2K_MS_CRG
CRG marker value.
Definition: j2k.h:88
Marker structure.
Definition: openjpeg.h:742
OPJ_UINT32 id
marker value
Definition: j2k.c:1354
OPJ_INT32 m_tile_ind_to_dec
Index of the tile to decode (used in get_tile)
Definition: j2k.h:475
@ J2K_STATE_NEOC
the decoding process must not expect a EOC marker because the codestream is truncated
Definition: j2k.h:126
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_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd)
Definition: tcd.c:2353
int * cp_matrice
fixed layer
Definition: openjpeg.h:371
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_UINT32 tdx
tile size in x = XTsiz
Definition: openjpeg.h:929
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
int sens_addr
sensitivity addressing size (0=auto/2/4 bytes)
Definition: j2k.h:429
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_UINT32 m_header_data_size
Definition: j2k.h:465
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_UINT32 numresolutions
number of resolutions
Definition: openjpeg.h:872
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
Tile coder/decoder.
Definition: tcd.h:251
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
union opj_cp::@0 m_specific_param
#define J2K_MS_QCD
QCD marker value.
Definition: j2k.h:78
#define J2K_MS_EPB
EPB marker value (Part 11: JPEG 2000 for Wireless)
Definition: j2k.h:100
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
#define J2K_MS_SOD
SOD marker value.
Definition: j2k.h:72
OPJ_UINT32 win_y0
Definition: tcd.h:183
void(* opj_procedure)(void)
declare a function pointer
Definition: function_list.h:52
int sens_range
sensitivity range (0-3)
Definition: j2k.h:431
int max_comp_size
Maximum size (in bytes) for each component.
Definition: openjpeg.h:477
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
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_UINT32 win_x1
Definition: tcd.h:184
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