Lines Matching refs:l_cp
2061 opj_cp_t *l_cp = 00; in opj_j2k_read_siz() local
2071 l_cp = &(p_j2k->m_cp); in opj_j2k_read_siz()
2090 l_cp->rsiz = (OPJ_UINT16) l_tmp; in opj_j2k_read_siz()
2099 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdx, in opj_j2k_read_siz()
2102 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdy, in opj_j2k_read_siz()
2105 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tx0, in opj_j2k_read_siz()
2108 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->ty0, in opj_j2k_read_siz()
2139 if ((l_cp->tdx == 0U) || (l_cp->tdy == 0U)) { in opj_j2k_read_siz()
2141 "Error with SIZ marker: invalid tile size (tdx: %d, tdy: %d)\n", l_cp->tdx, in opj_j2k_read_siz()
2142 l_cp->tdy); in opj_j2k_read_siz()
2147 l_tx1 = opj_uint_adds(l_cp->tx0, l_cp->tdx); /* manage overflow */ in opj_j2k_read_siz()
2148 l_ty1 = opj_uint_adds(l_cp->ty0, l_cp->tdy); /* manage overflow */ in opj_j2k_read_siz()
2149 if ((l_cp->tx0 > l_image->x0) || (l_cp->ty0 > l_image->y0) || in opj_j2k_read_siz()
2170 if (l_cp->correct) { in opj_j2k_read_siz()
2207 l_cp->exp_comps = l_image->numcomps; in opj_j2k_read_siz()
2237 } else if (!l_cp->allow_different_bit_depth_sign in opj_j2k_read_siz()
2269 if (l_cp->correct) { in opj_j2k_read_siz()
2300 l_cp->m_specific_param.m_dec.m_reduce; /* reducing factor per component */ in opj_j2k_read_siz()
2304 if (l_cp->tdx == 0 || l_cp->tdy == 0) { in opj_j2k_read_siz()
2309 l_cp->tw = opj_uint_ceildiv(l_image->x1 - l_cp->tx0, l_cp->tdx); in opj_j2k_read_siz()
2310 l_cp->th = opj_uint_ceildiv(l_image->y1 - l_cp->ty0, l_cp->tdy); in opj_j2k_read_siz()
2313 if (l_cp->tw == 0 || l_cp->th == 0 || l_cp->tw > 65535 / l_cp->th) { in opj_j2k_read_siz()
2316 l_cp->tw, l_cp->th); in opj_j2k_read_siz()
2319 l_nb_tiles = l_cp->tw * l_cp->th; in opj_j2k_read_siz()
2324 (p_j2k->m_specific_param.m_decoder.m_start_tile_x - l_cp->tx0) / l_cp->tdx; in opj_j2k_read_siz()
2326 (p_j2k->m_specific_param.m_decoder.m_start_tile_y - l_cp->ty0) / l_cp->tdy; in opj_j2k_read_siz()
2328 p_j2k->m_specific_param.m_decoder.m_end_tile_x - l_cp->tx0, l_cp->tdx); in opj_j2k_read_siz()
2330 p_j2k->m_specific_param.m_decoder.m_end_tile_y - l_cp->ty0, l_cp->tdy); in opj_j2k_read_siz()
2334 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_read_siz()
2335 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_read_siz()
2339 if (l_cp->correct) { in opj_j2k_read_siz()
2342 if ((l_cp->tw < 1) || (l_cp->th < 1) || (l_cp->tw > l_cp->max_tiles) || in opj_j2k_read_siz()
2343 (l_cp->th > l_cp->max_tiles)) { in opj_j2k_read_siz()
2346 l_cp->tw, l_cp->th); in opj_j2k_read_siz()
2353 if (l_cp->tw < 1) { in opj_j2k_read_siz()
2354 l_cp->tw = 1; in opj_j2k_read_siz()
2357 l_cp->tw); in opj_j2k_read_siz()
2359 if (l_cp->tw > l_cp->max_tiles) { in opj_j2k_read_siz()
2360 l_cp->tw = 1; in opj_j2k_read_siz()
2364 l_cp->max_tiles, l_cp->tw); in opj_j2k_read_siz()
2366 if (l_cp->th < 1) { in opj_j2k_read_siz()
2367 l_cp->th = 1; in opj_j2k_read_siz()
2370 l_cp->th); in opj_j2k_read_siz()
2372 if (l_cp->th > l_cp->max_tiles) { in opj_j2k_read_siz()
2373 l_cp->th = 1; in opj_j2k_read_siz()
2377 l_cp->max_tiles, l_cp->th); in opj_j2k_read_siz()
2384 l_cp->tcps = (opj_tcp_t*) opj_calloc(l_nb_tiles, sizeof(opj_tcp_t)); in opj_j2k_read_siz()
2385 if (l_cp->tcps == 00) { in opj_j2k_read_siz()
2392 if (l_cp->correct) { in opj_j2k_read_siz()
2393 if (!l_cp->tcps) { in opj_j2k_read_siz()
2445 l_current_tile_param = l_cp->tcps; in opj_j2k_read_siz()
2459 opj_image_comp_header_update(l_image, l_cp); in opj_j2k_read_siz()
2552 opj_cp_t *l_cp = 00; in opj_j2k_write_cod() local
2562 l_cp = &(p_j2k->m_cp); in opj_j2k_write_cod()
2563 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_write_cod()
2640 opj_cp_t *l_cp = 00; in opj_j2k_read_cod() local
2650 l_cp = &(p_j2k->m_cp); in opj_j2k_read_cod()
2654 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_cod()
2704 if (l_cp->m_specific_param.m_dec.m_layer) { in opj_j2k_read_cod()
2705 l_tcp->num_layers_to_decode = l_cp->m_specific_param.m_dec.m_layer; in opj_j2k_read_cod()
2806 opj_cp_t *l_cp = NULL; in opj_j2k_compare_coc() local
2812 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_coc()
2813 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_compare_coc()
2831 opj_cp_t *l_cp = 00; in opj_j2k_write_coc_in_memory() local
2842 l_cp = &(p_j2k->m_cp); in opj_j2k_write_coc_in_memory()
2843 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_write_coc_in_memory()
2908 opj_cp_t *l_cp = NULL; in opj_j2k_read_coc() local
2919 l_cp = &(p_j2k->m_cp); in opj_j2k_read_coc()
2922 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_coc()
3475 opj_cp_t *l_cp = 00; in opj_j2k_read_poc() local
3500 l_cp = &(p_j2k->m_cp); in opj_j2k_read_poc()
3502 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_poc()
3791 opj_cp_t *l_cp = 00; in opj_j2k_read_ppm() local
3805 l_cp = &(p_j2k->m_cp); in opj_j2k_read_ppm()
3806 l_cp->ppm = 1; in opj_j2k_read_ppm()
3813 if (l_cp->ppm_markers == NULL) { /* first PPM marker */ in opj_j2k_read_ppm()
3815 assert(l_cp->ppm_markers_count == 0U); in opj_j2k_read_ppm()
3817 l_cp->ppm_markers = (opj_ppx *) opj_calloc(l_newCount, sizeof(opj_ppx)); in opj_j2k_read_ppm()
3818 if (l_cp->ppm_markers == NULL) { in opj_j2k_read_ppm()
3822 l_cp->ppm_markers_count = l_newCount; in opj_j2k_read_ppm()
3823 } else if (l_cp->ppm_markers_count <= l_Z_ppm) { in opj_j2k_read_ppm()
3826 new_ppm_markers = (opj_ppx *) opj_realloc(l_cp->ppm_markers, in opj_j2k_read_ppm()
3833 l_cp->ppm_markers = new_ppm_markers; in opj_j2k_read_ppm()
3834 memset(l_cp->ppm_markers + l_cp->ppm_markers_count, 0, in opj_j2k_read_ppm()
3835 (l_newCount - l_cp->ppm_markers_count) * sizeof(opj_ppx)); in opj_j2k_read_ppm()
3836 l_cp->ppm_markers_count = l_newCount; in opj_j2k_read_ppm()
3839 if (l_cp->ppm_markers[l_Z_ppm].m_data != NULL) { in opj_j2k_read_ppm()
3845 l_cp->ppm_markers[l_Z_ppm].m_data = (OPJ_BYTE *) opj_malloc(p_header_size); in opj_j2k_read_ppm()
3846 if (l_cp->ppm_markers[l_Z_ppm].m_data == NULL) { in opj_j2k_read_ppm()
3851 l_cp->ppm_markers[l_Z_ppm].m_data_size = p_header_size; in opj_j2k_read_ppm()
3852 memcpy(l_cp->ppm_markers[l_Z_ppm].m_data, p_header_data, p_header_size); in opj_j2k_read_ppm()
4009 opj_cp_t *l_cp = 00; in opj_j2k_read_ppt() local
4024 l_cp = &(p_j2k->m_cp); in opj_j2k_read_ppt()
4025 if (l_cp->ppm) { in opj_j2k_read_ppt()
4031 l_tcp = &(l_cp->tcps[p_j2k->m_current_tile_number]); in opj_j2k_read_ppt()
4296 opj_cp_t *l_cp = 00; in opj_j2k_read_sot() local
4318 l_cp = &(p_j2k->m_cp); in opj_j2k_read_sot()
4321 if (p_j2k->m_current_tile_number >= l_cp->tw * l_cp->th) { in opj_j2k_read_sot()
4327 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_read_sot()
4328 l_tile_x = p_j2k->m_current_tile_number % l_cp->tw; in opj_j2k_read_sot()
4329 l_tile_y = p_j2k->m_current_tile_number / l_cp->tw; in opj_j2k_read_sot()
4358 if (l_cp->correct) { in opj_j2k_read_sot()
4364 if (tileno > (l_cp->tw * l_cp->th)) { in opj_j2k_read_sot()
4367 tileno, (l_cp->tw * l_cp->th)); in opj_j2k_read_sot()
4402 if (l_cp->correct) { in opj_j2k_read_sot()
4852 opj_cp_t *l_cp = 00; in opj_j2k_write_rgn() local
4862 l_cp = &(p_j2k->m_cp); in opj_j2k_write_rgn()
4863 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_rgn()
4955 opj_cp_t *l_cp = 00; in opj_j2k_read_rgn() local
4978 l_cp = &(p_j2k->m_cp); in opj_j2k_read_rgn()
4980 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_rgn()
4990 if (l_cp->correct) { in opj_j2k_read_rgn()
5035 opj_cp_t * l_cp = 00; in opj_j2k_update_rates() local
5056 l_cp = &(p_j2k->m_cp); in opj_j2k_update_rates()
5058 l_tcp = l_cp->tcps; in opj_j2k_update_rates()
5063 l_cp->th * l_cp->tw); in opj_j2k_update_rates()
5065 if (l_cp->m_specific_param.m_enc.m_tp_on) { in opj_j2k_update_rates()
5071 for (i = 0; i < l_cp->th; ++i) { in opj_j2k_update_rates()
5072 for (j = 0; j < l_cp->tw; ++j) { in opj_j2k_update_rates()
5077 l_x0 = opj_int_max((OPJ_INT32)(l_cp->tx0 + j * l_cp->tdx), in opj_j2k_update_rates()
5079 l_y0 = opj_int_max((OPJ_INT32)(l_cp->ty0 + i * l_cp->tdy), in opj_j2k_update_rates()
5081 l_x1 = opj_int_min((OPJ_INT32)(l_cp->tx0 + (j + 1) * l_cp->tdx), in opj_j2k_update_rates()
5083 l_y1 = opj_int_min((OPJ_INT32)(l_cp->ty0 + (i + 1) * l_cp->tdy), in opj_j2k_update_rates()
5120 l_tcp = l_cp->tcps; in opj_j2k_update_rates()
5122 for (i = 0; i < l_cp->th; ++i) { in opj_j2k_update_rates()
5123 for (j = 0; j < l_cp->tw; ++j) { in opj_j2k_update_rates()
5167 l_tile_size += (opj_uint_ceildiv(l_cp->tdx, l_img_comp->dx) in opj_j2k_update_rates()
5169 opj_uint_ceildiv(l_cp->tdy, l_img_comp->dy) in opj_j2k_update_rates()
5198 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_update_rates()
9339 opj_cp_t * l_cp = &(p_j2k->m_cp); in opj_j2k_set_decode_area() local
9368 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_set_decode_area()
9369 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_set_decode_area()
9401 l_cp->tx0) / l_cp->tdx; in opj_j2k_set_decode_area()
9424 l_cp->ty0) / l_cp->tdy; in opj_j2k_set_decode_area()
9443 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_set_decode_area()
9447 p_end_x - (OPJ_INT32)l_cp->tx0, (OPJ_INT32)l_cp->tdx); in opj_j2k_set_decode_area()
9467 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_set_decode_area()
9471 p_end_y - (OPJ_INT32)l_cp->ty0, (OPJ_INT32)l_cp->tdy); in opj_j2k_set_decode_area()
9585 opj_cp_t *l_cp = 00; in opj_j2k_get_SPCod_SPCoc_size() local
9592 l_cp = &(p_j2k->m_cp); in opj_j2k_get_SPCod_SPCoc_size()
9593 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_get_SPCod_SPCoc_size()
9597 assert(p_tile_no < (l_cp->tw * l_cp->th)); in opj_j2k_get_SPCod_SPCoc_size()
9611 opj_cp_t *l_cp = NULL; in opj_j2k_compare_SPCod_SPCoc() local
9619 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_SPCod_SPCoc()
9620 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_compare_SPCod_SPCoc()
9662 opj_cp_t *l_cp = 00; in opj_j2k_write_SPCod_SPCoc() local
9672 l_cp = &(p_j2k->m_cp); in opj_j2k_write_SPCod_SPCoc()
9673 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_SPCod_SPCoc()
9677 assert(p_tile_no < (l_cp->tw * l_cp->th)); in opj_j2k_write_SPCod_SPCoc()
9730 opj_cp_t *l_cp = NULL; in opj_j2k_read_SPCod_SPCoc() local
9740 l_cp = &(p_j2k->m_cp); in opj_j2k_read_SPCod_SPCoc()
9742 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_SPCod_SPCoc()
9773 if (l_cp->m_specific_param.m_dec.m_reduce >= l_tccp->numresolutions) { in opj_j2k_read_SPCod_SPCoc()
9778 compno, l_cp->m_specific_param.m_dec.m_reduce, l_tccp->numresolutions); in opj_j2k_read_SPCod_SPCoc()
9872 opj_cp_t *l_cp = NULL; in opj_j2k_copy_tile_component_parameters() local
9880 l_cp = &(p_j2k->m_cp); in opj_j2k_copy_tile_component_parameters()
9883 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_copy_tile_component_parameters()
9908 opj_cp_t *l_cp = 00; in opj_j2k_get_SQcd_SQcc_size() local
9915 l_cp = &(p_j2k->m_cp); in opj_j2k_get_SQcd_SQcc_size()
9916 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_get_SQcd_SQcc_size()
9920 assert(p_tile_no < l_cp->tw * l_cp->th); in opj_j2k_get_SQcd_SQcc_size()
9936 opj_cp_t *l_cp = NULL; in opj_j2k_compare_SQcd_SQcc() local
9945 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_SQcd_SQcc()
9946 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_compare_SQcd_SQcc()
9992 opj_cp_t *l_cp = 00; in opj_j2k_write_SQcd_SQcc() local
10002 l_cp = &(p_j2k->m_cp); in opj_j2k_write_SQcd_SQcc()
10003 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_SQcd_SQcc()
10007 assert(p_tile_no < l_cp->tw * l_cp->th); in opj_j2k_write_SQcd_SQcc()
10065 opj_cp_t *l_cp = 00; in opj_j2k_read_SQcd_SQcc() local
10076 l_cp = &(p_j2k->m_cp); in opj_j2k_read_SQcd_SQcc()
10080 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_SQcd_SQcc()
10120 if (l_cp->correct) { in opj_j2k_read_SQcd_SQcc()
10180 opj_cp_t *l_cp = NULL; in opj_j2k_copy_tile_quantization_parameters() local
10189 l_cp = &(p_j2k->m_cp); in opj_j2k_copy_tile_quantization_parameters()
10191 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_copy_tile_quantization_parameters()
11721 opj_cp_t * l_cp = 00; in opj_j2k_write_first_tile_part() local
11724 l_cp = &(p_j2k->m_cp); in opj_j2k_write_first_tile_part()
11746 if (!OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_first_tile_part()
11764 if (l_cp->tcps[p_j2k->m_current_tile_number].numpocs) { in opj_j2k_write_first_tile_part()
11787 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_first_tile_part()
11812 opj_cp_t * l_cp = 00; in opj_j2k_write_all_tile_parts() local
11815 l_cp = &(p_j2k->m_cp); in opj_j2k_write_all_tile_parts()
11816 l_tcp = l_cp->tcps + p_j2k->m_current_tile_number; in opj_j2k_write_all_tile_parts()
11819 tot_num_tp = opj_j2k_get_num_tp(l_cp, 0, p_j2k->m_current_tile_number); in opj_j2k_write_all_tile_parts()
11857 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_all_tile_parts()
11868 tot_num_tp = opj_j2k_get_num_tp(l_cp, pino, p_j2k->m_current_tile_number); in opj_j2k_write_all_tile_parts()
11903 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_all_tile_parts()