OpenJPEG: j2k.c File Reference

OpenJPEG 2.5.0

Data Structures
j2k.c File Reference
`#include "opj_includes.h"`

## Data Structures
struct | j2k_prog_order
struct | opj_dec_memory_marker_handler

## Local static functions
typedef struct j2k_prog_order | j2k_prog_order_t
typedef void(* | opj_j2k_mct_function) (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
typedef struct opj_dec_memory_marker_handler | opj_dec_memory_marker_handler_t
static const j2k_prog_order_t | j2k_prog_order_list []
static const OPJ_UINT32 | MCT_ELEMENT_SIZE []
| FIXME DOC.
static const opj_j2k_mct_function | j2k_mct_read_functions_to_float []
static const opj_j2k_mct_function | j2k_mct_read_functions_to_int32 []
static const opj_j2k_mct_function | j2k_mct_write_functions_from_float []
static const opj_dec_memory_marker_handler_t | j2k_memory_marker_handler_tab []
static const OPJ_UINT16 | tabMaxSubLevelFromMainLevel []
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
| Executes the given procedures on the given codec.
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.
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.
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.
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 associated with the marker value.
static void | opj_j2k_tcp_destroy (opj_tcp_t *p_tcp)
| Destroys a tile coding parameter structure.
static void | opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
| Destroys the data inside a tile coding parameter structure.
static void | opj_j2k_cp_destroy (opj_cp_t *p_cp)
| Destroys a coding parameter structure.
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.
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.
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.
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.
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.
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.
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.
static void | opj_j2k_update_tlm (opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_part_size)
| Updates the Tile Length Marker.
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.
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.
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.
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.
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)
static OPJ_BOOL | opj_j2k_update_image_data (opj_tcd_t *p_tcd, opj_image_t *p_output_image)
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)
static void | opj_j2k_get_tile_data (opj_tcd_t *p_tcd, OPJ_BYTE *p_data)
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)
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.
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 total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
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 total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
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.
static OPJ_BOOL | opj_j2k_allocate_tile_element_cstr_index (opj_j2k_t *p_j2k)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
static OPJ_UINT32 | opj_j2k_get_max_coc_size (opj_j2k_t *p_j2k)
| Gets the maximum size taken by a 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)
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)
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)
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)
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)
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)
static OPJ_UINT32 | opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k)
| Gets the maximum size taken by a 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)
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)
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)
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.
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)
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.
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.
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)
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)
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.
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)
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)
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)
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)
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)
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)
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)
static OPJ_BOOL | opj_j2k_write_sot (opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 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)
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)
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)
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 total_data_size, const opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
| Writes the SOD marker (Start of data)
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)
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)
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)
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)
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)
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.
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.
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.
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.
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)
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)
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)
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)
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)
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)
static OPJ_BOOL | opj_j2k_add_mct (opj_tcp_t *p_tcp, opj_image_t *p_image, OPJ_UINT32 p_index)
static void | opj_j2k_read_int16_to_float (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_int32_to_float (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_float32_to_float (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_float64_to_float (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_int16_to_int32 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_int32_to_int32 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_float32_to_int32 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_read_float64_to_int32 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_write_float_to_int16 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_write_float_to_int32 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_write_float_to_float (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
static void | opj_j2k_write_float_to_float64 (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)
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.
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)
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)
static OPJ_BOOL | opj_j2k_read_cap (opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
| Reads a CAP marker (extended capabilities definition).
static OPJ_BOOL | opj_j2k_read_cpf (opj_j2k_t *p_j2k, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager)
| Reads a CPF marker (corresponding profile).
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.
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.
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.
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 ????
static OPJ_BOOL | opj_j2k_check_poc_val (const opj_poc_t *p_pocs, OPJ_UINT32 tileno, 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.
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.
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.
static void | opj_j2k_dump_MH_info (opj_j2k_t *p_j2k, FILE *out_stream)
static void | opj_j2k_dump_MH_index (opj_j2k_t *p_j2k, FILE *out_stream)
static opj_codestream_index_t * | opj_j2k_create_cstr_index (void)
static OPJ_FLOAT32 | opj_j2k_get_tp_stride (opj_tcp_t *p_tcp)
static OPJ_FLOAT32 | opj_j2k_get_default_stride (opj_tcp_t *p_tcp)
static int | opj_j2k_initialise_4K_poc (opj_poc_t *POC, int numres)
static void | opj_j2k_set_cinema_parameters (opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
static OPJ_BOOL | opj_j2k_is_cinema_compliant (opj_image_t *image, OPJ_UINT16 rsiz, opj_event_mgr_t *p_manager)
static void | opj_j2k_set_imf_parameters (opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
static OPJ_BOOL | opj_j2k_is_imf_compliant (opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager)
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).
const char * | opj_j2k_convert_progression_order (OPJ_PROG_ORDER prg_order)
| Converts an enum type progression order to string type.
static OPJ_BOOL | opj_j2k_write_plt_in_memory (opj_j2k_t *p_j2k, opj_tcd_marker_info_t *marker_info, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, opj_event_mgr_t *p_manager)
| Write one or more PLT markers in the provided buffer.
void | opj_j2k_setup_decoder (opj_j2k_t *j2k, opj_dparameters_t *parameters)
| Setup the decoder decoding parameters using user parameters.
void | opj_j2k_decoder_set_strict_mode (opj_j2k_t *j2k, OPJ_BOOL strict)
OPJ_BOOL | opj_j2k_set_threads (opj_j2k_t *j2k, OPJ_UINT32 num_threads)
static int | opj_j2k_get_default_thread_count ()
opj_j2k_t * | opj_j2k_create_compress (void)
| Creates a J2K compression structure.
static int | opj_j2k_get_imf_max_NL (opj_cparameters_t *parameters, opj_image_t *image)
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)
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.
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.
OPJ_BOOL | opj_j2k_setup_mct_encoding (opj_tcp_t *p_tcp, opj_image_t *p_image)
void | opj_j2k_destroy (opj_j2k_t *p_j2k)
| Destroys a jpeg2000 codec.
void | j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind)
| Destroys a codestream index structure.
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.
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.
static OPJ_BOOL | opj_j2k_update_image_dimensions (opj_image_t *p_image, opj_event_mgr_t *p_manager)
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.
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.
opj_j2k_t * | opj_j2k_create_decompress (void)
| Creates a J2K decompression structure.
static void | opj_j2k_dump_tile_info (opj_tcp_t *l_default_tile, OPJ_INT32 numcomps, FILE *out_stream)
void | j2k_dump (opj_j2k_t *p_j2k, OPJ_INT32 flag, FILE *out_stream)
| Dump some elements from the J2K decompression structure .
void | j2k_dump_image_header (opj_image_t *img_header, OPJ_BOOL dev_dump_flag, FILE *out_stream)
| Dump an image header structure.
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.
opj_codestream_info_v2_t * | j2k_get_cstr_info (opj_j2k_t *p_j2k)
| Get the codestream info from a JPEG2000 codec.
opj_codestream_index_t * | j2k_get_cstr_index (opj_j2k_t *p_j2k)
| Get the codestream index from a JPEG2000 codec.
static OPJ_BOOL | opj_j2k_are_all_used_components_decoded (opj_j2k_t *p_j2k, opj_event_mgr_t *p_manager)
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.
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)
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.
static OPJ_BOOL | opj_j2k_move_data_from_codec_to_output_image (opj_j2k_t *p_j2k, opj_image_t *p_image)
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.
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)
OPJ_BOOL | opj_j2k_set_decoded_resolution_factor (opj_j2k_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager)
OPJ_BOOL | opj_j2k_encoder_set_extra_options (opj_j2k_t *p_j2k, const char *const *p_options, opj_event_mgr_t *p_manager)
| Specify extra options for the encoder.
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.
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.
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.
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.

## Typedef Documentation

## ◆ j2k_prog_order_t

typedef struct j2k_prog_order j2k_prog_order_t

## ◆ opj_dec_memory_marker_handler_t

typedef struct opj_dec_memory_marker_handler opj_dec_memory_marker_handler_t

## ◆ opj_j2k_mct_function

typedef void(* opj_j2k_mct_function) (const void *p_src_data, void *p_dest_data, OPJ_UINT32 p_nb_elem)

## Function Documentation

## ◆ j2k_destroy_cstr_index()

void j2k_destroy_cstr_index | ( | opj_codestream_index_t * | p_cstr_ind | ) |

Destroys a codestream index structure.

Parameters

  p_cstr_ind | the codestream index parameter to destroy.

References opj_tile_index::marker, opj_codestream_index::marker, opj_codestream_index::nb_of_tiles, opj_free(), opj_tile_index::packet_index, opj_codestream_index::tile_index, and opj_tile_index::tp_index.

Referenced by opj_destroy_cstr_index(), and opj_j2k_destroy().

## ◆ j2k_dump()

void j2k_dump | ( | opj_j2k_t * | p_j2k,
|  | OPJ_INT32 | flag,
|  | FILE * | out_stream
| ) |  |

Dump some elements from the J2K decompression structure .

Parameters

  p_j2k | the jpeg2000 codec.
  flag | flag to describe what elements are dump.
  out_stream | output stream where dump the elements.

References j2k_dump_image_header(), opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, OPJ_IMG_INFO, opj_j2k_dump_MH_index(), opj_j2k_dump_MH_info(), opj_j2k_dump_tile_info(), OPJ_J2K_MH_IND, OPJ_J2K_MH_INFO, OPJ_J2K_TCH_INFO, OPJ_J2K_TH_IND, OPJ_J2K_TH_INFO, OPJ_JP2_IND, OPJ_JP2_INFO, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by jp2_dump(), and opj_create_decompress().

## ◆ 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.

Parameters

  comp | the component image header to dump.
  dev_dump_flag | flag to describe if we are in the case of this function is use outside j2k_dump function
  out_stream | output stream where dump the elements.

References opj_image_comp::dx, opj_image_comp::dy, opj_image_comp::prec, and opj_image_comp::sgnd.

Referenced by j2k_dump_image_header().

## ◆ 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.

Parameters

  image | the image header to dump.
  dev_dump_flag | flag to describe if we are in the case of this function is use outside j2k_dump function
  out_stream | output stream where dump the elements.

References opj_image::comps, j2k_dump_image_comp_header(), opj_image::numcomps, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by j2k_dump().

## ◆ 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.

Parameters

  p_j2k | the component image header to dump.

Returns
  the codestream index extract from the jpg2000 codec

References opj_codestream_index::codestream_size, opj_j2k::cstr_index, opj_codestream_index::main_head_end, opj_codestream_index::main_head_start, opj_tile_index::marker, opj_codestream_index::marker, opj_tile_index::marknum, opj_codestream_index::marknum, opj_codestream_index::nb_of_tiles, opj_tile_index::nb_packet, opj_tile_index::nb_tps, opj_calloc(), opj_free(), opj_malloc(), opj_tile_index::packet_index, opj_codestream_index::tile_index, and opj_tile_index::tp_index.

Referenced by jp2_get_cstr_index(), and opj_create_decompress().

## ◆ 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.

Parameters

  p_j2k | the component image header to dump.

Returns
  the codestream information extract from the jpg2000 codec

References opj_tccp::cblkh, opj_tccp_info::cblkh, opj_tccp::cblksty, opj_tccp_info::cblksty, opj_tccp::cblkw, opj_tccp_info::cblkw, opj_tccp::csty, opj_tcp::csty, opj_tccp_info::csty, opj_tile_v2_info::csty, opj_stepsize::expn, J2K_CCP_QNTSTY_SIQNT, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_codestream_info_v2::m_default_tile_info, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_stepsize::mant, opj_tcp::mct, opj_tile_v2_info::mct, opj_codestream_info_v2::nbcomps, opj_image::numcomps, opj_tccp::numgbits, opj_tccp_info::numgbits, opj_tcp::numlayers, opj_tile_v2_info::numlayers, opj_tccp::numresolutions, opj_tccp_info::numresolutions, opj_calloc(), opj_destroy_cstr_info(), OPJ_J2K_MAXBANDS, OPJ_J2K_MAXRLVLS, opj_tccp::prch, opj_tccp_info::prch, opj_tccp::prcw, opj_tccp_info::prcw, opj_tcp::prg, opj_tile_v2_info::prg, opj_tccp::qmfbid, opj_tccp_info::qmfbid, opj_tccp::qntsty, opj_tccp_info::qntsty, opj_tccp::roishift, opj_tccp_info::roishift, opj_tccp::stepsizes, opj_tccp_info::stepsizes_expn, opj_tccp_info::stepsizes_mant, opj_tile_v2_info::tccp_info, opj_tcp::tccps, opj_cp::tdx, opj_codestream_info_v2::tdx, opj_cp::tdy, opj_codestream_info_v2::tdy, opj_cp::th, opj_codestream_info_v2::th, opj_codestream_info_v2::tile_info, opj_cp::tw, opj_codestream_info_v2::tw, opj_cp::tx0, opj_codestream_info_v2::tx0, opj_cp::ty0, and opj_codestream_info_v2::ty0.

Referenced by jp2_get_cstr_info(), and opj_create_decompress().

## ◆ 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
| ) |  |
| static

References opj_image_comp::dx, opj_image_comp::dy, opj_int_ceildiv(), opj_image_comp::prec, opj_image::x0, opj_tcd_tilecomp::x0, opj_image::x1, opj_tcd_tilecomp::x1, opj_image::y0, opj_tcd_tilecomp::y0, and opj_tcd_tilecomp::y1.

Referenced by opj_j2k_get_tile_data().

## ◆ 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
| ) |  |
| static

element discarded

do not support number of comps != image

References j2k_mct_read_functions_to_float, j2k_mct_read_functions_to_int32, opj_mct_data::m_data, opj_mct_data::m_data_size, opj_tccp::m_dc_level_shift, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_mct_data::m_element_type, opj_simple_mcc_decorrelation_data::m_index, opj_tcp::m_mcc_records, opj_tcp::m_mct_decoding_matrix, opj_simple_mcc_decorrelation_data::m_nb_comps, opj_tcp::m_nb_mcc_records, opj_simple_mcc_decorrelation_data::m_offset_array, MCT_ELEMENT_SIZE, opj_image::numcomps, OPJ_FALSE, opj_free(), opj_malloc(), OPJ_TRUE, and opj_tcp::tccps.

Referenced by opj_j2k_read_mco().

## ◆ 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
| ) |  |
| static

Add main header marker information.

