OpenJPEG  2.2.0
Data Structures | Typedefs | Functions | Variables
j2k.c File Reference
#include "opj_includes.h"

Data Structures

struct  j2k_prog_order
 
struct  opj_dec_memory_marker_handler
 

Typedefs

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
 

Functions

char * opj_j2k_convert_progression_order (OPJ_PROG_ORDER prg_order)
 Converts an enum type progression order to string type. More...
 
void opj_j2k_setup_decoder (opj_j2k_t *j2k, opj_dparameters_t *parameters)
 Setup the decoder decoding parameters using user parameters. More...
 
OPJ_BOOL opj_j2k_set_threads (opj_j2k_t *j2k, OPJ_UINT32 num_threads)
 
static int opj_j2k_get_default_thread_count ()
 
opj_j2k_topj_j2k_create_compress (void)
 Creates a J2K compression structure. More...
 
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. More...
 
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. More...
 
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. More...
 
void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind)
 Destroys a codestream index structure. More...
 
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. More...
 
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. More...
 
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. More...
 
opj_j2k_topj_j2k_create_decompress (void)
 Creates a J2K decompression structure. More...
 
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 . More...
 
void j2k_dump_image_header (opj_image_t *img_header, OPJ_BOOL dev_dump_flag, FILE *out_stream)
 Dump an image header structure. More...
 
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. More...
 
opj_codestream_info_v2_tj2k_get_cstr_info (opj_j2k_t *p_j2k)
 Get the codestream info from a JPEG2000 codec. More...
 
opj_codestream_index_tj2k_get_cstr_index (opj_j2k_t *p_j2k)
 Get the codestream index from a JPEG2000 codec. More...
 
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. More...
 
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. More...
 
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. More...
 
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_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. More...
 
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. More...
 
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. More...
 
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. More...
 

Variables

static j2k_prog_order_t j2k_prog_order_list []
 
static const OPJ_UINT32 MCT_ELEMENT_SIZE []
 FIXME DOC. More...
 
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 []
 

Local static functions

#define OPJ_UNUSED(x)   (void)x
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 decoder. More...
 
static OPJ_BOOL opj_j2k_exec (opj_j2k_t *p_j2k, opj_procedure_list_t *p_procedure_list, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Excutes the given procedures on the given codec. More...
 
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. More...
 
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. More...
 
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. More...
 
static const struct opj_dec_memory_marker_handleropj_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. More...
 
static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp)
 Destroys a tile coding parameter structure. More...
 
static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
 Destroys the data inside a tile coding parameter structure. More...
 
static void opj_j2k_cp_destroy (opj_cp_t *p_cp)
 Destroys a coding parameter structure. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static void opj_j2k_update_tlm (opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_part_size)
 Updates the Tile Length Marker. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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_BYTE *p_data, 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. More...
 
static OPJ_BOOL opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
 
static OPJ_BOOL opj_j2k_write_all_tile_parts (opj_j2k_t *p_j2k, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, opj_stream_private_t *p_stream, struct opj_event_mgr *p_manager)
 
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. More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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 Styke defaults) More...
 
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) More...
 
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) More...
 
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) More...
 
static OPJ_UINT32 opj_j2k_get_max_coc_size (opj_j2k_t *p_j2k)
 Gets the maximum size taken by a coc. More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
static OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k)
 Gets the maximum size taken by a qcc. More...
 
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) More...
 
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) More...
 
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) More...
 
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. More...
 
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) More...
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
static OPJ_BOOL opj_j2k_write_sot (opj_j2k_t *p_j2k, OPJ_BYTE *p_data, 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) More...
 
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) More...
 
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) More...
 
static OPJ_BOOL opj_j2k_write_sod (opj_j2k_t *p_j2k, opj_tcd_t *p_tile_coder, OPJ_BYTE *p_data, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_total_data_size, const opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager)
 Writes the SOD marker (Start of data) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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) More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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 ???? More...
 
static OPJ_BOOL opj_j2k_check_poc_val (const opj_poc_t *p_pocs, OPJ_UINT32 p_nb_pocs, OPJ_UINT32 p_nb_resolutions, OPJ_UINT32 numcomps, OPJ_UINT32 numlayers, opj_event_mgr_t *p_manager)
 Checks the progression order changes values. More...
 
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. More...
 
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. More...
 
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_topj_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 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). More...
 

Typedef Documentation

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

Function Documentation

void j2k_destroy_cstr_index ( opj_codestream_index_t p_cstr_ind)

Destroys a codestream index structure.

