l_nb_tiles = p_j2k->m_cp.th * p_j2k->m_cp.tw;
l_tcp = p_j2k->m_cp.tcps;
- l_tcd = tcd_create_v2(OPJ_TRUE);
+ l_tcd = opj_tcd_create(OPJ_TRUE);
if (l_tcd == 00) {
opj_event_msg_v2(p_manager, EVT_ERROR, "Cannot decode tile, memory error\n");
return OPJ_FALSE;
}
/* Create the current tile decoder*/
- p_j2k->m_tcd = (opj_tcd_v2_t*)tcd_create_v2(OPJ_TRUE); /* FIXME why a cast ? */
+ p_j2k->m_tcd = (opj_tcd_v2_t*)opj_tcd_create(OPJ_TRUE); /* FIXME why a cast ? */
if (! p_j2k->m_tcd ) {
return OPJ_FALSE;
}
assert(p_manager != 00);
assert(p_stream != 00);
- p_j2k->m_tcd = tcd_create_v2(OPJ_FALSE);
+ p_j2k->m_tcd = opj_tcd_create(OPJ_FALSE);
if (! p_j2k->m_tcd) {
opj_event_msg_v2(p_manager, EVT_ERROR, "Not enough memory to create Tile Coder\n");
/**
Create a new TCD handle
*/
-opj_tcd_t* tcd_create(opj_common_ptr cinfo) {
- /* create the tcd structure */
- opj_tcd_t *tcd = (opj_tcd_t*)opj_malloc(sizeof(opj_tcd_t));
- if(!tcd) return NULL;
- tcd->cinfo = cinfo;
- tcd->tcd_image = (opj_tcd_image_t*)opj_malloc(sizeof(opj_tcd_image_t));
- if(!tcd->tcd_image) {
- opj_free(tcd);
- return NULL;
- }
-
- return tcd;
-}
-
-/**
-Create a new TCD handle
-*/
-opj_tcd_v2_t* tcd_create_v2(opj_bool p_is_decoder)
+opj_tcd_v2_t* opj_tcd_create(opj_bool p_is_decoder)
{
opj_tcd_v2_t *l_tcd = 00;
Dump the content of a tcd structure
*/
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t *img);
-/**
-Create a new TCD handle
-@param cinfo Codec context info
-@return Returns a new TCD handle if successful returns NULL otherwise
-*/
-opj_tcd_t* tcd_create(opj_common_ptr cinfo);
/**
Create a new TCD handle
@param FIXME
@return Returns a new TCD handle if successful returns NULL otherwise
*/
-opj_tcd_v2_t* tcd_create_v2(opj_bool p_is_decoder);
+opj_tcd_v2_t* opj_tcd_create(opj_bool p_is_decoder);
/**
Destroy a previously created TCD handle