Parameters

  cstr_index | Codestream information structure
  type | marker type
  pos | byte offset of marker segment
  len | length of marker segment

References opj_marker_info::len, opj_codestream_index::marker, opj_codestream_index::marknum, opj_codestream_index::maxmarknum, OPJ_FALSE, opj_free(), opj_realloc(), OPJ_TRUE, opj_marker_info::pos, and opj_marker_info::type.

Referenced by opj_j2k_read_header_procedure(), opj_j2k_read_soc(), and opj_j2k_read_unk().

## ◆ 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
| ) |  |
| static

Add tile header marker information.

Parameters

  tileno | tile index number
  cstr_index | Codestream information structure
  type | marker type
  pos | byte offset of marker segment
  len | length of marker segment

References opj_tile_index::current_tpsno, J2K_MS_SOT, opj_marker_info::len, opj_tile_index::marker, opj_tile_index::marknum, opj_tile_index::maxmarknum, OPJ_FALSE, opj_free(), opj_realloc(), OPJ_TRUE, opj_marker_info::pos, opj_tp_index::start_pos, opj_codestream_index::tile_index, opj_tile_index::tp_index, and opj_marker_info::type.

Referenced by opj_j2k_read_sod(), and opj_j2k_read_tile_header().

## ◆ opj_j2k_allocate_tile_element_cstr_index()

static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index | ( | opj_j2k_t * | p_j2k | ) |
| static

References opj_j2k::cstr_index, opj_j2k::m_cp, opj_tile_index::marker, opj_tile_index::marknum, opj_tile_index::maxmarknum, opj_codestream_index::nb_of_tiles, opj_calloc(), OPJ_FALSE, OPJ_TRUE, opj_cp::th, opj_codestream_index::tile_index, and opj_cp::tw.

Referenced by opj_j2k_decode_one_tile(), and opj_j2k_read_header().

## ◆ opj_j2k_are_all_used_components_decoded()

static OPJ_BOOL opj_j2k_are_all_used_components_decoded | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

References opj_image::comps, opj_image_comp::data, EVT_ERROR, EVT_WARNING, opj_j2k_dec::m_comps_indices_to_decode, opj_j2k::m_decoder, opj_j2k_dec::m_numcomps_to_decode, opj_j2k::m_output_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, and OPJ_TRUE.

Referenced by opj_j2k_decode_one_tile(), and opj_j2k_decode_tiles().

## ◆ 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
| ) |  |
| static

Builds the tcd decoder to use to decode tile.

References OPJ_TRUE.

Referenced by opj_j2k_setup_decoding_validation().

## ◆ 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
| ) |  |
| static

Builds the tcd encoder to use to encode tile.

References OPJ_TRUE.

Referenced by opj_j2k_setup_encoding_validation().

## ◆ 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
| ) |  |
| static

Calculates the total number of tile parts needed by the encoder to encode such an image.

If not enough memory is available, then the function return false.

Parameters

  p_nb_tiles | pointer that will hold the number of tile parts.
  cp | the coding parameters for the image.
  image | the image to encode.
  p_j2k | the p_j2k encoder.
  p_manager | the user event manager.

Returns
  true if the function was successful, false else.

References opj_j2k_get_num_tp(), opj_pi_update_encoding_parameters(), OPJ_TRUE, OPJ_UNUSED, tcp, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_init_info().

## ◆ opj_j2k_check_poc_val()

static OPJ_BOOL opj_j2k_check_poc_val | ( | const opj_poc_t * | p_pocs,
|  | OPJ_UINT32 | tileno,
|  | OPJ_UINT32 | p_nb_pocs,
|  | OPJ_UINT32 | p_nb_resolutions,
|  | OPJ_UINT32 | numcomps,
|  | OPJ_UINT32 | numlayers,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Checks the progression order changes values.

Tells of the poc given as input are valid. A nice message is outputted at errors.

Parameters

  p_pocs | the progression order changes.
  tileno | the tile number of interest
  p_nb_pocs | the number of progression order changes.
  p_nb_resolutions | the number of resolutions.
  numcomps | the number of components
  numlayers | the number of layers.
  p_manager | the user event manager.

Returns
  true if the pocs are valid.

References opj_poc::compno0, opj_poc::compno1, EVT_ERROR, opj_poc::layno1, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_free(), opj_uint_min(), opj_poc::resno0, opj_poc::resno1, and opj_poc::tile.

Referenced by opj_j2k_setup_encoder().

## ◆ 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
| ) |  |
| static

Compares 2 COC markers (Coding style component)

Parameters

  p_j2k | J2K codec.
  p_first_comp_no | the index of the first component to compare.
  p_second_comp_no | the index of the second component to compare.

Returns
  OPJ_TRUE if equals

References opj_tccp::csty, opj_j2k::m_cp, opj_j2k::m_current_tile_number, OPJ_FALSE, opj_j2k_compare_SPCod_SPCoc(), opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_write_all_coc().

## ◆ 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
| ) |  |
| static

Compare QCC markers (quantization component)

Parameters

  p_j2k | J2K codec.
  p_first_comp_no | the index of the first component to compare.
  p_second_comp_no | the index of the second component to compare.

Returns
  OPJ_TRUE if equals.

References opj_j2k::m_current_tile_number, and opj_j2k_compare_SQcd_SQcc().

Referenced by opj_j2k_write_all_qcc().

## ◆ 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
| ) |  |
| static

Compare 2 a SPCod/ SPCoc elements, i.e.

the coding style of a given component of a tile.

Parameters

  p_j2k | J2K codec.
  p_tile_no | Tile number
  p_first_comp_no | The 1st component number to compare.
  p_second_comp_no | The 1st component number to compare.

Returns
  OPJ_TRUE if SPCdod are equals.

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, opj_tccp::csty, J2K_CCP_CSTY_PRT, opj_j2k::m_cp, opj_tccp::numresolutions, OPJ_FALSE, OPJ_TRUE, opj_tccp::prch, opj_tccp::prcw, opj_tccp::qmfbid, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_compare_coc().

## ◆ 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
| ) |  |
| static

Compares 2 SQcd or SQcc element, i.e.

the quantization values of a band in the QCD or QCC.

Parameters

  p_j2k | J2K codec.
  p_tile_no | the tile to output.
  p_first_comp_no | the first component number to compare.
  p_second_comp_no | the second component number to compare.

Returns
  OPJ_TRUE if equals.

References opj_stepsize::expn, J2K_CCP_QNTSTY_NOQNT, J2K_CCP_QNTSTY_SIQNT, opj_j2k::m_cp, opj_stepsize::mant, opj_tccp::numgbits, opj_tccp::numresolutions, OPJ_FALSE, OPJ_TRUE, opj_tccp::qntsty, opj_tccp::stepsizes, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_compare_qcc().

## ◆ 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.

References j2k_prog_order::enum_prog, j2k_prog_order_list, and j2k_prog_order::str_prog.

Referenced by opj_j2k_get_num_tp(), and opj_pi_create_encode().

## ◆ 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
| ) |  |
| static

Copies the decoding tile parameters onto all the tile parameters.

Creates also the tile decoder.

References opj_tcp::cod, EVT_ERROR, opj_j2k::m_cp, opj_tcp::m_current_tile_part_number, opj_mct_data::m_data, opj_mct_data::m_data_size, opj_j2k::m_decoder, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_j2k_dec::m_default_tcp, opj_tcp::m_mcc_records, opj_tcp::m_mct_decoding_matrix, opj_tcp::m_mct_records, opj_tcp::m_nb_max_mcc_records, opj_tcp::m_nb_max_mct_records, opj_tcp::m_nb_mct_records, opj_simple_mcc_decorrelation_data::m_offset_array, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_j2k::m_tp, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_malloc(), opj_tcd_create(), opj_tcd_destroy(), opj_tcd_init(), OPJ_TRUE, OPJ_UNUSED, opj_tcp::ppt, opj_tcp::ppt_data, opj_tcp::tccps, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_setup_header_reading().

## ◆ opj_j2k_copy_tile_component_parameters()

static void opj_j2k_copy_tile_component_parameters | ( | opj_j2k_t * | p_j2k | ) |
| static

Copies the tile component parameters of all the component from the first tile component.

Parameters

  p_j2k | the J2k codec.

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_tccp::numresolutions, opj_tccp::prch, opj_tccp::prcw, opj_tccp::qmfbid, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_read_cod().

## ◆ opj_j2k_copy_tile_quantization_parameters()

static void opj_j2k_copy_tile_quantization_parameters | ( | opj_j2k_t * | p_j2k | ) |
| static

Copies the tile quantization parameters of all the component from the first tile component.

Parameters

  p_j2k | the J2k codec.

References J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_tccp::numgbits, OPJ_J2K_MAXBANDS, opj_tccp::qntsty, opj_tccp::stepsizes, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_read_qcd().

## ◆ opj_j2k_cp_destroy()

static void opj_j2k_cp_destroy | ( | opj_cp_t * | p_cp | ) |
| static

Destroys a coding parameter structure.

Parameters

  p_cp | the coding parameter to destroy.

References opj_cp::comment, opj_ppx_struct::m_data, opj_cp::m_enc, opj_cp::m_is_decoder, opj_encoding_param::m_matrice, opj_cp::m_specific_param, opj_free(), opj_j2k_tcp_destroy(), opj_cp::ppm_buffer, opj_cp::ppm_data, opj_cp::ppm_markers, opj_cp::ppm_markers_count, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_destroy().

## ◆ opj_j2k_create_compress()

opj_j2k_t * opj_j2k_create_compress | ( | void |  | ) |

Creates a J2K compression structure.

Returns
  Returns a handle to a J2K compressor if successful, returns NULL otherwise

References opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_cp::m_is_decoder, opj_j2k::m_is_decoder, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k::m_tp, opj_j2k::m_validation_list, opj_calloc(), OPJ_J2K_DEFAULT_HEADER_SIZE, opj_j2k_destroy(), opj_j2k_get_default_thread_count(), opj_malloc(), opj_procedure_list_create(), and opj_thread_pool_create().

Referenced by opj_create_compress(), and opj_jp2_create().

## ◆ opj_j2k_create_cstr_index()

static opj_codestream_index_t * opj_j2k_create_cstr_index | ( | void |  | ) |
| static

References opj_codestream_index::marker, opj_codestream_index::marknum, opj_codestream_index::maxmarknum, opj_calloc(), opj_free(), and opj_codestream_index::tile_index.

Referenced by opj_j2k_create_decompress().

## ◆ opj_j2k_create_decompress()

opj_j2k_t * opj_j2k_create_decompress | ( | void |  | ) |

Creates a J2K decompression structure.

Returns
  a handle to a J2K decompressor if successful, NULL otherwise.

References opj_cp::allow_different_bit_depth_sign, opj_j2k::cstr_index, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k_dec::m_header_data, opj_j2k_dec::m_header_data_size, opj_cp::m_is_decoder, opj_j2k::m_is_decoder, opj_j2k_dec::m_last_sot_read_pos, opj_j2k_dec::m_nb_tile_parts_correction_checked, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_dec::m_tile_ind_to_dec, opj_j2k::m_tp, opj_j2k::m_validation_list, opj_calloc(), opj_j2k_create_cstr_index(), OPJ_J2K_DEFAULT_HEADER_SIZE, opj_j2k_destroy(), opj_j2k_get_default_thread_count(), opj_procedure_list_create(), opj_thread_pool_create(), OPJ_TRUE, and opj_cp::strict.

Referenced by opj_create_decompress(), and opj_jp2_create().

## ◆ 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
| ) |  |
| static

Creates a tile-coder encoder.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_cp, opj_j2k::m_private_image, opj_j2k::m_tcd, opj_j2k::m_tp, opj_event_msg(), OPJ_FALSE, opj_tcd_create(), opj_tcd_destroy(), opj_tcd_init(), OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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.

Parameters

  j2k | J2K decompressor handle
  p_stream | FIXME DOC
  p_image | FIXME DOC
  p_manager | FIXME DOC

Returns
  FIXME DOC

References opj_image::comps, opj_image_comp::data, opj_image_comp::factor, opj_j2k::m_cp, opj_cp::m_dec, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_image::numcomps, opj_copy_image_header(), OPJ_FALSE, opj_image_create0(), opj_image_destroy(), opj_j2k_exec(), opj_j2k_move_data_from_codec_to_output_image(), opj_j2k_setup_decoding(), and opj_j2k_update_image_dimensions().

Referenced by opj_create_decompress(), and opj_jp2_decode().

## ◆ 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
| ) |  |
| static

References opj_j2k::cstr_index, EVT_ERROR, EVT_INFO, EVT_WARNING, J2K_STATE_EOC, J2K_STATE_TPHSOT, opj_j2k::m_cp, opj_tcp::m_current_tile_part_number, opj_j2k::m_decoder, opj_j2k_dec::m_last_sot_read_pos, opj_j2k::m_output_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_tcd, opj_j2k_dec::m_tile_ind_to_dec, opj_codestream_index::main_head_end, opj_tile_index::nb_tps, opj_event_msg(), OPJ_FALSE, opj_j2k_allocate_tile_element_cstr_index(), opj_j2k_are_all_used_components_decoded(), opj_j2k_decode_tile(), opj_j2k_read_tile_header(), opj_j2k_tcp_data_destroy(), opj_j2k_update_image_data(), opj_stream_read_seek(), OPJ_TRUE, opj_tp_index::start_pos, opj_cp::tcps, opj_cp::th, opj_codestream_index::tile_index, opj_tile_index::tp_index, and opj_cp::tw.

Referenced by opj_j2k_setup_decoding_tile().

## ◆ 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.

Parameters

  p_j2k | the jpeg2000 codec.
  p_tile_index |
  p_data | FIXME DOC
  p_data_size | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References opj_j2k::cstr_index, EVT_ERROR, EVT_WARNING, J2K_MS_EOC, J2K_MS_SOT, J2K_STATE_DATA, J2K_STATE_EOC, J2K_STATE_ERR, J2K_STATE_NEOC, opj_j2k_dec::m_can_decode, opj_j2k_dec::m_comps_indices_to_decode, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_data, opj_tcp::m_data_size, opj_j2k::m_decoder, opj_j2k_dec::m_numcomps_to_decode, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_tcd, opj_event_msg(), OPJ_FALSE, opj_j2k_tcp_data_destroy(), opj_j2k_tcp_destroy(), opj_read_bytes, opj_stream_get_number_byte_left(), opj_stream_read_data(), opj_tcd_decode_tile(), opj_tcd_update_tile_data(), OPJ_TRUE, opj_cp::strict, opj_cp::tcps, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_create_decompress(), opj_j2k_decode_one_tile(), opj_j2k_decode_tiles(), and opj_jp2_decode_tile().

