unsigned long int left_THmarks_len;\r
\r
/******* sot_pos = j2k->cstr_info->tile[tileno].start_pos; */\r
- sot_pos = j2k->cstr_info->tile[tileno].tp_start_pos[tpno];\r
+ sot_pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos;\r
cio_seek(cio, sot_pos + 2); \r
sot_len = cio_read(cio, 2); /* SOT Len */\r
cio_skip(cio, 2);\r
Psot = cio_read(cio, 4); /* tile length */\r
\r
/******* post_sod_pos = j2k->cstr_info->tile[tileno].end_header + 1; */\r
- post_sod_pos = j2k->cstr_info->tile[tileno].tp_end_header[tpno] + 1;\r
+ post_sod_pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_end_header + 1;\r
left_THmarks_len = post_sod_pos - sot_pos;\r
\r
/* add all the lengths of the markers which are len-ready and stay within SOT and SOD */\r
jwmarker[jwmarker_num].id = J2K_MS_ESD; /* its type */\r
jwmarker[jwmarker_num].esdmark = esd_mark; /* the EPB */\r
/****** jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].start_pos + sot_len + 2; */ /* after SOT */\r
- jwmarker[jwmarker_num].pos = soc_pos + j2k->cstr_info->tile[tileno].tp_start_pos[tpno] + sot_len + 2; /* after SOT */\r
+ jwmarker[jwmarker_num].pos = soc_pos + j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2; /* after SOT */\r
jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos + 0.2; /* not first at all! */\r
jwmarker[jwmarker_num].len = esd_mark->Lesd; /* its length */\r
jwmarker[jwmarker_num].len_ready = true; /* ready, yet */\r
int sot_len, Psot, Psotp, mm, epb_index = 0, prot_len = 0;\r
unsigned long sot_pos, post_sod_pos;\r
unsigned long int left_THmarks_len, epbs_len = 0;\r
- int startpack = 0, stoppack = j2k->cstr_info->num;\r
+ int startpack = 0, stoppack = j2k->cstr_info->packno;\r
int first_tp_pack, last_tp_pack;\r
jpwl_epb_ms_t *tph_epb = NULL;\r
\r
/****** sot_pos = j2k->cstr_info->tile[tileno].start_pos; */\r
- sot_pos = j2k->cstr_info->tile[tileno].tp_start_pos[tpno];\r
+ sot_pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos;\r
cio_seek(cio, sot_pos + 2); \r
sot_len = cio_read(cio, 2); /* SOT Len */\r
cio_skip(cio, 2);\r
\r
/* a-priori length of the data dwelling between SOT and SOD */\r
/****** post_sod_pos = j2k->cstr_info->tile[tileno].end_header + 1; */\r
- post_sod_pos = j2k->cstr_info->tile[tileno].tp_end_header[tpno] + 1;\r
+ post_sod_pos = j2k->cstr_info->tile[tileno].tp[tpno].tp_end_header + 1;\r
left_THmarks_len = post_sod_pos - (sot_pos + sot_len + 2);\r
\r
/* add all the lengths of the JPWL markers which are len-ready and stay within SOT and SOD */\r
jwmarker[jwmarker_num].id = J2K_MS_EPB; /* its type */\r
jwmarker[jwmarker_num].epbmark = epb_mark; /* the EPB */\r
/****** jwmarker[jwmarker_num].pos = j2k->cstr_info->tile[tileno].start_pos + sot_len + 2; */ /* after SOT */\r
- jwmarker[jwmarker_num].pos = soc_pos + j2k->cstr_info->tile[tileno].tp_start_pos[tpno] + sot_len + 2; /* after SOT */\r
+ jwmarker[jwmarker_num].pos = soc_pos + j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2; /* after SOT */\r
jwmarker[jwmarker_num].dpos = (double) jwmarker[jwmarker_num].pos; /* first first first! */\r
jwmarker[jwmarker_num].len = epb_mark->Lepb; /* its length */\r
jwmarker[jwmarker_num].len_ready = true; /* ready */\r
startpack = 0;\r
/* EPB MSs for UEP packet data protection in Tile Parts */\r
/****** for (packno = 0; packno < j2k->cstr_info->num; packno++) { */\r
- first_tp_pack = (tpno > 0) ? (first_tp_pack + j2k->cstr_info->tile[tileno].tp_num[tpno - 1]) : 0;\r
- last_tp_pack = first_tp_pack + j2k->cstr_info->tile[tileno].tp_num[tpno] - 1;\r
- for (packno = 0; packno < j2k->cstr_info->tile[tileno].tp_num[tpno]; packno++) {\r
+ first_tp_pack = (tpno > 0) ? (first_tp_pack + j2k->cstr_info->tile[tileno].tp[tpno - 1].tp_numpacks) : 0;\r
+ last_tp_pack = first_tp_pack + j2k->cstr_info->tile[tileno].tp[tpno].tp_numpacks - 1;\r
+ for (packno = 0; packno < j2k->cstr_info->tile[tileno].tp[tpno].tp_numpacks; packno++) {\r
\r
/******** if ((packspec < JPWL_MAX_NO_PACKSPECS) &&\r
(j2k->cp->pprot_tileno[packspec] == tileno) && (j2k->cp->pprot_packno[packspec] == packno)) { */\r
&epb_index, /* pointer to EPB index */\r
pprot, /* protection type */\r
/****** (double) (j2k->cstr_info->tile[tileno].start_pos + sot_len + 2) + 0.0001, */ /* position */\r
- (double) (j2k->cstr_info->tile[tileno].tp_start_pos[tpno] + sot_len + 2) + 0.0001, /* position */\r
+ (double) (j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2) + 0.0001, /* position */\r
tileno, /* number of tile */\r
0, /* length of pre-data */\r
prot_len /*4000*/ /* length of post-data */\r
&epb_index, /* pointer to EPB index */\r
pprot, /* protection type */\r
/***** (double) (j2k->cstr_info->tile[tileno].start_pos + sot_len + 2) + 0.0001,*/ /* position */\r
- (double) (j2k->cstr_info->tile[tileno].tp_start_pos[tpno] + sot_len + 2) + 0.0001, /* position */\r
+ (double) (j2k->cstr_info->tile[tileno].tp[tpno].tp_start_pos + sot_len + 2) + 0.0001, /* position */\r
tileno, /* number of tile */\r
0, /* length of pre-data */\r
prot_len /*4000*/ /* length of post-data */\r