Home | History | Annotate | Download | only in libopenjpeg20

Lines Matching full:m_decoder

1837         p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_MHSIZ;
2171 if (p_j2k->m_specific_param.m_decoder.m_discard_tiles) {
2172 p_j2k->m_specific_param.m_decoder.m_start_tile_x = (p_j2k->m_specific_param.m_decoder.m_start_tile_x - l_cp->tx0) / l_cp->tdx;
2173 p_j2k->m_specific_param.m_decoder.m_start_tile_y = (p_j2k->m_specific_param.m_decoder.m_start_tile_y - l_cp->ty0) / l_cp->tdy;
2174 p_j2k->m_specific_param.m_decoder.m_end_tile_x = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(p_j2k->m_specific_param.m_decoder.m_end_tile_x - l_cp->tx0), (OPJ_INT32)l_cp->tdx);
2175 p_j2k->m_specific_param.m_decoder.m_end_tile_y = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)(p_j2k->m_specific_param.m_decoder.m_end_tile_y - l_cp->ty0), (OPJ_INT32)l_cp->tdy);
2178 p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0;
2179 p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0;
2180 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw;
2181 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th;
2244 p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps =
2246 if(p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps == 00) {
2251 p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mct_records =
2254 if (! p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mct_records) {
2258 p_j2k->m_specific_param.m_decoder.m_default_tcp->m_nb_max_mct_records = OPJ_J2K_MCT_DEFAULT_NB_RECORDS;
2260 p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mcc_records =
2264 if (! p_j2k->m_specific_param.m_decoder.m_default_tcp->m_mcc_records) {
2268 p_j2k->m_specific_param.m_decoder.m_default_tcp->m_nb_max_mcc_records = OPJ_J2K_MCC_DEFAULT_NB_RECORDS;
2273 p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps[i].m_dc_level_shift = 1 << (l_image->comps[i].prec - 1);
2288 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_MH; /* FIXME J2K_DEC_STATE_MH; */
2468 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ?
2470 p_j2k->m_specific_param.m_decoder.m_default_tcp;
2693 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ) ? /*FIXME J2K_DEC_STATE_TPH*/
2695 p_j2k->m_specific_param.m_decoder.m_default_tcp;
3238 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ?
3240 p_j2k->m_specific_param.m_decoder.m_default_tcp;
4078 p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1;
4082 l_num_parts += p_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction;
4089 p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1;
4097 p_j2k->m_specific_param.m_decoder.m_last_tile_part = 1;
4106 p_j2k->m_specific_param.m_decoder.m_can_decode = 1; /* Process the last tile-part header*/
4110 if (!p_j2k->m_specific_param.m_decoder.m_last_tile_part){
4112 p_j2k->m_specific_param.m_decoder.m_sot_length = l_tot_len - 12; /* SOT_marker_size = 12 */
4116 p_j2k->m_specific_param.m_decoder.m_sot_length = 0;
4119 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPH;
4122 if (p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec == -1) {
4123 p_j2k->m_specific_param.m_decoder.m_skip_data =
4124 (l_tile_x < p_j2k->m_specific_param.m_decoder.m_start_tile_x)
4125 || (l_tile_x >= p_j2k->m_specific_param.m_decoder.m_end_tile_x)
4126 || (l_tile_y < p_j2k->m_specific_param.m_decoder.m_start_tile_y)
4127 || (l_tile_y >= p_j2k->m_specific_param.m_decoder.m_end_tile_y);
4130 assert( p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec >= 0 );
4131 p_j2k->m_specific_param.m_decoder.m_skip_data =
4132 (p_j2k->m_current_tile_number != (OPJ_UINT32)p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec);
4325 if (p_j2k->m_specific_param.m_decoder.m_last_tile_part) {
4330 p_j2k->m_specific_param.m_decoder.m_sot_length = (OPJ_UINT32)(opj_stream_get_number_byte_left(p_stream) - 2);
4334 if (p_j2k->m_specific_param.m_decoder.m_sot_length >= 2 )
4335 p_j2k->m_specific_param.m_decoder.m_sot_length -= 2;
4345 if (p_j2k->m_specific_param.m_decoder.m_sot_length) {
4348 if ((OPJ_OFF_T)p_j2k->m_specific_param.m_decoder.m_sot_length > opj_stream_get_number_byte_left(p_stream)) {
4356 *l_current_data = (OPJ_BYTE*) opj_malloc(p_j2k->m_specific_param.m_decoder.m_sot_length);
4359 OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(*l_current_data, *l_tile_len + p_j2k->m_specific_param.m_decoder.m_sot_length);
4388 l_current_pos + p_j2k->m_specific_param.m_decoder.m_sot_length + 2;
4394 p_j2k->m_specific_param.m_decoder.m_sot_length + 2)) {
4407 p_j2k->m_specific_param.m_decoder.m_sot_length,
4415 if (l_current_read_size != p_j2k->m_specific_param.m_decoder.m_sot_length) {
4416 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
4419 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT;
4555 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ?
4557 p_j2k->m_specific_param.m_decoder.m_default_tcp;
4804 p_j2k->m_specific_param.m_decoder.m_state |= J2K_STATE_ERR;
5012 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
5018 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_unknown_marker,2);
5025 if (!(p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states)) {
5137 l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ?
5139 p_j2k->m_specific_param.m_decoder.m_default_tcp;
5351 l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ?
5353 p_j2k->m_specific_param.m_decoder.m_default_tcp;
5633 l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ?
5635 p_j2k->m_specific_param.m_decoder.m_default_tcp;
7048 l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NONE);
7093 l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == J2K_DEC_STATE_NONE);
7095 l_is_valid &= (p_j2k->m_specific_param.m_decoder.m_state == 0x0000);
7125 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_MHSOC;
7134 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7140 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2);
7181 if (! (p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states) ) {
7187 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7193 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_marker_size,2);
7197 if (l_marker_size > p_j2k->m_specific_param.m_decoder.m_header_data_size) {
7198 OPJ_BYTE *new_header_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_decoder.m_header_data, l_marker_size);
7200 opj_free(p_j2k->m_specific_param.m_decoder.m_header_data);
7201 p_j2k->m_specific_param.m_decoder.m_header_data = NULL;
7202 p_j2k->m_specific_param.m_decoder.m_header_data_size = 0;
7206 p_j2k->m_specific_param.m_decoder.m_header_data = new_header_data;
7207 p_j2k->m_specific_param.m_decoder.m_header_data_size = l_marker_size;
7211 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager) != l_marker_size) {
7217 if (! (*(l_marker_handler->handler))(p_j2k,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager)) {
7233 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7239 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2);
7266 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT;
7327 l_default_tcp = p_j2k->m_specific_param.m_decoder.m_default_tcp;
7458 if (p_j2k->m_specific_param.m_decoder.m_default_tcp != 00) {
7459 opj_j2k_tcp_destroy(p_j2k->m_specific_param.m_decoder.m_default_tcp);
7460 opj_free(p_j2k->m_specific_param.m_decoder.m_default_tcp);
7461 p_j2k->m_specific_param.m_decoder.m_default_tcp = 00;
7464 if (p_j2k->m_specific_param.m_decoder.m_header_data != 00) {
7465 opj_free(p_j2k->m_specific_param.m_decoder.m_header_data);
7466 p_j2k->m_specific_param.m_decoder.m_header_data = 00;
7467 p_j2k->m_specific_param.m_decoder.m_header_data_size = 0;
7797 if (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_EOC){
7801 else if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_TPHSOT){
7806 while ( (!p_j2k->m_specific_param.m_decoder.m_can_decode) && (l_current_marker != J2K_MS_EOC) ) {
7813 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
7818 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7824 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_marker_size,2);
7834 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
7839 if (p_j2k->m_specific_param.m_decoder.m_state & J2K_STATE_TPH){
7840 p_j2k->m_specific_param.m_decoder.m_sot_length -= (l_marker_size + 2);
7848 if (! (p_j2k->m_specific_param.m_decoder.m_state & l_marker_handler->states) ) {
7855 if (l_marker_size > p_j2k->m_specific_param.m_decoder.m_header_data_size) {
7863 new_header_data = (OPJ_BYTE *) opj_realloc(p_j2k->m_specific_param.m_decoder.m_header_data, l_marker_size);
7865 opj_free(p_j2k->m_specific_param.m_decoder.m_header_data);
7866 p_j2k->m_specific_param.m_decoder.m_header_data = NULL;
7867 p_j2k->m_specific_param.m_decoder.m_header_data_size = 0;
7871 p_j2k->m_specific_param.m_decoder.m_header_data = new_header_data;
7872 p_j2k->m_specific_param.m_decoder.m_header_data_size = l_marker_size;
7876 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager) != l_marker_size) {
7887 if (! (*(l_marker_handler->handler))(p_j2k,p_j2k->m_specific_param.m_decoder.m_header_data,l_marker_size,p_manager)) {
7905 if (sot_pos > p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos)
7907 p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos = sot_pos;
7911 if (p_j2k->m_specific_param.m_decoder.m_skip_data) {
7913 if (opj_stream_skip(p_stream,p_j2k->m_specific_param.m_decoder.m_sot_length,p_manager) != p_j2k->m_specific_param.m_decoder.m_sot_length) {
7921 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7926 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2);
7930 && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC)
7934 if (! p_j2k->m_specific_param.m_decoder.m_skip_data) {
7939 if (p_j2k->m_specific_param.m_decoder.m_can_decode && !p_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction_checked) {
7943 p_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction_checked = 1;
7952 p_j2k->m_specific_param.m_decoder.m_can_decode = 0;
7953 p_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction = 1;
7963 if (! p_j2k->m_specific_param.m_decoder.m_can_decode){
7965 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7971 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2);
7976 p_j2k->m_specific_param.m_decoder.m_skip_data = 0;
7977 p_j2k->m_specific_param.m_decoder.m_can_decode = 0;
7978 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT;
7981 if (opj_stream_read_data(p_stream,p_j2k->m_specific_param.m_decoder.m_header_data,2,p_manager) != 2) {
7987 opj_read_bytes(p_j2k->m_specific_param.m_decoder.m_header_data,&l_current_marker,2);
7993 if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_EOC ){
7995 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_EOC;
8000 if ( ! p_j2k->m_specific_param.m_decoder.m_can_decode) {
8037 p_j2k->m_specific_param.m_decoder.m_state |= 0x0080;/* FIXME J2K_DEC_STATE_DATA;*/
8058 if ( !(p_j2k->m_specific_param.m_decoder.m_state & 0x0080/*FIXME J2K_DEC_STATE_DATA*/)
8075 p_j2k->m_specific_param.m_decoder.m_state |= 0x8000;/*FIXME J2K_DEC_STATE_ERR;*/
8090 p_j2k->m_specific_param.m_decoder.m_can_decode = 0;
8091 p_j2k->m_specific_param.m_decoder.m_state &= (~ (0x0080u));/* FIXME J2K_DEC_STATE_DATA);*/
8094 && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC){
8098 if (p_j2k->m_specific_param.m_decoder.m_state != 0x0100){ /*FIXME J2K_DEC_STATE_EOC)*/
8108 p_j2k->m_specific_param.m_decoder.m_state = 0x0100;/*FIXME J2K_DEC_STATE_EOC;*/
8113 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
8406 if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_TPHSOT) { /* FIXME J2K_DEC_STATE_TPHSOT)*/
8414 p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0;
8415 p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0;
8416 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw;
8417 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th;
8439 p_j2k->m_specific_param.m_decoder.m_start_tile_x = 0;
8443 p_j2k->m_specific_param.m_decoder.m_start_tile_x = ((OPJ_UINT32)p_start_x - l_cp->tx0) / l_cp->tdx;
8458 p_j2k->m_specific_param.m_decoder.m_start_tile_y = 0;
8462 p_j2k->m_specific_param.m_decoder.m_start_tile_y = ((OPJ_UINT32)p_start_y - l_cp->ty0) / l_cp->tdy;
8479 p_j2k->m_specific_param.m_decoder.m_end_tile_x = l_cp->tw;
8483 p_j2k->m_specific_param.m_decoder.m_end_tile_x = (OPJ_UINT32)opj_int_ceildiv(p_end_x - (OPJ_INT32)l_cp->tx0, (OPJ_INT32)l_cp->tdx);
8498 p_j2k->m_specific_param.m_decoder.m_end_tile_y = l_cp->th;
8502 p_j2k->m_specific_param.m_decoder.m_end_tile_y = (OPJ_UINT32)opj_int_ceildiv(p_end_y - (OPJ_INT32)l_cp->ty0, (OPJ_INT32)l_cp->tdy);
8507 p_j2k->m_specific_param.m_decoder.m_discard_tiles = 1;
8559 l_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction_checked = 1;
8562 l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_t*) opj_calloc(1,sizeof(opj_tcp_t));
8563 if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) {
8568 l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_calloc(1,OPJ_J2K_DEFAULT_HEADER_SIZE);
8569 if (! l_j2k->m_specific_param.m_decoder.m_header_data) {
8574 l_j2k->m_specific_param.m_decoder.m_header_data_size = OPJ_J2K_DEFAULT_HEADER_SIZE;
8576 l_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec = -1 ;
8578 l_j2k->m_specific_param.m_decoder.m_last_sot_read_pos = 0 ;
8736 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ?
8738 p_j2k->m_specific_param.m_decoder.m_default_tcp;
8766 p_j2k->m_specific_param.m_decoder.m_state |= 0x8000;/* FIXME J2K_DEC_STATE_ERR;*/
8854 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? /* FIXME J2K_DEC_STATE_TPH*/
8856 p_j2k->m_specific_param.m_decoder.m_default_tcp;
9000 l_tcp = (p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH) ? /*FIXME J2K_DEC_STATE_TPH*/
9002 p_j2k->m_specific_param.m_decoder.m_default_tcp;
9108 l_tcp = p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_TPH ?
9110 p_j2k->m_specific_param.m_decoder.m_default_tcp;
9299 opj_j2k_dump_tile_info(p_j2k->m_specific_param.m_decoder.m_default_tcp,(OPJ_INT32)p_j2k->m_private_image->numcomps, out_stream);
9371 l_default_tile = p_j2k->m_specific_param.m_decoder.m_default_tcp;
9614 && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC)
9673 l_tile_no_to_dec = (OPJ_UINT32)p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec;
9680 if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){
9694 if(p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_EOC)
9695 p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_TPHSOT;
9890 p_j2k->m_specific_param.m_decoder.m_tile_ind_to_dec = (OPJ_INT32)tile_index;
9927 if (p_j2k->m_specific_param.m_decoder.m_default_tcp) {
9928 if (p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps) {
9930 OPJ_UINT32 max_res = p_j2k->m_specific_param.m_decoder.m_default_tcp->tccps[it_comp].numresolutions;