]> granicus.if.org Git - openjpeg/commitdiff
[trunk] remove old v1 style function t2_create
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 13:03:35 +0000 (13:03 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 27 Sep 2012 13:03:35 +0000 (13:03 +0000)
rename t2_create_v2 to opj_t2_create

libopenjpeg/t2.c
libopenjpeg/t2.h
libopenjpeg/tcd.c

index 68757b2ae2865c9981602d0ba89810d44314077f..01eaf50c7d9ac86931148953c4b8e6e637dc1138 100644 (file)
@@ -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;
index c506aac3a34ec18117573744bbf6113d9f6c81c8..23d04725ca3f66552e79a7212c8967ac93e35f9f 100644 (file)
@@ -135,16 +135,8 @@ 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
index f92031c7c516b27f38746c00046f4f774e8c8af0..32ad6cd9405fbefe818b77ec748bda4f4a52556b 100644 (file)
@@ -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;
         }