## ◆ 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
| ) |  |
| static

Reads the tiles.

References opj_image::comps, opj_tcd_tile::comps, opj_image_comp::data, opj_tcd_tilecomp::data, EVT_ERROR, EVT_INFO, opj_tcd::image, J2K_STATE_DATA, J2K_STATE_NEOC, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_data, opj_j2k::m_decoder, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_tcd, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_image_data_free(), opj_j2k_are_all_used_components_decoded(), opj_j2k_decode_tile(), opj_j2k_read_tile_header(), opj_j2k_tcp_data_destroy(), opj_j2k_update_image_data(), opj_stream_get_number_byte_left(), OPJ_TRUE, opj_image_comp::resno_decoded, opj_tcd::tcd_image, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_tcd_image::tiles, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_setup_decoding().

## ◆ opj_j2k_decoder_set_strict_mode()

void opj_j2k_decoder_set_strict_mode | ( | opj_j2k_t * | j2k,
|  | OPJ_BOOL | strict
| ) |  |

References opj_j2k::m_cp, and opj_cp::strict.

Referenced by opj_create_decompress(), and opj_jp2_decoder_set_strict_mode().

## ◆ 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
| ) |  |
| static

The default decoding validation procedure without any extension.

Parameters

  p_j2k | the jpeg2000 codec to validate.
  p_stream | the input stream to validate.
  p_manager | the user event manager.

Returns
  true if the parameters are correct.

References opj_j2k::m_decoder, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_validation_list, OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_decoding_validation().

## ◆ opj_j2k_destroy()

void opj_j2k_destroy | ( | opj_j2k_t * | p_j2k | ) |

Destroys a jpeg2000 codec.

Parameters

  p_j2k | the jpeg20000 structure to destroy.

References opj_j2k::cstr_index, j2k_destroy_cstr_index(), opj_j2k_dec::m_comps_indices_to_decode, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k_enc::m_encoded_tile_data, opj_j2k::m_encoder, opj_j2k_dec::m_header_data, opj_j2k_dec::m_header_data_size, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_is_decoder, opj_j2k_dec::m_numcomps_to_decode, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_j2k_enc::m_tlm_sot_offsets_buffer, opj_j2k_enc::m_tlm_sot_offsets_current, opj_j2k::m_tp, opj_j2k::m_validation_list, opj_free(), opj_image_destroy(), opj_j2k_cp_destroy(), opj_j2k_tcp_destroy(), opj_procedure_list_destroy(), opj_tcd_destroy(), and opj_thread_pool_destroy().

Referenced by opj_create_compress(), opj_create_decompress(), opj_j2k_create_compress(), opj_j2k_create_decompress(), and opj_jp2_destroy().

## ◆ 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
| ) |  |
| static

Destroys the memory associated with the decoding of headers.

References opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_specific_param, opj_free(), OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_end_compress().

## ◆ opj_j2k_dump_MH_index()

static void opj_j2k_dump_MH_index | ( | opj_j2k_t * | p_j2k,
|  | FILE * | out_stream
| ) |  |
| static

References opj_j2k::cstr_index, opj_tp_index::end_header, opj_tp_index::end_pos, opj_marker_info::len, opj_codestream_index::main_head_end, opj_codestream_index::main_head_start, opj_tile_index::marker, opj_codestream_index::marker, opj_tile_index::marknum, opj_codestream_index::marknum, opj_codestream_index::nb_of_tiles, opj_tile_index::nb_tps, opj_marker_info::pos, opj_tp_index::start_pos, opj_codestream_index::tile_index, opj_tile_index::tp_index, and opj_marker_info::type.

Referenced by j2k_dump().

## ◆ opj_j2k_dump_MH_info()

static void opj_j2k_dump_MH_info | ( | opj_j2k_t * | p_j2k,
|  | FILE * | out_stream
| ) |  |
| static

References opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_j2k_dump_tile_info(), opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, and opj_cp::ty0.

Referenced by j2k_dump().

## ◆ opj_j2k_dump_tile_info()

static void opj_j2k_dump_tile_info | ( | opj_tcp_t * | l_default_tile,
|  | OPJ_INT32 | numcomps,
|  | FILE * | out_stream
| ) |  |
| static

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, opj_tccp::csty, opj_tcp::csty, opj_stepsize::expn, J2K_CCP_QNTSTY_SIQNT, opj_stepsize::mant, opj_tcp::mct, opj_tccp::numgbits, opj_tcp::numlayers, opj_tccp::numresolutions, opj_tccp::prch, opj_tccp::prcw, opj_tcp::prg, opj_tccp::qmfbid, opj_tccp::qntsty, opj_tccp::roishift, opj_tccp::stepsizes, and opj_tcp::tccps.

Referenced by j2k_dump(), and opj_j2k_dump_MH_info().

## ◆ 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.

References opj_image::comps, opj_tcd_tile::comps, opj_image_comp::data, opj_tcd_tilecomp::data, EVT_ERROR, opj_tcd::image, opj_j2k::m_cp, opj_j2k::m_tcd, opj_image::numcomps, opj_alloc_tile_component_data(), opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_tile_data(), opj_j2k_post_write_tile(), opj_j2k_pre_write_tile(), opj_realloc(), opj_tcd_copy_tile_data(), opj_tcd_get_encoder_input_buffer_size(), OPJ_TRUE, opj_tcd_tilecomp::ownsData, opj_tcd::tcd_image, opj_cp::th, opj_tcd_image::tiles, and opj_cp::tw.

Referenced by opj_create_compress(), and opj_jp2_encode().

## ◆ opj_j2k_encoder_set_extra_options()

OPJ_BOOL opj_j2k_encoder_set_extra_options | ( | opj_j2k_t * | p_j2k,
|  | const char *const * | p_options,
|  | opj_event_mgr_t * | p_manager
| ) |  |

Specify extra options for the encoder.

Parameters

  p_j2k | the jpeg2000 codec.
  p_options | options
  p_manager | the user event manager

See also
  opj_encoder_set_extra_options() for more details.

References EVT_ERROR, opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_nb_comps, opj_j2k_enc::m_PLT, opj_j2k::m_specific_param, opj_j2k_enc::m_TLM, opj_tccp::numgbits, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, tcp, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_create_compress(), and opj_jp2_encoder_set_extra_options().

## ◆ 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
| ) |  |
| static

The default encoding validation procedure without any extension.

Parameters

  p_j2k | the jpeg2000 codec to validate.
  p_stream | the input stream to validate.
  p_manager | the user event manager.

Returns
  true if the parameters are correct.

References EVT_ERROR, J2K_STATE_NONE, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_validation_list, opj_tccp::numresolutions, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, OPJ_UNUSED, opj_tcp::tccps, opj_cp::tcps, opj_cp::tdx, and opj_cp::tdy.

Referenced by opj_j2k_setup_encoding_validation().

## ◆ 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.

References opj_j2k::m_procedure_list, OPJ_FALSE, opj_j2k_exec(), opj_j2k_setup_end_compress(), and OPJ_TRUE.

Referenced by opj_create_compress(), and opj_jp2_end_compress().

## ◆ 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.

References OPJ_TRUE.

Referenced by opj_create_decompress(), and opj_jp2_end_decompress().

## ◆ 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
| ) |  |
| static

Ends the encoding, i.e.

frees memory.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k_enc::m_encoded_tile_data, opj_j2k_enc::m_encoded_tile_size, opj_j2k::m_encoder, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_j2k_enc::m_tlm_sot_offsets_buffer, opj_j2k_enc::m_tlm_sot_offsets_current, opj_free(), opj_tcd_destroy(), OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_end_compress().

## ◆ 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
| ) |  |
| static

Executes the given procedures on the given codec.

Parameters

  p_procedure_list | the list of procedures to execute
  p_j2k | the jpeg2000 codec to execute the procedures on.
  p_stream | the stream to execute the procedures on.
  p_manager | the user manager.

Returns
  true if all the procedures were successfully executed.

References opj_procedure_list_clear(), opj_procedure_list_get_first_procedure(), opj_procedure_list_get_nb_procedures(), and OPJ_TRUE.

Referenced by opj_j2k_decode(), opj_j2k_end_compress(), opj_j2k_get_tile(), opj_j2k_read_header(), and opj_j2k_start_compress().

## ◆ opj_j2k_get_default_stride()

static OPJ_FLOAT32 opj_j2k_get_default_stride | ( | opj_tcp_t * | p_tcp | ) |
| static

Referenced by opj_j2k_update_rates().

## ◆ opj_j2k_get_default_thread_count()

static int opj_j2k_get_default_thread_count | ( |  | ) |
| static

References opj_get_num_cpus(), and opj_has_thread_support().

Referenced by opj_j2k_create_compress(), and opj_j2k_create_decompress().

## ◆ 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
| ) |  |
| static

Gets the offset of the header.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::cstr_index, opj_codestream_index::main_head_end, opj_stream_tell(), OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_header_writing().

## ◆ opj_j2k_get_imf_max_NL()

static int opj_j2k_get_imf_max_NL | ( | opj_cparameters_t * | parameters,
|  | opj_image_t * | image
| ) |  |
| static

References opj_cparameters::cp_tdx, OPJ_GET_IMF_PROFILE, OPJ_PROFILE_IMF_2K, OPJ_PROFILE_IMF_2K_R, OPJ_PROFILE_IMF_4K, OPJ_PROFILE_IMF_4K_R, OPJ_PROFILE_IMF_8K, OPJ_PROFILE_IMF_8K_R, opj_cparameters::rsiz, opj_cparameters::tile_size_on, and opj_image::x1.

Referenced by opj_j2k_set_imf_parameters().

## ◆ opj_j2k_get_marker_handler()

static const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler | ( | OPJ_UINT32 | p_id | ) |
| static

Reads the lookup table containing all the marker, status and action, and returns the handler associated with the marker value.

Parameters

  p_id | Marker value to look up

Returns
  the handler associated with the id.

References opj_dec_memory_marker_handler::id, and j2k_memory_marker_handler_tab.

Referenced by opj_j2k_read_header_procedure(), opj_j2k_read_tile_header(), and opj_j2k_read_unk().

## ◆ opj_j2k_get_max_coc_size()

static OPJ_UINT32 opj_j2k_get_max_coc_size | ( | opj_j2k_t * | p_j2k | ) |
| static

Gets the maximum size taken by a coc.

Parameters

  p_j2k | the jpeg2000 codec to use.

References opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, opj_j2k_get_SPCod_SPCoc_size(), opj_uint_max(), opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_get_max_qcc_size(), and opj_j2k_get_specific_header_sizes().

## ◆ opj_j2k_get_max_poc_size()

static OPJ_UINT32 opj_j2k_get_max_poc_size | ( | opj_j2k_t * | p_j2k | ) |
| static

Gets the maximum size taken by the writing of a POC.

References opj_j2k::m_cp, opj_tcp::numpocs, opj_uint_max(), opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_get_specific_header_sizes().

## ◆ opj_j2k_get_max_qcc_size()

static OPJ_UINT32 opj_j2k_get_max_qcc_size | ( | opj_j2k_t * | p_j2k | ) |
| static

Gets the maximum size taken by a qcc.

References opj_j2k_get_max_coc_size().

Referenced by opj_j2k_get_specific_header_sizes().

## ◆ opj_j2k_get_max_toc_size()

static OPJ_UINT32 opj_j2k_get_max_toc_size | ( | opj_j2k_t * | p_j2k | ) |
| static

Gets the maximum size taken by the toc headers of all the tile parts of any given tile.

References opj_j2k::m_cp, opj_tcp::m_nb_tile_parts, opj_uint_max(), opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_get_specific_header_sizes().

## ◆ opj_j2k_get_num_tp()

static OPJ_UINT32 opj_j2k_get_num_tp | ( | opj_cp_t * | cp,
|  | OPJ_UINT32 | pino,
|  | OPJ_UINT32 | tileno
| ) |  |
| static

Gets the number of tile parts used for the given change of progression (if any) and the given tile.

Parameters

  cp | the coding parameters.
  pino | the offset of the given poc (i.e. its position in the coding parameter).
  tileno | the given tile.

Returns
  the number of tile parts.

References opj_poc::compE, opj_poc::layE, opj_cp::m_enc, opj_cp::m_specific_param, opj_encoding_param::m_tp_flag, opj_encoding_param::m_tp_on, opj_encoding_param::m_tp_pos, opj_tcp::numpocs, opj_j2k_convert_progression_order(), opj_poc::prcE, opj_poc::resE, tcp, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_calculate_tp(), and opj_j2k_write_all_tile_parts().

## ◆ 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
| ) |  |
| static

Reads values from a SOT marker (Start of tile-part)

the j2k decoder state is not affected. No side effects, no checks except for p_header_size.

Parameters

  p_header_data | the data contained in the SOT marker.
  p_header_size | the size of the data contained in the SOT marker.
  p_tile_no | Isot.
  p_tot_len | Psot.
  p_current_part | TPsot.
  p_num_parts | TNsot.
  p_manager | the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, opj_read_bytes, and OPJ_TRUE.

Referenced by opj_j2k_need_nb_tile_parts_correction(), and opj_j2k_read_sot().

## ◆ 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
| ) |  |
| static

Gets the size taken by writing a SPCod or SPCoc for the given tile and component.

Parameters

  p_j2k | the J2K codec.
  p_tile_no | the tile index.
  p_comp_no | the component being outputted.

Returns
  the number of bytes taken by the SPCod element.

References opj_tccp::csty, J2K_CCP_CSTY_PRT, opj_j2k::m_cp, opj_tccp::numresolutions, opj_tcp::tccps, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_get_max_coc_size(), opj_j2k_write_coc(), opj_j2k_write_coc_in_memory(), and opj_j2k_write_cod().

## ◆ opj_j2k_get_specific_header_sizes()

static OPJ_UINT32 opj_j2k_get_specific_header_sizes | ( | opj_j2k_t * | p_j2k | ) |
| static

Gets the maximum size taken by the headers of the SOT.

Parameters

  p_j2k | the jpeg2000 codec to use.

References opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_PLT, opj_j2k::m_private_image, opj_j2k_enc::m_reserved_bytes_for_PLT, opj_j2k::m_specific_param, opj_image::numcomps, opj_get_encoding_packet_count(), OPJ_IS_CINEMA, opj_j2k_get_max_coc_size(), opj_j2k_get_max_poc_size(), opj_j2k_get_max_qcc_size(), opj_j2k_get_max_toc_size(), opj_uint_ceildiv(), opj_uint_max(), opj_cp::rsiz, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_update_rates().

## ◆ 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
| ) |  |
| static

Gets the size taken by writing SQcd or SQcc element, i.e.

the quantization values of a band in the QCD or QCC.

Parameters

  p_tile_no | the tile index.
  p_comp_no | the component being outputted.
  p_j2k | the J2K codec.

Returns
  the number of bytes taken by the SPCod element.

References J2K_CCP_QNTSTY_NOQNT, J2K_CCP_QNTSTY_SIQNT, opj_j2k::m_cp, opj_tccp::numresolutions, opj_tccp::qntsty, opj_tcp::tccps, opj_cp::tcps, and opj_cp::th.

Referenced by opj_j2k_write_qcc(), opj_j2k_write_qcc_in_memory(), and opj_j2k_write_qcd().

## ◆ 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
| ) |  |

References opj_image::comps, opj_image_comp::data, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, opj_image_comp::factor, opj_image_comp::h, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_dec::m_tile_ind_to_dec, opj_image::numcomps, opj_copy_image_header(), opj_event_msg(), OPJ_FALSE, opj_image_create0(), opj_image_data_free(), opj_image_destroy(), opj_int_ceildiv(), opj_int_ceildivpow2(), opj_j2k_exec(), opj_j2k_move_data_from_codec_to_output_image(), opj_j2k_setup_decoding_tile(), opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image_comp::w, opj_image_comp::x0, opj_image::x0, opj_image::x1, opj_image_comp::y0, opj_image::y0, and opj_image::y1.

Referenced by opj_create_decompress(), and opj_jp2_get_tile().

## ◆ opj_j2k_get_tile_data()

static void opj_j2k_get_tile_data | ( | opj_tcd_t * | p_tcd,
|  | OPJ_BYTE * | p_data
| ) |  |
| static

References opj_image::comps, opj_tcd_tile::comps, opj_image_comp::data, opj_tcd::image, opj_image::numcomps, opj_get_tile_dimensions(), opj_image_comp::sgnd, opj_tcd::tcd_image, and opj_tcd_image::tiles.

Referenced by opj_j2k_encode().

## ◆ opj_j2k_get_tp_stride()

static OPJ_FLOAT32 opj_j2k_get_tp_stride | ( | opj_tcp_t * | p_tcp | ) |
| static

References opj_tcp::m_nb_tile_parts.

Referenced by opj_j2k_update_rates().

## ◆ 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
| ) |  |
| static

Inits the Info.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_enc::m_total_tile_parts, opj_j2k_calculate_tp(), and OPJ_UNUSED.

Referenced by opj_j2k_setup_header_writing().

## ◆ opj_j2k_initialise_4K_poc()

static int opj_j2k_initialise_4K_poc | ( | opj_poc_t * | POC,
|  | int | numres
| ) |  |
| static

References opj_poc::compno0, opj_poc::compno1, opj_poc::layno1, OPJ_CPRL, opj_poc::prg1, opj_poc::resno0, opj_poc::resno1, and opj_poc::tile.

Referenced by opj_j2k_set_cinema_parameters().

## ◆ 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
| ) |  |
| static

References opj_image::comps, EVT_WARNING, opj_image_comp::h, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, OPJ_PROFILE_CINEMA_2K, OPJ_PROFILE_CINEMA_4K, OPJ_TRUE, opj_image_comp::prec, opj_image_comp::sgnd, and opj_image_comp::w.

Referenced by opj_j2k_setup_encoder().

## ◆ opj_j2k_is_imf_compliant()

static OPJ_BOOL opj_j2k_is_imf_compliant | ( | opj_cparameters_t * | parameters,
|  | opj_image_t * | image,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

References opj_cparameters::cblockh_init, opj_cparameters::cblockw_init, opj_image::comps, opj_cparameters::cp_tdx, opj_cparameters::cp_tdy, opj_cparameters::cp_tx0, opj_cparameters::cp_ty0, opj_image_comp::dx, opj_image_comp::dy, EVT_WARNING, opj_image_comp::h, opj_cparameters::irreversible, opj_cparameters::mode, opj_image::numcomps, opj_cparameters::numpocs, opj_cparameters::numresolution, OPJ_CPRL, opj_event_msg(), OPJ_FALSE, OPJ_GET_IMF_MAINLEVEL, OPJ_GET_IMF_PROFILE, OPJ_GET_IMF_SUBLEVEL, OPJ_IMF_MAINLEVEL_MAX, OPJ_PROFILE_IMF_2K, OPJ_PROFILE_IMF_2K_R, OPJ_PROFILE_IMF_4K, OPJ_PROFILE_IMF_4K_R, OPJ_PROFILE_IMF_8K, OPJ_PROFILE_IMF_8K_R, OPJ_TRUE, opj_cparameters::prch_init, opj_cparameters::prcw_init, opj_image_comp::prec, opj_cparameters::prog_order, opj_cparameters::res_spec, opj_cparameters::roi_compno, opj_cparameters::rsiz, opj_image_comp::sgnd, tabMaxSubLevelFromMainLevel, opj_cparameters::tcp_numlayers, opj_cparameters::tile_size_on, opj_image_comp::w, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_setup_encoder().

## ◆ 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
| ) |  |
| static

The mct encoding validation procedure.

Parameters

  p_j2k | the jpeg2000 codec to validate.
  p_stream | the input stream to validate.
  p_manager | the user event manager.

Returns
  true if the parameters are correct.

References opj_j2k::m_cp, opj_tcp::m_mct_coding_matrix, opj_j2k::m_private_image, opj_tcp::mct, opj_image::numcomps, OPJ_TRUE, OPJ_UNUSED, opj_tccp::qmfbid, opj_cp::rsiz, opj_tcp::tccps, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_setup_encoding_validation().

## ◆ opj_j2k_merge_ppm()

static OPJ_BOOL opj_j2k_merge_ppm | ( | opj_cp_t * | p_cp,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Merges all PPM markers read (Packed headers, main header)

Parameters

  p_cp | main coding parameters.
  p_manager | the user event manager.

References EVT_ERROR, opj_ppx_struct::m_data, opj_ppx_struct::m_data_size, opj_event_msg(), OPJ_FALSE, opj_free(), opj_malloc(), opj_read_bytes, OPJ_TRUE, opj_cp::ppm, opj_cp::ppm_buffer, opj_cp::ppm_data, opj_cp::ppm_data_size, opj_cp::ppm_len, opj_cp::ppm_markers, and opj_cp::ppm_markers_count.

Referenced by opj_j2k_read_header_procedure().

## ◆ opj_j2k_merge_ppt()

static OPJ_BOOL opj_j2k_merge_ppt | ( | opj_tcp_t * | p_tcp,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Merges all PPT markers read (Packed headers, tile-part header)

Merges all PPT markers read (Packed packet headers, tile-part header)

Parameters

  p_tcp | the tile.
  p_manager | the user event manager.

References EVT_ERROR, opj_ppx_struct::m_data, opj_ppx_struct::m_data_size, opj_event_msg(), OPJ_FALSE, opj_free(), opj_malloc(), OPJ_TRUE, opj_tcp::ppt, opj_tcp::ppt_buffer, opj_tcp::ppt_data, opj_tcp::ppt_data_size, opj_tcp::ppt_len, opj_tcp::ppt_markers, and opj_tcp::ppt_markers_count.

Referenced by opj_j2k_read_tile_header().

## ◆ 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
| ) |  |
| static

References opj_image::comps, opj_image_comp::data, opj_image_comp::h, opj_j2k_dec::m_comps_indices_to_decode, opj_j2k::m_decoder, opj_j2k_dec::m_numcomps_to_decode, opj_j2k::m_output_image, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, OPJ_FALSE, opj_free(), opj_image_data_free(), opj_image_destroy(), opj_malloc(), OPJ_TRUE, opj_image_comp::resno_decoded, and opj_image_comp::w.

Referenced by opj_j2k_decode(), and opj_j2k_get_tile().

## ◆ 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
| ) |  |
| static

Checks for invalid number of tile-parts in SOT marker (TPsot==TNsot).

See issue 254.

Parameters

  p_stream | the stream to read data from.
  tile_no | tile number we're looking for.
  p_correction_needed | output value. if true, non conformant codestream needs TNsot correction.
  p_manager | the user event manager.

Returns
  true if the function was successful, false else.

References EVT_ERROR, J2K_MS_SOT, opj_event_msg(), OPJ_FALSE, opj_j2k_get_sot_values(), opj_read_bytes, opj_stream_has_seek(), opj_stream_read_data(), opj_stream_seek(), opj_stream_skip(), opj_stream_tell(), and OPJ_TRUE.

Referenced by opj_j2k_read_tile_header().

## ◆ 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
| ) |  |
| static

References opj_j2k::m_current_tile_number, opj_j2k_enc::m_encoded_tile_data, opj_j2k_enc::m_encoded_tile_size, opj_j2k::m_encoder, opj_j2k::m_specific_param, OPJ_FALSE, opj_j2k_write_all_tile_parts(), opj_j2k_write_first_tile_part(), opj_stream_write_data(), and OPJ_TRUE.

Referenced by opj_j2k_encode(), and opj_j2k_write_tile().

## ◆ 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
| ) |  |
| static

References opj_tcd::cur_totnum_tp, EVT_ERROR, EVT_INFO, opj_j2k::m_cp, opj_j2k_enc::m_current_poc_tile_part_number, opj_j2k::m_current_tile_number, opj_j2k_enc::m_current_tile_part_number, opj_j2k::m_encoder, opj_tcp::m_nb_tile_parts, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_event_msg(), OPJ_FALSE, opj_tcd_init_encode_tile(), OPJ_TRUE, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_encode(), and opj_j2k_write_tile().

## ◆ opj_j2k_read_cap()

static OPJ_BOOL opj_j2k_read_cap | ( | opj_j2k_t * | p_j2k,
|  | OPJ_BYTE * | p_header_data,
|  | OPJ_UINT32 | p_header_size,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Reads a CAP marker (extended capabilities definition).

Empty implementation. Found in HTJ2K files

Parameters

  p_header_data | the data contained in the CAP box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the CAP marker.
  p_manager | the user event manager.

Empty implementation. Found in HTJ2K files.

Parameters

  p_header_data | the data contained in the CAP box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the CAP marker.
  p_manager | the user event manager.

References OPJ_TRUE.

## ◆ 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
| ) |  |
| static

Reads a CBD marker (Component bit depth definition)

Parameters

  p_header_data | the data contained in the CBD box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the CBD marker.
  p_manager | the user event manager.

References opj_image::comps, EVT_ERROR, opj_j2k::m_private_image, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, opj_image_comp::prec, and opj_image_comp::sgnd.

## ◆ 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
| ) |  |
| static

Reads a COC marker (Coding Style Component)

Parameters

  p_header_data | the data contained in the COC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the COC marker.
  p_manager | the user event manager.

References opj_tccp::csty, EVT_ERROR, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_j2k_read_SPCod_SPCoc(), opj_read_bytes, OPJ_TRUE, opj_tcp::tccps, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a COD marker (Coding style defaults)

Parameters

  p_header_data | the data contained in the COD box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the COD marker.
  p_manager | the user event manager.

References opj_tcp::cod, opj_tccp::csty, opj_tcp::csty, EVT_ERROR, J2K_CCP_CSTY_PRT, J2K_CP_CSTY_EPH, J2K_CP_CSTY_PRT, J2K_CP_CSTY_SOP, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_cp::m_dec, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_decoding_param::m_layer, opj_j2k::m_private_image, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_tcp::mct, opj_tcp::num_layers_to_decode, opj_image::numcomps, opj_tcp::numlayers, opj_tccp::numresolutions, OPJ_CPRL, opj_event_msg(), OPJ_FALSE, opj_j2k_copy_tile_component_parameters(), opj_j2k_read_SPCod_SPCoc(), opj_malloc(), OPJ_PROG_UNKNOWN, opj_read_bytes, OPJ_TRUE, opj_tcp::prg, opj_tcp::tccps, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a COM marker (comments)

Parameters

  p_j2k | the jpeg2000 file codec.
  p_header_data | the data contained in the COM box.
  p_header_size | the size of the data contained in the COM marker.
  p_manager | the user event manager.

References OPJ_TRUE, and OPJ_UNUSED.

## ◆ opj_j2k_read_cpf()

static OPJ_BOOL opj_j2k_read_cpf | ( | opj_j2k_t * | p_j2k,
|  | OPJ_BYTE * | p_header_data,
|  | OPJ_UINT32 | p_header_size,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Reads a CPF marker (corresponding profile).

Empty implementation. Found in HTJ2K files

Parameters

  p_header_data | the data contained in the CPF box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the CPF marker.
  p_manager | the user event manager.

References OPJ_TRUE.

## ◆ 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
| ) |  |
| static

Reads a CRG marker (Component registration)

Parameters

  p_header_data | the data contained in the TLM box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the TLM marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_private_image, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, and OPJ_UNUSED.

## ◆ 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
| ) |  |
| static

References opj_read_float.

## ◆ 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
| ) |  |
| static

References opj_read_float.

## ◆ 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
| ) |  |
| static

References opj_read_double.

## ◆ 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
| ) |  |
| static

References opj_read_double.

## ◆ 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.

Parameters

  p_stream | the stream to read data from.
  p_j2k | the jpeg2000 codec.
  p_image | FIXME DOC
  p_manager | the user event manager.

Returns
  true if the box is valid.

References opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_validation_list, opj_copy_image_header(), OPJ_FALSE, opj_image_create0(), opj_image_destroy(), opj_j2k_allocate_tile_element_cstr_index(), opj_j2k_exec(), opj_j2k_setup_decoding_validation(), opj_j2k_setup_header_reading(), and OPJ_TRUE.

Referenced by opj_create_decompress(), and opj_jp2_read_header().

## ◆ 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
| ) |  |
| static

The read header procedure.

