• Home
  • Raw
  • Download

Lines Matching refs:p_tcp

205 static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp);
212 static void opj_j2k_tcp_data_destroy(opj_tcp_t *p_tcp);
815 static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp,
1108 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image,
1273 static OPJ_FLOAT32 opj_j2k_get_tp_stride(opj_tcp_t * p_tcp);
1275 static OPJ_FLOAT32 opj_j2k_get_default_stride(opj_tcp_t * p_tcp);
4088 static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager) in opj_j2k_merge_ppt() argument
4092 assert(p_tcp != 00); in opj_j2k_merge_ppt()
4095 if (p_tcp->ppt_buffer != NULL) { in opj_j2k_merge_ppt()
4101 if (p_tcp->ppt == 0U) { in opj_j2k_merge_ppt()
4106 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_merge_ppt()
4108p_tcp->ppt_markers[i].m_data_size; /* can't overflow, max 256 markers of max 65536 bytes */ in opj_j2k_merge_ppt()
4111 p_tcp->ppt_buffer = (OPJ_BYTE *) opj_malloc(l_ppt_data_size); in opj_j2k_merge_ppt()
4112 if (p_tcp->ppt_buffer == 00) { in opj_j2k_merge_ppt()
4116 p_tcp->ppt_len = l_ppt_data_size; in opj_j2k_merge_ppt()
4118 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_merge_ppt()
4119 if (p_tcp->ppt_markers[i].m_data != in opj_j2k_merge_ppt()
4121 memcpy(p_tcp->ppt_buffer + l_ppt_data_size, p_tcp->ppt_markers[i].m_data, in opj_j2k_merge_ppt()
4122 p_tcp->ppt_markers[i].m_data_size); in opj_j2k_merge_ppt()
4124p_tcp->ppt_markers[i].m_data_size; /* can't overflow, max 256 markers of max 65536 bytes */ in opj_j2k_merge_ppt()
4126 opj_free(p_tcp->ppt_markers[i].m_data); in opj_j2k_merge_ppt()
4127 p_tcp->ppt_markers[i].m_data = NULL; in opj_j2k_merge_ppt()
4128 p_tcp->ppt_markers[i].m_data_size = 0U; in opj_j2k_merge_ppt()
4132 p_tcp->ppt_markers_count = 0U; in opj_j2k_merge_ppt()
4133 opj_free(p_tcp->ppt_markers); in opj_j2k_merge_ppt()
4134 p_tcp->ppt_markers = NULL; in opj_j2k_merge_ppt()
4136 p_tcp->ppt_data = p_tcp->ppt_buffer; in opj_j2k_merge_ppt()
4137 p_tcp->ppt_data_size = p_tcp->ppt_len; in opj_j2k_merge_ppt()
5020 static OPJ_FLOAT32 opj_j2k_get_tp_stride(opj_tcp_t * p_tcp) in opj_j2k_get_tp_stride() argument
5022 return (OPJ_FLOAT32)((p_tcp->m_nb_tile_parts - 1) * 14); in opj_j2k_get_tp_stride()
5025 static OPJ_FLOAT32 opj_j2k_get_default_stride(opj_tcp_t * p_tcp) in opj_j2k_get_default_stride() argument
5027 (void)p_tcp; in opj_j2k_get_default_stride()
6204 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, in opj_j2k_add_mct() argument
6216 assert(p_tcp != 00); in opj_j2k_add_mct()
6218 l_mcc_record = p_tcp->m_mcc_records; in opj_j2k_add_mct()
6220 for (i = 0; i < p_tcp->m_nb_mcc_records; ++i) { in opj_j2k_add_mct()
6226 if (i == p_tcp->m_nb_mcc_records) { in opj_j2k_add_mct()
6247 p_tcp->m_mct_decoding_matrix = (OPJ_FLOAT32*)opj_malloc(l_mct_size); in opj_j2k_add_mct()
6249 if (! p_tcp->m_mct_decoding_matrix) { in opj_j2k_add_mct()
6254 l_deco_array->m_data, p_tcp->m_mct_decoding_matrix, l_nb_elem); in opj_j2k_add_mct()
6277 l_tccp = p_tcp->tccps; in opj_j2k_add_mct()
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
7637 assert(p_tcp != 00); in opj_j2k_setup_mct_encoding()
7639 if (p_tcp->mct != 2) { in opj_j2k_setup_mct_encoding()
7643 if (p_tcp->m_mct_decoding_matrix) { in opj_j2k_setup_mct_encoding()
7644 if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { in opj_j2k_setup_mct_encoding()
7646 p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
7648 new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, in opj_j2k_setup_mct_encoding()
7649 p_tcp->m_nb_max_mct_records * sizeof(opj_mct_data_t)); in opj_j2k_setup_mct_encoding()
7651 opj_free(p_tcp->m_mct_records); in opj_j2k_setup_mct_encoding()
7652 p_tcp->m_mct_records = NULL; in opj_j2k_setup_mct_encoding()
7653 p_tcp->m_nb_max_mct_records = 0; in opj_j2k_setup_mct_encoding()
7654 p_tcp->m_nb_mct_records = 0; in opj_j2k_setup_mct_encoding()
7658 p_tcp->m_mct_records = new_mct_records; in opj_j2k_setup_mct_encoding()
7659 l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7662 (p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof( in opj_j2k_setup_mct_encoding()
7665 l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7684 p_tcp->m_mct_decoding_matrix, l_mct_deco_data->m_data, l_nb_elem); in opj_j2k_setup_mct_encoding()
7687 ++p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7690 if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { in opj_j2k_setup_mct_encoding()
7692 p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
7693 new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, in opj_j2k_setup_mct_encoding()
7694 p_tcp->m_nb_max_mct_records * sizeof(opj_mct_data_t)); in opj_j2k_setup_mct_encoding()
7696 opj_free(p_tcp->m_mct_records); in opj_j2k_setup_mct_encoding()
7697 p_tcp->m_mct_records = NULL; in opj_j2k_setup_mct_encoding()
7698 p_tcp->m_nb_max_mct_records = 0; in opj_j2k_setup_mct_encoding()
7699 p_tcp->m_nb_mct_records = 0; in opj_j2k_setup_mct_encoding()
7703 p_tcp->m_mct_records = new_mct_records; in opj_j2k_setup_mct_encoding()
7704 l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7707 (p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof( in opj_j2k_setup_mct_encoding()
7715 l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7740 l_tccp = p_tcp->tccps; in opj_j2k_setup_mct_encoding()
7755 ++p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
7757 if (p_tcp->m_nb_mcc_records == p_tcp->m_nb_max_mcc_records) { in opj_j2k_setup_mct_encoding()
7759 p_tcp->m_nb_max_mcc_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
7761 p_tcp->m_mcc_records, p_tcp->m_nb_max_mcc_records * sizeof( in opj_j2k_setup_mct_encoding()
7764 opj_free(p_tcp->m_mcc_records); in opj_j2k_setup_mct_encoding()
7765 p_tcp->m_mcc_records = NULL; in opj_j2k_setup_mct_encoding()
7766 p_tcp->m_nb_max_mcc_records = 0; in opj_j2k_setup_mct_encoding()
7767 p_tcp->m_nb_mcc_records = 0; in opj_j2k_setup_mct_encoding()
7771 p_tcp->m_mcc_records = new_mcc_records; in opj_j2k_setup_mct_encoding()
7772 l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
7773 memset(l_mcc_data, 0, (p_tcp->m_nb_max_mcc_records - p_tcp->m_nb_mcc_records) * in opj_j2k_setup_mct_encoding()
7778 l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
7784 ++p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
8384 static void opj_j2k_tcp_destroy(opj_tcp_t *p_tcp) in opj_j2k_tcp_destroy() argument
8386 if (p_tcp == 00) { in opj_j2k_tcp_destroy()
8390 if (p_tcp->ppt_markers != 00) { in opj_j2k_tcp_destroy()
8392 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_tcp_destroy()
8393 if (p_tcp->ppt_markers[i].m_data != NULL) { in opj_j2k_tcp_destroy()
8394 opj_free(p_tcp->ppt_markers[i].m_data); in opj_j2k_tcp_destroy()
8397 p_tcp->ppt_markers_count = 0U; in opj_j2k_tcp_destroy()
8398 opj_free(p_tcp->ppt_markers); in opj_j2k_tcp_destroy()
8399 p_tcp->ppt_markers = NULL; in opj_j2k_tcp_destroy()
8402 if (p_tcp->ppt_buffer != 00) { in opj_j2k_tcp_destroy()
8403 opj_free(p_tcp->ppt_buffer); in opj_j2k_tcp_destroy()
8404 p_tcp->ppt_buffer = 00; in opj_j2k_tcp_destroy()
8407 if (p_tcp->tccps != 00) { in opj_j2k_tcp_destroy()
8408 opj_free(p_tcp->tccps); in opj_j2k_tcp_destroy()
8409 p_tcp->tccps = 00; in opj_j2k_tcp_destroy()
8412 if (p_tcp->m_mct_coding_matrix != 00) { in opj_j2k_tcp_destroy()
8413 opj_free(p_tcp->m_mct_coding_matrix); in opj_j2k_tcp_destroy()
8414 p_tcp->m_mct_coding_matrix = 00; in opj_j2k_tcp_destroy()
8417 if (p_tcp->m_mct_decoding_matrix != 00) { in opj_j2k_tcp_destroy()
8418 opj_free(p_tcp->m_mct_decoding_matrix); in opj_j2k_tcp_destroy()
8419 p_tcp->m_mct_decoding_matrix = 00; in opj_j2k_tcp_destroy()
8422 if (p_tcp->m_mcc_records) { in opj_j2k_tcp_destroy()
8423 opj_free(p_tcp->m_mcc_records); in opj_j2k_tcp_destroy()
8424 p_tcp->m_mcc_records = 00; in opj_j2k_tcp_destroy()
8425 p_tcp->m_nb_max_mcc_records = 0; in opj_j2k_tcp_destroy()
8426 p_tcp->m_nb_mcc_records = 0; in opj_j2k_tcp_destroy()
8429 if (p_tcp->m_mct_records) { in opj_j2k_tcp_destroy()
8430 opj_mct_data_t * l_mct_data = p_tcp->m_mct_records; in opj_j2k_tcp_destroy()
8433 for (i = 0; i < p_tcp->m_nb_mct_records; ++i) { in opj_j2k_tcp_destroy()
8442 opj_free(p_tcp->m_mct_records); in opj_j2k_tcp_destroy()
8443 p_tcp->m_mct_records = 00; in opj_j2k_tcp_destroy()
8446 if (p_tcp->mct_norms != 00) { in opj_j2k_tcp_destroy()
8447 opj_free(p_tcp->mct_norms); in opj_j2k_tcp_destroy()
8448 p_tcp->mct_norms = 00; in opj_j2k_tcp_destroy()
8451 opj_j2k_tcp_data_destroy(p_tcp); in opj_j2k_tcp_destroy()
8455 static void opj_j2k_tcp_data_destroy(opj_tcp_t *p_tcp) in opj_j2k_tcp_data_destroy() argument
8457 if (p_tcp->m_data) { in opj_j2k_tcp_data_destroy()
8458 opj_free(p_tcp->m_data); in opj_j2k_tcp_data_destroy()
8459 p_tcp->m_data = NULL; in opj_j2k_tcp_data_destroy()
8460 p_tcp->m_data_size = 0; in opj_j2k_tcp_data_destroy()