[trunk] clean jp2_read_ihdr_v2 interface

This commit is contained in:
Mickael Savinaud 2012-08-09 13:22:25 +00:00
parent f12fde9132
commit 9ed88f6a8d
2 changed files with 12 additions and 18 deletions

View File

@ -64,14 +64,12 @@ static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
* @param p_image_header_size the size of the image header
* @param p_manager the user event manager.
*
* @return true if the image header is valid, fale else.
* @return true if the image header is valid, false else.
*/
static opj_bool jp2_read_ihdr_v2(
opj_jp2_v2_t *jp2,
unsigned char * p_image_header_data,
unsigned int p_image_header_size,
struct opj_event_mgr * p_manager
);
static opj_bool jp2_read_ihdr_v2( opj_jp2_v2_t *jp2,
OPJ_BYTE *p_image_header_data,
OPJ_INT32 p_image_header_size,
opj_event_mgr_t * p_manager );
static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio);
@ -656,11 +654,10 @@ static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio) {
*
* @return true if the image header is valid, fale else.
*/
opj_bool jp2_read_ihdr_v2(
opj_jp2_v2_t *jp2,
unsigned char * p_image_header_data,
unsigned int p_image_header_size,
opj_event_mgr_t * p_manager
opj_bool jp2_read_ihdr_v2( opj_jp2_v2_t *jp2,
OPJ_BYTE *p_image_header_data,
OPJ_INT32 p_image_header_size,
opj_event_mgr_t * p_manager
)
{
/* preconditions */
@ -677,7 +674,7 @@ opj_bool jp2_read_ihdr_v2(
p_image_header_data += 4;
opj_read_bytes(p_image_header_data,&(jp2->w),4); /* WIDTH */
p_image_header_data += 4;
opj_read_bytes(p_image_header_data,&(jp2->numcomps),2); /* NC */
opj_read_bytes(p_image_header_data,&(jp2->numcomps),2); /* NC */
p_image_header_data += 2;
/* allocate memory for components */

View File

@ -1009,6 +1009,7 @@ opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
return OPJ_FALSE;
}
/* ---------------------------------------------------------------------- */
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
{
@ -1027,7 +1028,7 @@ void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
}
}
/* ---------------------------------------------------------------------- */
/*
*
@ -1110,10 +1111,6 @@ void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
}
}
/* ---------------------------------------------------------------------- */
/**
* Helper function.