Lines Matching refs:cstr_index
1003 static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index,
1014 … opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos,
1926 p_j2k->cstr_index->main_head_start = opj_stream_tell(p_stream) - 2; in opj_j2k_read_soc()
1929 p_j2k->cstr_index->main_head_start); in opj_j2k_read_soc()
1932 if (OPJ_FALSE == opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_SOC, in opj_j2k_read_soc()
1933 p_j2k->cstr_index->main_head_start, 2)) { in opj_j2k_read_soc()
4491 if (p_j2k->cstr_index) { in opj_j2k_read_sot()
4492 assert(p_j2k->cstr_index->tile_index != 00); in opj_j2k_read_sot()
4493 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tileno = in opj_j2k_read_sot()
4495 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_tpsno = in opj_j2k_read_sot()
4499 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].nb_tps = in opj_j2k_read_sot()
4501 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = in opj_j2k_read_sot()
4504 if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { in opj_j2k_read_sot()
4505 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = in opj_j2k_read_sot()
4507 if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { in opj_j2k_read_sot()
4514 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index, in opj_j2k_read_sot()
4517 opj_free(p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index); in opj_j2k_read_sot()
4518 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = NULL; in opj_j2k_read_sot()
4523 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = in opj_j2k_read_sot()
4529 if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { in opj_j2k_read_sot()
4530 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = 10; in opj_j2k_read_sot()
4531 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = in opj_j2k_read_sot()
4533 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps, in opj_j2k_read_sot()
4535 if (!p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index) { in opj_j2k_read_sot()
4536 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = 0; in opj_j2k_read_sot()
4544 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps) { in opj_j2k_read_sot()
4546 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = in opj_j2k_read_sot()
4549 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index, in opj_j2k_read_sot()
4550 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps * in opj_j2k_read_sot()
4553 … opj_free(p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index); in opj_j2k_read_sot()
4554 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = NULL; in opj_j2k_read_sot()
4555 … p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = 0; in opj_j2k_read_sot()
4560 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index = in opj_j2k_read_sot()
4784 l_cstr_index = p_j2k->cstr_index; in opj_j2k_read_sod()
5236 p_j2k->cstr_index);
5265 p_j2k->cstr_index->main_head_end = opj_stream_tell(p_stream); in opj_j2k_get_end_header()
5407 l_cstr_index = p_j2k->cstr_index; in opj_j2k_write_epc()
5476 OPJ_BOOL res = opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_UNK, in opj_j2k_read_unk()
7381 static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, in opj_j2k_add_mhmarker() argument
7384 assert(cstr_index != 00); in opj_j2k_add_mhmarker()
7387 if ((cstr_index->marknum + 1) > cstr_index->maxmarknum) { in opj_j2k_add_mhmarker()
7389 cstr_index->maxmarknum = (OPJ_UINT32)(100 + (OPJ_FLOAT32) in opj_j2k_add_mhmarker()
7390 cstr_index->maxmarknum); in opj_j2k_add_mhmarker()
7391 new_marker = (opj_marker_info_t *) opj_realloc(cstr_index->marker, in opj_j2k_add_mhmarker()
7392 cstr_index->maxmarknum * sizeof(opj_marker_info_t)); in opj_j2k_add_mhmarker()
7394 opj_free(cstr_index->marker); in opj_j2k_add_mhmarker()
7395 cstr_index->marker = NULL; in opj_j2k_add_mhmarker()
7396 cstr_index->maxmarknum = 0; in opj_j2k_add_mhmarker()
7397 cstr_index->marknum = 0; in opj_j2k_add_mhmarker()
7401 cstr_index->marker = new_marker; in opj_j2k_add_mhmarker()
7405 cstr_index->marker[cstr_index->marknum].type = (OPJ_UINT16)type; in opj_j2k_add_mhmarker()
7406 cstr_index->marker[cstr_index->marknum].pos = (OPJ_INT32)pos; in opj_j2k_add_mhmarker()
7407 cstr_index->marker[cstr_index->marknum].len = (OPJ_INT32)len; in opj_j2k_add_mhmarker()
7408 cstr_index->marknum++; in opj_j2k_add_mhmarker()
7413 … opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, in opj_j2k_add_tlmarker() argument
7416 assert(cstr_index != 00); in opj_j2k_add_tlmarker()
7417 assert(cstr_index->tile_index != 00); in opj_j2k_add_tlmarker()
7420 if ((cstr_index->tile_index[tileno].marknum + 1) > in opj_j2k_add_tlmarker()
7421 cstr_index->tile_index[tileno].maxmarknum) { in opj_j2k_add_tlmarker()
7423 cstr_index->tile_index[tileno].maxmarknum = (OPJ_UINT32)(100 + in opj_j2k_add_tlmarker()
7424 (OPJ_FLOAT32) cstr_index->tile_index[tileno].maxmarknum); in opj_j2k_add_tlmarker()
7426 cstr_index->tile_index[tileno].marker, in opj_j2k_add_tlmarker()
7427 cstr_index->tile_index[tileno].maxmarknum * sizeof(opj_marker_info_t)); in opj_j2k_add_tlmarker()
7429 opj_free(cstr_index->tile_index[tileno].marker); in opj_j2k_add_tlmarker()
7430 cstr_index->tile_index[tileno].marker = NULL; in opj_j2k_add_tlmarker()
7431 cstr_index->tile_index[tileno].maxmarknum = 0; in opj_j2k_add_tlmarker()
7432 cstr_index->tile_index[tileno].marknum = 0; in opj_j2k_add_tlmarker()
7436 cstr_index->tile_index[tileno].marker = new_marker; in opj_j2k_add_tlmarker()
7440 cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].type in opj_j2k_add_tlmarker()
7442 cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].pos in opj_j2k_add_tlmarker()
7444 cstr_index->tile_index[tileno].marker[cstr_index->tile_index[tileno].marknum].len in opj_j2k_add_tlmarker()
7446 cstr_index->tile_index[tileno].marknum++; in opj_j2k_add_tlmarker()
7449 OPJ_UINT32 l_current_tile_part = cstr_index->tile_index[tileno].current_tpsno; in opj_j2k_add_tlmarker()
7451 if (cstr_index->tile_index[tileno].tp_index) { in opj_j2k_add_tlmarker()
7452 cstr_index->tile_index[tileno].tp_index[l_current_tile_part].start_pos = pos; in opj_j2k_add_tlmarker()
8017 p_j2k->cstr_index, in opj_j2k_read_header_procedure()
8061 p_j2k->cstr_index->main_head_end = (OPJ_UINT32) opj_stream_tell(p_stream) - 2; in opj_j2k_read_header_procedure()
8317 j2k_destroy_cstr_index(p_j2k->cstr_index); in opj_j2k_destroy()
8318 p_j2k->cstr_index = NULL; in opj_j2k_destroy()
8730 p_j2k->cstr_index, in opj_j2k_read_tile_header()
8939 p_j2k->cstr_index, p_manager)) { in opj_j2k_decode_tile()
9511 l_j2k->cstr_index = opj_j2k_create_cstr_index(); in opj_j2k_create_decompress()
9512 if (!l_j2k->cstr_index) { in opj_j2k_create_decompress()
9545 opj_codestream_index_t* cstr_index = (opj_codestream_index_t*) in opj_j2k_create_cstr_index() local
9547 if (!cstr_index) { in opj_j2k_create_cstr_index()
9551 cstr_index->maxmarknum = 100; in opj_j2k_create_cstr_index()
9552 cstr_index->marknum = 0; in opj_j2k_create_cstr_index()
9553 cstr_index->marker = (opj_marker_info_t*) in opj_j2k_create_cstr_index()
9554 opj_calloc(cstr_index->maxmarknum, sizeof(opj_marker_info_t)); in opj_j2k_create_cstr_index()
9555 if (!cstr_index-> marker) { in opj_j2k_create_cstr_index()
9556 opj_free(cstr_index); in opj_j2k_create_cstr_index()
9560 cstr_index->tile_index = NULL; in opj_j2k_create_cstr_index()
9562 return cstr_index; in opj_j2k_create_cstr_index()
10297 opj_codestream_index_t* cstr_index = p_j2k->cstr_index; in opj_j2k_dump_MH_index() local
10304 cstr_index->main_head_start, cstr_index->main_head_end); in opj_j2k_dump_MH_index()
10308 if (cstr_index->marker) { in opj_j2k_dump_MH_index()
10309 for (it_marker = 0; it_marker < cstr_index->marknum ; it_marker++) { in opj_j2k_dump_MH_index()
10311 cstr_index->marker[it_marker].type, in opj_j2k_dump_MH_index()
10312 cstr_index->marker[it_marker].pos, in opj_j2k_dump_MH_index()
10313 cstr_index->marker[it_marker].len); in opj_j2k_dump_MH_index()
10319 if (cstr_index->tile_index) { in opj_j2k_dump_MH_index()
10323 for (it_tile = 0; it_tile < cstr_index->nb_of_tiles ; it_tile++) { in opj_j2k_dump_MH_index()
10324 l_acc_nb_of_tile_part += cstr_index->tile_index[it_tile].nb_tps; in opj_j2k_dump_MH_index()
10330 for (it_tile = 0; it_tile < cstr_index->nb_of_tiles ; it_tile++) { in opj_j2k_dump_MH_index()
10331 OPJ_UINT32 nb_of_tile_part = cstr_index->tile_index[it_tile].nb_tps; in opj_j2k_dump_MH_index()
10336 if (cstr_index->tile_index[it_tile].tp_index) { in opj_j2k_dump_MH_index()
10341 cstr_index->tile_index[it_tile].tp_index[it_tile_part].start_pos, in opj_j2k_dump_MH_index()
10342 cstr_index->tile_index[it_tile].tp_index[it_tile_part].end_header, in opj_j2k_dump_MH_index()
10343 cstr_index->tile_index[it_tile].tp_index[it_tile_part].end_pos); in opj_j2k_dump_MH_index()
10347 if (cstr_index->tile_index[it_tile].marker) { in opj_j2k_dump_MH_index()
10348 for (it_marker = 0; it_marker < cstr_index->tile_index[it_tile].marknum ; in opj_j2k_dump_MH_index()
10351 cstr_index->tile_index[it_tile].marker[it_marker].type, in opj_j2k_dump_MH_index()
10352 cstr_index->tile_index[it_tile].marker[it_marker].pos, in opj_j2k_dump_MH_index()
10353 cstr_index->tile_index[it_tile].marker[it_marker].len); in opj_j2k_dump_MH_index()
10518 l_cstr_index->main_head_start = p_j2k->cstr_index->main_head_start; in j2k_get_cstr_index()
10519 l_cstr_index->main_head_end = p_j2k->cstr_index->main_head_end; in j2k_get_cstr_index()
10520 l_cstr_index->codestream_size = p_j2k->cstr_index->codestream_size; in j2k_get_cstr_index()
10522 l_cstr_index->marknum = p_j2k->cstr_index->marknum; in j2k_get_cstr_index()
10530 if (p_j2k->cstr_index->marker) { in j2k_get_cstr_index()
10531 memcpy(l_cstr_index->marker, p_j2k->cstr_index->marker, in j2k_get_cstr_index()
10538 l_cstr_index->nb_of_tiles = p_j2k->cstr_index->nb_of_tiles; in j2k_get_cstr_index()
10547 if (!p_j2k->cstr_index->tile_index) { in j2k_get_cstr_index()
10556 p_j2k->cstr_index->tile_index[it_tile].marknum; in j2k_get_cstr_index()
10575 if (p_j2k->cstr_index->tile_index[it_tile].marker) in j2k_get_cstr_index()
10577 p_j2k->cstr_index->tile_index[it_tile].marker, in j2k_get_cstr_index()
10586 p_j2k->cstr_index->tile_index[it_tile].nb_tps; in j2k_get_cstr_index()
10606 if (p_j2k->cstr_index->tile_index[it_tile].tp_index) { in j2k_get_cstr_index()
10608 p_j2k->cstr_index->tile_index[it_tile].tp_index, in j2k_get_cstr_index()
10629 p_j2k->cstr_index->nb_of_tiles = p_j2k->m_cp.tw * p_j2k->m_cp.th; in opj_j2k_allocate_tile_element_cstr_index()
10630 p_j2k->cstr_index->tile_index = (opj_tile_index_t*)opj_calloc( in opj_j2k_allocate_tile_element_cstr_index()
10631 p_j2k->cstr_index->nb_of_tiles, sizeof(opj_tile_index_t)); in opj_j2k_allocate_tile_element_cstr_index()
10632 if (!p_j2k->cstr_index->tile_index) { in opj_j2k_allocate_tile_element_cstr_index()
10636 for (it_tile = 0; it_tile < p_j2k->cstr_index->nb_of_tiles; it_tile++) { in opj_j2k_allocate_tile_element_cstr_index()
10637 p_j2k->cstr_index->tile_index[it_tile].maxmarknum = 100; in opj_j2k_allocate_tile_element_cstr_index()
10638 p_j2k->cstr_index->tile_index[it_tile].marknum = 0; in opj_j2k_allocate_tile_element_cstr_index()
10639 p_j2k->cstr_index->tile_index[it_tile].marker = (opj_marker_info_t*) in opj_j2k_allocate_tile_element_cstr_index()
10640 opj_calloc(p_j2k->cstr_index->tile_index[it_tile].maxmarknum, in opj_j2k_allocate_tile_element_cstr_index()
10642 if (!p_j2k->cstr_index->tile_index[it_tile].marker) { in opj_j2k_allocate_tile_element_cstr_index()
10799 if (!p_j2k->cstr_index->tile_index) { in opj_j2k_decode_one_tile()
10807 if (p_j2k->cstr_index->tile_index) in opj_j2k_decode_one_tile()
10808 if (p_j2k->cstr_index->tile_index->tp_index) { in opj_j2k_decode_one_tile()
10809 if (! p_j2k->cstr_index->tile_index[l_tile_no_to_dec].nb_tps) { in opj_j2k_decode_one_tile()
10819 … p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos + 2, in opj_j2k_decode_one_tile()
10875 if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, in opj_j2k_decode_one_tile()
11674 if (p_j2k->cstr_index) { in opj_j2k_setup_header_writing()