diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-08-16 15:51:55 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-08-16 15:51:55 +0000 |
| commit | e6d97ce928f0f625a949a43d1acc2c104f4b0df0 (patch) | |
| tree | 6644faa7ed3ec9675b1d56fc96d01af1acdf402d | |
| parent | b7473285ecfd4746c2fd49ba93870af0ce3f9003 (diff) | |
remove deprecated v1 style function tcd_create; rename tcd_create_v2 to opj_tcd_create
| -rw-r--r-- | libopenjpeg/j2k.c | 6 | ||||
| -rw-r--r-- | libopenjpeg/tcd.c | 19 | ||||
| -rw-r--r-- | libopenjpeg/tcd.h | 8 |
3 files changed, 5 insertions, 28 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index 11b4ff68..76e0740a 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -4768,7 +4768,7 @@ opj_bool opj_j2k_read_eoc ( opj_j2k_v2_t *p_j2k, 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; @@ -6999,7 +6999,7 @@ static opj_bool opj_j2k_copy_default_tcp_and_create_tcd ( opj_j2k_v2_t * p_j2k, } /* 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; } @@ -10250,7 +10250,7 @@ static opj_bool opj_j2k_create_tcd( opj_j2k_v2_t *p_j2k, 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"); diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index 9159c9b1..7efb89e9 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -172,24 +172,7 @@ opj_bool tcd_dc_level_shift_decode ( /** 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; diff --git a/libopenjpeg/tcd.h b/libopenjpeg/tcd.h index cbcfba46..c68cbc00 100644 --- a/libopenjpeg/tcd.h +++ b/libopenjpeg/tcd.h @@ -347,19 +347,13 @@ typedef struct opj_tcd_v2 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 |
