rename j2k functions with opj_ prefix

This commit is contained in:
Mickael Savinaud 2012-08-16 11:51:34 +00:00
parent a6522d3706
commit 582323d63c
4 changed files with 233 additions and 199 deletions

View File

@ -6737,7 +6737,7 @@ opj_j2k_t* j2k_create_compress(opj_common_ptr cinfo) {
return j2k; return j2k;
} }
opj_j2k_v2_t* j2k_create_compress_v2(void) opj_j2k_v2_t* opj_j2k_create_compress_v2(void)
{ {
opj_j2k_v2_t *l_j2k = (opj_j2k_v2_t*) opj_malloc(sizeof(opj_j2k_v2_t)); opj_j2k_v2_t *l_j2k = (opj_j2k_v2_t*) opj_malloc(sizeof(opj_j2k_v2_t));
if (!l_j2k) { if (!l_j2k) {
@ -6751,7 +6751,7 @@ opj_j2k_v2_t* j2k_create_compress_v2(void)
l_j2k->m_specific_param.m_encoder.m_header_tile_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE); l_j2k->m_specific_param.m_encoder.m_header_tile_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE);
if (! l_j2k->m_specific_param.m_encoder.m_header_tile_data) { if (! l_j2k->m_specific_param.m_encoder.m_header_tile_data) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return NULL; return NULL;
} }
@ -6760,14 +6760,14 @@ opj_j2k_v2_t* j2k_create_compress_v2(void)
/* validation list creation*/ /* validation list creation*/
l_j2k->m_validation_list = opj_procedure_list_create(); l_j2k->m_validation_list = opj_procedure_list_create();
if (! l_j2k->m_validation_list) { if (! l_j2k->m_validation_list) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return NULL; return NULL;
} }
/* execution list creation*/ /* execution list creation*/
l_j2k->m_procedure_list = opj_procedure_list_create(); l_j2k->m_procedure_list = opj_procedure_list_create();
if (! l_j2k->m_procedure_list) { if (! l_j2k->m_procedure_list) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return NULL; return NULL;
} }
@ -7060,11 +7060,11 @@ void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_
} }
} }
void j2k_setup_encoder_v2( opj_j2k_v2_t *p_j2k, void opj_j2k_setup_encoder_v2( opj_j2k_v2_t *p_j2k,
opj_cparameters_t *parameters, opj_cparameters_t *parameters,
opj_image_t *image, opj_image_t *image,
struct opj_event_mgr * p_manager) struct opj_event_mgr * p_manager)
{ {
OPJ_UINT32 i, j, tileno, numpocs_tile; OPJ_UINT32 i, j, tileno, numpocs_tile;
opj_cp_v2_t *cp = 00; opj_cp_v2_t *cp = 00;
opj_bool l_res; opj_bool l_res;
@ -7278,7 +7278,7 @@ void j2k_setup_encoder_v2( opj_j2k_v2_t *p_j2k,
tccp->m_dc_level_shift = l_dc_shift[i]; tccp->m_dc_level_shift = l_dc_shift[i];
} }
j2k_setup_mct_encoding(tcp,image); opj_j2k_setup_mct_encoding(tcp,image);
*/ */
} }
else { else {
@ -7692,10 +7692,10 @@ static void j2k_add_tlmarker_v2(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_
* Ends the decompression procedures and possibiliy add data to be read after the * Ends the decompression procedures and possibiliy add data to be read after the
* codestream. * codestream.
*/ */
opj_bool j2k_end_decompress( opj_bool opj_j2k_end_decompress(opj_j2k_v2_t *p_j2k,
opj_j2k_v2_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
)
{ {
(void)p_j2k; (void)p_j2k;
(void)p_stream; (void)p_stream;
@ -7713,10 +7713,10 @@ opj_bool j2k_end_decompress(
* *
* @return true if the box is valid. * @return true if the box is valid.
*/ */
opj_bool j2k_read_header( struct opj_stream_private *p_stream, opj_bool opj_j2k_read_header( opj_stream_private_t *p_stream,
opj_j2k_v2_t* p_j2k, opj_j2k_v2_t* p_j2k,
opj_image_t** p_image, opj_image_t** p_image,
struct opj_event_mgr* p_manager ) opj_event_mgr_t* p_manager )
{ {
/* preconditions */ /* preconditions */
assert(p_j2k != 00); assert(p_j2k != 00);
@ -7838,7 +7838,7 @@ opj_bool j2k_mct_validation ( opj_j2k_v2_t * p_j2k,
return l_is_valid; return l_is_valid;
} }
opj_bool j2k_setup_mct_encoding(opj_tcp_v2_t * p_tcp, opj_image_t * p_image) opj_bool opj_j2k_setup_mct_encoding(opj_tcp_v2_t * p_tcp, opj_image_t * p_image)
{ {
OPJ_UINT32 i; OPJ_UINT32 i;
OPJ_UINT32 l_indix = 1; OPJ_UINT32 l_indix = 1;
@ -8400,7 +8400,7 @@ const opj_dec_memory_marker_handler_t * opj_j2k_get_marker_handler (OPJ_UINT32 p
* *
* @param p_j2k the jpeg20000 structure to destroy. * @param p_j2k the jpeg20000 structure to destroy.
*/ */
void j2k_destroy (opj_j2k_v2_t *p_j2k) void opj_j2k_destroy (opj_j2k_v2_t *p_j2k)
{ {
if (p_j2k == 00) { if (p_j2k == 00) {
return; return;
@ -8645,7 +8645,7 @@ void opj_j2k_cp_destroy (opj_cp_v2_t *p_cp)
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
* @param p_manager the user event manager. * @param p_manager the user event manager.
*/ */
opj_bool j2k_read_tile_header( opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_read_tile_header( opj_j2k_v2_t * p_j2k,
OPJ_UINT32 * p_tile_index, OPJ_UINT32 * p_tile_index,
OPJ_UINT32 * p_data_size, OPJ_UINT32 * p_data_size,
OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0, OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
@ -8849,7 +8849,7 @@ opj_bool j2k_read_tile_header( opj_j2k_v2_t * p_j2k,
} }
opj_bool j2k_decode_tile ( opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_decode_tile ( opj_j2k_v2_t * p_j2k,
OPJ_UINT32 p_tile_index, OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data, OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size, OPJ_UINT32 p_data_size,
@ -9193,11 +9193,11 @@ opj_bool opj_j2k_update_image_data (opj_tcd_v2_t * p_tcd, OPJ_BYTE * p_data, opj
* *
* @return true if the area could be set. * @return true if the area could be set.
*/ */
opj_bool j2k_set_decode_area( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_set_decode_area( opj_j2k_v2_t *p_j2k,
opj_image_t* p_image, opj_image_t* p_image,
OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
struct opj_event_mgr * p_manager ) opj_event_mgr_t * p_manager )
{ {
opj_cp_v2_t * l_cp = &(p_j2k->m_cp); opj_cp_v2_t * l_cp = &(p_j2k->m_cp);
opj_image_t * l_image = p_j2k->m_private_image; opj_image_t * l_image = p_j2k->m_private_image;
@ -9372,14 +9372,14 @@ opj_j2k_v2_t* opj_j2k_create_decompress(void)
l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_v2_t*) opj_malloc(sizeof(opj_tcp_v2_t)); l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_v2_t*) opj_malloc(sizeof(opj_tcp_v2_t));
if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) { if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return 00; return 00;
} }
memset(l_j2k->m_specific_param.m_decoder.m_default_tcp,0,sizeof(opj_tcp_v2_t)); memset(l_j2k->m_specific_param.m_decoder.m_default_tcp,0,sizeof(opj_tcp_v2_t));
l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE); l_j2k->m_specific_param.m_decoder.m_header_data = (OPJ_BYTE *) opj_malloc(J2K_DEFAULT_HEADER_SIZE);
if (! l_j2k->m_specific_param.m_decoder.m_header_data) { if (! l_j2k->m_specific_param.m_decoder.m_header_data) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return 00; return 00;
} }
@ -9394,7 +9394,7 @@ opj_j2k_v2_t* opj_j2k_create_decompress(void)
/*(opj_codestream_index_t*) opj_malloc(sizeof(opj_codestream_index_t)); /*(opj_codestream_index_t*) opj_malloc(sizeof(opj_codestream_index_t));
if (!l_j2k->cstr_index){ if (!l_j2k->cstr_index){
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return NULL; return NULL;
} }
@ -9404,14 +9404,14 @@ opj_j2k_v2_t* opj_j2k_create_decompress(void)
/* validation list creation */ /* validation list creation */
l_j2k->m_validation_list = opj_procedure_list_create(); l_j2k->m_validation_list = opj_procedure_list_create();
if (! l_j2k->m_validation_list) { if (! l_j2k->m_validation_list) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return 00; return 00;
} }
/* execution list creation */ /* execution list creation */
l_j2k->m_procedure_list = opj_procedure_list_create(); l_j2k->m_procedure_list = opj_procedure_list_create();
if (! l_j2k->m_procedure_list) { if (! l_j2k->m_procedure_list) {
j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);
return 00; return 00;
} }
@ -10475,7 +10475,7 @@ opj_bool opj_j2k_decode_tiles ( opj_j2k_v2_t *p_j2k,
while (OPJ_TRUE) { while (OPJ_TRUE) {
if (! j2k_read_tile_header( p_j2k, if (! opj_j2k_read_tile_header( p_j2k,
&l_current_tile_no, &l_current_tile_no,
&l_data_size, &l_data_size,
&l_tile_x0, &l_tile_y0, &l_tile_x0, &l_tile_y0,
@ -10502,7 +10502,7 @@ opj_bool opj_j2k_decode_tiles ( opj_j2k_v2_t *p_j2k,
l_max_data_size = l_data_size; l_max_data_size = l_data_size;
} }
if (! j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) { if (! opj_j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) {
opj_free(l_current_data); opj_free(l_current_data);
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -10588,7 +10588,7 @@ static opj_bool opj_j2k_decode_one_tile ( opj_j2k_v2_t *p_j2k,
} }
while (OPJ_TRUE) { while (OPJ_TRUE) {
if (! j2k_read_tile_header( p_j2k, if (! opj_j2k_read_tile_header( p_j2k,
&l_current_tile_no, &l_current_tile_no,
&l_data_size, &l_data_size,
&l_tile_x0, &l_tile_y0, &l_tile_x0, &l_tile_y0,
@ -10618,7 +10618,7 @@ static opj_bool opj_j2k_decode_one_tile ( opj_j2k_v2_t *p_j2k,
if (! j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) { if (! opj_j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) {
opj_free(l_current_data); opj_free(l_current_data);
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -10716,7 +10716,7 @@ opj_bool opj_j2k_decode(opj_j2k_v2_t * p_j2k,
* *
* @return true if succeed. * @return true if succeed.
*/ */
opj_bool j2k_get_tile( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_get_tile( opj_j2k_v2_t *p_j2k,
opj_stream_private_t *p_stream, opj_stream_private_t *p_stream,
opj_image_t* p_image, opj_image_t* p_image,
opj_event_mgr_t * p_manager, opj_event_mgr_t * p_manager,
@ -10810,7 +10810,9 @@ opj_bool j2k_get_tile( opj_j2k_v2_t *p_j2k,
return OPJ_TRUE; return OPJ_TRUE;
} }
opj_bool j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t * p_manager) opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k,
OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager)
{ {
OPJ_UINT32 it_comp; OPJ_UINT32 it_comp;
@ -10841,7 +10843,7 @@ opj_bool j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k, OPJ_UINT32 res_f
/** /**
* Encodes all the tiles in a row. * Encodes all the tiles in a row.
*/ */
opj_bool j2k_encode_v2( opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_encode_v2( opj_j2k_v2_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 )
{ {
@ -10892,9 +10894,9 @@ opj_bool j2k_encode_v2( opj_j2k_v2_t * p_j2k,
* Ends the compression procedures and possibility add data to be read after the * Ends the compression procedures and possibility add data to be read after the
* codestream. * codestream.
*/ */
opj_bool j2k_end_compress( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_end_compress( opj_j2k_v2_t *p_j2k,
opj_stream_private_t *p_stream, opj_stream_private_t *p_stream,
struct opj_event_mgr * p_manager) opj_event_mgr_t * p_manager)
{ {
/* customization of the encoding */ /* customization of the encoding */
j2k_setup_end_compress(p_j2k); j2k_setup_end_compress(p_j2k);
@ -10917,7 +10919,7 @@ opj_bool j2k_end_compress( opj_j2k_v2_t *p_j2k,
* *
* @return true if the codec is valid. * @return true if the codec is valid.
*/ */
opj_bool j2k_start_compress(opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_start_compress(opj_j2k_v2_t *p_j2k,
opj_stream_private_t *p_stream, opj_stream_private_t *p_stream,
opj_image_t * p_image, opj_image_t * p_image,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
@ -11633,7 +11635,7 @@ static opj_bool opj_j2k_create_tcd( opj_j2k_v2_t *p_j2k,
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
* @param p_manager the user event manager. * @param p_manager the user event manager.
*/ */
opj_bool j2k_write_tile (opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_write_tile (opj_j2k_v2_t * p_j2k,
OPJ_UINT32 p_tile_index, OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data, OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size, OPJ_UINT32 p_data_size,

View File

@ -812,7 +812,7 @@ Creates a J2K compression structure
@param cinfo Codec context info @param cinfo Codec context info
@return Returns a handle to a J2K compressor if successful, returns NULL otherwise @return Returns a handle to a J2K compressor if successful, returns NULL otherwise
*/ */
opj_j2k_v2_t* j2k_create_compress_v2(void); opj_j2k_v2_t* opj_j2k_create_compress_v2(void);
/** /**
Destroy a J2K compressor handle Destroy a J2K compressor handle
@ -828,7 +828,7 @@ Coding parameters are returned in j2k->cp.
*/ */
void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image); void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image);
void j2k_setup_encoder_v2( opj_j2k_v2_t *p_j2k, void opj_j2k_setup_encoder_v2( opj_j2k_v2_t *p_j2k,
opj_cparameters_t *parameters, opj_cparameters_t *parameters,
opj_image_t *image, opj_image_t *image,
struct opj_event_mgr * p_manager); struct opj_event_mgr * p_manager);
@ -856,7 +856,9 @@ opj_bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_code
* Ends the decompression procedures and possibiliy add data to be read after the * Ends the decompression procedures and possibiliy add data to be read after the
* codestream. * codestream.
*/ */
opj_bool j2k_end_decompress(opj_j2k_v2_t *j2k, struct opj_stream_private *cio, struct opj_event_mgr * p_manager); opj_bool opj_j2k_end_decompress(opj_j2k_v2_t *j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager);
/** /**
* Reads a jpeg2000 codestream header structure. * Reads a jpeg2000 codestream header structure.
@ -867,10 +869,10 @@ opj_bool j2k_end_decompress(opj_j2k_v2_t *j2k, struct opj_stream_private *cio, s
* *
* @return true if the box is valid. * @return true if the box is valid.
*/ */
opj_bool j2k_read_header( struct opj_stream_private *p_stream, opj_bool opj_j2k_read_header( opj_stream_private_t *p_stream,
opj_j2k_v2_t* p_j2k, opj_j2k_v2_t* p_j2k,
opj_image_t** p_image, opj_image_t** p_image,
struct opj_event_mgr* p_manager ); opj_event_mgr_t* p_manager );
/** /**
@ -878,7 +880,7 @@ opj_bool j2k_read_header( struct opj_stream_private *p_stream,
* *
* @param p_j2k the jpeg20000 structure to destroy. * @param p_j2k the jpeg20000 structure to destroy.
*/ */
void j2k_destroy (opj_j2k_v2_t *p_j2k); void opj_j2k_destroy (opj_j2k_v2_t *p_j2k);
/** /**
* Destroys a codestream index structure. * Destroys a codestream index structure.
@ -893,14 +895,12 @@ void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind);
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
* @param p_manager the user event manager. * @param p_manager the user event manager.
*/ */
opj_bool j2k_decode_tile ( opj_bool opj_j2k_decode_tile ( opj_j2k_v2_t * p_j2k,
opj_j2k_v2_t * p_j2k,
OPJ_UINT32 p_tile_index, OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data, OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size, OPJ_UINT32 p_data_size,
struct opj_stream_private *p_stream, opj_stream_private_t *p_stream,
struct opj_event_mgr * p_manager opj_event_mgr_t * p_manager );
);
/** /**
* Reads a tile header. * Reads a tile header.
@ -908,8 +908,7 @@ opj_bool j2k_decode_tile (
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
* @param p_manager the user event manager. * @param p_manager the user event manager.
*/ */
opj_bool j2k_read_tile_header ( opj_bool opj_j2k_read_tile_header ( opj_j2k_v2_t * p_j2k,
opj_j2k_v2_t * p_j2k,
OPJ_UINT32 * p_tile_index, OPJ_UINT32 * p_tile_index,
OPJ_UINT32 * p_data_size, OPJ_UINT32 * p_data_size,
OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_x0,
@ -918,9 +917,8 @@ opj_bool j2k_read_tile_header (
OPJ_INT32 * p_tile_y1, OPJ_INT32 * p_tile_y1,
OPJ_UINT32 * p_nb_comps, OPJ_UINT32 * p_nb_comps,
opj_bool * p_go_on, opj_bool * p_go_on,
struct opj_stream_private *p_stream, opj_stream_private_t *p_stream,
struct opj_event_mgr * p_manager opj_event_mgr_t * p_manager );
);
/** /**
@ -935,11 +933,11 @@ opj_bool j2k_read_tile_header (
* *
* @return true if the area could be set. * @return true if the area could be set.
*/ */
opj_bool j2k_set_decode_area( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_set_decode_area( opj_j2k_v2_t *p_j2k,
opj_image_t* p_image, opj_image_t* p_image,
OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
struct opj_event_mgr * p_manager ); opj_event_mgr_t * p_manager );
/** /**
* Creates a J2K decompression structure. * Creates a J2K decompression structure.
@ -1010,13 +1008,15 @@ opj_bool opj_j2k_decode(opj_j2k_v2_t *j2k,
opj_event_mgr_t *p_manager); opj_event_mgr_t *p_manager);
opj_bool j2k_get_tile( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_get_tile( opj_j2k_v2_t *p_j2k,
opj_stream_private_t *p_stream, opj_stream_private_t *p_stream,
opj_image_t* p_image, opj_image_t* p_image,
struct opj_event_mgr * p_manager, opj_event_mgr_t * p_manager,
OPJ_UINT32 tile_index ); OPJ_UINT32 tile_index );
opj_bool j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k, OPJ_UINT32 res_factor, opj_event_mgr_t * p_manager); opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k,
OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager);
/** /**
@ -1025,19 +1025,19 @@ opj_bool j2k_set_decoded_resolution_factor(opj_j2k_v2_t *p_j2k, OPJ_UINT32 res_f
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
* @param p_manager the user event manager. * @param p_manager the user event manager.
*/ */
opj_bool j2k_write_tile ( opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_write_tile ( opj_j2k_v2_t * p_j2k,
OPJ_UINT32 p_tile_index, OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data, OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size, OPJ_UINT32 p_data_size,
struct opj_stream_private *p_stream, opj_stream_private_t *p_stream,
struct opj_event_mgr * p_manager ); opj_event_mgr_t * p_manager );
/** /**
* Encodes an image into a JPEG-2000 codestream * Encodes an image into a JPEG-2000 codestream
*/ */
opj_bool j2k_encode_v2( opj_j2k_v2_t * p_j2k, opj_bool opj_j2k_encode_v2( opj_j2k_v2_t * p_j2k,
opj_stream_private_t *cio, opj_stream_private_t *cio,
struct opj_event_mgr * p_manager ); opj_event_mgr_t * p_manager );
/** /**
* Starts a compression scheme, i.e. validates the codec parameters, writes the header. * Starts a compression scheme, i.e. validates the codec parameters, writes the header.
@ -1048,20 +1048,20 @@ opj_bool j2k_encode_v2( opj_j2k_v2_t * p_j2k,
* *
* @return true if the codec is valid. * @return true if the codec is valid.
*/ */
opj_bool j2k_start_compress(opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_start_compress(opj_j2k_v2_t *p_j2k,
struct opj_stream_private *cio, opj_stream_private_t *p_stream,
struct opj_image * p_image, opj_image_t * p_image,
struct opj_event_mgr * p_manager ); opj_event_mgr_t * p_manager);
/** /**
* Ends the compression procedures and possibiliy add data to be read after the * Ends the compression procedures and possibiliy add data to be read after the
* codestream. * codestream.
*/ */
opj_bool j2k_end_compress( opj_j2k_v2_t *p_j2k, opj_bool opj_j2k_end_compress( opj_j2k_v2_t *p_j2k,
opj_stream_private_t *cio, opj_stream_private_t *cio,
struct opj_event_mgr * p_manager); opj_event_mgr_t * p_manager);
opj_bool j2k_setup_mct_encoding (opj_tcp_v2_t * p_tcp, opj_image_t * p_image); opj_bool opj_j2k_setup_mct_encoding (opj_tcp_v2_t * p_tcp, opj_image_t * p_image);
#endif /* __J2K_H */ #endif /* __J2K_H */

View File

@ -1517,7 +1517,7 @@ void opj_jp2_setup_encoder( opj_jp2_v2_t *jp2,
return; return;
} }
j2k_setup_encoder_v2(jp2->j2k, parameters, image, p_manager ); opj_j2k_setup_encoder_v2(jp2->j2k, parameters, image, p_manager );
/* setup the JP2 codec */ /* setup the JP2 codec */
/* ------------------- */ /* ------------------- */
@ -1582,7 +1582,7 @@ opj_bool opj_jp2_encode(opj_jp2_v2_t *jp2,
opj_stream_private_t *stream, opj_stream_private_t *stream,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
{ {
return j2k_encode_v2(jp2->j2k, stream, p_manager); return opj_j2k_encode_v2(jp2->j2k, stream, p_manager);
} }
@ -1608,7 +1608,7 @@ opj_bool opj_jp2_end_decompress(opj_jp2_v2_t *jp2,
return OPJ_FALSE; return OPJ_FALSE;
} }
return j2k_end_decompress(jp2->j2k, cio, p_manager); return opj_j2k_end_decompress(jp2->j2k, cio, p_manager);
} }
/** /**
@ -1628,7 +1628,7 @@ opj_bool opj_jp2_end_compress( opj_jp2_v2_t *jp2,
/* customization of the end encoding */ /* customization of the end encoding */
opj_jp2_setup_end_header_writting(jp2); opj_jp2_setup_end_header_writting(jp2);
if (! j2k_end_compress(jp2->j2k,cio,p_manager)) { if (! opj_j2k_end_compress(jp2->j2k,cio,p_manager)) {
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -1894,7 +1894,7 @@ opj_bool opj_jp2_start_compress(opj_jp2_v2_t *jp2,
return OPJ_FALSE; return OPJ_FALSE;
} }
return j2k_start_compress(jp2->j2k,stream,p_image,p_manager); return opj_j2k_start_compress(jp2->j2k,stream,p_image,p_manager);
} }
/** /**
@ -2264,7 +2264,7 @@ opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
return OPJ_FALSE; return OPJ_FALSE;
} }
return j2k_read_header( p_stream, return opj_j2k_read_header( p_stream,
jp2->j2k, jp2->j2k,
p_image, p_image,
p_manager); p_manager);
@ -2345,7 +2345,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_v2_t * p_jp2,
opj_event_mgr_t * p_manager opj_event_mgr_t * p_manager
) )
{ {
return j2k_read_tile_header(p_jp2->j2k, return opj_j2k_read_tile_header(p_jp2->j2k,
p_tile_index, p_tile_index,
p_data_size, p_data_size,
p_tile_x0, p_tile_y0, p_tile_x0, p_tile_y0,
@ -2371,7 +2371,7 @@ opj_bool opj_jp2_write_tile ( opj_jp2_v2_t *p_jp2,
) )
{ {
return j2k_write_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager); return opj_j2k_write_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager);
} }
/** /**
@ -2388,7 +2388,7 @@ opj_bool opj_jp2_decode_tile ( opj_jp2_v2_t * p_jp2,
opj_event_mgr_t * p_manager opj_event_mgr_t * p_manager
) )
{ {
return j2k_decode_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager); return opj_j2k_decode_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager);
} }
/** /**
@ -2400,7 +2400,7 @@ void opj_jp2_destroy(opj_jp2_v2_t *jp2)
{ {
if (jp2) { if (jp2) {
/* destroy the J2K codec */ /* destroy the J2K codec */
j2k_destroy(jp2->j2k); opj_j2k_destroy(jp2->j2k);
jp2->j2k = 00; jp2->j2k = 00;
if (jp2->comps) { if (jp2->comps) {
@ -2482,7 +2482,7 @@ opj_bool opj_jp2_set_decode_area( opj_jp2_v2_t *p_jp2,
opj_event_mgr_t * p_manager opj_event_mgr_t * p_manager
) )
{ {
return j2k_set_decode_area(p_jp2->j2k, p_image, p_start_x, p_start_y, p_end_x, p_end_y, p_manager); return opj_j2k_set_decode_area(p_jp2->j2k, p_image, p_start_x, p_start_y, p_end_x, p_end_y, p_manager);
} }
/** /**
@ -2508,7 +2508,7 @@ opj_bool opj_jp2_get_tile( opj_jp2_v2_t *p_jp2,
opj_event_msg_v2(p_manager, EVT_WARNING, "JP2 box which are after the codestream will not be read by this function.\n"); opj_event_msg_v2(p_manager, EVT_WARNING, "JP2 box which are after the codestream will not be read by this function.\n");
if (! j2k_get_tile(p_jp2->j2k, p_stream, p_image, p_manager, tile_index) ){ if (! opj_j2k_get_tile(p_jp2->j2k, p_stream, p_image, p_manager, tile_index) ){
opj_event_msg_v2(p_manager, EVT_ERROR, "Failed to decode the codestream in the JP2 file\n"); opj_event_msg_v2(p_manager, EVT_ERROR, "Failed to decode the codestream in the JP2 file\n");
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -2559,7 +2559,7 @@ opj_jp2_v2_t* opj_jp2_create(opj_bool p_is_decoder)
/* create the J2K codec */ /* create the J2K codec */
if (! p_is_decoder) { if (! p_is_decoder) {
jp2->j2k = j2k_create_compress_v2(); jp2->j2k = opj_j2k_create_compress_v2();
} }
else { else {
jp2->j2k = opj_j2k_create_decompress(); jp2->j2k = opj_j2k_create_decompress();
@ -2619,6 +2619,6 @@ opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_v2_t *p_jp2,
OPJ_UINT32 res_factor, OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager) opj_event_mgr_t * p_manager)
{ {
return j2k_set_decoded_resolution_factor(p_jp2->j2k, res_factor, p_manager); return opj_j2k_set_decoded_resolution_factor(p_jp2->j2k, res_factor, p_manager);
} }

View File

@ -87,7 +87,9 @@ typedef struct opj_decompression
OPJ_UINT32 tile_index); OPJ_UINT32 tile_index);
/** Set the decoded resolution factor */ /** Set the decoded resolution factor */
opj_bool (*opj_set_decoded_resolution_factor) (void * p_codec, OPJ_UINT32 res_factor, struct opj_event_mgr * p_manager); opj_bool (*opj_set_decoded_resolution_factor) ( void * p_codec,
OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager);
}opj_decompression_t; }opj_decompression_t;
@ -301,16 +303,16 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
l_codec->m_codec_data.m_decompression.opj_end_decompress = l_codec->m_codec_data.m_decompression.opj_end_decompress =
(opj_bool (*) ( void *, (opj_bool (*) ( void *,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr *)) j2k_end_decompress; struct opj_event_mgr *)) opj_j2k_end_decompress;
l_codec->m_codec_data.m_decompression.opj_read_header = l_codec->m_codec_data.m_decompression.opj_read_header =
(opj_bool (*) ( struct opj_stream_private *, (opj_bool (*) ( struct opj_stream_private *,
void *, void *,
opj_image_t **, opj_image_t **,
struct opj_event_mgr * )) j2k_read_header; struct opj_event_mgr * )) opj_j2k_read_header;
l_codec->m_codec_data.m_decompression.opj_destroy = l_codec->m_codec_data.m_decompression.opj_destroy =
(void (*) (void *))j2k_destroy; (void (*) (void *))opj_j2k_destroy;
l_codec->m_codec_data.m_decompression.opj_setup_decoder = l_codec->m_codec_data.m_decompression.opj_setup_decoder =
(void (*) (void * , opj_dparameters_t * )) opj_j2k_setup_decoder; (void (*) (void * , opj_dparameters_t * )) opj_j2k_setup_decoder;
@ -324,23 +326,33 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
OPJ_UINT32*, OPJ_UINT32*,
opj_bool*, opj_bool*,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr * )) j2k_read_tile_header; struct opj_event_mgr * )) opj_j2k_read_tile_header;
l_codec->m_codec_data.m_decompression.opj_decode_tile_data = l_codec->m_codec_data.m_decompression.opj_decode_tile_data =
(opj_bool (*) (void *, OPJ_UINT32, OPJ_BYTE*, OPJ_UINT32, struct opj_stream_private *, struct opj_event_mgr *)) j2k_decode_tile; (opj_bool (*) ( void *,
OPJ_UINT32,
OPJ_BYTE*,
OPJ_UINT32,
struct opj_stream_private *,
struct opj_event_mgr *)) opj_j2k_decode_tile;
l_codec->m_codec_data.m_decompression.opj_set_decode_area = l_codec->m_codec_data.m_decompression.opj_set_decode_area =
(opj_bool (*) (void *, opj_image_t*, OPJ_INT32, OPJ_INT32, OPJ_INT32, OPJ_INT32, struct opj_event_mgr *)) j2k_set_decode_area; (opj_bool (*) ( void *,
opj_image_t*,
OPJ_INT32, OPJ_INT32, OPJ_INT32, OPJ_INT32,
struct opj_event_mgr *)) opj_j2k_set_decode_area;
l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = (opj_bool (*) (void *p_codec, l_codec->m_codec_data.m_decompression.opj_get_decoded_tile =
(opj_bool (*) ( void *p_codec,
opj_stream_private_t *p_cio, opj_stream_private_t *p_cio,
opj_image_t *p_image, opj_image_t *p_image,
struct opj_event_mgr * p_manager, struct opj_event_mgr * p_manager,
OPJ_UINT32 tile_index)) j2k_get_tile; OPJ_UINT32 tile_index)) opj_j2k_get_tile;
l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = (opj_bool (*) (void * p_codec, l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor =
(opj_bool (*) ( void * p_codec,
OPJ_UINT32 res_factor, OPJ_UINT32 res_factor,
struct opj_event_mgr * p_manager)) j2k_set_decoded_resolution_factor; struct opj_event_mgr * p_manager)) opj_j2k_set_decoded_resolution_factor;
l_codec->m_codec = opj_j2k_create_decompress(); l_codec->m_codec = opj_j2k_create_decompress();
@ -365,16 +377,19 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
opj_image_t*, opj_image_t*,
struct opj_event_mgr * )) opj_jp2_decode; struct opj_event_mgr * )) opj_jp2_decode;
l_codec->m_codec_data.m_decompression.opj_end_decompress = (opj_bool (*) (void *,struct opj_stream_private *,struct opj_event_mgr *)) opj_jp2_end_decompress; l_codec->m_codec_data.m_decompression.opj_end_decompress =
(opj_bool (*) ( void *,
l_codec->m_codec_data.m_decompression.opj_read_header = (opj_bool (*) (
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr *)) opj_jp2_end_decompress;
l_codec->m_codec_data.m_decompression.opj_read_header =
(opj_bool (*) ( struct opj_stream_private *,
void *, void *,
opj_image_t **, opj_image_t **,
struct opj_event_mgr * )) opj_jp2_read_header; struct opj_event_mgr * )) opj_jp2_read_header;
l_codec->m_codec_data.m_decompression.opj_read_tile_header = ( opj_bool (*) ( l_codec->m_codec_data.m_decompression.opj_read_tile_header =
void *, (opj_bool (*) ( void *,
OPJ_UINT32*, OPJ_UINT32*,
OPJ_UINT32*, OPJ_UINT32*,
OPJ_INT32*, OPJ_INT32*,
@ -386,21 +401,32 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr * )) opj_jp2_read_tile_header; struct opj_event_mgr * )) opj_jp2_read_tile_header;
l_codec->m_codec_data.m_decompression.opj_decode_tile_data = (opj_bool (*) (void *,OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,struct opj_stream_private *, struct opj_event_mgr * )) opj_jp2_decode_tile; l_codec->m_codec_data.m_decompression.opj_decode_tile_data =
(opj_bool (*) ( void *,
OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,
struct opj_stream_private *,
struct opj_event_mgr * )) opj_jp2_decode_tile;
l_codec->m_codec_data.m_decompression.opj_destroy = (void (*) (void *))opj_jp2_destroy; l_codec->m_codec_data.m_decompression.opj_destroy = (void (*) (void *))opj_jp2_destroy;
l_codec->m_codec_data.m_decompression.opj_setup_decoder = (void (*) (void * ,opj_dparameters_t * )) opj_jp2_setup_decoder; l_codec->m_codec_data.m_decompression.opj_setup_decoder =
(void (*) (void * ,opj_dparameters_t * )) opj_jp2_setup_decoder;
l_codec->m_codec_data.m_decompression.opj_set_decode_area = (opj_bool (*) (void *,opj_image_t*, OPJ_INT32,OPJ_INT32,OPJ_INT32,OPJ_INT32, struct opj_event_mgr * )) opj_jp2_set_decode_area; l_codec->m_codec_data.m_decompression.opj_set_decode_area =
(opj_bool (*) ( void *,
opj_image_t*,
OPJ_INT32,OPJ_INT32,OPJ_INT32,OPJ_INT32,
struct opj_event_mgr * )) opj_jp2_set_decode_area;
l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = (opj_bool (*) (void *p_codec, l_codec->m_codec_data.m_decompression.opj_get_decoded_tile =
(opj_bool (*) ( void *p_codec,
opj_stream_private_t *p_cio, opj_stream_private_t *p_cio,
opj_image_t *p_image, opj_image_t *p_image,
struct opj_event_mgr * p_manager, struct opj_event_mgr * p_manager,
OPJ_UINT32 tile_index)) opj_jp2_get_tile; OPJ_UINT32 tile_index)) opj_jp2_get_tile;
l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = (opj_bool (*) (void * p_codec, l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor =
(opj_bool (*) ( void * p_codec,
OPJ_UINT32 res_factor, OPJ_UINT32 res_factor,
opj_event_mgr_t * p_manager)) opj_jp2_set_decoded_resolution_factor; opj_event_mgr_t * p_manager)) opj_jp2_set_decoded_resolution_factor;
@ -452,7 +478,8 @@ opj_bool OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
if (! l_codec->is_decompressor) { if (! l_codec->is_decompressor) {
opj_event_msg_v2(&(l_codec->m_event_mgr), EVT_ERROR, "Codec provided to the opj_setup_decoder function is not a decompressor handler.\n"); opj_event_msg_v2(&(l_codec->m_event_mgr), EVT_ERROR,
"Codec provided to the opj_setup_decoder function is not a decompressor handler.\n");
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -472,7 +499,8 @@ opj_bool OPJ_CALLCONV opj_read_header ( opj_stream_t *p_stream,
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream; opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
if(! l_codec->is_decompressor) { if(! l_codec->is_decompressor) {
opj_event_msg_v2(&(l_codec->m_event_mgr), EVT_ERROR, "Codec provided to the opj_read_header function is not a decompressor handler.\n"); opj_event_msg_v2(&(l_codec->m_event_mgr), EVT_ERROR,
"Codec provided to the opj_read_header function is not a decompressor handler.\n");
return OPJ_FALSE; return OPJ_FALSE;
} }
@ -551,8 +579,8 @@ opj_bool OPJ_CALLCONV opj_set_decode_area( opj_codec_t *p_codec,
* @param p_codec the jpeg2000 codec. * @param p_codec the jpeg2000 codec.
* @param p_tile_index pointer to a value that will hold the index of the tile being decoded, in case of success. * @param p_tile_index pointer to a value that will hold the index of the tile being decoded, in case of success.
* @param p_data_size pointer to a value that will hold the maximum size of the decoded data, in case of success. In case * @param p_data_size pointer to a value that will hold the maximum size of the decoded data, in case of success. In case
* of truncated codestreams, the actual number of bytes decoded may be lower. The computation of the size is the same * of truncated codestreams, the actual number of bytes decoded may be lower.
* as depicted in opj_write_tile. * The computation of the size is the same as depicted in opj_write_tile.
* @param p_tile_x0 pointer to a value that will hold the x0 pos of the tile (in the image). * @param p_tile_x0 pointer to a value that will hold the x0 pos of the tile (in the image).
* @param p_tile_y0 pointer to a value that will hold the y0 pos of the tile (in the image). * @param p_tile_y0 pointer to a value that will hold the y0 pos of the tile (in the image).
* @param p_tile_x1 pointer to a value that will hold the x1 pos of the tile (in the image). * @param p_tile_x1 pointer to a value that will hold the x1 pos of the tile (in the image).
@ -698,32 +726,32 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
case CODEC_J2K: case CODEC_J2K:
l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *, l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr * )) j2k_encode_v2; struct opj_event_mgr * )) opj_j2k_encode_v2;
l_codec->m_codec_data.m_compression.opj_end_compress = (opj_bool (*) ( void *, l_codec->m_codec_data.m_compression.opj_end_compress = (opj_bool (*) ( void *,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr *)) j2k_end_compress; struct opj_event_mgr *)) opj_j2k_end_compress;
l_codec->m_codec_data.m_compression.opj_start_compress = (opj_bool (*) (void *, l_codec->m_codec_data.m_compression.opj_start_compress = (opj_bool (*) (void *,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_image * , struct opj_image * ,
struct opj_event_mgr *)) j2k_start_compress; struct opj_event_mgr *)) opj_j2k_start_compress;
l_codec->m_codec_data.m_compression.opj_write_tile = (opj_bool (*) (void *, l_codec->m_codec_data.m_compression.opj_write_tile = (opj_bool (*) (void *,
OPJ_UINT32, OPJ_UINT32,
OPJ_BYTE*, OPJ_BYTE*,
OPJ_UINT32, OPJ_UINT32,
struct opj_stream_private *, struct opj_stream_private *,
struct opj_event_mgr *) ) j2k_write_tile; struct opj_event_mgr *) ) opj_j2k_write_tile;
l_codec->m_codec_data.m_compression.opj_destroy = (void (*) (void *)) j2k_destroy; l_codec->m_codec_data.m_compression.opj_destroy = (void (*) (void *)) opj_j2k_destroy;
l_codec->m_codec_data.m_compression.opj_setup_encoder = (void (*) ( void *, l_codec->m_codec_data.m_compression.opj_setup_encoder = (void (*) ( void *,
opj_cparameters_t *, opj_cparameters_t *,
struct opj_image *, struct opj_image *,
struct opj_event_mgr * )) j2k_setup_encoder_v2; struct opj_event_mgr * )) opj_j2k_setup_encoder_v2;
l_codec->m_codec = j2k_create_compress_v2(); l_codec->m_codec = opj_j2k_create_compress_v2();
if (! l_codec->m_codec) { if (! l_codec->m_codec) {
opj_free(l_codec); opj_free(l_codec);
return 00; return 00;
@ -934,7 +962,9 @@ opj_bool OPJ_CALLCONV opj_end_decompress ( opj_codec_t *p_codec,
} }
opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,OPJ_FLOAT32 * pEncodingMatrix,OPJ_INT32 * p_dc_shift,OPJ_UINT32 pNbComp) opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
OPJ_FLOAT32 * pEncodingMatrix,
OPJ_INT32 * p_dc_shift,OPJ_UINT32 pNbComp)
{ {
OPJ_UINT32 l_matrix_size = pNbComp * pNbComp * sizeof(OPJ_FLOAT32); OPJ_UINT32 l_matrix_size = pNbComp * pNbComp * sizeof(OPJ_FLOAT32);
OPJ_UINT32 l_dc_shift_size = pNbComp * sizeof(OPJ_INT32); OPJ_UINT32 l_dc_shift_size = pNbComp * sizeof(OPJ_INT32);
@ -963,9 +993,11 @@ opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,OPJ_FLOAT32 * pE
* *
* @param p_compressor the jpeg2000 codec. * @param p_compressor the jpeg2000 codec.
* @param p_tile_index the index of the tile to write. At the moment, the tiles must be written from 0 to n-1 in sequence. * @param p_tile_index the index of the tile to write. At the moment, the tiles must be written from 0 to n-1 in sequence.
* @param p_data pointer to the data to write. Data is arranged in sequence, data_comp0, then data_comp1, then ... NO INTERLEAVING should be set. * @param p_data pointer to the data to write. Data is arranged in sequence, data_comp0, then data_comp1,
* @param p_data_size this value os used to make sure the data being written is correct. The size must be equal to the sum for each component of tile_width * tile_height * component_size. component_size can be 1,2 or 4 bytes, * then ... NO INTERLEAVING should be set.
* depending on the precision of the given component. * @param p_data_size this value os used to make sure the data being written is correct. The size must be
* equal to the sum for each component of tile_width * tile_height * component_size.
* component_size can be 1,2 or 4 bytes, depending on the precision of the given component.
* @param p_stream the stream to write data to. * @param p_stream the stream to write data to.
*/ */
opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec, opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,