"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openjpeg/src/lib/openjp2/j2k.c" between
ghostscript-9.28rc1.tar.xz and ghostscript-9.28rc2.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release). Release candidate.

j2k.c  (ghostscript-9.28rc1.tar.xz):j2k.c  (ghostscript-9.28rc2.tar.xz)
skipping to change at line 10634 skipping to change at line 10634
opj_calloc(p_j2k->cstr_index->tile_index[it_tile].maxmarknum, opj_calloc(p_j2k->cstr_index->tile_index[it_tile].maxmarknum,
sizeof(opj_marker_info_t)); sizeof(opj_marker_info_t));
if (!p_j2k->cstr_index->tile_index[it_tile].marker) { if (!p_j2k->cstr_index->tile_index[it_tile].marker) {
return OPJ_FALSE; return OPJ_FALSE;
} }
} }
return OPJ_TRUE; return OPJ_TRUE;
} }
static OPJ_BOOL opj_j2k_are_all_used_components_decoded(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager)
{
OPJ_UINT32 compno;
OPJ_BOOL decoded_all_used_components = OPJ_TRUE;
if (p_j2k->m_specific_param.m_decoder.m_numcomps_to_decode) {
for (compno = 0;
compno < p_j2k->m_specific_param.m_decoder.m_numcomps_to_decode;
compno++) {
OPJ_UINT32 dec_compno =
p_j2k->m_specific_param.m_decoder.m_comps_indices_to_decode[comp
no];
if (p_j2k->m_output_image->comps[dec_compno].data == NULL) {
opj_event_msg(p_manager, EVT_WARNING, "Failed to decode componen
t %d\n",
dec_compno);
decoded_all_used_components = OPJ_FALSE;
}
}
} else {
for (compno = 0; compno < p_j2k->m_output_image->numcomps; compno++) {
if (p_j2k->m_output_image->comps[compno].data == NULL) {
opj_event_msg(p_manager, EVT_WARNING, "Failed to decode componen
t %d\n",
compno);
decoded_all_used_components = OPJ_FALSE;
}
}
}
if (decoded_all_used_components == OPJ_FALSE) {
opj_event_msg(p_manager, EVT_ERROR, "Failed to decode all used component
s\n");
return OPJ_FALSE;
}
return OPJ_TRUE;
}
static OPJ_BOOL opj_j2k_decode_tiles(opj_j2k_t *p_j2k, static OPJ_BOOL opj_j2k_decode_tiles(opj_j2k_t *p_j2k,
opj_stream_private_t *p_stream, opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
{ {
OPJ_BOOL l_go_on = OPJ_TRUE; OPJ_BOOL l_go_on = OPJ_TRUE;
OPJ_UINT32 l_current_tile_no; OPJ_UINT32 l_current_tile_no;
OPJ_INT32 l_tile_x0, l_tile_y0, l_tile_x1, l_tile_y1; OPJ_INT32 l_tile_x0, l_tile_y0, l_tile_x1, l_tile_y1;
OPJ_UINT32 l_nb_comps; OPJ_UINT32 l_nb_comps;
OPJ_UINT32 nr_tiles = 0; OPJ_UINT32 nr_tiles = 0;
skipping to change at line 10745 skipping to change at line 10780
if (opj_stream_get_number_byte_left(p_stream) == 0 if (opj_stream_get_number_byte_left(p_stream) == 0
&& p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC) { && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC) {
break; break;
} }
if (++nr_tiles == p_j2k->m_cp.th * p_j2k->m_cp.tw) { if (++nr_tiles == p_j2k->m_cp.th * p_j2k->m_cp.tw) {
break; break;
} }
} }
if (! opj_j2k_are_all_used_components_decoded(p_j2k, p_manager)) {
return OPJ_FALSE;
}
return OPJ_TRUE; return OPJ_TRUE;
} }
/** /**
* Sets up the procedures to do on decoding data. Developpers wanting to extend the library can add their own reading procedures. * Sets up the procedures to do on decoding data. Developpers wanting to extend the library can add their own reading procedures.
*/ */
static OPJ_BOOL opj_j2k_setup_decoding(opj_j2k_t *p_j2k, static OPJ_BOOL opj_j2k_setup_decoding(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
{ {
/* preconditions*/ /* preconditions*/
skipping to change at line 10873 skipping to change at line 10912
} }
break; break;
} else { } else {
opj_event_msg(p_manager, EVT_WARNING, opj_event_msg(p_manager, EVT_WARNING,
"Tile read, decoded and updated is not the desired one (%d vs %d).\n", "Tile read, decoded and updated is not the desired one (%d vs %d).\n",
l_current_tile_no + 1, l_tile_no_to_dec + 1); l_current_tile_no + 1, l_tile_no_to_dec + 1);
} }
} }
if (! opj_j2k_are_all_used_components_decoded(p_j2k, p_manager)) {
return OPJ_FALSE;
}
return OPJ_TRUE; return OPJ_TRUE;
} }
/** /**
* Sets up the procedures to do on decoding one tile. Developpers wanting to ext end the library can add their own reading procedures. * Sets up the procedures to do on decoding one tile. Developpers wanting to ext end the library can add their own reading procedures.
*/ */
static OPJ_BOOL opj_j2k_setup_decoding_tile(opj_j2k_t *p_j2k, static OPJ_BOOL opj_j2k_setup_decoding_tile(opj_j2k_t *p_j2k,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
{ {
/* preconditions*/ /* preconditions*/
 End of changes. 3 change blocks. 
0 lines changed or deleted 48 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)