Parameters
p_cstr_indthe 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().

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

Dump some elements from the J2K decompression structure .

Parameters
p_j2kthe jpeg2000 codec.
flagflag to describe what elements are dump.
out_streamoutput 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().

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
compthe component image header to dump.
dev_dump_flagflag to describe if we are in the case of this function is use outside j2k_dump function
out_streamoutput 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().

void j2k_dump_image_header ( opj_image_t image,
OPJ_BOOL  dev_dump_flag,
FILE *  out_stream 
)

Dump an image header structure.

Parameters
imagethe image header to dump.
dev_dump_flagflag to describe if we are in the case of this function is use outside j2k_dump function
out_streamoutput 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().

opj_codestream_index_t* j2k_get_cstr_index ( opj_j2k_t p_j2k)
opj_codestream_info_v2_t* j2k_get_cstr_info ( opj_j2k_t p_j2k)

Get the codestream info from a JPEG2000 codec.

Parameters
p_j2kthe 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_j2k_t* opj_j2k_create_decompress ( void  )
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 
)
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_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 
)
void opj_j2k_destroy ( opj_j2k_t p_j2k)
static void opj_j2k_dump_tile_info ( opj_tcp_t l_default_tile,
OPJ_INT32  numcomps,
FILE *  out_stream 
)
static
OPJ_BOOL opj_j2k_encode ( opj_j2k_t p_j2k,
opj_stream_private_t p_stream,
opj_event_mgr_t p_manager 
)
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_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().

static int opj_j2k_get_default_thread_count ( )
static
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_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_streamthe stream to read data from.
p_j2kthe jpeg2000 codec.
p_imageFIXME DOC
p_managerthe 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_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_j2kthe jpeg2000 codec.
p_tile_indexFIXME DOC
p_data_sizeFIXME DOC
p_tile_x0FIXME DOC
p_tile_y0FIXME DOC
p_tile_x1FIXME DOC
p_tile_y1FIXME DOC
p_nb_compsFIXME DOC
p_go_onFIXME DOC
p_streamthe stream to write data to.
p_managerthe 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_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_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_j2kthe jpeg2000 codec.
p_imageFIXME DOC
p_start_xthe left position of the rectangle to decode (in image coordinates).
p_start_ythe up position of the rectangle to decode (in image coordinates).
p_end_xthe right position of the rectangle to decode (in image coordinates).
p_end_ythe bottom position of the rectangle to decode (in image coordinates).
p_managerthe user event manager
Returns
true if the area could be set.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_image_comp::factor, opj_image_comp::h, J2K_STATE_TPHSOT, opj_j2k::m_cp, 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_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_int_ceildivpow2(), OPJ_TRUE, 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_set_decode_area().

OPJ_BOOL opj_j2k_set_decoded_resolution_factor ( opj_j2k_t p_j2k,
OPJ_UINT32  res_factor,
opj_event_mgr_t p_manager 
)
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.

Developpers 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().

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.

Developpers 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_BOOL opj_j2k_setup_mct_encoding ( opj_tcp_t p_tcp,
opj_image_t p_image 
)
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_j2kthe jpeg2000 codec.
p_streamthe stream object.
p_imageFIXME DOC
p_managerthe 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_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_j2kthe jpeg2000 codec.
p_tile_indexFIXME DOC
p_dataFIXME DOC
p_data_sizeFIXME DOC
p_streamthe stream to write data to.
p_managerthe 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().

Variable Documentation

const opj_j2k_mct_function j2k_mct_read_functions_to_float[]
static
Initial value:
= {
}
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:1452
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:1418
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:1435
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:1401
const opj_j2k_mct_function j2k_mct_read_functions_to_int32[]
static
Initial value:
= {
}
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:1469
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:1503
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:1486
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:1520
const opj_j2k_mct_function j2k_mct_write_functions_from_float[]
static
Initial value:
= {
}
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:1571
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:1537
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:1588
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:1554
const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab[]
static
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, ""}
}
layer-resolution-component-precinct order
Definition: openjpeg.h:269
resolution-layer-component-precinct order
Definition: openjpeg.h:270
resolution-precinct-component-layer order
Definition: openjpeg.h:271
enum PROG_ORDER OPJ_PROG_ORDER
Progression order.
component-precinct-resolution-layer order
Definition: openjpeg.h:273
precinct-component-resolution-layer order
Definition: openjpeg.h:272
const OPJ_UINT32 MCT_ELEMENT_SIZE[]
static
Initial value:
= {
2,
4,
4,
8
}

FIXME DOC.