[trunk] Fix JPIP compilation. Some prototypes were not respected.

This commit is contained in:
Mathieu Malaterre 2012-10-15 15:47:19 +00:00
parent a501237ae3
commit d6bcb8b7e0
7 changed files with 40 additions and 12 deletions

View File

@ -164,21 +164,21 @@ int write_cidx_v2( int offset, opj_stream_private_t *cio, opj_codestream_info_t
box[num_box].type = JPIP_MHIX;
num_box++;
box[num_box].length = write_tpix_v2( offset, cstr_info, j2klen, cio);
box[num_box].length = write_tpix_v2( offset, cstr_info, j2klen, cio,p_manager);
box[num_box].type = JPIP_TPIX;
num_box++;
box[num_box].length = write_thix_v2( offset, cstr_info, cio);
box[num_box].length = write_thix_v2( offset, cstr_info, cio, p_manager);
box[num_box].type = JPIP_THIX;
num_box++;
EPHused = check_EPHuse_v2( offset, cstr_info.marker, cstr_info.marknum, cio);
EPHused = check_EPHuse_v2( offset, cstr_info.marker, cstr_info.marknum, cio,p_manager);
box[num_box].length = write_ppix_v2( offset, cstr_info, EPHused, j2klen, cio);
box[num_box].length = write_ppix_v2( offset, cstr_info, EPHused, j2klen, cio,p_manager);
box[num_box].type = JPIP_PPIX;
num_box++;
box[num_box].length = write_phix_v2( offset, cstr_info, EPHused, j2klen, cio);
box[num_box].length = write_phix_v2( offset, cstr_info, EPHused, j2klen, cio,p_manager);
box[num_box].type = JPIP_PHIX;
num_box++;

View File

@ -51,6 +51,10 @@
* @return length of cidx box
*/
int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen);
int write_cidx_v2( int offset, opj_stream_private_t *cio, opj_codestream_info_t cstr_info, int j2klen,
opj_event_mgr_t * p_manager );
opj_bool check_EPHuse_v2( int coff, opj_marker_info_t *markers, int marknum, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
#endif /* !CIDX_MANAGER_H_ */

View File

@ -66,6 +66,8 @@
* @return length of tpix box
*/
int write_tpix( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t *cio);
int write_tpix_v2( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/*
@ -77,6 +79,7 @@ int write_tpix( int coff, opj_codestream_info_t cstr_info, int j2klen, opj_cio_t
* @return length of thix box
*/
int write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio);
int write_thix_v2( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio, opj_event_mgr_t * p_manager );
/*
@ -90,6 +93,8 @@ int write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio);
* @return length of ppix box
*/
int write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio);
int write_ppix_v2( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/*
@ -103,6 +108,8 @@ int write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
* @return length of ppix box
*/
int write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_cio_t *cio);
int write_phix_v2( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
/*
* Wriet manifest box (box)
@ -114,5 +121,19 @@ int write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
*/
void write_manf(int second, int v, opj_jp2_box_t *box, opj_cio_t *cio);
int write_mainmhix_v2( int coff, opj_codestream_info_t cstr_info, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int write_phixfaix_v2( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int write_ppixfaix_v2( int coff, int compno, opj_codestream_info_t cstr_info, opj_bool EPHused, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int write_tilemhix_v2( int coff, opj_codestream_info_t cstr_info, int tileno, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
int write_tpixfaix_v2( int coff, int compno, opj_codestream_info_t cstr_info, int j2klen, opj_stream_private_t *cio,
opj_event_mgr_t * p_manager );
#endif /* !INDEXBOX_MANAGER_H_ */

View File

@ -736,7 +736,7 @@ static opj_bool opj_jpip_skip_iptr( opj_jp2_v2_t *jp2,
return OPJ_TRUE;
}
void opj_jpip_setup_header_writing (opj_jp2_v2_t *jp2)
static void opj_jpip_setup_header_writing (opj_jp2_v2_t *jp2)
{
/* preconditions */
assert(jp2 != 00);
@ -781,7 +781,7 @@ static opj_bool opj_jp2_exec ( opj_jp2_v2_t * jp2,
return l_result;
}
opj_bool opj_jpip_start_compress(opj_jp2_v2_t *jp2,
static opj_bool opj_jpip_start_compress(opj_jp2_v2_t *jp2,
opj_stream_private_t *stream,
opj_image_t * p_image,
opj_event_mgr_t * p_manager
@ -1031,6 +1031,7 @@ static opj_bool opj_jpip_write_jp2c(opj_jp2_v2_t *jp2,
opj_event_mgr_t * p_manager )
{
OPJ_OFF_T j2k_codestream_exit;
opj_codestream_info_t cstr_info;
OPJ_BYTE l_data_header [8];
OPJ_UINT32 len_jp2c;
int len_cidx;
@ -1068,7 +1069,9 @@ static opj_bool opj_jpip_write_jp2c(opj_jp2_v2_t *jp2,
/* CIDX */
pos_cidx = opj_stream_tell( cio);
len_cidx = write_cidx_v2( pos_jp2c+8, cio, jp2_get_cstr_info(jp2), len_jp2c-8);
/*cinfo = jp2_get_cstr_info(jp2);*/
assert( 0 ); /* MM: FIXME */
len_cidx = write_cidx_v2( pos_jp2c+8, cio, cstr_info, len_jp2c-8,p_manager);
/* FIDX */
pos_fidx = opj_stream_tell( cio);
@ -1091,7 +1094,7 @@ static void opj_jp2_setup_end_header_writing (opj_jp2_v2_t *jp2)
/* DEVELOPER CORNER, add your custom procedures */
}
opj_bool opj_jpip_end_compress( opj_jp2_v2_t *jp2,
static opj_bool opj_jpip_end_compress( opj_jp2_v2_t *jp2,
opj_stream_private_t *cio,
opj_event_mgr_t * p_manager
)

View File

@ -112,7 +112,7 @@ int write_phix_v2( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused,
write_manf_v2( i, cstr_info.numcomps, box, cio);
for( compno=0; compno<cstr_info.numcomps; compno++){
box[compno].length = write_phixfaix_v2( coff, compno, cstr_info, EPHused, j2klen, cio);
box[compno].length = write_phixfaix_v2( coff, compno, cstr_info, EPHused, j2klen, cio,p_manager);
box[compno].type = JPIP_FAIX;
}

View File

@ -117,7 +117,7 @@ int write_ppix_v2( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused,
write_manf_v2( i, cstr_info.numcomps, box, cio);
for (compno=0; compno<cstr_info.numcomps; compno++){
box[compno].length = write_ppixfaix_v2( coff, compno, cstr_info, EPHused, j2klen, cio);
box[compno].length = write_ppixfaix_v2( coff, compno, cstr_info, EPHused, j2klen, cio,p_manager);
box[compno].type = JPIP_FAIX;
}

View File

@ -112,7 +112,7 @@ int write_thix_v2( int coff, opj_codestream_info_t cstr_info, opj_stream_private
write_manf_v2( i, cstr_info.tw*cstr_info.th, box, cio);
for (tileno = 0; tileno < cstr_info.tw*cstr_info.th; tileno++){
box[tileno].length = write_tilemhix_v2( coff, cstr_info, tileno, cio);
box[tileno].length = write_tilemhix_v2( coff, cstr_info, tileno, cio,p_manager);
box[tileno].type = JPIP_MHIX;
}