• Home
  • Raw
  • Download

Lines Matching refs:p_tcd

114 static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no,
154 static OPJ_BOOL opj_tcd_t2_decode(opj_tcd_t *p_tcd,
161 static OPJ_BOOL opj_tcd_t1_decode(opj_tcd_t *p_tcd,
164 static OPJ_BOOL opj_tcd_dwt_decode(opj_tcd_t *p_tcd);
166 static OPJ_BOOL opj_tcd_mct_decode(opj_tcd_t *p_tcd,
169 static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd);
172 static OPJ_BOOL opj_tcd_dc_level_shift_encode(opj_tcd_t *p_tcd);
174 static OPJ_BOOL opj_tcd_mct_encode(opj_tcd_t *p_tcd);
176 static OPJ_BOOL opj_tcd_dwt_encode(opj_tcd_t *p_tcd);
178 static OPJ_BOOL opj_tcd_t1_encode(opj_tcd_t *p_tcd);
180 static OPJ_BOOL opj_tcd_t2_encode(opj_tcd_t *p_tcd,
187 static OPJ_BOOL opj_tcd_rate_allocate_encode(opj_tcd_t *p_tcd,
643 OPJ_BOOL opj_tcd_init(opj_tcd_t *p_tcd, in opj_tcd_init() argument
648 p_tcd->image = p_image; in opj_tcd_init()
649 p_tcd->cp = p_cp; in opj_tcd_init()
651 p_tcd->tcd_image->tiles = (opj_tcd_tile_t *) opj_calloc(1, in opj_tcd_init()
653 if (! p_tcd->tcd_image->tiles) { in opj_tcd_init()
657 p_tcd->tcd_image->tiles->comps = (opj_tcd_tilecomp_t *) opj_calloc( in opj_tcd_init()
659 if (! p_tcd->tcd_image->tiles->comps) { in opj_tcd_init()
663 p_tcd->tcd_image->tiles->numcomps = p_image->numcomps; in opj_tcd_init()
664 p_tcd->tp_pos = p_cp->m_specific_param.m_enc.m_tp_pos; in opj_tcd_init()
665 p_tcd->thread_pool = p_tp; in opj_tcd_init()
720 static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, in opj_tcd_init_tile() argument
756 l_cp = p_tcd->cp; in opj_tcd_init_tile()
758 l_tile = p_tcd->tcd_image->tiles; in opj_tcd_init_tile()
761 l_image = p_tcd->image; in opj_tcd_init_tile()
762 l_image_comp = p_tcd->image->comps; in opj_tcd_init_tile()
1198 OPJ_BOOL opj_tcd_init_encode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, in opj_tcd_init_encode_tile() argument
1201 return opj_tcd_init_tile(p_tcd, p_tile_no, OPJ_TRUE, 1.0F, in opj_tcd_init_encode_tile()
1205 OPJ_BOOL opj_tcd_init_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, in opj_tcd_init_decode_tile() argument
1208 return opj_tcd_init_tile(p_tcd, p_tile_no, OPJ_FALSE, 0.5F, in opj_tcd_init_decode_tile()
1320 OPJ_UINT32 opj_tcd_get_decoded_tile_size(opj_tcd_t *p_tcd, in opj_tcd_get_decoded_tile_size() argument
1331 l_tile_comp = p_tcd->tcd_image->tiles->comps; in opj_tcd_get_decoded_tile_size()
1332 l_img_comp = p_tcd->image->comps; in opj_tcd_get_decoded_tile_size()
1334 for (i = 0; i < p_tcd->image->numcomps; ++i) { in opj_tcd_get_decoded_tile_size()
1348 if (take_into_account_partial_decoding && !p_tcd->whole_tile_decoding) { in opj_tcd_get_decoded_tile_size()
1375 OPJ_BOOL opj_tcd_encode_tile(opj_tcd_t *p_tcd, in opj_tcd_encode_tile() argument
1384 if (p_tcd->cur_tp_num == 0) { in opj_tcd_encode_tile()
1386 p_tcd->tcd_tileno = p_tile_no; in opj_tcd_encode_tile()
1387 p_tcd->tcp = &p_tcd->cp->tcps[p_tile_no]; in opj_tcd_encode_tile()
1394 &p_tcd->tcd_image->tiles->comps[0]; /* based on component 0 */ in opj_tcd_encode_tile()
1395 opj_tccp_t *l_tccp = p_tcd->tcp->tccps; /* based on component 0 */ in opj_tcd_encode_tile()
1420 if (! opj_tcd_dc_level_shift_encode(p_tcd)) { in opj_tcd_encode_tile()
1426 if (! opj_tcd_mct_encode(p_tcd)) { in opj_tcd_encode_tile()
1432 if (! opj_tcd_dwt_encode(p_tcd)) { in opj_tcd_encode_tile()
1438 if (! opj_tcd_t1_encode(p_tcd)) { in opj_tcd_encode_tile()
1444 if (! opj_tcd_rate_allocate_encode(p_tcd, p_dest, p_max_length, in opj_tcd_encode_tile()
1459 if (! opj_tcd_t2_encode(p_tcd, p_dest, p_data_written, p_max_length, in opj_tcd_encode_tile()
1470 OPJ_BOOL opj_tcd_decode_tile(opj_tcd_t *p_tcd, in opj_tcd_decode_tile() argument
1487 p_tcd->tcd_tileno = p_tile_no; in opj_tcd_decode_tile()
1488 p_tcd->tcp = &(p_tcd->cp->tcps[p_tile_no]); in opj_tcd_decode_tile()
1489 p_tcd->win_x0 = win_x0; in opj_tcd_decode_tile()
1490 p_tcd->win_y0 = win_y0; in opj_tcd_decode_tile()
1491 p_tcd->win_x1 = win_x1; in opj_tcd_decode_tile()
1492 p_tcd->win_y1 = win_y1; in opj_tcd_decode_tile()
1493 p_tcd->whole_tile_decoding = OPJ_TRUE; in opj_tcd_decode_tile()
1495 opj_free(p_tcd->used_component); in opj_tcd_decode_tile()
1496 p_tcd->used_component = NULL; in opj_tcd_decode_tile()
1500 p_tcd->image->numcomps); in opj_tcd_decode_tile()
1508 p_tcd->used_component = used_component; in opj_tcd_decode_tile()
1511 for (compno = 0; compno < p_tcd->image->numcomps; compno++) { in opj_tcd_decode_tile()
1512 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_decode_tile()
1516 if (!opj_tcd_is_whole_tilecomp_decoding(p_tcd, compno)) { in opj_tcd_decode_tile()
1517 p_tcd->whole_tile_decoding = OPJ_FALSE; in opj_tcd_decode_tile()
1522 if (p_tcd->whole_tile_decoding) { in opj_tcd_decode_tile()
1523 for (compno = 0; compno < p_tcd->image->numcomps; compno++) { in opj_tcd_decode_tile()
1524 opj_tcd_tilecomp_t* tilec = &(p_tcd->tcd_image->tiles->comps[compno]); in opj_tcd_decode_tile()
1533 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_decode_tile()
1564 for (compno = 0; compno < p_tcd->image->numcomps; compno++) { in opj_tcd_decode_tile()
1566 opj_tcd_tilecomp_t* tilec = &(p_tcd->tcd_image->tiles->comps[compno]); in opj_tcd_decode_tile()
1567 opj_image_comp_t* image_comp = &(p_tcd->image->comps[compno]); in opj_tcd_decode_tile()
1569 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_decode_tile()
1577 opj_uint_ceildiv(p_tcd->win_x0, image_comp->dx)); in opj_tcd_decode_tile()
1580 opj_uint_ceildiv(p_tcd->win_y0, image_comp->dy)); in opj_tcd_decode_tile()
1583 opj_uint_ceildiv(p_tcd->win_x1, image_comp->dx)); in opj_tcd_decode_tile()
1586 opj_uint_ceildiv(p_tcd->win_y1, image_comp->dy)); in opj_tcd_decode_tile()
1616 opj_tcp_t *tcp = &p_tcd->cp->tcps[0]; in opj_tcd_decode_tile()
1618 opj_tcd_tilecomp_t *tilec_idx = &p_tcd->tcd_image->tiles->comps[compno]; in opj_tcd_decode_tile()
1638 if (! opj_tcd_t2_decode(p_tcd, p_src, &l_data_read, p_max_length, p_cstr_index, in opj_tcd_decode_tile()
1647 if (! opj_tcd_t1_decode(p_tcd, p_manager)) { in opj_tcd_decode_tile()
1655 if (!p_tcd->whole_tile_decoding) { in opj_tcd_decode_tile()
1656 for (compno = 0; compno < p_tcd->image->numcomps; compno++) { in opj_tcd_decode_tile()
1657 opj_tcd_tilecomp_t* tilec = &(p_tcd->tcd_image->tiles->comps[compno]); in opj_tcd_decode_tile()
1658 opj_image_comp_t* image_comp = &(p_tcd->image->comps[compno]); in opj_tcd_decode_tile()
1667 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_decode_tile()
1699 (! opj_tcd_dwt_decode(p_tcd)) { in opj_tcd_decode_tile()
1707 (! opj_tcd_mct_decode(p_tcd, p_manager)) { in opj_tcd_decode_tile()
1714 (! opj_tcd_dc_level_shift_decode(p_tcd)) { in opj_tcd_decode_tile()
1724 OPJ_BOOL opj_tcd_update_tile_data(opj_tcd_t *p_tcd, in opj_tcd_update_tile_data() argument
1736 l_data_size = opj_tcd_get_decoded_tile_size(p_tcd, OPJ_TRUE); in opj_tcd_update_tile_data()
1741 l_tilec = p_tcd->tcd_image->tiles->comps; in opj_tcd_update_tile_data()
1742 l_img_comp = p_tcd->image->comps; in opj_tcd_update_tile_data()
1744 for (i = 0; i < p_tcd->image->numcomps; ++i) { in opj_tcd_update_tile_data()
1749 if (p_tcd->whole_tile_decoding) { in opj_tcd_update_tile_data()
1847 static void opj_tcd_free_tile(opj_tcd_t *p_tcd) in opj_tcd_free_tile() argument
1858 if (! p_tcd) { in opj_tcd_free_tile()
1862 if (! p_tcd->tcd_image) { in opj_tcd_free_tile()
1866 if (p_tcd->m_is_decoder) { in opj_tcd_free_tile()
1872 l_tile = p_tcd->tcd_image->tiles; in opj_tcd_free_tile()
1929 opj_free(p_tcd->tcd_image->tiles); in opj_tcd_free_tile()
1930 p_tcd->tcd_image->tiles = 00; in opj_tcd_free_tile()
1934 static OPJ_BOOL opj_tcd_t2_decode(opj_tcd_t *p_tcd, in opj_tcd_t2_decode() argument
1944 l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp); in opj_tcd_t2_decode()
1950 p_tcd, in opj_tcd_t2_decode()
1952 p_tcd->tcd_tileno, in opj_tcd_t2_decode()
1953 p_tcd->tcd_image->tiles, in opj_tcd_t2_decode()
1969 static OPJ_BOOL opj_tcd_t1_decode(opj_tcd_t *p_tcd, opj_event_mgr_t *p_manager) in opj_tcd_t1_decode() argument
1972 opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; in opj_tcd_t1_decode()
1974 opj_tccp_t * l_tccp = p_tcd->tcp->tccps; in opj_tcd_t1_decode()
1982 if (p_tcd->tcp->num_layers_to_decode == p_tcd->tcp->numlayers && in opj_tcd_t1_decode()
1989 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_t1_decode()
1993 opj_t1_decode_cblks(p_tcd, &ret, l_tile_comp, l_tccp, in opj_tcd_t1_decode()
2000 opj_thread_pool_wait_completion(p_tcd->thread_pool, 0); in opj_tcd_t1_decode()
2008 static OPJ_BOOL opj_tcd_dwt_decode(opj_tcd_t *p_tcd) in opj_tcd_dwt_decode() argument
2011 opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; in opj_tcd_dwt_decode()
2013 opj_tccp_t * l_tccp = p_tcd->tcp->tccps; in opj_tcd_dwt_decode()
2014 opj_image_comp_t * l_img_comp = p_tcd->image->comps; in opj_tcd_dwt_decode()
2018 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_dwt_decode()
2023 if (! opj_dwt_decode(p_tcd, l_tile_comp, in opj_tcd_dwt_decode()
2028 if (! opj_dwt_decode_real(p_tcd, l_tile_comp, in opj_tcd_dwt_decode()
2039 static OPJ_BOOL opj_tcd_mct_decode(opj_tcd_t *p_tcd, opj_event_mgr_t *p_manager) in opj_tcd_mct_decode() argument
2041 opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; in opj_tcd_mct_decode()
2042 opj_tcp_t * l_tcp = p_tcd->tcp; in opj_tcd_mct_decode()
2046 if (l_tcp->mct == 0 || p_tcd->used_component != NULL) { in opj_tcd_mct_decode()
2050 if (p_tcd->whole_tile_decoding) { in opj_tcd_mct_decode()
2075 if (p_tcd->image->comps[0].resno_decoded != in opj_tcd_mct_decode()
2076 p_tcd->image->comps[1].resno_decoded || in opj_tcd_mct_decode()
2077 p_tcd->image->comps[0].resno_decoded != in opj_tcd_mct_decode()
2078 p_tcd->image->comps[2].resno_decoded || in opj_tcd_mct_decode()
2090 p_tcd->image->comps[0].resno_decoded; in opj_tcd_mct_decode()
2096 p_tcd->image->comps[1].resno_decoded; in opj_tcd_mct_decode()
2098 p_tcd->image->comps[2].resno_decoded; in opj_tcd_mct_decode()
2100 if (p_tcd->image->comps[0].resno_decoded != in opj_tcd_mct_decode()
2101 p_tcd->image->comps[1].resno_decoded || in opj_tcd_mct_decode()
2102 p_tcd->image->comps[0].resno_decoded != in opj_tcd_mct_decode()
2103 p_tcd->image->comps[2].resno_decoded || in opj_tcd_mct_decode()
2129 if (p_tcd->whole_tile_decoding) { in opj_tcd_mct_decode()
2146 p_tcd->image->comps->sgnd)) { in opj_tcd_mct_decode()
2154 if (p_tcd->whole_tile_decoding) { in opj_tcd_mct_decode()
2166 if (p_tcd->whole_tile_decoding) { in opj_tcd_mct_decode()
2189 static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd) in opj_tcd_dc_level_shift_decode() argument
2202 l_tile = p_tcd->tcd_image->tiles; in opj_tcd_dc_level_shift_decode()
2204 l_tccp = p_tcd->tcp->tccps; in opj_tcd_dc_level_shift_decode()
2205 l_img_comp = p_tcd->image->comps; in opj_tcd_dc_level_shift_decode()
2210 if (p_tcd->used_component != NULL && !p_tcd->used_component[compno]) { in opj_tcd_dc_level_shift_decode()
2216 if (!p_tcd->whole_tile_decoding) { in opj_tcd_dc_level_shift_decode()
2359 OPJ_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd) in opj_tcd_get_encoded_tile_size() argument
2367 l_tilec = p_tcd->tcd_image->tiles->comps; in opj_tcd_get_encoded_tile_size()
2368 l_img_comp = p_tcd->image->comps; in opj_tcd_get_encoded_tile_size()
2369 for (i = 0; i < p_tcd->image->numcomps; ++i) { in opj_tcd_get_encoded_tile_size()
2390 static OPJ_BOOL opj_tcd_dc_level_shift_encode(opj_tcd_t *p_tcd) in opj_tcd_dc_level_shift_encode() argument
2400 l_tile = p_tcd->tcd_image->tiles; in opj_tcd_dc_level_shift_encode()
2402 l_tccp = p_tcd->tcp->tccps; in opj_tcd_dc_level_shift_encode()
2403 l_img_comp = p_tcd->image->comps; in opj_tcd_dc_level_shift_encode()
2430 static OPJ_BOOL opj_tcd_mct_encode(opj_tcd_t *p_tcd) in opj_tcd_mct_encode() argument
2432 opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; in opj_tcd_mct_encode()
2433 opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; in opj_tcd_mct_encode()
2438 opj_tcp_t * l_tcp = p_tcd->tcp; in opj_tcd_mct_encode()
2440 if (!p_tcd->tcp->mct) { in opj_tcd_mct_encode()
2444 if (p_tcd->tcp->mct == 2) { in opj_tcd_mct_encode()
2445 if (! p_tcd->tcp->m_mct_coding_matrix) { in opj_tcd_mct_encode()
2460 (OPJ_BYTE*) p_tcd->tcp->m_mct_coding_matrix, in opj_tcd_mct_encode()
2468 p_tcd->image->comps->sgnd)) { in opj_tcd_mct_encode()
2485 static OPJ_BOOL opj_tcd_dwt_encode(opj_tcd_t *p_tcd) in opj_tcd_dwt_encode() argument
2487 opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; in opj_tcd_dwt_encode()
2488 opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps; in opj_tcd_dwt_encode()
2489 opj_tccp_t * l_tccp = p_tcd->tcp->tccps; in opj_tcd_dwt_encode()
2510 static OPJ_BOOL opj_tcd_t1_encode(opj_tcd_t *p_tcd) in opj_tcd_t1_encode() argument
2515 opj_tcp_t * l_tcp = p_tcd->tcp; in opj_tcd_t1_encode()
2531 l_mct_numcomps = p_tcd->image->numcomps; in opj_tcd_t1_encode()
2535 if (! opj_t1_encode_cblks(l_t1, p_tcd->tcd_image->tiles, l_tcp, l_mct_norms, in opj_tcd_t1_encode()
2546 static OPJ_BOOL opj_tcd_t2_encode(opj_tcd_t *p_tcd, in opj_tcd_t2_encode() argument
2555 l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp); in opj_tcd_t2_encode()
2562 p_tcd->tcd_tileno, in opj_tcd_t2_encode()
2563 p_tcd->tcd_image->tiles, in opj_tcd_t2_encode()
2564 p_tcd->tcp->numlayers, in opj_tcd_t2_encode()
2569 p_tcd->tp_num, in opj_tcd_t2_encode()
2570 p_tcd->tp_pos, in opj_tcd_t2_encode()
2571 p_tcd->cur_pino, in opj_tcd_t2_encode()
2585 static OPJ_BOOL opj_tcd_rate_allocate_encode(opj_tcd_t *p_tcd, in opj_tcd_rate_allocate_encode() argument
2591 opj_cp_t * l_cp = p_tcd->cp; in opj_tcd_rate_allocate_encode()
2602 if (! opj_tcd_rateallocate(p_tcd, p_dest_data, &l_nb_written, p_max_dest_size, in opj_tcd_rate_allocate_encode()
2608 opj_tcd_rateallocate_fixed(p_tcd); in opj_tcd_rate_allocate_encode()
2615 OPJ_BOOL opj_tcd_copy_tile_data(opj_tcd_t *p_tcd, in opj_tcd_copy_tile_data() argument
2627 l_data_size = opj_tcd_get_encoded_tile_size(p_tcd); in opj_tcd_copy_tile_data()
2632 l_tilec = p_tcd->tcd_image->tiles->comps; in opj_tcd_copy_tile_data()
2633 l_img_comp = p_tcd->image->comps; in opj_tcd_copy_tile_data()
2634 for (i = 0; i < p_tcd->image->numcomps; ++i) { in opj_tcd_copy_tile_data()
2796 static OPJ_BOOL opj_tcd_is_whole_tilecomp_decoding(opj_tcd_t *p_tcd, in opj_tcd_is_whole_tilecomp_decoding() argument
2799 opj_tcd_tilecomp_t* tilec = &(p_tcd->tcd_image->tiles->comps[compno]); in opj_tcd_is_whole_tilecomp_decoding()
2800 opj_image_comp_t* image_comp = &(p_tcd->image->comps[compno]); in opj_tcd_is_whole_tilecomp_decoding()
2805 opj_uint_ceildiv(p_tcd->win_x0, image_comp->dx)); in opj_tcd_is_whole_tilecomp_decoding()
2808 opj_uint_ceildiv(p_tcd->win_y0, image_comp->dy)); in opj_tcd_is_whole_tilecomp_decoding()
2811 opj_uint_ceildiv(p_tcd->win_x1, image_comp->dx)); in opj_tcd_is_whole_tilecomp_decoding()
2814 opj_uint_ceildiv(p_tcd->win_y1, image_comp->dy)); in opj_tcd_is_whole_tilecomp_decoding()