Lines Matching refs:l_cp
2060 opj_cp_t *l_cp = 00; in opj_j2k_read_siz() local
2070 l_cp = &(p_j2k->m_cp); in opj_j2k_read_siz()
2089 l_cp->rsiz = (OPJ_UINT16) l_tmp; in opj_j2k_read_siz()
2098 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdx, in opj_j2k_read_siz()
2101 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tdy, in opj_j2k_read_siz()
2104 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->tx0, in opj_j2k_read_siz()
2107 opj_read_bytes(p_header_data, (OPJ_UINT32*) &l_cp->ty0, in opj_j2k_read_siz()
2138 if ((l_cp->tdx == 0U) || (l_cp->tdy == 0U)) { in opj_j2k_read_siz()
2140 "Error with SIZ marker: invalid tile size (tdx: %d, tdy: %d)\n", l_cp->tdx, in opj_j2k_read_siz()
2141 l_cp->tdy); in opj_j2k_read_siz()
2146 l_tx1 = opj_uint_adds(l_cp->tx0, l_cp->tdx); /* manage overflow */ in opj_j2k_read_siz()
2147 l_ty1 = opj_uint_adds(l_cp->ty0, l_cp->tdy); /* manage overflow */ in opj_j2k_read_siz()
2148 if ((l_cp->tx0 > l_image->x0) || (l_cp->ty0 > l_image->y0) || in opj_j2k_read_siz()
2169 if (l_cp->correct) { in opj_j2k_read_siz()
2206 l_cp->exp_comps = l_image->numcomps; in opj_j2k_read_siz()
2236 } else if (!l_cp->allow_different_bit_depth_sign in opj_j2k_read_siz()
2268 if (l_cp->correct) { in opj_j2k_read_siz()
2299 l_cp->m_specific_param.m_dec.m_reduce; /* reducing factor per component */ in opj_j2k_read_siz()
2303 if (l_cp->tdx == 0 || l_cp->tdy == 0) { in opj_j2k_read_siz()
2308 l_cp->tw = opj_uint_ceildiv(l_image->x1 - l_cp->tx0, l_cp->tdx); in opj_j2k_read_siz()
2309 l_cp->th = opj_uint_ceildiv(l_image->y1 - l_cp->ty0, l_cp->tdy); in opj_j2k_read_siz()
2312 if (l_cp->tw == 0 || l_cp->th == 0 || l_cp->tw > 65535 / l_cp->th) { in opj_j2k_read_siz()
2315 l_cp->tw, l_cp->th); in opj_j2k_read_siz()
2318 l_nb_tiles = l_cp->tw * l_cp->th; in opj_j2k_read_siz()
2323 (p_j2k->m_specific_param.m_decoder.m_start_tile_x - l_cp->tx0) / l_cp->tdx; in opj_j2k_read_siz()
2325 (p_j2k->m_specific_param.m_decoder.m_start_tile_y - l_cp->ty0) / l_cp->tdy; in opj_j2k_read_siz()
2327 p_j2k->m_specific_param.m_decoder.m_end_tile_x - l_cp->tx0, l_cp->tdx); in opj_j2k_read_siz()
2329 p_j2k->m_specific_param.m_decoder.m_end_tile_y - l_cp->ty0, l_cp->tdy); in opj_j2k_read_siz()
2333 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_read_siz()
2334 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_read_siz()
2338 if (l_cp->correct) { in opj_j2k_read_siz()
2341 if ((l_cp->tw < 1) || (l_cp->th < 1) || (l_cp->tw > l_cp->max_tiles) || in opj_j2k_read_siz()
2342 (l_cp->th > l_cp->max_tiles)) { in opj_j2k_read_siz()
2345 l_cp->tw, l_cp->th); in opj_j2k_read_siz()
2352 if (l_cp->tw < 1) { in opj_j2k_read_siz()
2353 l_cp->tw = 1; in opj_j2k_read_siz()
2356 l_cp->tw); in opj_j2k_read_siz()
2358 if (l_cp->tw > l_cp->max_tiles) { in opj_j2k_read_siz()
2359 l_cp->tw = 1; in opj_j2k_read_siz()
2363 l_cp->max_tiles, l_cp->tw); in opj_j2k_read_siz()
2365 if (l_cp->th < 1) { in opj_j2k_read_siz()
2366 l_cp->th = 1; in opj_j2k_read_siz()
2369 l_cp->th); in opj_j2k_read_siz()
2371 if (l_cp->th > l_cp->max_tiles) { in opj_j2k_read_siz()
2372 l_cp->th = 1; in opj_j2k_read_siz()
2376 l_cp->max_tiles, l_cp->th); in opj_j2k_read_siz()
2383 l_cp->tcps = (opj_tcp_t*) opj_calloc(l_nb_tiles, sizeof(opj_tcp_t)); in opj_j2k_read_siz()
2384 if (l_cp->tcps == 00) { in opj_j2k_read_siz()
2391 if (l_cp->correct) { in opj_j2k_read_siz()
2392 if (!l_cp->tcps) { in opj_j2k_read_siz()
2444 l_current_tile_param = l_cp->tcps; in opj_j2k_read_siz()
2458 opj_image_comp_header_update(l_image, l_cp); in opj_j2k_read_siz()
2551 opj_cp_t *l_cp = 00; in opj_j2k_write_cod() local
2561 l_cp = &(p_j2k->m_cp); in opj_j2k_write_cod()
2562 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_write_cod()
2639 opj_cp_t *l_cp = 00; in opj_j2k_read_cod() local
2649 l_cp = &(p_j2k->m_cp); in opj_j2k_read_cod()
2653 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_cod()
2698 if (l_cp->m_specific_param.m_dec.m_layer) { in opj_j2k_read_cod()
2699 l_tcp->num_layers_to_decode = l_cp->m_specific_param.m_dec.m_layer; in opj_j2k_read_cod()
2800 opj_cp_t *l_cp = NULL; in opj_j2k_compare_coc() local
2806 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_coc()
2807 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_compare_coc()
2825 opj_cp_t *l_cp = 00; in opj_j2k_write_coc_in_memory() local
2836 l_cp = &(p_j2k->m_cp); in opj_j2k_write_coc_in_memory()
2837 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_write_coc_in_memory()
2902 opj_cp_t *l_cp = NULL; in opj_j2k_read_coc() local
2913 l_cp = &(p_j2k->m_cp); in opj_j2k_read_coc()
2916 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_coc()
3469 opj_cp_t *l_cp = 00; in opj_j2k_read_poc() local
3494 l_cp = &(p_j2k->m_cp); in opj_j2k_read_poc()
3496 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_poc()
3785 opj_cp_t *l_cp = 00; in opj_j2k_read_ppm() local
3799 l_cp = &(p_j2k->m_cp); in opj_j2k_read_ppm()
3800 l_cp->ppm = 1; in opj_j2k_read_ppm()
3807 if (l_cp->ppm_markers == NULL) { /* first PPM marker */ in opj_j2k_read_ppm()
3809 assert(l_cp->ppm_markers_count == 0U); in opj_j2k_read_ppm()
3811 l_cp->ppm_markers = (opj_ppx *) opj_calloc(l_newCount, sizeof(opj_ppx)); in opj_j2k_read_ppm()
3812 if (l_cp->ppm_markers == NULL) { in opj_j2k_read_ppm()
3816 l_cp->ppm_markers_count = l_newCount; in opj_j2k_read_ppm()
3817 } else if (l_cp->ppm_markers_count <= l_Z_ppm) { in opj_j2k_read_ppm()
3820 new_ppm_markers = (opj_ppx *) opj_realloc(l_cp->ppm_markers, in opj_j2k_read_ppm()
3827 l_cp->ppm_markers = new_ppm_markers; in opj_j2k_read_ppm()
3828 memset(l_cp->ppm_markers + l_cp->ppm_markers_count, 0, in opj_j2k_read_ppm()
3829 (l_newCount - l_cp->ppm_markers_count) * sizeof(opj_ppx)); in opj_j2k_read_ppm()
3830 l_cp->ppm_markers_count = l_newCount; in opj_j2k_read_ppm()
3833 if (l_cp->ppm_markers[l_Z_ppm].m_data != NULL) { in opj_j2k_read_ppm()
3839 l_cp->ppm_markers[l_Z_ppm].m_data = (OPJ_BYTE *) opj_malloc(p_header_size); in opj_j2k_read_ppm()
3840 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_size = p_header_size; in opj_j2k_read_ppm()
3846 memcpy(l_cp->ppm_markers[l_Z_ppm].m_data, p_header_data, p_header_size); in opj_j2k_read_ppm()
4003 opj_cp_t *l_cp = 00; in opj_j2k_read_ppt() local
4018 l_cp = &(p_j2k->m_cp); in opj_j2k_read_ppt()
4019 if (l_cp->ppm) { in opj_j2k_read_ppt()
4025 l_tcp = &(l_cp->tcps[p_j2k->m_current_tile_number]); in opj_j2k_read_ppt()
4285 opj_cp_t *l_cp = 00; in opj_j2k_read_sot() local
4307 l_cp = &(p_j2k->m_cp); in opj_j2k_read_sot()
4310 if (p_j2k->m_current_tile_number >= l_cp->tw * l_cp->th) { in opj_j2k_read_sot()
4316 l_tcp = &l_cp->tcps[p_j2k->m_current_tile_number]; in opj_j2k_read_sot()
4317 l_tile_x = p_j2k->m_current_tile_number % l_cp->tw; in opj_j2k_read_sot()
4318 l_tile_y = p_j2k->m_current_tile_number / l_cp->tw; in opj_j2k_read_sot()
4347 if (l_cp->correct) { in opj_j2k_read_sot()
4353 if (tileno > (l_cp->tw * l_cp->th)) { in opj_j2k_read_sot()
4356 tileno, (l_cp->tw * l_cp->th)); in opj_j2k_read_sot()
4391 if (l_cp->correct) { in opj_j2k_read_sot()
4841 opj_cp_t *l_cp = 00; in opj_j2k_write_rgn() local
4851 l_cp = &(p_j2k->m_cp); in opj_j2k_write_rgn()
4852 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_rgn()
4944 opj_cp_t *l_cp = 00; in opj_j2k_read_rgn() local
4967 l_cp = &(p_j2k->m_cp); in opj_j2k_read_rgn()
4969 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_rgn()
4979 if (l_cp->correct) { in opj_j2k_read_rgn()
5024 opj_cp_t * l_cp = 00; in opj_j2k_update_rates() local
5045 l_cp = &(p_j2k->m_cp); in opj_j2k_update_rates()
5047 l_tcp = l_cp->tcps; in opj_j2k_update_rates()
5052 l_cp->th * l_cp->tw); in opj_j2k_update_rates()
5054 if (l_cp->m_specific_param.m_enc.m_tp_on) { in opj_j2k_update_rates()
5060 for (i = 0; i < l_cp->th; ++i) { in opj_j2k_update_rates()
5061 for (j = 0; j < l_cp->tw; ++j) { in opj_j2k_update_rates()
5066 l_x0 = opj_int_max((OPJ_INT32)(l_cp->tx0 + j * l_cp->tdx), in opj_j2k_update_rates()
5068 l_y0 = opj_int_max((OPJ_INT32)(l_cp->ty0 + i * l_cp->tdy), in opj_j2k_update_rates()
5070 l_x1 = opj_int_min((OPJ_INT32)(l_cp->tx0 + (j + 1) * l_cp->tdx), in opj_j2k_update_rates()
5072 l_y1 = opj_int_min((OPJ_INT32)(l_cp->ty0 + (i + 1) * l_cp->tdy), in opj_j2k_update_rates()
5109 l_tcp = l_cp->tcps; in opj_j2k_update_rates()
5111 for (i = 0; i < l_cp->th; ++i) { in opj_j2k_update_rates()
5112 for (j = 0; j < l_cp->tw; ++j) { in opj_j2k_update_rates()
5156 l_tile_size += (opj_uint_ceildiv(l_cp->tdx, l_img_comp->dx) in opj_j2k_update_rates()
5158 opj_uint_ceildiv(l_cp->tdy, l_img_comp->dy) in opj_j2k_update_rates()
5187 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_update_rates()
9323 opj_cp_t * l_cp = &(p_j2k->m_cp); in opj_j2k_set_decode_area() local
9352 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_set_decode_area()
9353 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_set_decode_area()
9385 l_cp->tx0) / l_cp->tdx; in opj_j2k_set_decode_area()
9408 l_cp->ty0) / l_cp->tdy; in opj_j2k_set_decode_area()
9427 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw; in opj_j2k_set_decode_area()
9431 p_end_x - (OPJ_INT32)l_cp->tx0, (OPJ_INT32)l_cp->tdx); in opj_j2k_set_decode_area()
9451 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th; in opj_j2k_set_decode_area()
9455 p_end_y - (OPJ_INT32)l_cp->ty0, (OPJ_INT32)l_cp->tdy); in opj_j2k_set_decode_area()
9569 opj_cp_t *l_cp = 00; in opj_j2k_get_SPCod_SPCoc_size() local
9576 l_cp = &(p_j2k->m_cp); in opj_j2k_get_SPCod_SPCoc_size()
9577 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_get_SPCod_SPCoc_size()
9581 assert(p_tile_no < (l_cp->tw * l_cp->th)); in opj_j2k_get_SPCod_SPCoc_size()
9595 opj_cp_t *l_cp = NULL; in opj_j2k_compare_SPCod_SPCoc() local
9603 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_SPCod_SPCoc()
9604 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_compare_SPCod_SPCoc()
9646 opj_cp_t *l_cp = 00; in opj_j2k_write_SPCod_SPCoc() local
9656 l_cp = &(p_j2k->m_cp); in opj_j2k_write_SPCod_SPCoc()
9657 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_SPCod_SPCoc()
9661 assert(p_tile_no < (l_cp->tw * l_cp->th)); in opj_j2k_write_SPCod_SPCoc()
9714 opj_cp_t *l_cp = NULL; in opj_j2k_read_SPCod_SPCoc() local
9724 l_cp = &(p_j2k->m_cp); in opj_j2k_read_SPCod_SPCoc()
9726 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_SPCod_SPCoc()
9757 if (l_cp->m_specific_param.m_dec.m_reduce >= l_tccp->numresolutions) { in opj_j2k_read_SPCod_SPCoc()
9762 compno, l_cp->m_specific_param.m_dec.m_reduce, l_tccp->numresolutions); in opj_j2k_read_SPCod_SPCoc()
9856 opj_cp_t *l_cp = NULL; in opj_j2k_copy_tile_component_parameters() local
9864 l_cp = &(p_j2k->m_cp); in opj_j2k_copy_tile_component_parameters()
9867 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_copy_tile_component_parameters()
9892 opj_cp_t *l_cp = 00; in opj_j2k_get_SQcd_SQcc_size() local
9899 l_cp = &(p_j2k->m_cp); in opj_j2k_get_SQcd_SQcc_size()
9900 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_get_SQcd_SQcc_size()
9904 assert(p_tile_no < l_cp->tw * l_cp->th); in opj_j2k_get_SQcd_SQcc_size()
9920 opj_cp_t *l_cp = NULL; in opj_j2k_compare_SQcd_SQcc() local
9929 l_cp = &(p_j2k->m_cp); in opj_j2k_compare_SQcd_SQcc()
9930 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_compare_SQcd_SQcc()
9976 opj_cp_t *l_cp = 00; in opj_j2k_write_SQcd_SQcc() local
9986 l_cp = &(p_j2k->m_cp); in opj_j2k_write_SQcd_SQcc()
9987 l_tcp = &l_cp->tcps[p_tile_no]; in opj_j2k_write_SQcd_SQcc()
9991 assert(p_tile_no < l_cp->tw * l_cp->th); in opj_j2k_write_SQcd_SQcc()
10049 opj_cp_t *l_cp = 00; in opj_j2k_read_SQcd_SQcc() local
10060 l_cp = &(p_j2k->m_cp); in opj_j2k_read_SQcd_SQcc()
10064 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_read_SQcd_SQcc()
10104 if (l_cp->correct) { in opj_j2k_read_SQcd_SQcc()
10164 opj_cp_t *l_cp = NULL; in opj_j2k_copy_tile_quantization_parameters() local
10173 l_cp = &(p_j2k->m_cp); in opj_j2k_copy_tile_quantization_parameters()
10175 &l_cp->tcps[p_j2k->m_current_tile_number] : in opj_j2k_copy_tile_quantization_parameters()
11705 opj_cp_t * l_cp = 00; in opj_j2k_write_first_tile_part() local
11708 l_cp = &(p_j2k->m_cp); in opj_j2k_write_first_tile_part()
11730 if (!OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_first_tile_part()
11748 if (l_cp->tcps[p_j2k->m_current_tile_number].numpocs) { in opj_j2k_write_first_tile_part()
11771 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_first_tile_part()
11796 opj_cp_t * l_cp = 00; in opj_j2k_write_all_tile_parts() local
11799 l_cp = &(p_j2k->m_cp); in opj_j2k_write_all_tile_parts()
11800 l_tcp = l_cp->tcps + p_j2k->m_current_tile_number; in opj_j2k_write_all_tile_parts()
11803 tot_num_tp = opj_j2k_get_num_tp(l_cp, 0, p_j2k->m_current_tile_number); in opj_j2k_write_all_tile_parts()
11841 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_all_tile_parts()
11852 tot_num_tp = opj_j2k_get_num_tp(l_cp, pino, p_j2k->m_current_tile_number); in opj_j2k_write_all_tile_parts()
11887 if (OPJ_IS_CINEMA(l_cp->rsiz)) { in opj_j2k_write_all_tile_parts()