#include "opj_includes.h"
static OPJ_BOOL opj_j2k_setup_header_reading(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_encoding_validation(opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_setup_encoding_validation(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager);
static OPJ_BOOL opj_j2k_setup_decoding_validation(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager);
static OPJ_BOOL opj_j2k_setup_end_compress(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_build_decoder(opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_create_tcd(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_update_rates(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 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 const struct opj_dec_memory_marker_handler * opj_j2k_get_marker_handler(
OPJ_UINT32 p_id);
static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp);
static void opj_j2k_tcp_data_destroy(opj_tcp_t *p_tcp);
static void opj_j2k_cp_destroy(opj_cp_t *p_cp);
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 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 OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size(opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no);
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 OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size(opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no);
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 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 void opj_j2k_update_tlm(opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size);
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 void opj_j2k_copy_tile_component_parameters(opj_j2k_t *p_j2k);
static void opj_j2k_copy_tile_quantization_parameters(opj_j2k_t *p_j2k);
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 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);
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);
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);
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 OPJ_BOOL opj_j2k_write_siz(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_write_com(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_write_cod(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_compare_coc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no);
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 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 OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k);
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 OPJ_BOOL opj_j2k_write_qcd(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_compare_qcc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no);
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 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 OPJ_UINT32 opj_j2k_get_max_qcc_size(opj_j2k_t *p_j2k);
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 OPJ_BOOL opj_j2k_write_poc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k);
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 OPJ_UINT32 opj_j2k_get_max_toc_size(opj_j2k_t *p_j2k);
static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k);
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 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 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 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 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 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 OPJ_BOOL opj_j2k_merge_ppm(opj_cp_t *p_cp, opj_event_mgr_t * p_manager);
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 OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp,
opj_event_mgr_t * p_manager);
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 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 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 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 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 OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
static void opj_j2k_update_tlm(opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size)
{ … }
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 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 OPJ_BOOL opj_j2k_write_eoc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
#if 0
static OPJ_BOOL opj_j2k_read_eoc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
#endif
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 OPJ_BOOL opj_j2k_init_info(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index,
OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) ;
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 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 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 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 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 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 OPJ_BOOL opj_j2k_write_mco(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 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);
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 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 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 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 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 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 OPJ_BOOL opj_j2k_write_regions(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
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 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 OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino,
OPJ_UINT32 tileno);
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 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);
j2k_prog_order_t;
static const j2k_prog_order_t j2k_prog_order_list[] = …;
static const OPJ_UINT32 MCT_ELEMENT_SIZE [] = …;
opj_j2k_mct_function;
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 [] = …;
opj_dec_memory_marker_handler_t;
static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] = …;
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)
{ … }
const char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order)
{ … }
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 p_num_comps,
OPJ_UINT32 p_num_layers,
opj_event_mgr_t * p_manager)
{ … }
static OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino,
OPJ_UINT32 tileno)
{ … }
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 OPJ_BOOL opj_j2k_write_soc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_write_siz(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_write_com(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 OPJ_BOOL opj_j2k_write_cod(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
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 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 OPJ_BOOL opj_j2k_compare_coc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
{ … }
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 OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k)
{ … }
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 OPJ_BOOL opj_j2k_write_qcd(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 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 OPJ_BOOL opj_j2k_compare_qcc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_first_comp_no, OPJ_UINT32 p_second_comp_no)
{ … }
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 OPJ_UINT32 opj_j2k_get_max_qcc_size(opj_j2k_t *p_j2k)
{ … }
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 OPJ_BOOL opj_j2k_write_poc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k)
{ … }
static OPJ_UINT32 opj_j2k_get_max_toc_size(opj_j2k_t *p_j2k)
{ … }
static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k)
{ … }
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 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 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 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 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 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 OPJ_BOOL opj_j2k_merge_ppm(opj_cp_t *p_cp, opj_event_mgr_t * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager)
{ … }
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 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 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 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 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 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 OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 OPJ_BOOL opj_j2k_write_eoc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 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 OPJ_BOOL opj_j2k_update_rates(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
#if 0
static OPJ_BOOL opj_j2k_read_eoc(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{
OPJ_UINT32 i;
opj_tcd_t * l_tcd = 00;
OPJ_UINT32 l_nb_tiles;
opj_tcp_t * l_tcp = 00;
OPJ_BOOL l_success;
assert(p_j2k != 00);
assert(p_manager != 00);
assert(p_stream != 00);
l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw;
l_tcp = p_j2k->m_cp.tcps;
l_tcd = opj_tcd_create(OPJ_TRUE);
if (l_tcd == 00) {
opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n");
return OPJ_FALSE;
}
for (i = 0; i < l_nb_tiles; ++i) {
if (l_tcp->m_data) {
if (! opj_tcd_init_decode_tile(l_tcd, i)) {
opj_tcd_destroy(l_tcd);
opj_event_msg(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n");
return OPJ_FALSE;
}
l_success = opj_tcd_decode_tile(l_tcd, l_tcp->m_data, l_tcp->m_data_size, i,
p_j2k->cstr_index);
if (! l_success) {
p_j2k->m_specific_param.m_decoder.m_state |= J2K_STATE_ERR;
break;
}
}
opj_j2k_tcp_destroy(l_tcp);
++l_tcp;
}
opj_tcd_destroy(l_tcd);
return OPJ_TRUE;
}
#endif
static OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_write_mct_data_group(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_write_all_coc(
opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_write_all_qcc(
opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_write_regions(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_write_epc(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_write_mct_record(opj_j2k_t *p_j2k,
opj_mct_data_t * p_mct_record,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_write_mcc_record(opj_j2k_t *p_j2k,
struct opj_simple_mcc_decorrelation_data * p_mcc_record,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_write_mco(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager
)
{ … }
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 OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image,
OPJ_UINT32 p_index)
{ … }
static OPJ_BOOL opj_j2k_write_cbd(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
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 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 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
)
{ … }
void opj_j2k_setup_decoder(void *p_j2k, opj_dparameters_t *parameters)
{ … }
void opj_j2k_decoder_set_strict_mode(void *p_j2k, OPJ_BOOL strict)
{ … }
OPJ_BOOL opj_j2k_set_threads(void *p_j2k, OPJ_UINT32 num_threads)
{ … }
static int opj_j2k_get_default_thread_count(void)
{ … }
opj_j2k_t* opj_j2k_create_compress(void)
{ … }
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 int opj_j2k_get_imf_max_NL(opj_cparameters_t *parameters,
opj_image_t *image)
{ … }
static void opj_j2k_set_imf_parameters(opj_cparameters_t *parameters,
opj_image_t *image, opj_event_mgr_t *p_manager)
{ … }
static const OPJ_UINT16 tabMaxSubLevelFromMainLevel[] = …;
static OPJ_BOOL opj_j2k_is_imf_compliant(opj_cparameters_t *parameters,
opj_image_t *image,
opj_event_mgr_t *p_manager)
{ … }
OPJ_BOOL opj_j2k_setup_encoder(void *p_j2k,
opj_cparameters_t *parameters,
opj_image_t *image,
opj_event_mgr_t * p_manager)
{ … }
static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index,
OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
{ … }
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)
{ … }
OPJ_BOOL opj_j2k_end_decompress(void *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
OPJ_BOOL opj_j2k_read_header(opj_stream_private_t *p_stream,
void* j2k,
opj_image_t** p_image,
opj_event_mgr_t* p_manager)
{ … }
static OPJ_BOOL opj_j2k_setup_header_reading(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{ … }
static OPJ_BOOL opj_j2k_setup_decoding_validation(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{ … }
static OPJ_BOOL opj_j2k_mct_validation(opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
{ … }
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 OPJ_BOOL opj_j2k_build_encoder(opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_decoding_validation(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
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 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 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 const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler(
OPJ_UINT32 p_id)
{ … }
void opj_j2k_destroy(void *j2k)
{ … }
void j2k_destroy_cstr_index(opj_codestream_index_t *p_cstr_ind)
{ … }
static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp)
{ … }
static void opj_j2k_tcp_data_destroy(opj_tcp_t *p_tcp)
{ … }
static void opj_j2k_cp_destroy(opj_cp_t *p_cp)
{ … }
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)
{ … }
OPJ_BOOL opj_j2k_read_tile_header(void * 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)
{ … }
OPJ_BOOL opj_j2k_decode_tile(void * 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)
{ … }
static OPJ_BOOL opj_j2k_update_image_data(opj_tcd_t * p_tcd,
opj_image_t* p_output_image)
{ … }
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(void *j2k,
OPJ_UINT32 numcomps,
const OPJ_UINT32* comps_indices,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_set_decode_area(void *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)
{ … }
opj_j2k_t* opj_j2k_create_decompress(void)
{ … }
static opj_codestream_index_t* opj_j2k_create_cstr_index(void)
{ … }
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 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 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,
struct opj_event_mgr * p_manager)
{ … }
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 void opj_j2k_copy_tile_component_parameters(opj_j2k_t *p_j2k)
{ … }
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 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 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,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no,
OPJ_BYTE* p_header_data,
OPJ_UINT32 * p_header_size,
opj_event_mgr_t * p_manager
)
{ … }
static void opj_j2k_copy_tile_quantization_parameters(opj_j2k_t *p_j2k)
{ … }
static void opj_j2k_dump_tile_info(opj_tcp_t * l_default_tile,
OPJ_INT32 numcomps, FILE* out_stream)
{ … }
void j2k_dump(void* j2k, OPJ_INT32 flag, FILE* out_stream)
{ … }
static void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream)
{ … }
static void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream)
{ … }
void j2k_dump_image_header(opj_image_t* img_header, OPJ_BOOL dev_dump_flag,
FILE* out_stream)
{ … }
void j2k_dump_image_comp_header(opj_image_comp_t* comp_header,
OPJ_BOOL dev_dump_flag, FILE* out_stream)
{ … }
opj_codestream_info_v2_t* j2k_get_cstr_info(void* j2k)
{ … }
opj_codestream_index_t* j2k_get_cstr_index(void* j2k)
{ … }
static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
{ … }
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_decode_tiles(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
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 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)
{ … }
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(void * j2k,
opj_stream_private_t * p_stream,
opj_image_t * p_image,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_get_tile(void *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(void *j2k,
OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_encoder_set_extra_options(
void *j2k,
const char* const* p_options,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_encode(void * j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_end_compress(void *j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager)
{ … }
OPJ_BOOL opj_j2k_start_compress(void *j2k,
opj_stream_private_t *p_stream,
opj_image_t * p_image,
opj_event_mgr_t * p_manager)
{ … }
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 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_end_compress(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{ … }
static OPJ_BOOL opj_j2k_setup_encoding_validation(opj_j2k_t *p_j2k,
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)
{ … }
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_write_updated_tlm(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_end_encoding(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
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 OPJ_BOOL opj_j2k_init_info(opj_j2k_t *p_j2k,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager)
{ … }
static OPJ_BOOL opj_j2k_create_tcd(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager
)
{ … }
OPJ_BOOL opj_j2k_write_tile(void * 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)
{ … }