Lines Matching refs:p_image
1108 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image,
6204 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, in opj_j2k_add_mct() argument
6231 if (l_mcc_record->m_nb_comps != p_image->numcomps) { in opj_j2k_add_mct()
6239 l_data_size = MCT_ELEMENT_SIZE[l_deco_array->m_element_type] * p_image->numcomps in opj_j2k_add_mct()
6240 * p_image->numcomps; in opj_j2k_add_mct()
6245 l_nb_elem = p_image->numcomps * p_image->numcomps; in opj_j2k_add_mct()
6261 p_image->numcomps; in opj_j2k_add_mct()
6266 l_nb_elem = p_image->numcomps; in opj_j2k_add_mct()
6280 for (i = 0; i < p_image->numcomps; ++i) { in opj_j2k_add_mct()
7491 opj_image_t** p_image, in opj_j2k_read_header() argument
7533 *p_image = opj_image_create0(); in opj_j2k_read_header()
7534 if (!(*p_image)) { in opj_j2k_read_header()
7539 opj_copy_image_header(p_j2k->m_private_image, *p_image); in opj_j2k_read_header()
7626 OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image) in opj_j2k_setup_mct_encoding() argument
7675 l_nb_elem = p_image->numcomps * p_image->numcomps; in opj_j2k_setup_mct_encoding()
7725 l_nb_elem = p_image->numcomps; in opj_j2k_setup_mct_encoding()
7781 l_mcc_data->m_nb_comps = p_image->numcomps; in opj_j2k_setup_mct_encoding()
9233 static OPJ_BOOL opj_j2k_update_image_dimensions(opj_image_t* p_image, in opj_j2k_update_image_dimensions() argument
9240 l_img_comp = p_image->comps; in opj_j2k_update_image_dimensions()
9241 for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) { in opj_j2k_update_image_dimensions()
9242 l_img_comp->x0 = opj_uint_ceildiv(p_image->x0, l_img_comp->dx); in opj_j2k_update_image_dimensions()
9243 l_img_comp->y0 = opj_uint_ceildiv(p_image->y0, l_img_comp->dy); in opj_j2k_update_image_dimensions()
9244 l_comp_x1 = opj_int_ceildiv((OPJ_INT32)p_image->x1, (OPJ_INT32)l_img_comp->dx); in opj_j2k_update_image_dimensions()
9245 l_comp_y1 = opj_int_ceildiv((OPJ_INT32)p_image->y1, (OPJ_INT32)l_img_comp->dy); in opj_j2k_update_image_dimensions()
9334 opj_image_t* p_image, in opj_j2k_set_decode_area() argument
9358 for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) { in opj_j2k_set_decode_area()
9359 p_image->comps[it_comp].factor = p_j2k->m_cp.m_specific_param.m_dec.m_reduce; in opj_j2k_set_decode_area()
9371 p_image->x0 = l_image->x0; in opj_j2k_set_decode_area()
9372 p_image->y0 = l_image->y0; in opj_j2k_set_decode_area()
9373 p_image->x1 = l_image->x1; in opj_j2k_set_decode_area()
9374 p_image->y1 = l_image->y1; in opj_j2k_set_decode_area()
9376 return opj_j2k_update_image_dimensions(p_image, p_manager); in opj_j2k_set_decode_area()
9398 p_image->x0 = l_image->x0; in opj_j2k_set_decode_area()
9402 p_image->x0 = (OPJ_UINT32)p_start_x; in opj_j2k_set_decode_area()
9421 p_image->y0 = l_image->y0; in opj_j2k_set_decode_area()
9425 p_image->y0 = (OPJ_UINT32)p_start_y; in opj_j2k_set_decode_area()
9444 p_image->x1 = l_image->x1; in opj_j2k_set_decode_area()
9448 p_image->x1 = (OPJ_UINT32)p_end_x; in opj_j2k_set_decode_area()
9468 p_image->y1 = l_image->y1; in opj_j2k_set_decode_area()
9472 p_image->y1 = (OPJ_UINT32)p_end_y; in opj_j2k_set_decode_area()
9478 ret = opj_j2k_update_image_dimensions(p_image, p_manager); in opj_j2k_set_decode_area()
9482 p_image->x0, p_image->y0, p_image->x1, p_image->y1); in opj_j2k_set_decode_area()
10928 opj_image_t * p_image) in opj_j2k_move_data_from_codec_to_output_image() argument
10943 for (compno = 0; compno < p_image->numcomps; compno++) { in opj_j2k_move_data_from_codec_to_output_image()
10944 opj_image_data_free(p_image->comps[compno].data); in opj_j2k_move_data_from_codec_to_output_image()
10945 p_image->comps[compno].data = NULL; in opj_j2k_move_data_from_codec_to_output_image()
10959 for (compno = 0; compno < p_image->numcomps; compno++) { in opj_j2k_move_data_from_codec_to_output_image()
10964 p_image->numcomps = p_j2k->m_specific_param.m_decoder.m_numcomps_to_decode; in opj_j2k_move_data_from_codec_to_output_image()
10965 opj_free(p_image->comps); in opj_j2k_move_data_from_codec_to_output_image()
10966 p_image->comps = newcomps; in opj_j2k_move_data_from_codec_to_output_image()
10968 for (compno = 0; compno < p_image->numcomps; compno++) { in opj_j2k_move_data_from_codec_to_output_image()
10969 p_image->comps[compno].resno_decoded = in opj_j2k_move_data_from_codec_to_output_image()
10971 opj_image_data_free(p_image->comps[compno].data); in opj_j2k_move_data_from_codec_to_output_image()
10972 p_image->comps[compno].data = p_j2k->m_output_image->comps[compno].data; in opj_j2k_move_data_from_codec_to_output_image()
10977 fwrite(p_image->comps[compno].data, sizeof(OPJ_INT32), in opj_j2k_move_data_from_codec_to_output_image()
10978 p_image->comps[compno].w * p_image->comps[compno].h, debug); in opj_j2k_move_data_from_codec_to_output_image()
10989 opj_image_t * p_image, in opj_j2k_decode() argument
10992 if (!p_image) { in opj_j2k_decode()
11005 p_image->numcomps > 0 && in opj_j2k_decode()
11006 p_image->comps[0].factor == 0 && in opj_j2k_decode()
11008 p_image->comps[0].data == NULL) { in opj_j2k_decode()
11013 for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) { in opj_j2k_decode()
11014 p_image->comps[it_comp].factor = p_j2k->m_cp.m_specific_param.m_dec.m_reduce; in opj_j2k_decode()
11016 if (!opj_j2k_update_image_dimensions(p_image, p_manager)) { in opj_j2k_decode()
11027 opj_copy_image_header(p_image, p_j2k->m_output_image); in opj_j2k_decode()
11042 return opj_j2k_move_data_from_codec_to_output_image(p_j2k, p_image); in opj_j2k_decode()
11047 opj_image_t* p_image, in opj_j2k_get_tile() argument
11055 if (!p_image) { in opj_j2k_get_tile()
11060 if (p_image->numcomps < p_j2k->m_private_image->numcomps) { in opj_j2k_get_tile()
11077 p_image->x0 = l_tile_x * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0; in opj_j2k_get_tile()
11078 if (p_image->x0 < p_j2k->m_private_image->x0) { in opj_j2k_get_tile()
11079 p_image->x0 = p_j2k->m_private_image->x0; in opj_j2k_get_tile()
11081 p_image->x1 = (l_tile_x + 1) * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0; in opj_j2k_get_tile()
11082 if (p_image->x1 > p_j2k->m_private_image->x1) { in opj_j2k_get_tile()
11083 p_image->x1 = p_j2k->m_private_image->x1; in opj_j2k_get_tile()
11086 p_image->y0 = l_tile_y * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0; in opj_j2k_get_tile()
11087 if (p_image->y0 < p_j2k->m_private_image->y0) { in opj_j2k_get_tile()
11088 p_image->y0 = p_j2k->m_private_image->y0; in opj_j2k_get_tile()
11090 p_image->y1 = (l_tile_y + 1) * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0; in opj_j2k_get_tile()
11091 if (p_image->y1 > p_j2k->m_private_image->y1) { in opj_j2k_get_tile()
11092 p_image->y1 = p_j2k->m_private_image->y1; in opj_j2k_get_tile()
11095 l_img_comp = p_image->comps; in opj_j2k_get_tile()
11101 l_img_comp->x0 = opj_uint_ceildiv(p_image->x0, l_img_comp->dx); in opj_j2k_get_tile()
11102 l_img_comp->y0 = opj_uint_ceildiv(p_image->y0, l_img_comp->dy); in opj_j2k_get_tile()
11103 l_comp_x1 = opj_int_ceildiv((OPJ_INT32)p_image->x1, (OPJ_INT32)l_img_comp->dx); in opj_j2k_get_tile()
11104 l_comp_y1 = opj_int_ceildiv((OPJ_INT32)p_image->y1, (OPJ_INT32)l_img_comp->dy); in opj_j2k_get_tile()
11116 if (p_image->numcomps > p_j2k->m_private_image->numcomps) { in opj_j2k_get_tile()
11120 for (compno = p_j2k->m_private_image->numcomps; compno < p_image->numcomps; in opj_j2k_get_tile()
11122 opj_image_data_free(p_image->comps[compno].data); in opj_j2k_get_tile()
11123 p_image->comps[compno].data = NULL; in opj_j2k_get_tile()
11125 p_image->numcomps = p_j2k->m_private_image->numcomps; in opj_j2k_get_tile()
11138 opj_copy_image_header(p_image, p_j2k->m_output_image); in opj_j2k_get_tile()
11155 return opj_j2k_move_data_from_codec_to_output_image(p_j2k, p_image); in opj_j2k_get_tile()
11315 opj_image_t * p_image, in opj_j2k_start_compress() argument
11328 opj_copy_image_header(p_image, p_j2k->m_private_image); in opj_j2k_start_compress()
11331 if (p_image->comps) { in opj_j2k_start_compress()
11333 for (it_comp = 0 ; it_comp < p_image->numcomps; it_comp++) { in opj_j2k_start_compress()
11334 if (p_image->comps[it_comp].data) { in opj_j2k_start_compress()
11335 p_j2k->m_private_image->comps[it_comp].data = p_image->comps[it_comp].data; in opj_j2k_start_compress()
11336 p_image->comps[it_comp].data = NULL; in opj_j2k_start_compress()