summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libopenjpeg/t2.c16
-rw-r--r--libopenjpeg/t2.h10
-rw-r--r--libopenjpeg/tcd.c6
3 files changed, 6 insertions, 26 deletions
diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c
index 68757b2a..01eaf50c 100644
--- a/libopenjpeg/t2.c
+++ b/libopenjpeg/t2.c
@@ -870,17 +870,6 @@ opj_bool t2_decode_packets_v2(
/* ----------------------------------------------------------------------- */
-opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp) {
- /* create the tcd structure */
- opj_t2_t *t2 = (opj_t2_t*)opj_malloc(sizeof(opj_t2_t));
- if(!t2) return NULL;
- t2->cinfo = cinfo;
- t2->image = image;
- t2->cp = cp;
-
- return t2;
-}
-
/**
* Creates a Tier 2 handle
*
@@ -888,10 +877,9 @@ opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp) {
* @param p_cp Image coding parameters.
* @return a new T2 handle if successful, NULL otherwise.
*/
-opj_t2_v2_t* t2_create_v2( opj_image_t *p_image,
- opj_cp_v2_t *p_cp)
+opj_t2_v2_t* opj_t2_create(opj_image_t *p_image, opj_cp_v2_t *p_cp)
{
- /* create the tcd structure */
+ /* create the t2 structure */
opj_t2_v2_t *l_t2 = (opj_t2_v2_t*)opj_malloc(sizeof(opj_t2_v2_t));
if (!l_t2) {
return NULL;
diff --git a/libopenjpeg/t2.h b/libopenjpeg/t2.h
index c506aac3..23d04725 100644
--- a/libopenjpeg/t2.h
+++ b/libopenjpeg/t2.h
@@ -135,17 +135,9 @@ opj_bool t2_decode_packets_v2( opj_t2_v2_t *t2,
* @param p_cp Image coding parameters.
* @return a new T2 handle if successful, NULL otherwise.
*/
-opj_t2_v2_t* t2_create_v2(opj_image_t *p_image, opj_cp_v2_t *p_cp);
+opj_t2_v2_t* opj_t2_create_(opj_image_t *p_image, opj_cp_v2_t *p_cp);
/**
-Create a T2 handle
-@param cinfo Codec context info
-@param image Source or destination image
-@param cp Image coding parameters
-@return Returns a new T2 handle if successful, returns NULL otherwise
-*/
-opj_t2_t* t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp);
-/**
Destroy a T2 handle
@param t2 T2 handle to destroy
*/
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c
index f92031c7..32ad6cd9 100644
--- a/libopenjpeg/tcd.c
+++ b/libopenjpeg/tcd.c
@@ -477,7 +477,7 @@ opj_bool opj_tcd_rateallocate( opj_tcd_v2_t *tcd,
-q xx,yy,zz,0 (fixed_quality == 1 and distoratio == 0)
==> possible to have some lossy layers and the last layer for sure lossless */
if ( ((cp->m_specific_param.m_enc.m_disto_alloc==1) && (tcd_tcp->rates[layno]>0)) || ((cp->m_specific_param.m_enc.m_fixed_quality==1) && (tcd_tcp->distoratio[layno]>0))) {
- opj_t2_v2_t*t2 = t2_create_v2(tcd->image, cp);
+ opj_t2_v2_t*t2 = opj_t2_create(tcd->image, cp);
OPJ_FLOAT64 thresh = 0;
if (t2 == 00) {
@@ -1462,7 +1462,7 @@ opj_bool opj_tcd_t2_decode (opj_tcd_v2_t *p_tcd,
{
opj_t2_v2_t * l_t2;
- l_t2 = t2_create_v2(p_tcd->image, p_tcd->cp);
+ l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp);
if (l_t2 == 00) {
return OPJ_FALSE;
}
@@ -1960,7 +1960,7 @@ opj_bool opj_tcd_t2_encode (opj_tcd_v2_t *p_tcd,
{
opj_t2_v2_t * l_t2;
- l_t2 = t2_create_v2(p_tcd->image, p_tcd->cp);
+ l_t2 = opj_t2_create(p_tcd->image, p_tcd->cp);
if (l_t2 == 00) {
return OPJ_FALSE;
}