[trunk] rename opj_jp2_v2 to opj_jp2
This commit is contained in:
parent
56cf5f4f67
commit
2257166e61
|
@ -51,7 +51,7 @@
|
||||||
*
|
*
|
||||||
* @return true if the image header is valid, false else.
|
* @return true if the image header is valid, false else.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_ihdr( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_ihdr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_image_header_data,
|
OPJ_BYTE *p_image_header_data,
|
||||||
OPJ_UINT32 p_image_header_size,
|
OPJ_UINT32 p_image_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -64,7 +64,7 @@ static opj_bool opj_jp2_read_ihdr( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return the data being copied.
|
* @return the data being copied.
|
||||||
*/
|
*/
|
||||||
static OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_v2_t *jp2,
|
static OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written );
|
OPJ_UINT32 * p_nb_bytes_written );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,7 +75,7 @@ static OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return the data being copied.
|
* @return the data being copied.
|
||||||
*/
|
*/
|
||||||
static OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_v2_t *jp2,
|
static OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written );
|
OPJ_UINT32 * p_nb_bytes_written );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,12 +88,12 @@ static OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the bpc header is valid, fale else.
|
* @return true if the bpc header is valid, fale else.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_bpcc( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_bpcc( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_bpc_header_data,
|
OPJ_BYTE * p_bpc_header_data,
|
||||||
OPJ_UINT32 p_bpc_header_size,
|
OPJ_UINT32 p_bpc_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
static opj_bool opj_jp2_read_cdef( opj_jp2_v2_t * jp2,
|
static opj_bool opj_jp2_read_cdef( opj_jp2_t * jp2,
|
||||||
OPJ_BYTE * p_cdef_header_data,
|
OPJ_BYTE * p_cdef_header_data,
|
||||||
OPJ_UINT32 p_cdef_header_size,
|
OPJ_UINT32 p_cdef_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -108,7 +108,7 @@ static void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color);
|
||||||
*
|
*
|
||||||
* @return the data being copied.
|
* @return the data being copied.
|
||||||
*/
|
*/
|
||||||
static OPJ_BYTE * opj_jp2_write_colr( opj_jp2_v2_t *jp2,
|
static OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written );
|
OPJ_UINT32 * p_nb_bytes_written );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -120,7 +120,7 @@ static OPJ_BYTE * opj_jp2_write_colr( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if writing was successful.
|
* @return true if writing was successful.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_write_ftyp( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_write_ftyp( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -134,12 +134,12 @@ static opj_bool opj_jp2_write_ftyp( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the FTYP box is valid.
|
* @return true if the FTYP box is valid.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_ftyp( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_ftyp( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_header_data,
|
OPJ_BYTE * p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
opj_bool opj_jp2_skip_jp2c( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_skip_jp2c( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ opj_bool opj_jp2_skip_jp2c( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the JP2 Header box was successfully reconized.
|
* @return true if the JP2 Header box was successfully reconized.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_jp2h( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_header_data,
|
OPJ_BYTE *p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -167,7 +167,7 @@ static opj_bool opj_jp2_read_jp2h( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if writing was successful.
|
* @return true if writing was successful.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_write_jp2c( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_write_jp2c( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ static opj_bool opj_jp2_write_jp2c( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the file signature box is valid.
|
* @return true if the file signature box is valid.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_jp(opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_header_data,
|
OPJ_BYTE * p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -195,7 +195,7 @@ static opj_bool opj_jp2_read_jp(opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if writing was successful.
|
* @return true if writing was successful.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_write_jp( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_write_jp( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ static void opj_jp2_free_pclr(opj_jp2_color_t *color);
|
||||||
*
|
*
|
||||||
* @return Returns true if successful, returns false otherwise
|
* @return Returns true if successful, returns false otherwise
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_pclr( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_pclr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_pclr_header_data,
|
OPJ_BYTE * p_pclr_header_data,
|
||||||
OPJ_UINT32 p_pclr_header_size,
|
OPJ_UINT32 p_pclr_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -234,7 +234,7 @@ static opj_bool opj_jp2_read_pclr( opj_jp2_v2_t *jp2,
|
||||||
* @return Returns true if successful, returns false otherwise
|
* @return Returns true if successful, returns false otherwise
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static opj_bool opj_jp2_read_cmap( opj_jp2_v2_t * jp2,
|
static opj_bool opj_jp2_read_cmap( opj_jp2_t * jp2,
|
||||||
OPJ_BYTE * p_cmap_header_data,
|
OPJ_BYTE * p_cmap_header_data,
|
||||||
OPJ_UINT32 p_cmap_header_size,
|
OPJ_UINT32 p_cmap_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -249,7 +249,7 @@ static opj_bool opj_jp2_read_cmap( opj_jp2_v2_t * jp2,
|
||||||
*
|
*
|
||||||
* @return true if the bpc header is valid, fale else.
|
* @return true if the bpc header is valid, fale else.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_colr( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_colr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_colr_header_data,
|
OPJ_BYTE * p_colr_header_data,
|
||||||
OPJ_UINT32 p_colr_header_size,
|
OPJ_UINT32 p_colr_header_size,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -262,13 +262,13 @@ static opj_bool opj_jp2_read_colr( opj_jp2_v2_t *jp2,
|
||||||
* Sets up the procedures to do on writing header after the codestream.
|
* Sets up the procedures to do on writing header after the codestream.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developpers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_end_header_writing (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on reading header after the codestream.
|
* Sets up the procedures to do on reading header after the codestream.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developpers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_end_header_reading (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads a jpeg2000 file header structure.
|
* Reads a jpeg2000 file header structure.
|
||||||
|
@ -279,7 +279,7 @@ static void opj_jp2_setup_end_header_reading (opj_jp2_v2_t *jp2);
|
||||||
*
|
*
|
||||||
* @return true if the box is valid.
|
* @return true if the box is valid.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_header_procedure( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_header_procedure( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ static opj_bool opj_jp2_read_header_procedure( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if all the procedures were successfully executed.
|
* @return true if all the procedures were successfully executed.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_exec ( opj_jp2_v2_t * jp2,
|
static opj_bool opj_jp2_exec ( opj_jp2_t * jp2,
|
||||||
opj_procedure_list_t * p_procedure_list,
|
opj_procedure_list_t * p_procedure_list,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
@ -317,14 +317,14 @@ static opj_bool opj_jp2_read_boxhdr(opj_jp2_box_t *box,
|
||||||
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_encoding_validation (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on writing header. Developpers wanting to extend the library can add their own writing procedures.
|
* Sets up the procedures to do on writing header. Developpers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_header_writing (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_header_writing (opj_jp2_t *jp2);
|
||||||
|
|
||||||
opj_bool opj_jp2_default_validation ( opj_jp2_v2_t * jp2,
|
opj_bool opj_jp2_default_validation ( opj_jp2_t * jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -385,13 +385,13 @@ static opj_bool opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
|
||||||
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_decoding_validation (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on reading header.
|
* Sets up the procedures to do on reading header.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developpers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static void opj_jp2_setup_header_reading (opj_jp2_v2_t *jp2);
|
static void opj_jp2_setup_header_reading (opj_jp2_t *jp2);
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ static void jp2_write_url(opj_cio_t *cio, char *Idx_file) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
opj_bool opj_jp2_read_ihdr( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_read_ihdr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_image_header_data,
|
OPJ_BYTE *p_image_header_data,
|
||||||
OPJ_UINT32 p_image_header_size,
|
OPJ_UINT32 p_image_header_size,
|
||||||
opj_event_mgr_t * p_manager )
|
opj_event_mgr_t * p_manager )
|
||||||
|
@ -516,7 +516,7 @@ opj_bool opj_jp2_read_ihdr( opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_v2_t *jp2,
|
OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written
|
OPJ_UINT32 * p_nb_bytes_written
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -567,7 +567,7 @@ OPJ_BYTE * opj_jp2_write_ihdr(opj_jp2_v2_t *jp2,
|
||||||
return l_ihdr_data;
|
return l_ihdr_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_v2_t *jp2,
|
OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written
|
OPJ_UINT32 * p_nb_bytes_written
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -604,7 +604,7 @@ OPJ_BYTE * opj_jp2_write_bpcc( opj_jp2_v2_t *jp2,
|
||||||
return l_bpcc_data;
|
return l_bpcc_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_bpcc( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_read_bpcc( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_bpc_header_data,
|
OPJ_BYTE * p_bpc_header_data,
|
||||||
OPJ_UINT32 p_bpc_header_size,
|
OPJ_UINT32 p_bpc_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -637,7 +637,7 @@ opj_bool opj_jp2_read_bpcc( opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
OPJ_BYTE * opj_jp2_write_colr( opj_jp2_v2_t *jp2,
|
OPJ_BYTE * opj_jp2_write_colr( opj_jp2_t *jp2,
|
||||||
OPJ_UINT32 * p_nb_bytes_written
|
OPJ_UINT32 * p_nb_bytes_written
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -779,7 +779,7 @@ void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color)
|
||||||
|
|
||||||
}/* apply_pclr() */
|
}/* apply_pclr() */
|
||||||
|
|
||||||
opj_bool opj_jp2_read_pclr( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_read_pclr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_pclr_header_data,
|
OPJ_BYTE * p_pclr_header_data,
|
||||||
OPJ_UINT32 p_pclr_header_size,
|
OPJ_UINT32 p_pclr_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -845,7 +845,7 @@ opj_bool opj_jp2_read_pclr( opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_cmap( opj_jp2_v2_t * jp2,
|
opj_bool opj_jp2_read_cmap( opj_jp2_t * jp2,
|
||||||
OPJ_BYTE * p_cmap_header_data,
|
OPJ_BYTE * p_cmap_header_data,
|
||||||
OPJ_UINT32 p_cmap_header_size,
|
OPJ_UINT32 p_cmap_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -933,7 +933,7 @@ void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color)
|
||||||
|
|
||||||
}/* jp2_apply_cdef() */
|
}/* jp2_apply_cdef() */
|
||||||
|
|
||||||
opj_bool opj_jp2_read_cdef( opj_jp2_v2_t * jp2,
|
opj_bool opj_jp2_read_cdef( opj_jp2_t * jp2,
|
||||||
OPJ_BYTE * p_cdef_header_data,
|
OPJ_BYTE * p_cdef_header_data,
|
||||||
OPJ_UINT32 p_cdef_header_size,
|
OPJ_UINT32 p_cdef_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -984,7 +984,7 @@ opj_bool opj_jp2_read_cdef( opj_jp2_v2_t * jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_colr( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_read_colr( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_colr_header_data,
|
OPJ_BYTE * p_colr_header_data,
|
||||||
OPJ_UINT32 p_colr_header_size,
|
OPJ_UINT32 p_colr_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -1054,7 +1054,7 @@ opj_bool opj_jp2_read_colr( opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_decode(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_decode(opj_jp2_t *jp2,
|
||||||
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)
|
||||||
|
@ -1103,7 +1103,7 @@ opj_bool opj_jp2_decode(opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_write_jp2h(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -1201,7 +1201,7 @@ opj_bool opj_jp2_write_jp2h(opj_jp2_v2_t *jp2,
|
||||||
return l_result;
|
return l_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_write_ftyp(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_write_ftyp(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager )
|
opj_event_mgr_t * p_manager )
|
||||||
{
|
{
|
||||||
|
@ -1253,7 +1253,7 @@ opj_bool opj_jp2_write_ftyp(opj_jp2_v2_t *jp2,
|
||||||
return l_result;
|
return l_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_write_jp2c(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_write_jp2c(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager )
|
opj_event_mgr_t * p_manager )
|
||||||
{
|
{
|
||||||
|
@ -1290,7 +1290,7 @@ opj_bool opj_jp2_write_jp2c(opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_write_jp( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_write_jp( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager )
|
opj_event_mgr_t * p_manager )
|
||||||
{
|
{
|
||||||
|
@ -1320,7 +1320,7 @@ opj_bool opj_jp2_write_jp( opj_jp2_v2_t *jp2,
|
||||||
/* JP2 decoder interface */
|
/* JP2 decoder interface */
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
void opj_jp2_setup_decoder(opj_jp2_v2_t *jp2, opj_dparameters_t *parameters)
|
void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
|
||||||
{
|
{
|
||||||
/* setup the J2K codec */
|
/* setup the J2K codec */
|
||||||
opj_j2k_setup_decoder(jp2->j2k, parameters);
|
opj_j2k_setup_decoder(jp2->j2k, parameters);
|
||||||
|
@ -1334,7 +1334,7 @@ void opj_jp2_setup_decoder(opj_jp2_v2_t *jp2, opj_dparameters_t *parameters)
|
||||||
/* JP2 encoder interface */
|
/* JP2 encoder interface */
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
void opj_jp2_setup_encoder( opj_jp2_v2_t *jp2,
|
void opj_jp2_setup_encoder( opj_jp2_t *jp2,
|
||||||
opj_cparameters_t *parameters,
|
opj_cparameters_t *parameters,
|
||||||
opj_image_t *image,
|
opj_image_t *image,
|
||||||
opj_event_mgr_t * p_manager)
|
opj_event_mgr_t * p_manager)
|
||||||
|
@ -1412,14 +1412,14 @@ void opj_jp2_setup_encoder( opj_jp2_v2_t *jp2,
|
||||||
jp2->approx = 0; /* APPROX */
|
jp2->approx = 0; /* APPROX */
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_encode(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_encode(opj_jp2_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 opj_j2k_encode_v2(jp2->j2k, stream, p_manager);
|
return opj_j2k_encode_v2(jp2->j2k, stream, p_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_end_decompress(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -1440,7 +1440,7 @@ opj_bool opj_jp2_end_decompress(opj_jp2_v2_t *jp2,
|
||||||
return opj_j2k_end_decompress(jp2->j2k, cio, p_manager);
|
return opj_j2k_end_decompress(jp2->j2k, cio, p_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_end_compress( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_end_compress( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -1461,7 +1461,7 @@ opj_bool opj_jp2_end_compress( opj_jp2_v2_t *jp2,
|
||||||
return opj_jp2_exec(jp2,jp2->m_procedure_list,cio,p_manager);
|
return opj_jp2_exec(jp2,jp2->m_procedure_list,cio,p_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_end_header_writing (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_end_header_writing (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
|
@ -1470,7 +1470,7 @@ void opj_jp2_setup_end_header_writing (opj_jp2_v2_t *jp2)
|
||||||
/* DEVELOPER CORNER, add your custom procedures */
|
/* DEVELOPER CORNER, add your custom procedures */
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_end_header_reading (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
|
@ -1478,7 +1478,7 @@ void opj_jp2_setup_end_header_reading (opj_jp2_v2_t *jp2)
|
||||||
/* DEVELOPER CORNER, add your custom procedures */
|
/* DEVELOPER CORNER, add your custom procedures */
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_default_validation ( opj_jp2_v2_t * jp2,
|
opj_bool opj_jp2_default_validation ( opj_jp2_t * jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -1532,7 +1532,7 @@ opj_bool opj_jp2_default_validation ( opj_jp2_v2_t * jp2,
|
||||||
return l_is_valid;
|
return l_is_valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_header_procedure( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_read_header_procedure( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -1629,14 +1629,14 @@ opj_bool opj_jp2_read_header_procedure( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if all the procedures were successfully executed.
|
* @return true if all the procedures were successfully executed.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_exec ( opj_jp2_v2_t * jp2,
|
static opj_bool opj_jp2_exec ( opj_jp2_t * jp2,
|
||||||
opj_procedure_list_t * p_procedure_list,
|
opj_procedure_list_t * p_procedure_list,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
opj_bool (** l_procedure) (opj_jp2_v2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *) = 00;
|
opj_bool (** l_procedure) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *) = 00;
|
||||||
opj_bool l_result = OPJ_TRUE;
|
opj_bool l_result = OPJ_TRUE;
|
||||||
OPJ_UINT32 l_nb_proc, i;
|
OPJ_UINT32 l_nb_proc, i;
|
||||||
|
|
||||||
|
@ -1647,7 +1647,7 @@ static opj_bool opj_jp2_exec ( opj_jp2_v2_t * jp2,
|
||||||
assert(p_manager != 00);
|
assert(p_manager != 00);
|
||||||
|
|
||||||
l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list);
|
l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list);
|
||||||
l_procedure = (opj_bool (**) (opj_jp2_v2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
|
l_procedure = (opj_bool (**) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
|
||||||
|
|
||||||
for (i=0;i<l_nb_proc;++i) {
|
for (i=0;i<l_nb_proc;++i) {
|
||||||
l_result = l_result && (*l_procedure) (jp2,stream,p_manager);
|
l_result = l_result && (*l_procedure) (jp2,stream,p_manager);
|
||||||
|
@ -1659,7 +1659,7 @@ static opj_bool opj_jp2_exec ( opj_jp2_v2_t * jp2,
|
||||||
return l_result;
|
return l_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_start_compress(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_start_compress(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_image_t * p_image,
|
opj_image_t * p_image,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -1731,7 +1731,7 @@ static const opj_jp2_header_handler_t * opj_jp2_img_find_handler (OPJ_UINT32 p_i
|
||||||
*
|
*
|
||||||
* @return true if the file signature box is valid.
|
* @return true if the file signature box is valid.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_jp(opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_header_data,
|
OPJ_BYTE * p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -1778,7 +1778,7 @@ static opj_bool opj_jp2_read_jp(opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the FTYP box is valid.
|
* @return true if the FTYP box is valid.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_ftyp( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_ftyp( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE * p_header_data,
|
OPJ_BYTE * p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -1838,7 +1838,7 @@ static opj_bool opj_jp2_read_ftyp( opj_jp2_v2_t *jp2,
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_skip_jp2c( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_skip_jp2c( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager )
|
opj_event_mgr_t * p_manager )
|
||||||
{
|
{
|
||||||
|
@ -1866,7 +1866,7 @@ opj_bool opj_jp2_skip_jp2c( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the JP2 Header box was successfully reconized.
|
* @return true if the JP2 Header box was successfully reconized.
|
||||||
*/
|
*/
|
||||||
static opj_bool opj_jp2_read_jp2h( opj_jp2_v2_t *jp2,
|
static opj_bool opj_jp2_read_jp2h( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_header_data,
|
OPJ_BYTE *p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
|
@ -1992,7 +1992,7 @@ opj_bool opj_jp2_read_boxhdr_char( opj_jp2_box_t *box,
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
||||||
opj_jp2_v2_t *jp2,
|
opj_jp2_t *jp2,
|
||||||
opj_image_t ** p_image,
|
opj_image_t ** p_image,
|
||||||
opj_event_mgr_t * p_manager
|
opj_event_mgr_t * p_manager
|
||||||
)
|
)
|
||||||
|
@ -2024,7 +2024,7 @@ opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
||||||
p_manager);
|
p_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_encoding_validation (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
|
@ -2033,14 +2033,14 @@ void opj_jp2_setup_encoding_validation (opj_jp2_v2_t *jp2)
|
||||||
/* DEVELOPER CORNER, add your custom validation procedure */
|
/* DEVELOPER CORNER, add your custom validation procedure */
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_decoding_validation (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_decoding_validation (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
/* DEVELOPER CORNER, add your custom validation procedure */
|
/* DEVELOPER CORNER, add your custom validation procedure */
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_header_writing (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_header_writing (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
|
@ -2054,7 +2054,7 @@ void opj_jp2_setup_header_writing (opj_jp2_v2_t *jp2)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_setup_header_reading (opj_jp2_v2_t *jp2)
|
void opj_jp2_setup_header_reading (opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(jp2 != 00);
|
assert(jp2 != 00);
|
||||||
|
@ -2063,7 +2063,7 @@ void opj_jp2_setup_header_reading (opj_jp2_v2_t *jp2)
|
||||||
/* DEVELOPER CORNER, add your custom procedures */
|
/* DEVELOPER CORNER, add your custom procedures */
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_read_tile_header ( opj_jp2_v2_t * p_jp2,
|
opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
|
||||||
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,
|
||||||
|
@ -2087,7 +2087,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_v2_t * p_jp2,
|
||||||
p_manager);
|
p_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_write_tile ( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_write_tile ( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -2099,7 +2099,7 @@ opj_bool opj_jp2_write_tile ( opj_jp2_v2_t *p_jp2,
|
||||||
return opj_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);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_decode_tile ( opj_jp2_v2_t * p_jp2,
|
opj_bool opj_jp2_decode_tile ( opj_jp2_t * p_jp2,
|
||||||
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,
|
||||||
|
@ -2110,7 +2110,7 @@ opj_bool opj_jp2_decode_tile ( opj_jp2_v2_t * p_jp2,
|
||||||
return opj_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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void opj_jp2_destroy(opj_jp2_v2_t *jp2)
|
void opj_jp2_destroy(opj_jp2_t *jp2)
|
||||||
{
|
{
|
||||||
if (jp2) {
|
if (jp2) {
|
||||||
/* destroy the J2K codec */
|
/* destroy the J2K codec */
|
||||||
|
@ -2178,7 +2178,7 @@ void opj_jp2_destroy(opj_jp2_v2_t *jp2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_set_decode_area( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_set_decode_area( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -2188,7 +2188,7 @@ opj_bool opj_jp2_set_decode_area( opj_jp2_v2_t *p_jp2,
|
||||||
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);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_get_tile( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_get_tile( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -2241,11 +2241,11 @@ opj_bool opj_jp2_get_tile( opj_jp2_v2_t *p_jp2,
|
||||||
/* JP2 encoder interface */
|
/* JP2 encoder interface */
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
opj_jp2_v2_t* opj_jp2_create(opj_bool p_is_decoder)
|
opj_jp2_t* opj_jp2_create(opj_bool p_is_decoder)
|
||||||
{
|
{
|
||||||
opj_jp2_v2_t *jp2 = (opj_jp2_v2_t*)opj_malloc(sizeof(opj_jp2_v2_t));
|
opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t));
|
||||||
if (jp2) {
|
if (jp2) {
|
||||||
memset(jp2,0,sizeof(opj_jp2_v2_t));
|
memset(jp2,0,sizeof(opj_jp2_t));
|
||||||
|
|
||||||
/* create the J2K codec */
|
/* create the J2K codec */
|
||||||
if (! p_is_decoder) {
|
if (! p_is_decoder) {
|
||||||
|
@ -2285,7 +2285,7 @@ opj_jp2_v2_t* opj_jp2_create(opj_bool p_is_decoder)
|
||||||
return jp2;
|
return jp2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void jp2_dump(opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream)
|
void jp2_dump(opj_jp2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream)
|
||||||
{
|
{
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(p_jp2 != 00);
|
assert(p_jp2 != 00);
|
||||||
|
@ -2295,17 +2295,17 @@ void jp2_dump(opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream)
|
||||||
out_stream);
|
out_stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_v2_t* p_jp2)
|
opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_t* p_jp2)
|
||||||
{
|
{
|
||||||
return j2k_get_cstr_index(p_jp2->j2k);
|
return j2k_get_cstr_index(p_jp2->j2k);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2)
|
opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2)
|
||||||
{
|
{
|
||||||
return j2k_get_cstr_info(p_jp2->j2k);
|
return j2k_get_cstr_info(p_jp2->j2k);
|
||||||
}
|
}
|
||||||
|
|
||||||
opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2,
|
||||||
OPJ_UINT32 res_factor,
|
OPJ_UINT32 res_factor,
|
||||||
opj_event_mgr_t * p_manager)
|
opj_event_mgr_t * p_manager)
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,7 +146,7 @@ typedef struct opj_jp2_comps {
|
||||||
/**
|
/**
|
||||||
JPEG-2000 file format reader/writer
|
JPEG-2000 file format reader/writer
|
||||||
*/
|
*/
|
||||||
typedef struct opj_jp2_v2
|
typedef struct opj_jp2
|
||||||
{
|
{
|
||||||
/** handle to the J2K codec */
|
/** handle to the J2K codec */
|
||||||
struct opj_j2k_v2 *j2k;
|
struct opj_j2k_v2 *j2k;
|
||||||
|
@ -188,7 +188,7 @@ typedef struct opj_jp2_v2
|
||||||
|
|
||||||
opj_bool ignore_pclr_cmap_cdef;
|
opj_bool ignore_pclr_cmap_cdef;
|
||||||
}
|
}
|
||||||
opj_jp2_v2_t;
|
opj_jp2_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
JP2 Box
|
JP2 Box
|
||||||
|
@ -204,7 +204,7 @@ typedef struct opj_jp2_header_handler
|
||||||
/* marker value */
|
/* marker value */
|
||||||
OPJ_UINT32 id;
|
OPJ_UINT32 id;
|
||||||
/* action linked to the marker */
|
/* action linked to the marker */
|
||||||
opj_bool (*handler) ( opj_jp2_v2_t *jp2,
|
opj_bool (*handler) ( opj_jp2_t *jp2,
|
||||||
OPJ_BYTE *p_header_data,
|
OPJ_BYTE *p_header_data,
|
||||||
OPJ_UINT32 p_header_size,
|
OPJ_UINT32 p_header_size,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -215,7 +215,7 @@ opj_jp2_header_handler_t;
|
||||||
typedef struct opj_jp2_img_header_writer_handler
|
typedef struct opj_jp2_img_header_writer_handler
|
||||||
{
|
{
|
||||||
/* action to perform */
|
/* action to perform */
|
||||||
OPJ_BYTE* (*handler) (opj_jp2_v2_t *jp2, OPJ_UINT32 * p_data_size);
|
OPJ_BYTE* (*handler) (opj_jp2_t *jp2, OPJ_UINT32 * p_data_size);
|
||||||
/* result of the action : data */
|
/* result of the action : data */
|
||||||
OPJ_BYTE* m_data;
|
OPJ_BYTE* m_data;
|
||||||
/* size of data */
|
/* size of data */
|
||||||
|
@ -236,7 +236,7 @@ opj_jp2_img_header_writer_handler_t;
|
||||||
*
|
*
|
||||||
* @return true if writing was successful.
|
* @return true if writing was successful.
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_write_jp2h(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ Decoding parameters are returned in jp2->j2k->cp.
|
||||||
@param jp2 JP2 decompressor handle
|
@param jp2 JP2 decompressor handle
|
||||||
@param parameters decompression parameters
|
@param parameters decompression parameters
|
||||||
*/
|
*/
|
||||||
void opj_jp2_setup_decoder(opj_jp2_v2_t *jp2, opj_dparameters_t *parameters);
|
void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode an image from a JPEG-2000 file stream
|
* Decode an image from a JPEG-2000 file stream
|
||||||
|
@ -257,7 +257,7 @@ void opj_jp2_setup_decoder(opj_jp2_v2_t *jp2, opj_dparameters_t *parameters);
|
||||||
*
|
*
|
||||||
* @return Returns a decoded image if successful, returns NULL otherwise
|
* @return Returns a decoded image if successful, returns NULL otherwise
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_decode(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_decode(opj_jp2_t *jp2,
|
||||||
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);
|
||||||
|
@ -271,7 +271,7 @@ opj_bool opj_jp2_decode(opj_jp2_v2_t *jp2,
|
||||||
* @param image input filled image
|
* @param image input filled image
|
||||||
* @param p_manager FIXME DOC
|
* @param p_manager FIXME DOC
|
||||||
*/
|
*/
|
||||||
void opj_jp2_setup_encoder( opj_jp2_v2_t *jp2,
|
void opj_jp2_setup_encoder( opj_jp2_t *jp2,
|
||||||
opj_cparameters_t *parameters,
|
opj_cparameters_t *parameters,
|
||||||
opj_image_t *image,
|
opj_image_t *image,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -283,7 +283,7 @@ Encode an image into a JPEG-2000 file stream
|
||||||
@param p_manager event manager
|
@param p_manager event manager
|
||||||
@return Returns true if successful, returns false otherwise
|
@return Returns true if successful, returns false otherwise
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_encode( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_encode( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ opj_bool opj_jp2_encode( opj_jp2_v2_t *jp2,
|
||||||
*
|
*
|
||||||
* @return true if the codec is valid.
|
* @return true if the codec is valid.
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_start_compress(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_start_compress(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *stream,
|
opj_stream_private_t *stream,
|
||||||
opj_image_t * p_image,
|
opj_image_t * p_image,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -308,7 +308,7 @@ opj_bool opj_jp2_start_compress(opj_jp2_v2_t *jp2,
|
||||||
* 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 opj_jp2_end_compress( opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_end_compress( opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ opj_bool opj_jp2_end_compress( opj_jp2_v2_t *jp2,
|
||||||
* 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 opj_jp2_end_decompress(opj_jp2_v2_t *jp2,
|
opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2,
|
||||||
opj_stream_private_t *cio,
|
opj_stream_private_t *cio,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ opj_bool opj_jp2_end_decompress(opj_jp2_v2_t *jp2,
|
||||||
* @return true if the box is valid.
|
* @return true if the box is valid.
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
||||||
opj_jp2_v2_t *jp2,
|
opj_jp2_t *jp2,
|
||||||
opj_image_t ** p_image,
|
opj_image_t ** p_image,
|
||||||
opj_event_mgr_t * p_manager );
|
opj_event_mgr_t * p_manager );
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ opj_bool opj_jp2_read_header( opj_stream_private_t *p_stream,
|
||||||
* @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 opj_jp2_read_tile_header ( opj_jp2_v2_t * p_jp2,
|
opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
|
||||||
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,
|
||||||
|
@ -373,7 +373,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_v2_t * p_jp2,
|
||||||
* @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 opj_jp2_write_tile ( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_write_tile ( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -391,7 +391,7 @@ opj_bool opj_jp2_write_tile ( opj_jp2_v2_t *p_jp2,
|
||||||
*
|
*
|
||||||
* @return FIXME DOC
|
* @return FIXME DOC
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_decode_tile ( opj_jp2_v2_t * p_jp2,
|
opj_bool opj_jp2_decode_tile ( opj_jp2_t * p_jp2,
|
||||||
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,
|
||||||
|
@ -403,13 +403,13 @@ opj_bool opj_jp2_decode_tile ( opj_jp2_v2_t * p_jp2,
|
||||||
*
|
*
|
||||||
* @return an empty jpeg2000 file codec.
|
* @return an empty jpeg2000 file codec.
|
||||||
*/
|
*/
|
||||||
opj_jp2_v2_t* opj_jp2_create (opj_bool p_is_decoder);
|
opj_jp2_t* opj_jp2_create (opj_bool p_is_decoder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroy a JP2 decompressor handle
|
Destroy a JP2 decompressor handle
|
||||||
@param jp2 JP2 decompressor handle to destroy
|
@param jp2 JP2 decompressor handle to destroy
|
||||||
*/
|
*/
|
||||||
void opj_jp2_destroy(opj_jp2_v2_t *jp2);
|
void opj_jp2_destroy(opj_jp2_t *jp2);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -425,7 +425,7 @@ void opj_jp2_destroy(opj_jp2_v2_t *jp2);
|
||||||
*
|
*
|
||||||
* @return true if the area could be set.
|
* @return true if the area could be set.
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_set_decode_area( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_set_decode_area( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -434,7 +434,7 @@ opj_bool opj_jp2_set_decode_area( opj_jp2_v2_t *p_jp2,
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_get_tile( opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_get_tile( opj_jp2_t *p_jp2,
|
||||||
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,
|
||||||
|
@ -444,7 +444,7 @@ opj_bool opj_jp2_get_tile( opj_jp2_v2_t *p_jp2,
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_v2_t *p_jp2,
|
opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2,
|
||||||
OPJ_UINT32 res_factor,
|
OPJ_UINT32 res_factor,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_v2_t *p_jp2,
|
||||||
*@param out_stream output stream where dump the elements.
|
*@param out_stream output stream where dump the elements.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void jp2_dump (opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream);
|
void jp2_dump (opj_jp2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the codestream info from a JPEG2000 codec.
|
* Get the codestream info from a JPEG2000 codec.
|
||||||
|
@ -467,7 +467,7 @@ void jp2_dump (opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream);
|
||||||
*
|
*
|
||||||
*@return the codestream information extract from the jpg2000 codec
|
*@return the codestream information extract from the jpg2000 codec
|
||||||
*/
|
*/
|
||||||
opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2);
|
opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the codestream index from a JPEG2000 codec.
|
* Get the codestream index from a JPEG2000 codec.
|
||||||
|
@ -476,7 +476,7 @@ opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2);
|
||||||
*
|
*
|
||||||
*@return the codestream index extract from the jpg2000 codec
|
*@return the codestream index extract from the jpg2000 codec
|
||||||
*/
|
*/
|
||||||
opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_v2_t* p_jp2);
|
opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_t* p_jp2);
|
||||||
|
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
Loading…
Reference in New Issue