References opj_j2k::cstr_index, EVT_ERROR, EVT_INFO, opj_dec_memory_marker_handler::handler, opj_dec_memory_marker_handler::id, J2K_MS_COD, J2K_MS_QCD, J2K_MS_SIZ, J2K_MS_SOT, J2K_MS_UNK, J2K_STATE_MHSOC, J2K_STATE_TPHSOT, opj_j2k::m_cp, opj_j2k::m_decoder, opj_j2k_dec::m_header_data, opj_j2k_dec::m_header_data_size, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_codestream_index::main_head_end, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_add_mhmarker(), opj_j2k_get_marker_handler(), opj_j2k_merge_ppm(), opj_j2k_read_soc(), opj_j2k_read_unk(), opj_read_bytes, opj_realloc(), opj_stream_read_data(), opj_stream_tell(), OPJ_TRUE, and opj_dec_memory_marker_handler::states.

Referenced by opj_j2k_setup_header_reading().

## ◆ 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
| ) |  |
| static

References opj_read_bytes.

## ◆ 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
| ) |  |
| static

References opj_read_bytes.

## ◆ 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
| ) |  |
| static

References opj_read_bytes.

## ◆ 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
| ) |  |
| static

References opj_read_bytes.

## ◆ 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
| ) |  |
| static

Reads a MCC marker (Multiple Component Collection)

Parameters

  p_header_data | the data contained in the MCC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the MCC marker.
  p_manager | the user event manager.

NOT FOUND

References EVT_ERROR, EVT_WARNING, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_j2k_dec::m_default_tcp, opj_mct_data::m_index, opj_simple_mcc_decorrelation_data::m_index, opj_simple_mcc_decorrelation_data::m_is_irreversible, opj_tcp::m_mcc_records, opj_tcp::m_mct_records, opj_simple_mcc_decorrelation_data::m_nb_comps, opj_tcp::m_nb_max_mcc_records, opj_tcp::m_nb_mcc_records, opj_tcp::m_nb_mct_records, opj_simple_mcc_decorrelation_data::m_offset_array, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_event_msg(), OPJ_FALSE, opj_free(), OPJ_J2K_MCC_DEFAULT_NB_RECORDS, opj_read_bytes, opj_realloc(), OPJ_TRUE, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a MCO marker (Multiple Component Transform Ordering)

Parameters

  p_header_data | the data contained in the MCO box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the MCO marker.
  p_manager | the user event manager.

References EVT_ERROR, EVT_WARNING, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tccp::m_dc_level_shift, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_tcp::m_mct_decoding_matrix, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_add_mct(), opj_read_bytes, OPJ_TRUE, opj_tcp::tccps, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a MCT marker (Multiple Component Transform)

Parameters

  p_header_data | the data contained in the MCT box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the MCT marker.
  p_manager | the user event manager.

References EVT_ERROR, EVT_WARNING, J2K_STATE_TPH, opj_mct_data::m_array_type, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_mct_data::m_data, opj_mct_data::m_data_size, opj_j2k::m_decoder, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_j2k_dec::m_default_tcp, opj_mct_data::m_element_type, opj_mct_data::m_index, opj_tcp::m_mcc_records, opj_tcp::m_mct_records, opj_tcp::m_nb_max_mct_records, opj_tcp::m_nb_mcc_records, opj_tcp::m_nb_mct_records, opj_simple_mcc_decorrelation_data::m_offset_array, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_event_msg(), OPJ_FALSE, opj_free(), OPJ_J2K_MCT_DEFAULT_NB_RECORDS, opj_malloc(), opj_read_bytes, opj_realloc(), OPJ_TRUE, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a PLM marker (Packet length, main header marker)

Parameters

  p_header_data | the data contained in the TLM box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the TLM marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, and OPJ_UNUSED.

## ◆ 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
| ) |  |
| static

Reads a PLT marker (Packet length, tile-part header)

Parameters

  p_header_data | the data contained in the PLT box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the PLT marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, and OPJ_UNUSED.

## ◆ 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
| ) |  |
| static

Reads a POC marker (Progression Order Change)

Parameters

  p_header_data | the data contained in the POC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the POC marker.
  p_manager | the user event manager.

References opj_poc::compno0, opj_poc::compno1, EVT_ERROR, J2K_MAX_POCS, J2K_STATE_TPH, opj_poc::layno1, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, opj_uint_min(), opj_tcp::POC, opj_tcp::pocs, opj_poc::prg, opj_poc::resno0, opj_poc::resno1, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a PPM marker (Packed headers, main header)

Reads a PPM marker (Packed packet headers, main header)

Parameters

  p_header_data | the data contained in the POC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the POC marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_cp, opj_ppx_struct::m_data, opj_ppx_struct::m_data_size, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_malloc(), opj_read_bytes, opj_realloc(), OPJ_TRUE, opj_cp::ppm, opj_cp::ppm_markers, and opj_cp::ppm_markers_count.

## ◆ 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
| ) |  |
| static

Reads a PPT marker (Packed packet headers, tile-part header)

Parameters

  p_header_data | the data contained in the PPT box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the PPT marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_ppx_struct::m_data, opj_ppx_struct::m_data_size, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_malloc(), opj_read_bytes, opj_realloc(), OPJ_TRUE, opj_cp::ppm, opj_tcp::ppt, opj_tcp::ppt_markers, opj_tcp::ppt_markers_count, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a QCC marker (Quantization component)

Parameters

  p_header_data | the data contained in the QCC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the QCC marker.
  p_manager | the user event manager.

References opj_cp::correct, EVT_ERROR, EVT_WARNING, opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_j2k_read_SQcd_SQcc(), opj_read_bytes, and OPJ_TRUE.

## ◆ 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
| ) |  |
| static

Reads a QCD marker (Quantization defaults)

Parameters

  p_header_data | the data contained in the QCD box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the QCD marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, opj_j2k_copy_tile_quantization_parameters(), opj_j2k_read_SQcd_SQcc(), and OPJ_TRUE.

## ◆ 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
| ) |  |
| static

Reads a RGN marker (Region Of Interest)

Parameters

  p_header_data | the data contained in the POC box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the POC marker.
  p_manager | the user event manager.

References opj_cp::correct, EVT_ERROR, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, opj_tccp::roishift, opj_tcp::tccps, and opj_cp::tcps.

## ◆ 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
| ) |  |
| static

Reads a SIZ marker (image and tile size)

Parameters

  p_j2k | the jpeg2000 file codec.
  p_header_data | the data contained in the SIZ box.
  p_header_size | the size of the data contained in the SIZ marker.
  p_manager | the user event manager.

References opj_cp::allow_different_bit_depth_sign, opj_image::comps, opj_cp::correct, opj_j2k::dump_state, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, EVT_WARNING, opj_cp::exp_comps, opj_image_comp::factor, opj_j2k::ihdr_h, opj_j2k::ihdr_w, J2K_STATE_MH, opj_j2k::m_cp, opj_tccp::m_dc_level_shift, opj_cp::m_dec, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k_dec::m_discard_tiles, opj_j2k_dec::m_end_tile_x, opj_j2k_dec::m_end_tile_y, opj_tcp::m_mcc_records, opj_tcp::m_mct_records, opj_tcp::m_nb_max_mcc_records, opj_tcp::m_nb_max_mct_records, opj_j2k::m_private_image, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_dec::m_start_tile_x, opj_j2k_dec::m_start_tile_y, opj_j2k_dec::m_state, opj_cp::max_tiles, opj_image::numcomps, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_image_comp_header_update(), opj_int_ceildiv(), OPJ_J2K_MCC_DEFAULT_NB_RECORDS, OPJ_J2K_MCT_DEFAULT_NB_RECORDS, opj_read_bytes, OPJ_TRUE, opj_uint_adds(), opj_image_comp::prec, opj_image_comp::resno_decoded, opj_cp::rsiz, opj_image_comp::sgnd, opj_tcp::tccps, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

## ◆ 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
| ) |  |
| static

Reads a SOC marker (Start of Codestream)

Parameters

  p_j2k | the jpeg2000 file codec.
  p_stream | XXX needs data
  p_manager | the user event manager.
  p_j2k | the jpeg2000 file codec.
  p_stream | FIXME DOC
  p_manager | the user event manager.

References opj_j2k::cstr_index, EVT_ERROR, EVT_INFO, J2K_MS_SOC, J2K_STATE_MHSIZ, opj_j2k::m_decoder, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_codestream_index::main_head_start, opj_event_msg(), OPJ_FALSE, opj_j2k_add_mhmarker(), opj_read_bytes, opj_stream_read_data(), opj_stream_tell(), and OPJ_TRUE.

Referenced by opj_j2k_read_header_procedure().

## ◆ 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
| ) |  |
| static

Reads a SOD marker (Start Of Data)

Parameters

  p_j2k | the jpeg2000 codec.
  p_stream | FIXME DOC
  p_manager | the user event manager.

References opj_j2k::cstr_index, opj_tile_index::current_tpsno, opj_tp_index::end_header, opj_tp_index::end_pos, EVT_ERROR, EVT_WARNING, J2K_MS_SOD, J2K_STATE_NEOC, J2K_STATE_TPHSOT, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_data, opj_tcp::m_data_size, opj_j2k::m_decoder, opj_j2k_dec::m_last_tile_part, opj_j2k_dec::m_sot_length, opj_j2k::m_specific_param, opj_j2k_dec::m_state, OPJ_COMMON_CBLK_DATA_EXTRA, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_add_tlmarker(), opj_malloc(), opj_realloc(), opj_stream_get_number_byte_left(), opj_stream_read_data(), opj_stream_tell(), OPJ_TRUE, opj_cp::strict, opj_cp::tcps, opj_codestream_index::tile_index, and opj_tile_index::tp_index.

Referenced by opj_j2k_read_tile_header().

## ◆ 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
| ) |  |
| static

Reads a SOT marker (Start of tile-part)

Parameters

  p_header_data | the data contained in the SOT marker.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the PPT marker.
  p_manager | the user event manager.

References opj_cp::correct, opj_j2k::cstr_index, opj_tile_index::current_nb_tps, opj_tile_index::current_tpsno, EVT_ERROR, EVT_INFO, EVT_WARNING, J2K_STATE_TPH, opj_j2k_dec::m_can_decode, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_current_tile_part_number, opj_j2k::m_decoder, opj_j2k_dec::m_end_tile_x, opj_j2k_dec::m_end_tile_y, opj_j2k_dec::m_last_tile_part, opj_tcp::m_nb_tile_parts, opj_j2k_dec::m_nb_tile_parts_correction, opj_j2k_dec::m_skip_data, opj_j2k_dec::m_sot_length, opj_j2k::m_specific_param, opj_j2k_dec::m_start_tile_x, opj_j2k_dec::m_start_tile_y, opj_j2k_dec::m_state, opj_j2k_dec::m_tile_ind_to_dec, opj_tile_index::nb_tps, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_sot_values(), opj_realloc(), OPJ_TRUE, opj_cp::tcps, opj_cp::th, opj_codestream_index::tile_index, opj_tile_index::tileno, opj_tile_index::tp_index, and opj_cp::tw.

## ◆ 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
| ) |  |
| static

Reads a SPCod or SPCoc element, i.e.

the coding style of a given component of a tile.

Parameters

  p_j2k | the jpeg2000 codec.
  compno | FIXME DOC
  p_header_data | the data contained in the COM box.
  p_header_size | the size of the data contained in the COM marker.
  p_manager | the user event manager.

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, opj_tccp::csty, EVT_ERROR, J2K_CCP_CBLKSTY_HTMIXED, J2K_CCP_CSTY_PRT, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_cp::m_dec, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_tccp::numresolutions, opj_event_msg(), OPJ_FALSE, OPJ_J2K_MAXRLVLS, opj_read_bytes, OPJ_TRUE, opj_tccp::prch, opj_tccp::prcw, opj_tccp::qmfbid, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_read_coc(), and opj_j2k_read_cod().

## ◆ 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
| ) |  |
| static

Reads a SQcd or SQcc element, i.e.

the quantization values of a band in the QCD or QCC.

Parameters

  p_j2k | J2K codec.
  compno | the component number to output.
  p_header_data | the data buffer.
  p_header_size | pointer to the size of the data buffer, it is changed by the function.
  p_manager | the user event manager.

References opj_cp::correct, EVT_ERROR, EVT_WARNING, opj_stepsize::expn, J2K_CCP_QNTSTY_NOQNT, J2K_CCP_QNTSTY_SIQNT, J2K_STATE_TPH, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_stepsize::mant, opj_tccp::numgbits, opj_event_msg(), OPJ_FALSE, OPJ_J2K_MAXBANDS, opj_read_bytes, OPJ_TRUE, opj_tccp::qntsty, opj_tccp::stepsizes, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_read_qcc(), and opj_j2k_read_qcd().

## ◆ 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.

Parameters

  p_j2k | the jpeg2000 codec.
  p_tile_index | FIXME DOC
  p_data_size | FIXME DOC
  p_tile_x0 | FIXME DOC
  p_tile_y0 | FIXME DOC
  p_tile_x1 | FIXME DOC
  p_tile_y1 | FIXME DOC
  p_nb_comps | FIXME DOC
  p_go_on | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References opj_j2k::cstr_index, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_dec_memory_marker_handler::handler, opj_dec_memory_marker_handler::id, J2K_MS_EOC, J2K_MS_SOD, J2K_MS_SOT, J2K_STATE_DATA, J2K_STATE_EOC, J2K_STATE_NEOC, J2K_STATE_TPH, J2K_STATE_TPHSOT, opj_j2k_dec::m_can_decode, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_current_tile_part_number, opj_tcp::m_data, opj_j2k::m_decoder, opj_j2k_dec::m_header_data, opj_j2k_dec::m_header_data_size, opj_j2k_dec::m_last_sot_read_pos, opj_tcp::m_nb_tile_parts, opj_j2k_dec::m_nb_tile_parts_correction, opj_j2k_dec::m_nb_tile_parts_correction_checked, opj_j2k_dec::m_skip_data, opj_j2k_dec::m_sot_length, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_j2k::m_tcd, opj_tcd_tile::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_add_tlmarker(), opj_j2k_get_marker_handler(), opj_j2k_merge_ppt(), opj_j2k_need_nb_tile_parts_correction(), opj_j2k_read_sod(), opj_read_bytes, opj_realloc(), opj_stream_get_number_byte_left(), opj_stream_read_data(), opj_stream_skip(), opj_stream_tell(), opj_tcd_get_decoded_tile_size(), opj_tcd_init_decode_tile(), OPJ_TRUE, opj_dec_memory_marker_handler::states, opj_tcd::tcd_image, opj_cp::tcps, opj_cp::th, opj_tcd_image::tiles, opj_cp::tw, opj_tcd_tile::x0, opj_tcd_tile::x1, opj_tcd_tile::y0, and opj_tcd_tile::y1.

