[trunk] remove old v1 style function t2_create
rename t2_create_v2 to opj_t2_create
This commit is contained in:
parent
77e6971bbb
commit
69673635ef
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user