remove unused code related to index recording which is not really functionnal

This commit is contained in:
Mickael Savinaud 2016-12-10 23:31:48 +01:00
parent 68809eee99
commit 5c1e99867c
1 changed files with 0 additions and 44 deletions

View File

@ -244,7 +244,6 @@ OPJ_BOOL opj_t2_encode_packets( opj_t2_t* p_t2,
for (poc = 0; poc < pocno ; ++poc) { for (poc = 0; poc < pocno ; ++poc) {
OPJ_UINT32 l_tp_num = compno; OPJ_UINT32 l_tp_num = compno;
/* TODO MSD : check why this function cannot fail (cf. v1) */
opj_pi_create_encode(l_pi, l_cp,p_tile_no,poc,l_tp_num,p_tp_pos,p_t2_mode); opj_pi_create_encode(l_pi, l_cp,p_tile_no,poc,l_tp_num,p_tp_pos,p_t2_mode);
if (l_current_pi->poc.prg == OPJ_PROG_UNKNOWN) { if (l_current_pi->poc.prg == OPJ_PROG_UNKNOWN) {
@ -362,21 +361,9 @@ OPJ_BOOL opj_t2_decode_packets( opj_t2_t *p_t2,
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;
#ifdef TODO_MSD
OPJ_UINT32 curtp = 0;
OPJ_UINT32 tp_start_packno;
#endif
opj_packet_info_t *l_pack_info = 00; opj_packet_info_t *l_pack_info = 00;
opj_image_comp_t* l_img_comp = 00; opj_image_comp_t* l_img_comp = 00;
OPJ_ARG_NOT_USED(p_cstr_index);
#ifdef TODO_MSD
if (p_cstr_index) {
l_pack_info = p_cstr_index->tile_index[p_tile_no].packet;
}
#endif
/* create a packet iterator */ /* create a packet iterator */
l_pi = opj_pi_create_decode(l_image, l_cp, p_tile_no); l_pi = opj_pi_create_decode(l_image, l_cp, p_tile_no);
if (!l_pi) { if (!l_pi) {
@ -446,41 +433,11 @@ OPJ_BOOL opj_t2_decode_packets( opj_t2_t *p_t2,
l_current_data += l_nb_bytes_read; l_current_data += l_nb_bytes_read;
p_max_len -= l_nb_bytes_read; p_max_len -= l_nb_bytes_read;
/* INDEX >> */
#ifdef TODO_MSD
if(p_cstr_info) {
opj_tile_info_v2_t *info_TL = &p_cstr_info->tile[p_tile_no];
opj_packet_info_t *info_PK = &info_TL->packet[p_cstr_info->packno];
tp_start_packno = 0;
if (!p_cstr_info->packno) {
info_PK->start_pos = info_TL->end_header + 1;
} else if (info_TL->packet[p_cstr_info->packno-1].end_pos >= (OPJ_INT32)p_cstr_info->tile[p_tile_no].tp[curtp].tp_end_pos){ /* New tile part */
info_TL->tp[curtp].tp_numpacks = p_cstr_info->packno - tp_start_packno; /* Number of packets in previous tile-part */
tp_start_packno = p_cstr_info->packno;
curtp++;
info_PK->start_pos = p_cstr_info->tile[p_tile_no].tp[curtp].tp_end_header+1;
} else {
info_PK->start_pos = (l_cp->m_specific_param.m_enc.m_tp_on && info_PK->start_pos) ? info_PK->start_pos : info_TL->packet[p_cstr_info->packno - 1].end_pos + 1;
}
info_PK->end_pos = info_PK->start_pos + l_nb_bytes_read - 1;
info_PK->end_ph_pos += info_PK->start_pos - 1; /* End of packet header which now only represents the distance */
++p_cstr_info->packno;
}
#endif
/* << INDEX */
} }
++l_current_pi; ++l_current_pi;
opj_free(first_pass_failed); opj_free(first_pass_failed);
} }
/* INDEX >> */
#ifdef TODO_MSD
if
(p_cstr_info) {
p_cstr_info->tile[p_tile_no].tp[curtp].tp_numpacks = p_cstr_info->packno - tp_start_packno; /* Number of packets in last tile-part */
}
#endif
/* << INDEX */
/* don't forget to release pi */ /* don't forget to release pi */
opj_pi_destroy(l_pi,l_nb_pocs); opj_pi_destroy(l_pi,l_nb_pocs);
@ -941,7 +898,6 @@ static OPJ_BOOL opj_t2_read_packet_header( opj_t2_t* p_t2,
l_present = opj_bio_read(l_bio, 1); l_present = opj_bio_read(l_bio, 1);
JAS_FPRINTF(stderr, "present=%d \n", l_present ); JAS_FPRINTF(stderr, "present=%d \n", l_present );
if (!l_present) { if (!l_present) {
/* TODO MSD: no test to control the output of this function*/
opj_bio_inalign(l_bio); opj_bio_inalign(l_bio);
l_header_data += opj_bio_numbytes(l_bio); l_header_data += opj_bio_numbytes(l_bio);
opj_bio_destroy(l_bio); opj_bio_destroy(l_bio);