Referenced by opj_create_decompress(), opj_j2k_decode_one_tile(), opj_j2k_decode_tiles(), and opj_jp2_read_tile_header().

## ◆ 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
| ) |  |
| static

Reads a TLM marker (Tile Length Marker)

Parameters

  p_header_data | the data contained in the TLM box.
  p_j2k | the jpeg2000 codec.
  p_header_size | the size of the data contained in the TLM marker.
  p_manager | the user event manager.

References EVT_ERROR, opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, and OPJ_UNUSED.

## ◆ 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
| ) |  |
| static

Reads an unknown marker.

Parameters

  p_j2k | the jpeg2000 codec.
  p_stream | the stream object to read from.
  output_marker | FIXME DOC
  p_manager | the user event manager.

Returns
  true if the marker could be deduced.

References opj_j2k::cstr_index, EVT_ERROR, EVT_WARNING, opj_dec_memory_marker_handler::id, J2K_MS_SOT, J2K_MS_UNK, opj_j2k::m_decoder, opj_j2k_dec::m_header_data, opj_j2k::m_specific_param, opj_j2k_dec::m_state, opj_event_msg(), OPJ_FALSE, opj_j2k_add_mhmarker(), opj_j2k_get_marker_handler(), opj_read_bytes, opj_stream_read_data(), opj_stream_tell(), OPJ_TRUE, and opj_dec_memory_marker_handler::states.

Referenced by opj_j2k_read_header_procedure().

## ◆ 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
| ) |  |
| static

References opj_cparameters::cblockh_init, opj_cparameters::cblockw_init, opj_image::comps, opj_cparameters::cp_disto_alloc, opj_cparameters::cp_tdx, opj_cparameters::cp_tdy, opj_cparameters::cp_tx0, opj_cparameters::cp_ty0, opj_cparameters::csty, opj_image_comp::dx, opj_image_comp::dy, EVT_WARNING, opj_image_comp::h, opj_cparameters::image_offset_x0, opj_cparameters::image_offset_y0, opj_cparameters::irreversible, J2K_CP_CSTY_PRT, opj_cparameters::max_comp_size, opj_cparameters::max_cs_size, opj_cparameters::mode, opj_image::numcomps, opj_cparameters::numpocs, opj_cparameters::numresolution, OPJ_CINEMA_24_COMP, OPJ_CINEMA_24_CS, OPJ_CPRL, opj_event_msg(), OPJ_FALSE, opj_j2k_initialise_4K_poc(), OPJ_PROFILE_CINEMA_2K, OPJ_PROFILE_CINEMA_4K, opj_cparameters::POC, opj_cparameters::prch_init, opj_cparameters::prcw_init, opj_image_comp::prec, opj_cparameters::prog_order, opj_cparameters::res_spec, opj_cparameters::roi_compno, opj_cparameters::rsiz, opj_cparameters::subsampling_dx, opj_cparameters::subsampling_dy, opj_cparameters::tcp_numlayers, opj_cparameters::tcp_rates, opj_cparameters::tile_size_on, opj_cparameters::tp_flag, opj_cparameters::tp_on, and opj_image_comp::w.

Referenced by opj_j2k_setup_encoder().

## ◆ 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.

This function should be called right after opj_read_header and before any tile header reading.

Parameters

  p_j2k | the jpeg2000 codec.
  p_image | FIXME DOC
  p_start_x | the left position of the rectangle to decode (in image coordinates).
  p_start_y | the up position of the rectangle to decode (in image coordinates).
  p_end_x | the right position of the rectangle to decode (in image coordinates).
  p_end_y | the bottom position of the rectangle to decode (in image coordinates).
  p_manager | the user event manager

Returns
  true if the area could be set.

References opj_image::comps, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_image_comp::factor, J2K_STATE_TPHSOT, opj_j2k::m_cp, opj_tcp::m_data, opj_cp::m_dec, opj_j2k::m_decoder, opj_j2k_dec::m_discard_tiles, opj_j2k_dec::m_end_tile_x, opj_j2k_dec::m_end_tile_y, opj_j2k::m_private_image, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_dec::m_start_tile_x, opj_j2k_dec::m_start_tile_y, opj_j2k_dec::m_state, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_int_ceildiv(), opj_j2k_update_image_dimensions(), opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_create_decompress(), and opj_jp2_set_decode_area().

## ◆ 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.

Parameters

  p_j2k | the jpeg2000 codec.
  numcomps | Number of components to decode.
  comps_indices | Array of num_compts indices (numbering starting at 0) corresponding to the components to decode.
  p_manager | Event manager

Returns
  OPJ_TRUE in case of success.

References EVT_ERROR, opj_j2k_dec::m_comps_indices_to_decode, opj_j2k::m_decoder, opj_j2k_dec::m_numcomps_to_decode, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_free(), opj_malloc(), and OPJ_TRUE.

Referenced by opj_create_decompress(), and opj_jp2_set_decoded_components().

## ◆ 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
| ) |  |

References opj_image::comps, EVT_ERROR, opj_image_comp::factor, opj_j2k::m_cp, opj_cp::m_dec, opj_j2k::m_decoder, opj_j2k_dec::m_default_tcp, opj_j2k::m_private_image, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_image::numcomps, opj_tccp::numresolutions, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, and opj_tcp::tccps.

Referenced by opj_create_decompress(), and opj_jp2_set_decoded_resolution_factor().

## ◆ opj_j2k_set_imf_parameters()

