[trunk] [trunk] remove old opj_tcp and rename opj_tcp_v2 to opj_tcp

This commit is contained in:
Mickael Savinaud 2012-10-25 15:15:02 +00:00
parent 7f7ef068fc
commit 9b6900b058
8 changed files with 105 additions and 144 deletions

View File

@ -189,14 +189,14 @@ static const struct opj_dec_memory_marker_handler * opj_j2k_get_marker_handler (
* *
* @param p_tcp the tile coding parameter to destroy. * @param p_tcp the tile coding parameter to destroy.
*/ */
static void opj_j2k_tcp_destroy (opj_tcp_v2_t *p_tcp); static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp);
/** /**
* Destroys the data inside a tile coding parameter structure. * Destroys the data inside a tile coding parameter structure.
* *
* @param p_tcp the tile coding parameter which contain data to destroy. * @param p_tcp the tile coding parameter which contain data to destroy.
*/ */
static void opj_j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp); static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp);
/** /**
* Destroys a coding parameter structure. * Destroys a coding parameter structure.
@ -985,7 +985,7 @@ static opj_bool opj_j2k_read_mco ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_header_size, OPJ_UINT32 p_header_size,
opj_event_mgr_t * p_manager ); opj_event_mgr_t * p_manager );
static opj_bool opj_j2k_add_mct(opj_tcp_v2_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index); 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_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_int32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem);
@ -1124,9 +1124,9 @@ 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_codestream_index_t* opj_j2k_create_cstr_index(void);
static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_v2_t * p_tcp); static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp);
static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_v2_t * p_tcp); static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp);
/*@}*/ /*@}*/
@ -1546,7 +1546,7 @@ OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno)
const OPJ_CHAR *prog = 00; const OPJ_CHAR *prog = 00;
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_UINT32 tpnum = 1; OPJ_UINT32 tpnum = 1;
opj_tcp_v2_t *tcp = 00; opj_tcp_t *tcp = 00;
opj_poc_t * l_current_poc = 00; opj_poc_t * l_current_poc = 00;
/* preconditions */ /* preconditions */
@ -1608,7 +1608,7 @@ opj_bool opj_j2k_calculate_tp( opj_j2k_t *p_j2k,
{ {
OPJ_UINT32 pino,tileno; OPJ_UINT32 pino,tileno;
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
opj_tcp_v2_t *tcp; opj_tcp_t *tcp;
/* preconditions */ /* preconditions */
assert(p_nb_tiles != 00); assert(p_nb_tiles != 00);
@ -1872,7 +1872,7 @@ static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
opj_image_t *l_image = 00; opj_image_t *l_image = 00;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
opj_tcp_v2_t * l_current_tile_param = 00; opj_tcp_t * l_current_tile_param = 00;
/* preconditions */ /* preconditions */
assert(p_j2k != 00); assert(p_j2k != 00);
@ -2090,12 +2090,12 @@ static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
#endif /* USE_JPWL */ #endif /* USE_JPWL */
/* memory allocations */ /* memory allocations */
l_cp->tcps = (opj_tcp_v2_t*) opj_calloc(l_nb_tiles, sizeof(opj_tcp_v2_t)); l_cp->tcps = (opj_tcp_t*) opj_calloc(l_nb_tiles, sizeof(opj_tcp_t));
if (l_cp->tcps == 00) { if (l_cp->tcps == 00) {
opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n"); opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to take in charge SIZ marker\n");
return OPJ_FALSE; return OPJ_FALSE;
} }
memset(l_cp->tcps,0,l_nb_tiles*sizeof(opj_tcp_v2_t)); memset(l_cp->tcps,0,l_nb_tiles*sizeof(opj_tcp_t));
#ifdef USE_JPWL #ifdef USE_JPWL
if (l_cp->correct) { if (l_cp->correct) {
@ -2243,7 +2243,7 @@ opj_bool opj_j2k_write_cod( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager ) opj_event_mgr_t * p_manager )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_code_size,l_remaining_size; OPJ_UINT32 l_code_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00; OPJ_BYTE * l_current_data = 00;
@ -2326,7 +2326,7 @@ static opj_bool opj_j2k_read_cod ( opj_j2k_t *p_j2k,
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_UINT32 l_tmp; OPJ_UINT32 l_tmp;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_image_t *l_image = 00; opj_image_t *l_image = 00;
/* preconditions */ /* preconditions */
@ -2454,7 +2454,7 @@ void opj_j2k_write_coc_in_memory( opj_j2k_t *p_j2k,
) )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_coc_size,l_remaining_size; OPJ_UINT32 l_coc_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00; OPJ_BYTE * l_current_data = 00;
opj_image_t *l_image = 00; opj_image_t *l_image = 00;
@ -2526,7 +2526,7 @@ static opj_bool opj_j2k_read_coc ( opj_j2k_t *p_j2k,
) )
{ {
opj_cp_t *l_cp = NULL; opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL; opj_tcp_t *l_tcp = NULL;
opj_image_t *l_image = NULL; opj_image_t *l_image = NULL;
OPJ_UINT32 l_comp_room; OPJ_UINT32 l_comp_room;
OPJ_UINT32 l_comp_no; OPJ_UINT32 l_comp_no;
@ -2579,7 +2579,7 @@ opj_bool opj_j2k_write_qcd( opj_j2k_t *p_j2k,
) )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_qcd_size,l_remaining_size; OPJ_UINT32 l_qcd_size,l_remaining_size;
OPJ_BYTE * l_current_data = 00; OPJ_BYTE * l_current_data = 00;
@ -2848,7 +2848,7 @@ opj_bool opj_j2k_write_poc( opj_j2k_t *p_j2k,
OPJ_UINT32 l_nb_poc; OPJ_UINT32 l_nb_poc;
OPJ_UINT32 l_poc_size; OPJ_UINT32 l_poc_size;
OPJ_UINT32 l_written_size = 0; OPJ_UINT32 l_written_size = 0;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
OPJ_UINT32 l_poc_room; OPJ_UINT32 l_poc_room;
@ -2904,7 +2904,7 @@ void opj_j2k_write_poc_in_memory( opj_j2k_t *p_j2k,
OPJ_UINT32 l_nb_poc; OPJ_UINT32 l_nb_poc;
OPJ_UINT32 l_poc_size; OPJ_UINT32 l_poc_size;
opj_image_t *l_image = 00; opj_image_t *l_image = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
opj_poc_t *l_current_poc = 00; opj_poc_t *l_current_poc = 00;
OPJ_UINT32 l_poc_room; OPJ_UINT32 l_poc_room;
@ -2969,7 +2969,7 @@ void opj_j2k_write_poc_in_memory( opj_j2k_t *p_j2k,
OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k) OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k)
{ {
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
OPJ_UINT32 l_nb_tiles = 0; OPJ_UINT32 l_nb_tiles = 0;
OPJ_UINT32 l_max_poc = 0; OPJ_UINT32 l_max_poc = 0;
OPJ_UINT32 i; OPJ_UINT32 i;
@ -2992,7 +2992,7 @@ OPJ_UINT32 opj_j2k_get_max_toc_size (opj_j2k_t *p_j2k)
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
OPJ_UINT32 l_max = 0; OPJ_UINT32 l_max = 0;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
l_tcp = p_j2k->m_cp.tcps; l_tcp = p_j2k->m_cp.tcps;
l_nb_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th ; l_nb_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th ;
@ -3050,7 +3050,7 @@ static opj_bool opj_j2k_read_poc ( opj_j2k_t *p_j2k,
OPJ_UINT32 l_chunk_size, l_comp_room; OPJ_UINT32 l_chunk_size, l_comp_room;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_poc_t *l_current_poc = 00; opj_poc_t *l_current_poc = 00;
/* preconditions */ /* preconditions */
@ -3667,7 +3667,7 @@ static opj_bool opj_j2k_read_ppt ( opj_j2k_t *p_j2k,
) )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_Z_ppt; OPJ_UINT32 l_Z_ppt;
/* preconditions */ /* preconditions */
@ -3839,7 +3839,7 @@ opj_bool opj_j2k_read_sot ( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager ) opj_event_mgr_t * p_manager )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_tot_len, l_num_parts = 0; OPJ_UINT32 l_tot_len, l_num_parts = 0;
OPJ_UINT32 l_current_part; OPJ_UINT32 l_current_part;
OPJ_UINT32 l_tile_x,l_tile_y; OPJ_UINT32 l_tile_x,l_tile_y;
@ -4081,7 +4081,7 @@ opj_bool opj_j2k_write_sod( opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager opj_event_mgr_t * p_manager
) )
{ {
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_codestream_info_t *l_cstr_info = 00; opj_codestream_info_t *l_cstr_info = 00;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
@ -4163,7 +4163,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
OPJ_UINT32 l_current_read_size; OPJ_UINT32 l_current_read_size;
opj_codestream_index_t * l_cstr_index = 00; opj_codestream_index_t * l_cstr_index = 00;
OPJ_BYTE ** l_current_data = 00; OPJ_BYTE ** l_current_data = 00;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
OPJ_UINT32 * l_tile_len = 00; OPJ_UINT32 * l_tile_len = 00;
/* preconditions */ /* preconditions */
@ -4262,7 +4262,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
OPJ_UINT32 l_rgn_size; OPJ_UINT32 l_rgn_size;
opj_image_t *l_image = 00; opj_image_t *l_image = 00;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
OPJ_UINT32 l_comp_room; OPJ_UINT32 l_comp_room;
@ -4359,7 +4359,7 @@ static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
opj_image_t * l_image = 00; opj_image_t * l_image = 00;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_comp_room, l_comp_no, l_roi_sty; OPJ_UINT32 l_comp_room, l_comp_no, l_roi_sty;
/* preconditions*/ /* preconditions*/
@ -4412,12 +4412,12 @@ static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
} }
OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_v2_t * p_tcp) OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp)
{ {
return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14); return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14);
} }
OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_v2_t * p_tcp) OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp)
{ {
(void)p_tcp; (void)p_tcp;
return 0; return 0;
@ -4429,7 +4429,7 @@ opj_bool opj_j2k_update_rates( opj_j2k_t *p_j2k,
{ {
opj_cp_t * l_cp = 00; opj_cp_t * l_cp = 00;
opj_image_t * l_image = 00; opj_image_t * l_image = 00;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
OPJ_UINT32 i,j,k; OPJ_UINT32 i,j,k;
@ -4439,7 +4439,7 @@ opj_bool opj_j2k_update_rates( opj_j2k_t *p_j2k,
OPJ_UINT32 l_bits_empty, l_size_pixel; OPJ_UINT32 l_bits_empty, l_size_pixel;
OPJ_UINT32 l_tile_size = 0; OPJ_UINT32 l_tile_size = 0;
OPJ_UINT32 l_last_res; OPJ_UINT32 l_last_res;
OPJ_FLOAT32 (* l_tp_stride_func)(opj_tcp_v2_t *) = 00; OPJ_FLOAT32 (* l_tp_stride_func)(opj_tcp_t *) = 00;
/* preconditions */ /* preconditions */
assert(p_j2k != 00); assert(p_j2k != 00);
@ -4592,7 +4592,7 @@ opj_bool opj_j2k_read_eoc ( opj_j2k_t *p_j2k,
OPJ_UINT32 i; OPJ_UINT32 i;
opj_tcd_t * l_tcd = 00; opj_tcd_t * l_tcd = 00;
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_bool l_success; opj_bool l_success;
/* preconditions */ /* preconditions */
@ -4655,7 +4655,7 @@ opj_bool opj_j2k_write_mct_data_group( opj_j2k_t *p_j2k,
OPJ_UINT32 i; OPJ_UINT32 i;
opj_simple_mcc_decorrelation_data_t * l_mcc_record; opj_simple_mcc_decorrelation_data_t * l_mcc_record;
opj_mct_data_t * l_mct_record; opj_mct_data_t * l_mct_record;
opj_tcp_v2_t * l_tcp; opj_tcp_t * l_tcp;
/* preconditions */ /* preconditions */
assert(p_j2k != 00); assert(p_j2k != 00);
@ -4922,7 +4922,7 @@ static opj_bool opj_j2k_read_mct ( opj_j2k_t *p_j2k,
) )
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
OPJ_UINT32 l_tmp; OPJ_UINT32 l_tmp;
OPJ_UINT32 l_indix; OPJ_UINT32 l_indix;
opj_mct_data_t * l_mct_data; opj_mct_data_t * l_mct_data;
@ -5132,7 +5132,7 @@ opj_bool opj_j2k_read_mcc ( opj_j2k_t *p_j2k,
OPJ_UINT32 i,j; OPJ_UINT32 i,j;
OPJ_UINT32 l_tmp; OPJ_UINT32 l_tmp;
OPJ_UINT32 l_indix; OPJ_UINT32 l_indix;
opj_tcp_v2_t * l_tcp; opj_tcp_t * l_tcp;
opj_simple_mcc_decorrelation_data_t * l_mcc_record; opj_simple_mcc_decorrelation_data_t * l_mcc_record;
opj_mct_data_t * l_mct_data; opj_mct_data_t * l_mct_data;
OPJ_UINT32 l_nb_collections; OPJ_UINT32 l_nb_collections;
@ -5346,7 +5346,7 @@ opj_bool opj_j2k_write_mco( opj_j2k_t *p_j2k,
{ {
OPJ_BYTE * l_current_data = 00; OPJ_BYTE * l_current_data = 00;
OPJ_UINT32 l_mco_size; OPJ_UINT32 l_mco_size;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_simple_mcc_decorrelation_data_t * l_mcc_record; opj_simple_mcc_decorrelation_data_t * l_mcc_record;
OPJ_UINT32 i; OPJ_UINT32 i;
@ -5413,7 +5413,7 @@ static opj_bool opj_j2k_read_mco ( opj_j2k_t *p_j2k,
{ {
OPJ_UINT32 l_tmp, i; OPJ_UINT32 l_tmp, i;
OPJ_UINT32 l_nb_stages; OPJ_UINT32 l_nb_stages;
opj_tcp_v2_t * l_tcp; opj_tcp_t * l_tcp;
opj_tccp_t * l_tccp; opj_tccp_t * l_tccp;
opj_image_t * l_image; opj_image_t * l_image;
opj_image_comp_t * l_img_comp; opj_image_comp_t * l_img_comp;
@ -5471,7 +5471,7 @@ static opj_bool opj_j2k_read_mco ( opj_j2k_t *p_j2k,
return OPJ_TRUE; return OPJ_TRUE;
} }
opj_bool opj_j2k_add_mct(opj_tcp_v2_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index) opj_bool opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index)
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
opj_simple_mcc_decorrelation_data_t * l_mcc_record; opj_simple_mcc_decorrelation_data_t * l_mcc_record;
@ -5848,7 +5848,7 @@ void opj_j2k_setup_encoder( opj_j2k_t *p_j2k,
/* initialize the mutiple tiles */ /* initialize the mutiple tiles */
/* ---------------------------- */ /* ---------------------------- */
cp->tcps = (opj_tcp_v2_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_v2_t)); cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t));
if (parameters->numpocs) { if (parameters->numpocs) {
/* initialisation of POC */ /* initialisation of POC */
l_res = opj_j2k_check_poc_val(parameters->POC,parameters->numpocs, parameters->numresolution, image->numcomps, parameters->tcp_numlayers, p_manager); l_res = opj_j2k_check_poc_val(parameters->POC,parameters->numpocs, parameters->numresolution, image->numcomps, parameters->tcp_numlayers, p_manager);
@ -5856,7 +5856,7 @@ void opj_j2k_setup_encoder( opj_j2k_t *p_j2k,
} }
for (tileno = 0; tileno < cp->tw * cp->th; tileno++) { for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
opj_tcp_v2_t *tcp = &cp->tcps[tileno]; opj_tcp_t *tcp = &cp->tcps[tileno];
tcp->numlayers = parameters->tcp_numlayers; tcp->numlayers = parameters->tcp_numlayers;
for (j = 0; j < tcp->numlayers; j++) { for (j = 0; j < tcp->numlayers; j++) {
@ -6202,7 +6202,7 @@ opj_bool opj_j2k_mct_validation ( opj_j2k_t * p_j2k,
if ((p_j2k->m_cp.rsiz & 0x8200) == 0x8200) { if ((p_j2k->m_cp.rsiz & 0x8200) == 0x8200) {
OPJ_UINT32 l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw; OPJ_UINT32 l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw;
opj_tcp_v2_t * l_tcp = p_j2k->m_cp.tcps; opj_tcp_t * l_tcp = p_j2k->m_cp.tcps;
for (i=0;i<l_nb_tiles;++i) { for (i=0;i<l_nb_tiles;++i) {
if (l_tcp->mct == 2) { if (l_tcp->mct == 2) {
@ -6221,7 +6221,7 @@ opj_bool opj_j2k_mct_validation ( opj_j2k_t * p_j2k,
return l_is_valid; return l_is_valid;
} }
opj_bool opj_j2k_setup_mct_encoding(opj_tcp_v2_t * p_tcp, opj_image_t * p_image) opj_bool opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_UINT32 l_indix = 1; OPJ_UINT32 l_indix = 1;
@ -6626,8 +6626,8 @@ static opj_bool opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2
opj_event_mgr_t * p_manager opj_event_mgr_t * p_manager
) )
{ {
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_tcp_v2_t * l_default_tcp = 00; opj_tcp_t * l_default_tcp = 00;
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
OPJ_UINT32 i,j; OPJ_UINT32 i,j;
opj_tccp_t *l_current_tccp = 00; opj_tccp_t *l_current_tccp = 00;
@ -6656,7 +6656,7 @@ static opj_bool opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_t * p_j2
/* keep the tile-compo coding parameters pointer of the current tile coding parameters*/ /* keep the tile-compo coding parameters pointer of the current tile coding parameters*/
l_current_tccp = l_tcp->tccps; l_current_tccp = l_tcp->tccps;
/*Copy default coding parameters into the current tile coding parameters*/ /*Copy default coding parameters into the current tile coding parameters*/
memcpy(l_tcp, l_default_tcp, sizeof(opj_tcp_v2_t)); memcpy(l_tcp, l_default_tcp, sizeof(opj_tcp_t));
/* Initialize some values of the current tile coding parameters*/ /* Initialize some values of the current tile coding parameters*/
l_tcp->ppt = 0; l_tcp->ppt = 0;
l_tcp->ppt_data = 00; l_tcp->ppt_data = 00;
@ -6863,7 +6863,7 @@ void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind)
} }
} }
void opj_j2k_tcp_destroy (opj_tcp_v2_t *p_tcp) void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp)
{ {
if (p_tcp == 00) { if (p_tcp == 00) {
return; return;
@ -6922,7 +6922,7 @@ void opj_j2k_tcp_destroy (opj_tcp_v2_t *p_tcp)
} }
void opj_j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp) void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
{ {
if (p_tcp->m_data) { if (p_tcp->m_data) {
opj_free(p_tcp->m_data); opj_free(p_tcp->m_data);
@ -6934,7 +6934,7 @@ void opj_j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp)
void opj_j2k_cp_destroy (opj_cp_t *p_cp) void opj_j2k_cp_destroy (opj_cp_t *p_cp)
{ {
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
opj_tcp_v2_t * l_current_tile = 00; opj_tcp_t * l_current_tile = 00;
OPJ_UINT32 i; OPJ_UINT32 i;
if (p_cp == 00) if (p_cp == 00)
@ -6979,7 +6979,7 @@ opj_bool opj_j2k_read_tile_header( opj_j2k_t * p_j2k,
OPJ_UINT32 l_current_marker = J2K_MS_SOT; OPJ_UINT32 l_current_marker = J2K_MS_SOT;
OPJ_UINT32 l_marker_size; OPJ_UINT32 l_marker_size;
const opj_dec_memory_marker_handler_t * l_marker_handler = 00; const opj_dec_memory_marker_handler_t * l_marker_handler = 00;
opj_tcp_v2_t * l_tcp = NULL; opj_tcp_t * l_tcp = NULL;
OPJ_UINT32 l_nb_tiles; OPJ_UINT32 l_nb_tiles;
/* preconditions */ /* preconditions */
@ -7187,7 +7187,7 @@ opj_bool opj_j2k_decode_tile ( opj_j2k_t * p_j2k,
{ {
OPJ_UINT32 l_current_marker; OPJ_UINT32 l_current_marker;
OPJ_BYTE l_data [2]; OPJ_BYTE l_data [2];
opj_tcp_v2_t * l_tcp; opj_tcp_t * l_tcp;
/* preconditions */ /* preconditions */
assert(p_stream != 00); assert(p_stream != 00);
@ -7675,12 +7675,12 @@ opj_j2k_t* opj_j2k_create_decompress(void)
l_j2k->m_is_decoder = 1; l_j2k->m_is_decoder = 1;
l_j2k->m_cp.m_is_decoder = 1; l_j2k->m_cp.m_is_decoder = 1;
l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_v2_t*) opj_malloc(sizeof(opj_tcp_v2_t)); l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_t*) opj_malloc(sizeof(opj_tcp_t));
if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) { if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) {
opj_j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return 00; return 00;
} }
memset(l_j2k->m_specific_param.m_decoder.m_default_tcp,0,sizeof(opj_tcp_v2_t)); memset(l_j2k->m_specific_param.m_decoder.m_default_tcp,0,sizeof(opj_tcp_t));
l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE); l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE);
if (! l_j2k->m_specific_param.m_decoder.m_header_data) { if (! l_j2k->m_specific_param.m_decoder.m_header_data) {
@ -7747,7 +7747,7 @@ OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_comp_no ) OPJ_UINT32 p_comp_no )
{ {
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
/* preconditions */ /* preconditions */
@ -7778,7 +7778,7 @@ opj_bool opj_j2k_write_SPCod_SPCoc( opj_j2k_t *p_j2k,
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
/* preconditions */ /* preconditions */
@ -7843,7 +7843,7 @@ opj_bool opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k,
{ {
OPJ_UINT32 i, l_tmp; OPJ_UINT32 i, l_tmp;
opj_cp_t *l_cp = NULL; opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL; opj_tcp_t *l_tcp = NULL;
opj_tccp_t *l_tccp = NULL; opj_tccp_t *l_tccp = NULL;
OPJ_BYTE * l_current_ptr = NULL; OPJ_BYTE * l_current_ptr = NULL;
@ -7946,7 +7946,7 @@ void opj_j2k_copy_tile_component_parameters( opj_j2k_t *p_j2k )
/* loop */ /* loop */
OPJ_UINT32 i; OPJ_UINT32 i;
opj_cp_t *l_cp = NULL; opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL; opj_tcp_t *l_tcp = NULL;
opj_tccp_t *l_ref_tccp = NULL, *l_copied_tccp = NULL; opj_tccp_t *l_ref_tccp = NULL, *l_copied_tccp = NULL;
OPJ_UINT32 l_prc_size; OPJ_UINT32 l_prc_size;
@ -7981,7 +7981,7 @@ OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 l_num_bands; OPJ_UINT32 l_num_bands;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
/* preconditions */ /* preconditions */
@ -8017,7 +8017,7 @@ opj_bool opj_j2k_write_SQcd_SQcc( opj_j2k_t *p_j2k,
OPJ_UINT32 l_expn,l_mant; OPJ_UINT32 l_expn,l_mant;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
/* preconditions */ /* preconditions */
@ -8088,7 +8088,7 @@ opj_bool opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
/* loop*/ /* loop*/
OPJ_UINT32 l_band_no; OPJ_UINT32 l_band_no;
opj_cp_t *l_cp = 00; opj_cp_t *l_cp = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tccp_t *l_tccp = 00; opj_tccp_t *l_tccp = 00;
OPJ_BYTE * l_current_ptr = 00; OPJ_BYTE * l_current_ptr = 00;
OPJ_UINT32 l_tmp, l_num_band; OPJ_UINT32 l_tmp, l_num_band;
@ -8199,7 +8199,7 @@ void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k )
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
opj_cp_t *l_cp = NULL; opj_cp_t *l_cp = NULL;
opj_tcp_v2_t *l_tcp = NULL; opj_tcp_t *l_tcp = NULL;
opj_tccp_t *l_ref_tccp = NULL; opj_tccp_t *l_ref_tccp = NULL;
opj_tccp_t *l_copied_tccp = NULL; opj_tccp_t *l_copied_tccp = NULL;
OPJ_UINT32 l_size; OPJ_UINT32 l_size;
@ -8330,7 +8330,7 @@ void opj_j2k_dump_MH_index(opj_j2k_t* p_j2k, FILE* out_stream)
void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream) void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream)
{ {
opj_tcp_v2_t * l_default_tile=NULL; opj_tcp_t * l_default_tile=NULL;
fprintf(out_stream, "Codestream info from main header: {\n"); fprintf(out_stream, "Codestream info from main header: {\n");
@ -8446,7 +8446,7 @@ opj_codestream_info_v2_t* j2k_get_cstr_info(opj_j2k_t* p_j2k)
{ {
OPJ_UINT16 compno; OPJ_UINT16 compno;
OPJ_UINT16 numcomps = p_j2k->m_private_image->numcomps; OPJ_UINT16 numcomps = p_j2k->m_private_image->numcomps;
opj_tcp_v2_t *l_default_tile; opj_tcp_t *l_default_tile;
opj_codestream_info_v2_t* cstr_info = (opj_codestream_info_v2_t*) opj_calloc(1,sizeof(opj_codestream_info_v2_t)); opj_codestream_info_v2_t* cstr_info = (opj_codestream_info_v2_t*) opj_calloc(1,sizeof(opj_codestream_info_v2_t));
cstr_info->nbcomps = p_j2k->m_private_image->numcomps; cstr_info->nbcomps = p_j2k->m_private_image->numcomps;
@ -9251,7 +9251,7 @@ opj_bool opj_j2k_post_write_tile ( opj_j2k_t * p_j2k,
{ {
opj_tcd_t * l_tcd = 00; opj_tcd_t * l_tcd = 00;
opj_cp_t * l_cp = 00; opj_cp_t * l_cp = 00;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
OPJ_UINT32 l_nb_bytes_written; OPJ_UINT32 l_nb_bytes_written;
OPJ_BYTE * l_current_data = 00; OPJ_BYTE * l_current_data = 00;
OPJ_UINT32 l_tile_size = 0; OPJ_UINT32 l_tile_size = 0;
@ -9380,7 +9380,7 @@ opj_bool opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
OPJ_UINT32 l_current_nb_bytes_written; OPJ_UINT32 l_current_nb_bytes_written;
OPJ_BYTE * l_begin_data = 00; OPJ_BYTE * l_begin_data = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tcd_t * l_tcd = 00; opj_tcd_t * l_tcd = 00;
opj_cp_t * l_cp = 00; opj_cp_t * l_cp = 00;
@ -9465,7 +9465,7 @@ opj_bool opj_j2k_write_all_tile_parts( opj_j2k_t *p_j2k,
OPJ_UINT32 pino; OPJ_UINT32 pino;
OPJ_BYTE * l_begin_data; OPJ_BYTE * l_begin_data;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
opj_tcd_t * l_tcd = 00; opj_tcd_t * l_tcd = 00;
opj_cp_t * l_cp = 00; opj_cp_t * l_cp = 00;

View File

@ -196,45 +196,6 @@ typedef struct opj_tccp
opj_tccp_t; opj_tccp_t;
/** V1 STYLE
Tile coding parameters :
this structure is used to store coding/decoding parameters common to all
tiles (information like COD, COC in main header)
*/
typedef struct opj_tcp {
/** 1 : first part-tile of a tile */
int first;
/** coding style */
int csty;
/** progression order */
OPJ_PROG_ORDER prg;
/** number of layers */
int numlayers;
/** multi-component transform identifier */
int mct;
/** rates of layers */
float rates[100];
/** number of progression order changes */
int numpocs;
/** indicates if a POC marker has been used O:NO, 1:YES */
int POC;
/** progression order changes */
opj_poc_t pocs[32];
/** packet header store there for futur use in t2_decode_packet */
unsigned char *ppt_data;
/** pointer remaining on the first byte of the first header if ppt is used */
unsigned char *ppt_data_first;
/** If ppt == 1 --> there was a PPT marker for the present tile */
int ppt;
/** used in case of multiple marker PPT (number of info already stored) */
int ppt_store;
/** ppmbug1 */
int ppt_len;
/** add fixed_quality */
float distoratio[100];
/** tile-component coding parameters */
opj_tccp_t *tccps;
} opj_tcp_t;
/** /**
* FIXME DOC * FIXME DOC
@ -267,7 +228,7 @@ Tile coding parameters :
this structure is used to store coding/decoding parameters common to all this structure is used to store coding/decoding parameters common to all
tiles (information like COD, COC in main header) tiles (information like COD, COC in main header)
*/ */
typedef struct opj_tcp_v2 typedef struct opj_tcp
{ {
/** coding style */ /** coding style */
OPJ_UINT32 csty; OPJ_UINT32 csty;
@ -327,7 +288,7 @@ typedef struct opj_tcp_v2
OPJ_UINT32 ppt : 1; OPJ_UINT32 ppt : 1;
/** indicates if a POC marker has been used O:NO, 1:YES */ /** indicates if a POC marker has been used O:NO, 1:YES */
OPJ_UINT32 POC : 1; OPJ_UINT32 POC : 1;
} opj_tcp_v2_t; } opj_tcp_t;
@ -410,7 +371,7 @@ typedef struct opj_cp
OPJ_INT32 ppm_previous; OPJ_INT32 ppm_previous;
/** tile coding parameters */ /** tile coding parameters */
opj_tcp_v2_t *tcps; opj_tcp_t *tcps;
union union
{ {
@ -480,7 +441,7 @@ typedef struct opj_j2k_dec
/** /**
* store decoding parameters common to all tiles (information like COD, COC in main header) * store decoding parameters common to all tiles (information like COD, COC in main header)
*/ */
opj_tcp_v2_t *m_default_tcp; opj_tcp_t *m_default_tcp;
OPJ_BYTE *m_header_data; OPJ_BYTE *m_header_data;
OPJ_UINT32 m_header_data_size; OPJ_UINT32 m_header_data_size;
/** to tell the tile part length */ /** to tell the tile part length */
@ -868,7 +829,7 @@ opj_bool opj_j2k_end_compress( opj_j2k_t *p_j2k,
opj_stream_private_t *cio, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager); opj_event_mgr_t * p_manager);
opj_bool opj_j2k_setup_mct_encoding (opj_tcp_v2_t * p_tcp, opj_image_t * p_image); opj_bool opj_j2k_setup_mct_encoding (opj_tcp_t * p_tcp, opj_image_t * p_image);
#endif /* __J2K_H */ #endif /* __J2K_H */

View File

@ -193,14 +193,14 @@ static opj_pi_iterator_t * opj_pi_create( const opj_image_t *image,
* FIXME DOC * FIXME DOC
*/ */
static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi,
opj_tcp_v2_t * p_tcp, opj_tcp_t * p_tcp,
OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_precision,
OPJ_UINT32 p_max_res); OPJ_UINT32 p_max_res);
/** /**
* FIXME DOC * FIXME DOC
*/ */
static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi, static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi,
opj_tcp_v2_t * p_tcp, opj_tcp_t * p_tcp,
OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_precision,
OPJ_UINT32 p_max_res); OPJ_UINT32 p_max_res);
@ -560,7 +560,7 @@ void opj_get_encoding_parameters( const opj_image_t *p_image,
/* loop */ /* loop */
OPJ_UINT32 compno, resno; OPJ_UINT32 compno, resno;
/* pointers */ /* pointers */
const opj_tcp_v2_t *l_tcp = 00; const opj_tcp_t *l_tcp = 00;
const opj_tccp_t * l_tccp = 00; const opj_tccp_t * l_tccp = 00;
const opj_image_comp_t * l_img_comp = 00; const opj_image_comp_t * l_img_comp = 00;
@ -676,7 +676,7 @@ void opj_get_all_encoding_parameters( const opj_image_t *p_image,
OPJ_UINT32 compno, resno; OPJ_UINT32 compno, resno;
/* pointers*/ /* pointers*/
const opj_tcp_v2_t *tcp = 00; const opj_tcp_t *tcp = 00;
const opj_tccp_t * l_tccp = 00; const opj_tccp_t * l_tccp = 00;
const opj_image_comp_t * l_img_comp = 00; const opj_image_comp_t * l_img_comp = 00;
@ -788,7 +788,7 @@ opj_pi_iterator_t * opj_pi_create( const opj_image_t *image,
/* pointers to tile coding parameters and components.*/ /* pointers to tile coding parameters and components.*/
opj_pi_iterator_t *l_pi = 00; opj_pi_iterator_t *l_pi = 00;
opj_tcp_v2_t *tcp = 00; opj_tcp_t *tcp = 00;
const opj_tccp_t *tccp = 00; const opj_tccp_t *tccp = 00;
/* current packet iterator being allocated*/ /* current packet iterator being allocated*/
@ -855,7 +855,7 @@ void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp,
/* loop*/ /* loop*/
OPJ_UINT32 pino; OPJ_UINT32 pino;
/* tile coding parameter*/ /* tile coding parameter*/
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
/* current poc being updated*/ /* current poc being updated*/
opj_poc_t * l_current_poc = 00; opj_poc_t * l_current_poc = 00;
@ -932,7 +932,7 @@ void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp,
/* loop*/ /* loop*/
OPJ_UINT32 pino; OPJ_UINT32 pino;
/* tile coding parameter*/ /* tile coding parameter*/
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
/* current poc being updated*/ /* current poc being updated*/
opj_poc_t * l_current_poc = 00; opj_poc_t * l_current_poc = 00;
/* number of pocs*/ /* number of pocs*/
@ -973,7 +973,7 @@ void opj_pi_update_encode_not_poc ( opj_cp_t *p_cp,
} }
void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi, void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi,
opj_tcp_v2_t * p_tcp, opj_tcp_t * p_tcp,
OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_precision,
OPJ_UINT32 p_max_res) OPJ_UINT32 p_max_res)
{ {
@ -1013,7 +1013,7 @@ void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi,
} }
void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi,
opj_tcp_v2_t * p_tcp, opj_tcp_t * p_tcp,
OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_precision,
OPJ_UINT32 p_max_res) OPJ_UINT32 p_max_res)
{ {
@ -1056,7 +1056,7 @@ opj_bool opj_pi_check_next_level( OPJ_INT32 pos,
const OPJ_CHAR *prog) const OPJ_CHAR *prog)
{ {
OPJ_INT32 i; OPJ_INT32 i;
opj_tcp_v2_t *tcps =&cp->tcps[tileno]; opj_tcp_t *tcps =&cp->tcps[tileno];
opj_poc_t *tcp = &tcps->pocs[pino]; opj_poc_t *tcp = &tcps->pocs[pino];
if(pos>=0){ if(pos>=0){
@ -1160,7 +1160,7 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
/* pointers */ /* pointers */
opj_pi_iterator_t *l_pi = 00; opj_pi_iterator_t *l_pi = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
const opj_tccp_t *l_tccp = 00; const opj_tccp_t *l_tccp = 00;
opj_pi_comp_t *l_current_comp = 00; opj_pi_comp_t *l_current_comp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
@ -1363,7 +1363,7 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
/* pointers*/ /* pointers*/
opj_pi_iterator_t *l_pi = 00; opj_pi_iterator_t *l_pi = 00;
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
const opj_tccp_t *l_tccp = 00; const opj_tccp_t *l_tccp = 00;
opj_pi_comp_t *l_current_comp = 00; opj_pi_comp_t *l_current_comp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
@ -1536,7 +1536,7 @@ void opj_pi_create_encode( opj_pi_iterator_t *pi,
const OPJ_CHAR *prog; const OPJ_CHAR *prog;
OPJ_INT32 i; OPJ_INT32 i;
OPJ_UINT32 incr_top=1,resetX=0; OPJ_UINT32 incr_top=1,resetX=0;
opj_tcp_v2_t *tcps =&cp->tcps[tileno]; opj_tcp_t *tcps =&cp->tcps[tileno];
opj_poc_t *tcp= &tcps->pocs[pino]; opj_poc_t *tcp= &tcps->pocs[pino];
prog = opj_j2k_convert_progression_order(tcp->prg); prog = opj_j2k_convert_progression_order(tcp->prg);
@ -1826,7 +1826,7 @@ void opj_pi_update_encoding_parameters( const opj_image_t *p_image,
OPJ_UINT32 l_dx_min,l_dy_min; OPJ_UINT32 l_dx_min,l_dy_min;
/* pointers */ /* pointers */
opj_tcp_v2_t *l_tcp = 00; opj_tcp_t *l_tcp = 00;
/* preconditions */ /* preconditions */
assert(p_cp != 00); assert(p_cp != 00);

View File

@ -1057,7 +1057,7 @@ opj_bool opj_t1_decode_cblk(opj_t1_t *t1,
opj_bool opj_t1_encode_cblks( opj_t1_t *t1, opj_bool opj_t1_encode_cblks( opj_t1_t *t1,
opj_tcd_tile_t *tile, opj_tcd_tile_t *tile,
opj_tcp_v2_t *tcp, opj_tcp_t *tcp,
const OPJ_FLOAT64 * mct_norms const OPJ_FLOAT64 * mct_norms
) )
{ {

View File

@ -123,7 +123,7 @@ Encode the code-blocks of a tile
*/ */
opj_bool opj_t1_encode_cblks( opj_t1_t *t1, opj_bool opj_t1_encode_cblks( opj_t1_t *t1,
opj_tcd_tile_t *tile, opj_tcd_tile_t *tile,
opj_tcp_v2_t *tcp, opj_tcp_t *tcp,
const OPJ_FLOAT64 * mct_norms); const OPJ_FLOAT64 * mct_norms);
/** /**

View File

@ -62,7 +62,7 @@ Encode a packet of a tile to a destination buffer
*/ */
static opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno, static opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
opj_tcd_tile_t *tile, opj_tcd_tile_t *tile,
opj_tcp_v2_t *tcp, opj_tcp_t *tcp,
opj_pi_iterator_t *pi, opj_pi_iterator_t *pi,
OPJ_BYTE *dest, OPJ_BYTE *dest,
OPJ_UINT32 * p_data_written, OPJ_UINT32 * p_data_written,
@ -84,7 +84,7 @@ Decode a packet of a tile from a source buffer
*/ */
static opj_bool opj_t2_decode_packet( opj_t2_t* t2, static opj_bool opj_t2_decode_packet( opj_t2_t* t2,
opj_tcd_tile_t *tile, opj_tcd_tile_t *tile,
opj_tcp_v2_t *tcp, opj_tcp_t *tcp,
opj_pi_iterator_t *pi, opj_pi_iterator_t *pi,
OPJ_BYTE *src, OPJ_BYTE *src,
OPJ_UINT32 * data_read, OPJ_UINT32 * data_read,
@ -93,7 +93,7 @@ static opj_bool opj_t2_decode_packet( opj_t2_t* t2,
static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2, static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
opj_tcd_tile_t *p_tile, opj_tcd_tile_t *p_tile,
opj_tcp_v2_t *p_tcp, opj_tcp_t *p_tcp,
opj_pi_iterator_t *p_pi, opj_pi_iterator_t *p_pi,
OPJ_BYTE *p_src, OPJ_BYTE *p_src,
OPJ_UINT32 * p_data_read, OPJ_UINT32 * p_data_read,
@ -102,7 +102,7 @@ static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
static opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2, static opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2,
opj_tcd_tile_t *p_tile, opj_tcd_tile_t *p_tile,
opj_tcp_v2_t *p_tcp, opj_tcp_t *p_tcp,
opj_pi_iterator_t *p_pi, opj_pi_iterator_t *p_pi,
opj_bool * p_is_data_present, opj_bool * p_is_data_present,
OPJ_BYTE *p_src_data, OPJ_BYTE *p_src_data,
@ -210,7 +210,7 @@ opj_bool opj_t2_encode_packets( opj_t2_t* p_t2,
opj_pi_iterator_t *l_current_pi = 00; opj_pi_iterator_t *l_current_pi = 00;
opj_image_t *l_image = p_t2->image; opj_image_t *l_image = p_t2->image;
opj_cp_t *l_cp = p_t2->cp; opj_cp_t *l_cp = p_t2->cp;
opj_tcp_v2_t *l_tcp = &l_cp->tcps[p_tile_no]; opj_tcp_t *l_tcp = &l_cp->tcps[p_tile_no];
OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == CINEMA4K_24? 2: 1; OPJ_UINT32 pocno = l_cp->m_specific_param.m_enc.m_cinema == CINEMA4K_24? 2: 1;
OPJ_UINT32 l_max_comp = l_cp->m_specific_param.m_enc.m_max_comp_size > 0 ? l_image->numcomps : 1; OPJ_UINT32 l_max_comp = l_cp->m_specific_param.m_enc.m_max_comp_size > 0 ? l_image->numcomps : 1;
OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1; OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1;
@ -324,7 +324,7 @@ opj_bool opj_t2_decode_packets( opj_t2_t *p_t2,
opj_image_t *l_image = p_t2->image; opj_image_t *l_image = p_t2->image;
opj_cp_t *l_cp = p_t2->cp; opj_cp_t *l_cp = p_t2->cp;
opj_cp_t *cp = p_t2->cp; opj_cp_t *cp = p_t2->cp;
opj_tcp_v2_t *l_tcp = &(p_t2->cp->tcps[p_tile_no]); opj_tcp_t *l_tcp = &(p_t2->cp->tcps[p_tile_no]);
OPJ_UINT32 l_nb_bytes_read; OPJ_UINT32 l_nb_bytes_read;
OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1; OPJ_UINT32 l_nb_pocs = l_tcp->numpocs + 1;
opj_pi_iterator_t *l_current_pi = 00; opj_pi_iterator_t *l_current_pi = 00;
@ -465,7 +465,7 @@ void opj_t2_destroy(opj_t2_t *t2) {
opj_bool opj_t2_decode_packet( opj_t2_t* p_t2, opj_bool opj_t2_decode_packet( opj_t2_t* p_t2,
opj_tcd_tile_t *p_tile, opj_tcd_tile_t *p_tile,
opj_tcp_v2_t *p_tcp, opj_tcp_t *p_tcp,
opj_pi_iterator_t *p_pi, opj_pi_iterator_t *p_pi,
OPJ_BYTE *p_src, OPJ_BYTE *p_src,
OPJ_UINT32 * p_data_read, OPJ_UINT32 * p_data_read,
@ -504,7 +504,7 @@ opj_bool opj_t2_decode_packet( opj_t2_t* p_t2,
opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno, opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
opj_tcd_tile_t * tile, opj_tcd_tile_t * tile,
opj_tcp_v2_t * tcp, opj_tcp_t * tcp,
opj_pi_iterator_t *pi, opj_pi_iterator_t *pi,
OPJ_BYTE *dest, OPJ_BYTE *dest,
OPJ_UINT32 * p_data_written, OPJ_UINT32 * p_data_written,
@ -729,7 +729,7 @@ opj_bool opj_t2_encode_packet( OPJ_UINT32 tileno,
static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2, static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
opj_tcd_tile_t *p_tile, opj_tcd_tile_t *p_tile,
opj_tcp_v2_t *p_tcp, opj_tcp_t *p_tcp,
opj_pi_iterator_t *p_pi, opj_pi_iterator_t *p_pi,
OPJ_BYTE *p_src, OPJ_BYTE *p_src,
OPJ_UINT32 * p_data_read, OPJ_UINT32 * p_data_read,
@ -769,7 +769,7 @@ static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2, opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2,
opj_tcd_tile_t *p_tile, opj_tcd_tile_t *p_tile,
opj_tcp_v2_t *p_tcp, opj_tcp_t *p_tcp,
opj_pi_iterator_t *p_pi, opj_pi_iterator_t *p_pi,
opj_bool * p_is_data_present, opj_bool * p_is_data_present,
OPJ_BYTE *p_src_data, OPJ_BYTE *p_src_data,

View File

@ -290,7 +290,7 @@ void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final)
opj_cp_t *cp = tcd->cp; opj_cp_t *cp = tcd->cp;
opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles; opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
opj_tcp_v2_t *tcd_tcp = tcd->tcp; opj_tcp_t *tcd_tcp = tcd->tcp;
for (compno = 0; compno < tcd_tile->numcomps; compno++) { for (compno = 0; compno < tcd_tile->numcomps; compno++) {
opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno]; opj_tcd_tilecomp_t *tilec = &tcd_tile->comps[compno];
@ -390,7 +390,7 @@ opj_bool opj_tcd_rateallocate( opj_tcd_t *tcd,
opj_cp_t *cp = tcd->cp; opj_cp_t *cp = tcd->cp;
opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles; opj_tcd_tile_t *tcd_tile = tcd->tcd_image->tiles;
opj_tcp_v2_t *tcd_tcp = tcd->tcp; opj_tcp_t *tcd_tcp = tcd->tcp;
min = DBL_MAX; min = DBL_MAX;
max = 0; max = 0;
@ -614,7 +614,7 @@ opj_bool FUNCTION ( opj_tcd_t *p_tcd, \
{ \ { \
OPJ_UINT32 (*l_gain_ptr)(OPJ_UINT32) = 00; \ OPJ_UINT32 (*l_gain_ptr)(OPJ_UINT32) = 00; \
OPJ_UINT32 compno, resno, bandno, precno, cblkno; \ OPJ_UINT32 compno, resno, bandno, precno, cblkno; \
opj_tcp_v2_t * l_tcp = 00; \ opj_tcp_t * l_tcp = 00; \
opj_cp_t * l_cp = 00; \ opj_cp_t * l_cp = 00; \
opj_tcd_tile_t * l_tile = 00; \ opj_tcd_tile_t * l_tile = 00; \
opj_tccp_t *l_tccp = 00; \ opj_tccp_t *l_tccp = 00; \
@ -1190,7 +1190,7 @@ opj_bool opj_tcd_decode_tile( opj_tcd_t *p_tcd,
if(p_cstr_info) { if(p_cstr_info) {
OPJ_UINT32 resno, compno, numprec = 0; OPJ_UINT32 resno, compno, numprec = 0;
for (compno = 0; compno < (OPJ_UINT32) p_cstr_info->numcomps; compno++) { for (compno = 0; compno < (OPJ_UINT32) p_cstr_info->numcomps; compno++) {
opj_tcp_v2_t *tcp = &p_tcd->cp->tcps[0]; opj_tcp_t *tcp = &p_tcd->cp->tcps[0];
opj_tccp_t *tccp = &tcp->tccps[compno]; opj_tccp_t *tccp = &tcp->tccps[compno];
opj_tcd_tilecomp_t *tilec_idx = &p_tcd->tcd_image->tiles->comps[compno]; opj_tcd_tilecomp_t *tilec_idx = &p_tcd->tcd_image->tiles->comps[compno];
for (resno = 0; resno < tilec_idx->numresolutions; resno++) { for (resno = 0; resno < tilec_idx->numresolutions; resno++) {
@ -1560,7 +1560,7 @@ opj_bool opj_tcd_dwt_decode ( opj_tcd_t *p_tcd )
opj_bool opj_tcd_mct_decode ( opj_tcd_t *p_tcd ) opj_bool opj_tcd_mct_decode ( opj_tcd_t *p_tcd )
{ {
opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles;
opj_tcp_v2_t * l_tcp = p_tcd->tcp; opj_tcp_t * l_tcp = p_tcd->tcp;
opj_tcd_tilecomp_t * l_tile_comp = l_tile->comps; opj_tcd_tilecomp_t * l_tile_comp = l_tile->comps;
OPJ_UINT32 l_samples,i; OPJ_UINT32 l_samples,i;
@ -1635,7 +1635,7 @@ opj_bool opj_tcd_dc_level_shift_decode ( opj_tcd_t *p_tcd )
opj_tccp_t * l_tccp = 00; opj_tccp_t * l_tccp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
opj_tcd_resolution_t* l_res = 00; opj_tcd_resolution_t* l_res = 00;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_tcd_tile_t * l_tile; opj_tcd_tile_t * l_tile;
OPJ_UINT32 l_width,l_height,i,j; OPJ_UINT32 l_width,l_height,i,j;
OPJ_INT32 * l_current_ptr; OPJ_INT32 * l_current_ptr;
@ -1803,7 +1803,7 @@ opj_bool opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd )
opj_tcd_tilecomp_t * l_tile_comp = 00; opj_tcd_tilecomp_t * l_tile_comp = 00;
opj_tccp_t * l_tccp = 00; opj_tccp_t * l_tccp = 00;
opj_image_comp_t * l_img_comp = 00; opj_image_comp_t * l_img_comp = 00;
opj_tcp_v2_t * l_tcp = 00; opj_tcp_t * l_tcp = 00;
opj_tcd_tile_t * l_tile; opj_tcd_tile_t * l_tile;
OPJ_UINT32 l_nb_elem,i; OPJ_UINT32 l_nb_elem,i;
OPJ_INT32 * l_current_ptr; OPJ_INT32 * l_current_ptr;
@ -1846,7 +1846,7 @@ opj_bool opj_tcd_mct_encode ( opj_tcd_t *p_tcd )
OPJ_UINT32 samples = (l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0); OPJ_UINT32 samples = (l_tile_comp->x1 - l_tile_comp->x0) * (l_tile_comp->y1 - l_tile_comp->y0);
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_BYTE ** l_data = 00; OPJ_BYTE ** l_data = 00;
opj_tcp_v2_t * l_tcp = p_tcd->tcp; opj_tcp_t * l_tcp = p_tcd->tcp;
if(!p_tcd->tcp->mct) { if(!p_tcd->tcp->mct) {
return OPJ_TRUE; return OPJ_TRUE;
@ -1924,7 +1924,7 @@ opj_bool opj_tcd_t1_encode ( opj_tcd_t *p_tcd )
{ {
opj_t1_t * l_t1; opj_t1_t * l_t1;
const OPJ_FLOAT64 * l_mct_norms; const OPJ_FLOAT64 * l_mct_norms;
opj_tcp_v2_t * l_tcp = p_tcd->tcp; opj_tcp_t * l_tcp = p_tcd->tcp;
l_t1 = opj_t1_create(); l_t1 = opj_t1_create();
if (l_t1 == 00) { if (l_t1 == 00) {

View File

@ -202,7 +202,7 @@ typedef struct opj_tcd
/** coding parameters */ /** coding parameters */
opj_cp_t *cp; opj_cp_t *cp;
/** coding/decoding parameters common to all tiles */ /** coding/decoding parameters common to all tiles */
opj_tcp_v2_t *tcp; opj_tcp_t *tcp;
/** current encoded/decoded tile */ /** current encoded/decoded tile */
OPJ_UINT32 tcd_tileno; OPJ_UINT32 tcd_tileno;
/** tell if the tcd is a decoder. */ /** tell if the tcd is a decoder. */