• Home
  • Raw
  • Download

Lines Matching refs:p_tcp

199 static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp);
206 static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp);
763 static OPJ_BOOL opj_j2k_merge_ppt ( opj_tcp_t *p_tcp,
1049 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index);
1203 static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp);
1205 static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp);
3804 static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager) in opj_j2k_merge_ppt() argument
3808 assert(p_tcp != 00); in opj_j2k_merge_ppt()
3810 assert(p_tcp->ppt_buffer == NULL); in opj_j2k_merge_ppt()
3812 if (p_tcp->ppt == 0U) { in opj_j2k_merge_ppt()
3817 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_merge_ppt()
3818 …l_ppt_data_size += p_tcp->ppt_markers[i].m_data_size; /* can't overflow, max 256 markers of max 65… in opj_j2k_merge_ppt()
3821 p_tcp->ppt_buffer = (OPJ_BYTE *) opj_malloc(l_ppt_data_size); in opj_j2k_merge_ppt()
3822 if (p_tcp->ppt_buffer == 00) { in opj_j2k_merge_ppt()
3826 p_tcp->ppt_len = l_ppt_data_size; in opj_j2k_merge_ppt()
3828 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_merge_ppt()
3829 if (p_tcp->ppt_markers[i].m_data != NULL) { /* standard doesn't seem to require contiguous Zppt */ in opj_j2k_merge_ppt()
3830 …memcpy(p_tcp->ppt_buffer + l_ppt_data_size, p_tcp->ppt_markers[i].m_data, p_tcp->ppt_markers[i].m_… in opj_j2k_merge_ppt()
3831 …l_ppt_data_size += p_tcp->ppt_markers[i].m_data_size; /* can't overflow, max 256 markers of max 65… in opj_j2k_merge_ppt()
3833 opj_free(p_tcp->ppt_markers[i].m_data); in opj_j2k_merge_ppt()
3834 p_tcp->ppt_markers[i].m_data = NULL; in opj_j2k_merge_ppt()
3835 p_tcp->ppt_markers[i].m_data_size = 0U; in opj_j2k_merge_ppt()
3839 p_tcp->ppt_markers_count = 0U; in opj_j2k_merge_ppt()
3840 opj_free(p_tcp->ppt_markers); in opj_j2k_merge_ppt()
3841 p_tcp->ppt_markers = NULL; in opj_j2k_merge_ppt()
3843 p_tcp->ppt_data = p_tcp->ppt_buffer; in opj_j2k_merge_ppt()
3844 p_tcp->ppt_data_size = p_tcp->ppt_len; in opj_j2k_merge_ppt()
4594 static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp) in opj_j2k_get_tp_stride() argument
4596 return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14); in opj_j2k_get_tp_stride()
4599 static OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp) in opj_j2k_get_default_stride() argument
4601 (void)p_tcp; in opj_j2k_get_default_stride()
5679 static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index) in opj_j2k_add_mct() argument
5690 assert(p_tcp != 00); in opj_j2k_add_mct()
5692 l_mcc_record = p_tcp->m_mcc_records; in opj_j2k_add_mct()
5694 for (i=0;i<p_tcp->m_nb_mcc_records;++i) { in opj_j2k_add_mct()
5700 if (i==p_tcp->m_nb_mcc_records) { in opj_j2k_add_mct()
5720 p_tcp->m_mct_decoding_matrix = (OPJ_FLOAT32*)opj_malloc(l_mct_size); in opj_j2k_add_mct()
5722 if (! p_tcp->m_mct_decoding_matrix ) { in opj_j2k_add_mct()
5726 …ead_functions_to_float[l_deco_array->m_element_type](l_deco_array->m_data,p_tcp->m_mct_decoding_ma… in opj_j2k_add_mct()
5747 l_tccp = p_tcp->tccps; in opj_j2k_add_mct()
6858 OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image) in opj_j2k_setup_mct_encoding() argument
6869 assert(p_tcp != 00); in opj_j2k_setup_mct_encoding()
6871 if (p_tcp->mct != 2) { in opj_j2k_setup_mct_encoding()
6875 if (p_tcp->m_mct_decoding_matrix) { in opj_j2k_setup_mct_encoding()
6876 if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { in opj_j2k_setup_mct_encoding()
6878 p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
6880 …new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, p_tcp->m_nb_max_mct_records… in opj_j2k_setup_mct_encoding()
6882 opj_free(p_tcp->m_mct_records); in opj_j2k_setup_mct_encoding()
6883 p_tcp->m_mct_records = NULL; in opj_j2k_setup_mct_encoding()
6884 p_tcp->m_nb_max_mct_records = 0; in opj_j2k_setup_mct_encoding()
6885 p_tcp->m_nb_mct_records = 0; in opj_j2k_setup_mct_encoding()
6889 p_tcp->m_mct_records = new_mct_records; in opj_j2k_setup_mct_encoding()
6890 l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6892 …memset(l_mct_deco_data ,0,(p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof(opj_mct… in opj_j2k_setup_mct_encoding()
6894 l_mct_deco_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6912 …j2k_mct_write_functions_from_float[l_mct_deco_data->m_element_type](p_tcp->m_mct_decoding_matrix,l… in opj_j2k_setup_mct_encoding()
6915 ++p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6918 if (p_tcp->m_nb_mct_records == p_tcp->m_nb_max_mct_records) { in opj_j2k_setup_mct_encoding()
6920 p_tcp->m_nb_max_mct_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
6921 …new_mct_records = (opj_mct_data_t *) opj_realloc(p_tcp->m_mct_records, p_tcp->m_nb_max_mct_records… in opj_j2k_setup_mct_encoding()
6923 opj_free(p_tcp->m_mct_records); in opj_j2k_setup_mct_encoding()
6924 p_tcp->m_mct_records = NULL; in opj_j2k_setup_mct_encoding()
6925 p_tcp->m_nb_max_mct_records = 0; in opj_j2k_setup_mct_encoding()
6926 p_tcp->m_nb_mct_records = 0; in opj_j2k_setup_mct_encoding()
6930 p_tcp->m_mct_records = new_mct_records; in opj_j2k_setup_mct_encoding()
6931 l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6933 …memset(l_mct_offset_data ,0,(p_tcp->m_nb_max_mct_records - p_tcp->m_nb_mct_records) * sizeof(opj_m… in opj_j2k_setup_mct_encoding()
6940 l_mct_offset_data = p_tcp->m_mct_records + p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6965 l_tccp = p_tcp->tccps; in opj_j2k_setup_mct_encoding()
6979 ++p_tcp->m_nb_mct_records; in opj_j2k_setup_mct_encoding()
6981 if (p_tcp->m_nb_mcc_records == p_tcp->m_nb_max_mcc_records) { in opj_j2k_setup_mct_encoding()
6983 p_tcp->m_nb_max_mcc_records += OPJ_J2K_MCT_DEFAULT_NB_RECORDS; in opj_j2k_setup_mct_encoding()
6985p_tcp->m_mcc_records, p_tcp->m_nb_max_mcc_records * sizeof(opj_simple_mcc_decorrelation_data_t)); in opj_j2k_setup_mct_encoding()
6987 opj_free(p_tcp->m_mcc_records); in opj_j2k_setup_mct_encoding()
6988 p_tcp->m_mcc_records = NULL; in opj_j2k_setup_mct_encoding()
6989 p_tcp->m_nb_max_mcc_records = 0; in opj_j2k_setup_mct_encoding()
6990 p_tcp->m_nb_mcc_records = 0; in opj_j2k_setup_mct_encoding()
6994 p_tcp->m_mcc_records = new_mcc_records; in opj_j2k_setup_mct_encoding()
6995 l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
6996 …memset(l_mcc_data ,0,(p_tcp->m_nb_max_mcc_records - p_tcp->m_nb_mcc_records) * sizeof(opj_simple_m… in opj_j2k_setup_mct_encoding()
7000 l_mcc_data = p_tcp->m_mcc_records + p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
7006 ++p_tcp->m_nb_mcc_records; in opj_j2k_setup_mct_encoding()
7552 static void opj_j2k_tcp_destroy (opj_tcp_t *p_tcp) in opj_j2k_tcp_destroy() argument
7554 if (p_tcp == 00) { in opj_j2k_tcp_destroy()
7558 if (p_tcp->ppt_markers != 00) { in opj_j2k_tcp_destroy()
7560 for (i = 0U; i < p_tcp->ppt_markers_count; ++i) { in opj_j2k_tcp_destroy()
7561 if (p_tcp->ppt_markers[i].m_data != NULL) { in opj_j2k_tcp_destroy()
7562 opj_free(p_tcp->ppt_markers[i].m_data); in opj_j2k_tcp_destroy()
7565 p_tcp->ppt_markers_count = 0U; in opj_j2k_tcp_destroy()
7566 opj_free(p_tcp->ppt_markers); in opj_j2k_tcp_destroy()
7567 p_tcp->ppt_markers = NULL; in opj_j2k_tcp_destroy()
7570 if (p_tcp->ppt_buffer != 00) { in opj_j2k_tcp_destroy()
7571 opj_free(p_tcp->ppt_buffer); in opj_j2k_tcp_destroy()
7572 p_tcp->ppt_buffer = 00; in opj_j2k_tcp_destroy()
7575 if (p_tcp->tccps != 00) { in opj_j2k_tcp_destroy()
7576 opj_free(p_tcp->tccps); in opj_j2k_tcp_destroy()
7577 p_tcp->tccps = 00; in opj_j2k_tcp_destroy()
7580 if (p_tcp->m_mct_coding_matrix != 00) { in opj_j2k_tcp_destroy()
7581 opj_free(p_tcp->m_mct_coding_matrix); in opj_j2k_tcp_destroy()
7582 p_tcp->m_mct_coding_matrix = 00; in opj_j2k_tcp_destroy()
7585 if (p_tcp->m_mct_decoding_matrix != 00) { in opj_j2k_tcp_destroy()
7586 opj_free(p_tcp->m_mct_decoding_matrix); in opj_j2k_tcp_destroy()
7587 p_tcp->m_mct_decoding_matrix = 00; in opj_j2k_tcp_destroy()
7590 if (p_tcp->m_mcc_records) { in opj_j2k_tcp_destroy()
7591 opj_free(p_tcp->m_mcc_records); in opj_j2k_tcp_destroy()
7592 p_tcp->m_mcc_records = 00; in opj_j2k_tcp_destroy()
7593 p_tcp->m_nb_max_mcc_records = 0; in opj_j2k_tcp_destroy()
7594 p_tcp->m_nb_mcc_records = 0; in opj_j2k_tcp_destroy()
7597 if (p_tcp->m_mct_records) { in opj_j2k_tcp_destroy()
7598 opj_mct_data_t * l_mct_data = p_tcp->m_mct_records; in opj_j2k_tcp_destroy()
7601 for (i=0;i<p_tcp->m_nb_mct_records;++i) { in opj_j2k_tcp_destroy()
7610 opj_free(p_tcp->m_mct_records); in opj_j2k_tcp_destroy()
7611 p_tcp->m_mct_records = 00; in opj_j2k_tcp_destroy()
7614 if (p_tcp->mct_norms != 00) { in opj_j2k_tcp_destroy()
7615 opj_free(p_tcp->mct_norms); in opj_j2k_tcp_destroy()
7616 p_tcp->mct_norms = 00; in opj_j2k_tcp_destroy()
7619 opj_j2k_tcp_data_destroy(p_tcp); in opj_j2k_tcp_destroy()
7623 static void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp) in opj_j2k_tcp_data_destroy() argument
7625 if (p_tcp->m_data) { in opj_j2k_tcp_data_destroy()
7626 opj_free(p_tcp->m_data); in opj_j2k_tcp_data_destroy()
7627 p_tcp->m_data = NULL; in opj_j2k_tcp_data_destroy()
7628 p_tcp->m_data_size = 0; in opj_j2k_tcp_data_destroy()