static void opj_j2k_set_imf_parameters | ( | opj_cparameters_t * | parameters,
|  | opj_image_t * | image,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

References opj_cparameters::cblockh_init, opj_cparameters::cblockw_init, opj_cparameters::csty, opj_cparameters::irreversible, J2K_CP_CSTY_PRT, opj_cparameters::numresolution, OPJ_COMP_PARAM_DEFAULT_CBLOCKH, OPJ_COMP_PARAM_DEFAULT_CBLOCKW, OPJ_COMP_PARAM_DEFAULT_NUMRESOLUTION, OPJ_COMP_PARAM_DEFAULT_PROG_ORDER, OPJ_CPRL, OPJ_GET_IMF_PROFILE, opj_j2k_get_imf_max_NL(), OPJ_PROFILE_IMF_2K, OPJ_PROFILE_IMF_4K, OPJ_PROFILE_IMF_8K, OPJ_UNUSED, opj_cparameters::prch_init, opj_cparameters::prcw_init, opj_cparameters::prog_order, opj_cparameters::res_spec, opj_cparameters::rsiz, opj_cparameters::tile_size_on, opj_cparameters::tp_flag, opj_cparameters::tp_on, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_setup_encoder().

## ◆ opj_j2k_set_threads()

OPJ_BOOL opj_j2k_set_threads | ( | opj_j2k_t * | j2k,
|  | OPJ_UINT32 | num_threads
| ) |  |

References opj_j2k::m_tcd, opj_j2k::m_tp, OPJ_FALSE, opj_has_thread_support(), opj_thread_pool_create(), opj_thread_pool_destroy(), and OPJ_TRUE.

Referenced by opj_create_compress(), opj_create_decompress(), and opj_jp2_set_threads().

## ◆ 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.

Decoding parameters are returned in j2k->cp.

Parameters

  j2k | J2K decompressor handle
  parameters | decompression parameters

References opj_cp::correct, opj_dparameters::cp_layer, opj_dparameters::cp_reduce, opj_j2k::dump_state, opj_cp::exp_comps, opj_dparameters::flags, opj_dparameters::jpwl_correct, opj_dparameters::jpwl_exp_comps, opj_dparameters::jpwl_max_tiles, opj_j2k::m_cp, opj_cp::m_dec, opj_decoding_param::m_layer, opj_decoding_param::m_reduce, opj_cp::m_specific_param, opj_cp::max_tiles, and OPJ_DPARAMETERS_DUMP_FLAG.

Referenced by opj_create_decompress(), and opj_jp2_setup_decoder().

## ◆ opj_j2k_setup_decoding()

static OPJ_BOOL opj_j2k_setup_decoding | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the procedures to do on decoding data.

Developers wanting to extend the library can add their own reading procedures.

References opj_j2k::m_procedure_list, OPJ_FALSE, opj_j2k_decode_tiles(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_decode().

## ◆ opj_j2k_setup_decoding_tile()

static OPJ_BOOL opj_j2k_setup_decoding_tile | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the procedures to do on decoding one tile.

Developers wanting to extend the library can add their own reading procedures.

References opj_j2k::m_procedure_list, OPJ_FALSE, opj_j2k_decode_one_tile(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_get_tile().

## ◆ opj_j2k_setup_decoding_validation()

static OPJ_BOOL opj_j2k_setup_decoding_validation | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the validation ,i.e.

adds the procedures to launch to make sure the codec parameters are valid. Developers wanting to extend the library can add their own validation procedures.

References opj_j2k::m_validation_list, OPJ_FALSE, opj_j2k_build_decoder(), opj_j2k_decoding_validation(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_read_header().

## ◆ 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
| ) |  |

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, opj_cparameters::cblockh_init, opj_cparameters::cblockw_init, opj_cp::comment, opj_poc::compno0, opj_poc::compno1, opj_image::comps, opj_cparameters::cp_cinema, opj_cparameters::cp_comment, opj_cparameters::cp_disto_alloc, opj_cparameters::cp_fixed_alloc, opj_cparameters::cp_fixed_quality, opj_cparameters::cp_matrice, opj_cparameters::cp_rsiz, opj_cparameters::cp_tdx, opj_cparameters::cp_tdy, opj_cparameters::cp_tx0, opj_cparameters::cp_ty0, opj_tccp::csty, opj_cparameters::csty, opj_image_comp::dx, opj_image_comp::dy, opj_cp::epb_on, opj_cp::epc_on, opj_cp::esd_on, EVT_ERROR, EVT_WARNING, opj_image_comp::h, opj_cp::hprot_MH, opj_cp::hprot_TPH, opj_cp::hprot_TPH_tileno, opj_cp::info_on, opj_cparameters::irreversible, J2K_CCP_CSTY_PRT, J2K_CCP_QNTSTY_NOQNT, J2K_CCP_QNTSTY_SEQNT, opj_cparameters::jpwl_epc_on, opj_cparameters::jpwl_hprot_MH, opj_cparameters::jpwl_hprot_TPH, opj_cparameters::jpwl_hprot_TPH_tileno, JPWL_MAX_NO_PACKSPECS, JPWL_MAX_NO_TILESPECS, opj_cparameters::jpwl_pprot, opj_cparameters::jpwl_pprot_packno, opj_cparameters::jpwl_pprot_tileno, opj_cparameters::jpwl_sens_addr, opj_cparameters::jpwl_sens_MH, opj_cparameters::jpwl_sens_range, opj_cparameters::jpwl_sens_size, opj_cparameters::jpwl_sens_TPH, opj_cparameters::jpwl_sens_TPH_tileno, opj_poc::layno1, opj_j2k::m_cp, opj_tccp::m_dc_level_shift, opj_encoding_param::m_disto_alloc, opj_cp::m_enc, opj_j2k::m_encoder, opj_encoding_param::m_fixed_alloc, opj_encoding_param::m_fixed_quality, opj_encoding_param::m_matrice, opj_encoding_param::m_max_comp_size, opj_j2k_enc::m_nb_comps, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_enc::m_TLM, opj_encoding_param::m_tp_flag, opj_encoding_param::m_tp_on, opj_cparameters::max_comp_size, opj_cparameters::max_cs_size, opj_cparameters::mct_data, opj_cparameters::mode, opj_image::numcomps, opj_tccp::numgbits, opj_tcp::numlayers, opj_cparameters::numpocs, opj_cparameters::numresolution, opj_tccp::numresolutions, opj_calculate_norms(), opj_calloc(), OPJ_CINEMA2K, OPJ_CINEMA2K_24, OPJ_CINEMA2K_48, OPJ_CINEMA4K, OPJ_CINEMA4K_24, OPJ_CINEMA_24_COMP, OPJ_CINEMA_24_CS, OPJ_CINEMA_48_COMP, OPJ_CINEMA_48_CS, opj_dwt_calc_explicit_stepsizes(), opj_event_msg(), OPJ_EXTENSION_MCT, OPJ_EXTENSION_NONE, OPJ_FALSE, opj_free(), opj_int_ceildiv(), opj_int_floorlog2(), OPJ_IS_BROADCAST, OPJ_IS_CINEMA, OPJ_IS_IMF, OPJ_IS_PART2, OPJ_IS_STORAGE, opj_j2k_check_poc_val(), opj_j2k_is_cinema_compliant(), opj_j2k_is_imf_compliant(), OPJ_J2K_MAXRLVLS, opj_j2k_set_cinema_parameters(), opj_j2k_set_imf_parameters(), opj_j2k_setup_mct_encoding(), opj_malloc(), opj_matrix_inversion_f(), OPJ_MCT, OPJ_OFF, OPJ_PROFILE_CINEMA_2K, OPJ_PROFILE_CINEMA_4K, OPJ_PROFILE_CINEMA_S2K, OPJ_PROFILE_CINEMA_S4K, OPJ_PROFILE_NONE, OPJ_PROFILE_PART2, OPJ_STD_RSIZ, OPJ_TRUE, opj_uint_min(), opj_version(), opj_cparameters::POC, opj_cp::pprot, opj_cp::pprot_packno, opj_cp::pprot_tileno, opj_tccp::prch, opj_cparameters::prch_init, opj_tccp::prcw, opj_cparameters::prcw_init, opj_image_comp::prec, opj_poc::prg1, opj_cparameters::prog_order, opj_tccp::qmfbid, opj_tccp::qntsty, opj_cp::red_on, opj_cparameters::res_spec, opj_poc::resno0, opj_poc::resno1, opj_cparameters::roi_compno, opj_cparameters::roi_shift, opj_tccp::roishift, opj_cp::rsiz, opj_cparameters::rsiz, opj_cp::sens_addr, opj_cp::sens_MH, opj_cp::sens_range, opj_cp::sens_size, opj_cp::sens_TPH, opj_cp::sens_TPH_tileno, opj_image_comp::sgnd, tcp, opj_cparameters::tcp_distoratio, opj_cparameters::tcp_mct, opj_cparameters::tcp_numlayers, opj_cparameters::tcp_rates, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_poc::tile, opj_cparameters::tile_size_on, opj_cparameters::tp_flag, opj_cparameters::tp_on, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image_comp::w, opj_image::x1, and opj_image::y1.

Referenced by opj_create_compress(), and opj_jp2_setup_encoder().

## ◆ opj_j2k_setup_encoding_validation()

static OPJ_BOOL opj_j2k_setup_encoding_validation | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the validation ,i.e.

adds the procedures to launch to make sure the codec parameters are valid. Developers wanting to extend the library can add their own validation procedures.

References opj_j2k::m_validation_list, OPJ_FALSE, opj_j2k_build_encoder(), opj_j2k_encoding_validation(), opj_j2k_mct_validation(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_start_compress().

## ◆ opj_j2k_setup_end_compress()

static OPJ_BOOL opj_j2k_setup_end_compress | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the validation ,i.e.

adds the procedures to launch to make sure the codec parameters are valid. Developers wanting to extend the library can add their own validation procedures.

References opj_j2k::m_encoder, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_enc::m_TLM, OPJ_FALSE, opj_j2k_destroy_header_memory(), opj_j2k_end_encoding(), opj_j2k_write_eoc(), opj_j2k_write_epc(), opj_j2k_write_updated_tlm(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_end_compress().

## ◆ opj_j2k_setup_header_reading()

static OPJ_BOOL opj_j2k_setup_header_reading | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the procedures to do on reading header.

Developers wanting to extend the library can add their own reading procedures.

References opj_j2k::m_procedure_list, OPJ_FALSE, opj_j2k_copy_default_tcp_and_create_tcd(), opj_j2k_read_header_procedure(), opj_procedure_list_add_procedure(), and OPJ_TRUE.

Referenced by opj_j2k_read_header().

## ◆ opj_j2k_setup_header_writing()

static OPJ_BOOL opj_j2k_setup_header_writing | ( | opj_j2k_t * | p_j2k,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Sets up the procedures to do on writing header.

Developers wanting to extend the library can add their own writing procedures.

References opj_cp::comment, opj_j2k::cstr_index, opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k::m_procedure_list, opj_j2k::m_specific_param, opj_j2k_enc::m_TLM, OPJ_EXTENSION_MCT, OPJ_FALSE, opj_j2k_create_tcd(), opj_j2k_get_end_header(), opj_j2k_init_info(), opj_j2k_update_rates(), opj_j2k_write_all_coc(), opj_j2k_write_all_qcc(), opj_j2k_write_cod(), opj_j2k_write_com(), opj_j2k_write_mct_data_group(), opj_j2k_write_poc(), opj_j2k_write_qcd(), opj_j2k_write_regions(), opj_j2k_write_siz(), opj_j2k_write_soc(), opj_j2k_write_tlm(), opj_procedure_list_add_procedure(), OPJ_PROFILE_CINEMA_4K, OPJ_PROFILE_PART2, OPJ_TRUE, and opj_cp::rsiz.

Referenced by opj_j2k_start_compress().

## ◆ opj_j2k_setup_mct_encoding()

OPJ_BOOL opj_j2k_setup_mct_encoding | ( | opj_tcp_t * | p_tcp,
|  | opj_image_t * | p_image
| ) |  |

References j2k_mct_write_functions_from_float, opj_mct_data::m_array_type, opj_mct_data::m_data, opj_mct_data::m_data_size, opj_tccp::m_dc_level_shift, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_mct_data::m_element_type, opj_mct_data::m_index, opj_simple_mcc_decorrelation_data::m_index, opj_simple_mcc_decorrelation_data::m_is_irreversible, opj_tcp::m_mcc_records, opj_tcp::m_mct_decoding_matrix, opj_tcp::m_mct_records, opj_simple_mcc_decorrelation_data::m_nb_comps, opj_tcp::m_nb_max_mcc_records, opj_tcp::m_nb_max_mct_records, opj_tcp::m_nb_mcc_records, opj_tcp::m_nb_mct_records, opj_simple_mcc_decorrelation_data::m_offset_array, opj_tcp::mct, MCT_ELEMENT_SIZE, MCT_TYPE_DECORRELATION, MCT_TYPE_FLOAT, MCT_TYPE_OFFSET, opj_image::numcomps, OPJ_FALSE, opj_free(), OPJ_J2K_MCT_DEFAULT_NB_RECORDS, opj_malloc(), opj_realloc(), OPJ_TRUE, and opj_tcp::tccps.

Referenced by opj_j2k_setup_encoder().

## ◆ 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.

validates the codec parameters, writes the header.

Parameters

  p_j2k | the jpeg2000 codec.
  p_stream | the stream object.
  p_image | FIXME DOC
  p_manager | the user event manager.

Returns
  true if the codec is valid.

References opj_image::comps, opj_image_comp::data, EVT_ERROR, opj_j2k::m_private_image, opj_j2k::m_procedure_list, opj_j2k::m_validation_list, opj_image::numcomps, opj_copy_image_header(), opj_event_msg(), OPJ_FALSE, opj_image_create0(), opj_j2k_exec(), opj_j2k_setup_encoding_validation(), opj_j2k_setup_header_writing(), and OPJ_TRUE.

Referenced by opj_create_compress(), and opj_jp2_start_compress().

## ◆ opj_j2k_tcp_data_destroy()

static void opj_j2k_tcp_data_destroy | ( | opj_tcp_t * | p_tcp | ) |
| static

Destroys the data inside a tile coding parameter structure.

Parameters

  p_tcp | the tile coding parameter which contain data to destroy.

References opj_tcp::m_data, opj_tcp::m_data_size, and opj_free().

Referenced by opj_j2k_decode_one_tile(), opj_j2k_decode_tile(), opj_j2k_decode_tiles(), and opj_j2k_tcp_destroy().

## ◆ opj_j2k_tcp_destroy()

static void opj_j2k_tcp_destroy | ( | opj_tcp_t * | p_tcp | ) |
| static

Destroys a tile coding parameter structure.

Parameters

  p_tcp | the tile coding parameter to destroy.

References opj_mct_data::m_data, opj_ppx_struct::m_data, opj_tcp::m_mcc_records, opj_tcp::m_mct_coding_matrix, opj_tcp::m_mct_decoding_matrix, opj_tcp::m_mct_records, opj_tcp::m_nb_max_mcc_records, opj_tcp::m_nb_mcc_records, opj_tcp::m_nb_mct_records, opj_tcp::mct_norms, opj_free(), opj_j2k_tcp_data_destroy(), opj_tcp::ppt_buffer, opj_tcp::ppt_markers, opj_tcp::ppt_markers_count, and opj_tcp::tccps.

Referenced by opj_j2k_cp_destroy(), opj_j2k_decode_tile(), and opj_j2k_destroy().

## ◆ opj_j2k_update_image_data()

static OPJ_BOOL opj_j2k_update_image_data | ( | opj_tcd_t * | p_tcd,
|  | opj_image_t * | p_output_image
| ) |  |
| static

References opj_image::comps, opj_tcd_tile::comps, opj_image_comp::data, opj_tcd_tilecomp::data, opj_tcd_tilecomp::data_win, opj_image_comp::factor, opj_image_comp::h, opj_tcd::image, opj_tcd_tilecomp::minimum_num_resolutions, opj_image::numcomps, OPJ_FALSE, opj_image_data_alloc(), OPJ_TRUE, opj_uint_ceildivpow2(), opj_image_comp::resno_decoded, opj_tcd_tilecomp::resolutions, SIZE_MAX, opj_tcd::tcd_image, opj_tcd_image::tiles, opj_image_comp::w, opj_tcd::whole_tile_decoding, opj_tcd_resolution::win_x0, opj_tcd_resolution::win_x1, opj_tcd_resolution::win_y0, opj_tcd_resolution::win_y1, opj_image_comp::x0, opj_tcd_resolution::x0, opj_tcd_resolution::x1, opj_image_comp::y0, opj_tcd_resolution::y0, and opj_tcd_resolution::y1.

Referenced by opj_j2k_decode_one_tile(), and opj_j2k_decode_tiles().

## ◆ opj_j2k_update_image_dimensions()

static OPJ_BOOL opj_j2k_update_image_dimensions | ( | opj_image_t * | p_image,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, opj_image_comp::factor, opj_image_comp::h, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_int_ceildiv(), opj_int_ceildivpow2(), OPJ_TRUE, opj_image_comp::w, opj_image_comp::x0, opj_image::x0, opj_image::x1, opj_image_comp::y0, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_decode(), and opj_j2k_set_decode_area().

## ◆ 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
| ) |  |
| static

Updates the rates of the tcp.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, opj_j2k::m_cp, opj_cp::m_enc, opj_j2k_enc::m_encoded_tile_data, opj_j2k_enc::m_encoded_tile_size, opj_j2k::m_encoder, opj_j2k::m_private_image, opj_cp::m_specific_param, opj_j2k::m_specific_param, opj_j2k_enc::m_TLM, opj_j2k_enc::m_tlm_sot_offsets_buffer, opj_j2k_enc::m_tlm_sot_offsets_current, opj_j2k_enc::m_total_tile_parts, opj_encoding_param::m_tp_on, opj_image::numcomps, opj_tcp::numlayers, opj_event_msg(), OPJ_FALSE, opj_int_max(), opj_int_min(), opj_j2k_get_default_stride(), opj_j2k_get_specific_header_sizes(), opj_j2k_get_tp_stride(), opj_malloc(), opj_stream_tell(), OPJ_TRUE, opj_uint_ceildiv(), OPJ_UNUSED, opj_image_comp::prec, opj_tcp::rates, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_setup_header_writing().

## ◆ opj_j2k_update_tlm()

static void opj_j2k_update_tlm | ( | opj_j2k_t * | p_j2k,
|  | OPJ_UINT32 | p_tile_part_size
| ) |  |
| static

Updates the Tile Length Marker.

References opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k::m_specific_param, opj_j2k_enc::m_tlm_sot_offsets_current, opj_j2k_enc::m_Ttlmi_is_byte, and opj_write_bytes.

Referenced by opj_j2k_write_all_tile_parts(), and opj_j2k_write_first_tile_part().

## ◆ 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
| ) |  |
| static

Writes COC marker for each component.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_private_image, opj_image::numcomps, OPJ_FALSE, opj_j2k_compare_coc(), opj_j2k_write_coc(), and OPJ_TRUE.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes QCC marker for each component.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_private_image, opj_image::numcomps, OPJ_FALSE, opj_j2k_compare_qcc(), opj_j2k_write_qcc(), and OPJ_TRUE.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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 | total_data_size,
|  | opj_stream_private_t * | p_stream,
|  | struct opj_event_mgr * | p_manager
| ) |  |
| static

References opj_tcd::cur_pino, opj_j2k::m_cp, opj_j2k_enc::m_current_poc_tile_part_number, opj_j2k::m_current_tile_number, opj_j2k_enc::m_current_tile_part_number, opj_j2k::m_encoder, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_j2k_enc::m_TLM, opj_tcp::numpocs, OPJ_FALSE, opj_j2k_get_num_tp(), opj_j2k_update_tlm(), opj_j2k_write_sod(), opj_j2k_write_sot(), OPJ_TRUE, opj_write_bytes, and opj_cp::tcps.

Referenced by opj_j2k_post_write_tile().

## ◆ 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
| ) |  |
| static

Writes the CBD marker (Component bit depth definition)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_image::comps, EVT_ERROR, J2K_MS_CBD, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, opj_write_bytes, opj_image_comp::prec, and opj_image_comp::sgnd.

Referenced by opj_j2k_write_mct_data_group().

## ◆ 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
| ) |  |
| static

Writes the COC marker (Coding style component)

Parameters

  p_j2k | J2K codec.
  p_comp_no | the index of the component to output.
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_SPCod_SPCoc_size(), opj_j2k_write_coc_in_memory(), opj_realloc(), opj_stream_write_data(), and OPJ_TRUE.

Referenced by opj_j2k_write_all_coc().

## ◆ 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
| ) |  |
| static

Writes the COC marker (Coding style component)

Parameters

  p_j2k | J2K codec.
  p_comp_no | the index of the component to output.
  p_data | FIXME DOC
  p_data_written | FIXME DOC
  p_manager | the user event manager.

References opj_tccp::csty, J2K_MS_COC, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_private_image, opj_image::numcomps, opj_j2k_get_SPCod_SPCoc_size(), opj_j2k_write_SPCod_SPCoc(), opj_write_bytes, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_write_coc(), and opj_j2k_write_first_tile_part().

## ◆ 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
| ) |  |
| static

Writes the COD marker (Coding style default)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_tcp::csty, EVT_ERROR, J2K_MS_COD, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_specific_param, opj_tcp::mct, opj_tcp::numlayers, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_SPCod_SPCoc_size(), opj_j2k_write_SPCod_SPCoc(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, opj_write_bytes, opj_tcp::prg, and opj_cp::tcps.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the COM marker (comment)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_cp::comment, EVT_ERROR, J2K_MS_COM, opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the EOC marker (End of Codestream)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References J2K_MS_EOC, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k::m_specific_param, OPJ_FALSE, opj_stream_flush(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_setup_end_compress().

## ◆ 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
| ) |  |
| static

Writes EPC ????

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_codestream_index::codestream_size, opj_j2k::cstr_index, opj_codestream_index::main_head_start, opj_stream_tell(), OPJ_TRUE, and OPJ_UNUSED.

Referenced by opj_j2k_setup_end_compress().

## ◆ 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 | total_data_size,
|  | opj_stream_private_t * | p_stream,
|  | struct opj_event_mgr * | p_manager
| ) |  |
| static

References opj_tcd::cur_pino, opj_j2k::m_cp, opj_j2k_enc::m_current_poc_tile_part_number, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_j2k::m_tcd, opj_j2k_enc::m_TLM, opj_image::numcomps, OPJ_FALSE, OPJ_IS_CINEMA, opj_j2k_update_tlm(), opj_j2k_write_coc_in_memory(), opj_j2k_write_poc_in_memory(), opj_j2k_write_qcc_in_memory(), opj_j2k_write_sod(), opj_j2k_write_sot(), OPJ_TRUE, opj_write_bytes, opj_tcp::POC, opj_cp::rsiz, and opj_cp::tcps.

Referenced by opj_j2k_post_write_tile().

## ◆ 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
| ) |  |
| static

References opj_write_float.

## ◆ 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
| ) |  |
| static

References opj_write_double.

## ◆ 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
| ) |  |
| static

References opj_write_bytes.

## ◆ 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
| ) |  |
| static

References opj_write_bytes.

## ◆ 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
| ) |  |
| static

Writes the MCC marker (Multiple Component Collection)

Parameters

  p_j2k | J2K codec.
  p_mcc_record | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_MCC, opj_simple_mcc_decorrelation_data::m_decorrelation_array, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_mct_data::m_index, opj_simple_mcc_decorrelation_data::m_index, opj_simple_mcc_decorrelation_data::m_is_irreversible, opj_simple_mcc_decorrelation_data::m_nb_comps, opj_simple_mcc_decorrelation_data::m_offset_array, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_write_mct_data_group().

## ◆ 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
| ) |  |
| static

Writes the MCO marker (Multiple component transformation ordering)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_MCO, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_simple_mcc_decorrelation_data::m_index, opj_tcp::m_mcc_records, opj_tcp::m_nb_mcc_records, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, opj_write_bytes, and opj_cp::tcps.

Referenced by opj_j2k_write_mct_data_group().

## ◆ 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
| ) |  |
| static

Writes the CBD-MCT-MCC-MCO markers (Multi components transform)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_tcp::m_mcc_records, opj_tcp::m_mct_records, opj_tcp::m_nb_mcc_records, opj_tcp::m_nb_mct_records, OPJ_FALSE, opj_j2k_write_cbd(), opj_j2k_write_mcc_record(), opj_j2k_write_mco(), opj_j2k_write_mct_record(), OPJ_TRUE, and opj_cp::tcps.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the MCT marker (Multiple Component Transform)

Parameters

  p_j2k | J2K codec.
  p_mct_record | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_MCT, opj_mct_data::m_array_type, opj_mct_data::m_data, opj_mct_data::m_data_size, opj_mct_data::m_element_type, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_mct_data::m_index, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_write_mct_data_group().

## ◆ opj_j2k_write_plt_in_memory()

static OPJ_BOOL opj_j2k_write_plt_in_memory | ( | opj_j2k_t * | p_j2k,
|  | opj_tcd_marker_info_t * | marker_info,
|  | OPJ_BYTE * | p_data,
|  | OPJ_UINT32 * | p_data_written,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Write one or more PLT markers in the provided buffer.

References EVT_ERROR, J2K_MS_PLT, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, OPJ_UNUSED, opj_write_bytes, opj_tcd_marker_info::p_packet_size, and opj_tcd_marker_info::packet_count.

Referenced by opj_j2k_write_sod().

## ◆ 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
| ) |  |
| static

Writes the POC marker (Progression Order Change)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_tcp::numpocs, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_write_poc_in_memory(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, and opj_cp::tcps.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the POC marker (Progression Order Change)

Parameters

  p_j2k | J2K codec.
  p_data | FIXME DOC
  p_data_written | the stream to write data to.
  p_manager | the user event manager.

References opj_poc::compno0, opj_poc::compno1, J2K_MS_POC, opj_poc::layno1, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k::m_private_image, opj_image::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_tccp::numresolutions, opj_int_min(), OPJ_UNUSED, opj_write_bytes, opj_tcp::pocs, opj_poc::prg, opj_poc::resno0, opj_poc::resno1, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_write_first_tile_part(), and opj_j2k_write_poc().

## ◆ 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
| ) |  |
| static

Writes the QCC marker (quantization component)

Parameters

  p_comp_no | the index of the component to output.
  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_SQcd_SQcc_size(), opj_j2k_write_qcc_in_memory(), opj_realloc(), opj_stream_write_data(), and OPJ_TRUE.

Referenced by opj_j2k_write_all_qcc().

## ◆ 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
| ) |  |
| static

Writes the QCC marker (quantization component)

Parameters

  p_j2k | J2K codec.
  p_comp_no | the index of the component to output.
  p_data | FIXME DOC
  p_data_written | the stream to write data to.
  p_manager | the user event manager.

References J2K_MS_QCC, opj_j2k::m_current_tile_number, opj_j2k::m_private_image, opj_image::numcomps, opj_j2k_get_SQcd_SQcc_size(), opj_j2k_write_SQcd_SQcc(), and opj_write_bytes.

Referenced by opj_j2k_write_first_tile_part(), and opj_j2k_write_qcc().

## ◆ 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
| ) |  |
| static

Writes the QCD marker (quantization default)

Parameters

  p_j2k | J2K codec.
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_QCD, opj_j2k::m_current_tile_number, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_get_SQcd_SQcc_size(), opj_j2k_write_SQcd_SQcc(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes regions of interests.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, OPJ_FALSE, opj_j2k_write_rgn(), OPJ_TRUE, opj_tccp::roishift, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the RGN marker (Region Of Interest)

Parameters

  p_tile_no | the tile to output
  p_comp_no | the component to output
  nb_comps | the number of components
  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References J2K_MS_RGN, opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k::m_specific_param, OPJ_FALSE, opj_stream_write_data(), OPJ_TRUE, opj_write_bytes, opj_tccp::roishift, opj_tcp::tccps, and opj_cp::tcps.

Referenced by opj_j2k_write_regions().

## ◆ 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
| ) |  |
| static

Writes the SIZ marker (image and tile size)

Parameters

  p_j2k | J2K codec.
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, J2K_MS_SIZ, opj_j2k::m_cp, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_private_image, opj_j2k::m_specific_param, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_write_data(), OPJ_TRUE, opj_write_bytes, opj_image_comp::prec, opj_cp::rsiz, opj_image_comp::sgnd, opj_cp::tdx, opj_cp::tdy, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the SOC marker (Start Of Codestream)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References J2K_MS_SOC, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k::m_specific_param, OPJ_FALSE, opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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 | total_data_size,
|  | const opj_stream_private_t * | p_stream,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Writes the SOD marker (Start of data)

This also writes optional PLT markers (before SOD)

Parameters

  p_j2k | J2K codec.
  p_tile_coder | FIXME DOC
  p_data | FIXME DOC
  p_data_written | FIXME DOC
  total_data_size | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References opj_tcd::cur_tp_num, EVT_ERROR, J2K_MS_SOD, opj_j2k_enc::m_current_poc_tile_part_number, opj_j2k::m_current_tile_number, opj_j2k_enc::m_current_tile_part_number, opj_j2k::m_encoder, opj_j2k_enc::m_PLT, opj_j2k_enc::m_reserved_bytes_for_PLT, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, opj_free(), opj_j2k_write_plt_in_memory(), opj_malloc(), opj_tcd_encode_tile(), opj_tcd_marker_info_create(), opj_tcd_marker_info_destroy(), OPJ_TRUE, OPJ_UNUSED, opj_write_bytes, opj_codestream_info::packno, opj_tcd_tile::packno, opj_tcd::tcd_image, opj_tcd_image::tiles, and opj_tcd::tp_num.

Referenced by opj_j2k_write_all_tile_parts(), and opj_j2k_write_first_tile_part().

## ◆ opj_j2k_write_sot()

static OPJ_BOOL opj_j2k_write_sot | ( | opj_j2k_t * | p_j2k,
|  | OPJ_BYTE * | p_data,
|  | OPJ_UINT32 | total_data_size,
|  | OPJ_UINT32 * | p_data_written,
|  | const opj_stream_private_t * | p_stream,
|  | opj_event_mgr_t * | p_manager
| ) |  |
| static

Writes the SOT marker (Start of tile-part)

Parameters

  p_j2k | J2K codec.
  p_data | Output buffer
  total_data_size | Output buffer size
  p_data_written | Number of bytes written into stream
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_SOT, opj_j2k::m_cp, opj_j2k::m_current_tile_number, opj_j2k_enc::m_current_tile_part_number, opj_j2k::m_encoder, opj_tcp::m_nb_tile_parts, opj_j2k::m_specific_param, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, OPJ_UNUSED, opj_write_bytes, and opj_cp::tcps.

Referenced by opj_j2k_write_all_tile_parts(), and opj_j2k_write_first_tile_part().

## ◆ 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
| ) |  |
| static

Writes a SPCod or SPCoc element, i.e.

the coding style of a given component of a tile.

Parameters

  p_j2k | J2K codec.
  p_tile_no | FIXME DOC
  p_comp_no | the component number to output.
  p_data | FIXME DOC
  p_header_size | FIXME DOC
  p_manager | the user event manager.

Returns
  FIXME DOC

References opj_tccp::cblkh, opj_tccp::cblksty, opj_tccp::cblkw, opj_tccp::csty, EVT_ERROR, J2K_CCP_CSTY_PRT, opj_j2k::m_cp, opj_j2k::m_private_image, opj_image::numcomps, opj_tccp::numresolutions, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, opj_write_bytes, opj_tccp::prch, opj_tccp::prcw, opj_tccp::qmfbid, opj_tcp::tccps, opj_cp::tcps, opj_cp::th, and opj_cp::tw.

Referenced by opj_j2k_write_coc_in_memory(), and opj_j2k_write_cod().

## ◆ 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
| ) |  |
| static

Writes a SQcd or SQcc element, i.e.

the quantization values of a band in the QCD or QCC.

Parameters

  p_tile_no | the tile to output.
  p_comp_no | the component number to output.
  p_data | the data buffer.
  p_header_size | pointer to the size of the data buffer, it is changed by the function.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, opj_stepsize::expn, J2K_CCP_QNTSTY_NOQNT, J2K_CCP_QNTSTY_SIQNT, opj_j2k::m_cp, opj_stepsize::mant, opj_tccp::numgbits, opj_tccp::numresolutions, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, opj_write_bytes, opj_tccp::qntsty, opj_tccp::stepsizes, opj_tcp::tccps, opj_cp::tcps, and opj_cp::th.

Referenced by opj_j2k_write_qcc_in_memory(), and opj_j2k_write_qcd().

## ◆ 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.

Parameters

  p_j2k | the jpeg2000 codec.
  p_tile_index | FIXME DOC
  p_data | FIXME DOC
  p_data_size | FIXME DOC
  p_stream | the stream to write data to.
  p_manager | the user event manager.

References opj_tcd_tile::comps, EVT_ERROR, opj_tcd::image, opj_j2k::m_tcd, opj_image::numcomps, opj_alloc_tile_component_data(), opj_event_msg(), OPJ_FALSE, opj_j2k_post_write_tile(), opj_j2k_pre_write_tile(), opj_tcd_copy_tile_data(), OPJ_TRUE, opj_tcd::tcd_image, and opj_tcd_image::tiles.

Referenced by opj_create_compress(), and opj_jp2_write_tile().

## ◆ 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
| ) |  |
| static

Writes the TLM marker (Tile Length Marker)

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References EVT_ERROR, J2K_MS_TLM, opj_j2k::m_encoder, opj_j2k_enc::m_header_tile_data, opj_j2k_enc::m_header_tile_data_size, opj_j2k::m_specific_param, opj_j2k_enc::m_tlm_start, opj_j2k_enc::m_total_tile_parts, opj_j2k_enc::m_Ttlmi_is_byte, opj_event_msg(), OPJ_FALSE, opj_free(), opj_realloc(), opj_stream_tell(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.

Referenced by opj_j2k_setup_header_writing().

## ◆ 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
| ) |  |
| static

Writes the updated tlm.

Parameters

  p_stream | the stream to write data to.
  p_j2k | J2K codec.
  p_manager | the user event manager.

References opj_j2k::m_encoder, opj_j2k::m_specific_param, opj_j2k_enc::m_tlm_sot_offsets_buffer, opj_j2k_enc::m_tlm_start, opj_j2k_enc::m_total_tile_parts, opj_j2k_enc::m_Ttlmi_is_byte, OPJ_FALSE, opj_stream_seek(), opj_stream_tell(), opj_stream_write_data(), and OPJ_TRUE.

Referenced by opj_j2k_setup_end_compress().

## Variable Documentation

## ◆ j2k_mct_read_functions_to_float

const opj_j2k_mct_function j2k_mct_read_functions_to_float[]
| static

Initial value:
= {
opj_j2k_read_int16_to_float,
opj_j2k_read_int32_to_float,
opj_j2k_read_float32_to_float,
opj_j2k_read_float64_to_float
}
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:1498
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:1464
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:1447
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:1481

Referenced by opj_j2k_add_mct().

## ◆ j2k_mct_read_functions_to_int32

const opj_j2k_mct_function j2k_mct_read_functions_to_int32[]
| static

Initial value:
= {
opj_j2k_read_int16_to_int32,
opj_j2k_read_int32_to_int32,
opj_j2k_read_float32_to_int32,
opj_j2k_read_float64_to_int32
}
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:1515
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:1566
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:1532
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:1549

Referenced by opj_j2k_add_mct().

## ◆ j2k_mct_write_functions_from_float

const opj_j2k_mct_function j2k_mct_write_functions_from_float[]
| static

Initial value:
= {
opj_j2k_write_float_to_int16,
opj_j2k_write_float_to_int32,
opj_j2k_write_float_to_float,
opj_j2k_write_float_to_float64
}
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:1634
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:1600
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:1617
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:1583

Referenced by opj_j2k_setup_mct_encoding().

## ◆ j2k_memory_marker_handler_tab

const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab[]
| static

Referenced by opj_j2k_get_marker_handler().

## ◆ j2k_prog_order_list

const j2k_prog_order_t j2k_prog_order_list[]
| static

Initial value:
= {
{OPJ_CPRL, "CPRL"},
{OPJ_LRCP, "LRCP"},
{OPJ_PCRL, "PCRL"},
{OPJ_RLCP, "RLCP"},
{OPJ_RPCL, "RPCL"},
{(OPJ_PROG_ORDER) - 1, ""}
}
OPJ_PROG_ORDER
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
OPJ_RLCP
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition openjpeg.h:306
OPJ_LRCP
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition openjpeg.h:305
OPJ_PCRL
@ OPJ_PCRL
precinct-component-resolution-layer order
Definition openjpeg.h:308
OPJ_CPRL
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition openjpeg.h:309
OPJ_RPCL
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition openjpeg.h:307

Referenced by opj_j2k_convert_progression_order().

## ◆ MCT_ELEMENT_SIZE

const OPJ_UINT32 MCT_ELEMENT_SIZE[]
| static

Initial value:
= {
2,
4,
4,
8
}

FIXME DOC.

Referenced by opj_j2k_add_mct(), and opj_j2k_setup_mct_encoding().

## ◆ tabMaxSubLevelFromMainLevel

const OPJ_UINT16 tabMaxSubLevelFromMainLevel[]
| static

Initial value:
= {
15,
1,
1,
1,
2,
3,
4,
5,
6,
7,
8,
9
}

Referenced by opj_j2k_is_imf_compliant().