summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-08-16 13:31:22 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-08-16 13:31:22 +0000
commit30de580afeb6cce48b0b94d2037f0391873e41b9 (patch)
treee0341e4970094d8bb7789a24aa7de3362663fe33 /libopenjpeg
parent0c13350ea49ac9508ec00628477035dca33e6ffa (diff)
remove deprecated v1 style function j2k_calculate_tp; rename j2k_calculate_tp_v2 to opj_j2k_calculate_tp
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/j2k.c56
1 files changed, 12 insertions, 44 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c
index 6bc46c3f..c5b304d4 100644
--- a/libopenjpeg/j2k.c
+++ b/libopenjpeg/j2k.c
@@ -1121,9 +1121,6 @@ static opj_bool opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
*/
static OPJ_UINT32 j2k_get_num_tp_v2( opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno);
-/** mem allocation for TLM marker*/
-static int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k );
-
/**
* Calculates the total number of tile parts needed by the encoder to
* encode such an image. If not enough memory is available, then the function return false.
@@ -1136,11 +1133,11 @@ static int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_
*
* @return true if the function was successful, false else.
*/
-static opj_bool j2k_calculate_tp_v2(opj_j2k_v2_t *p_j2k,
- opj_cp_v2_t *cp,
- OPJ_UINT32 * p_nb_tiles,
- opj_image_t *image,
- opj_event_mgr_t * p_manager);
+static opj_bool opj_j2k_calculate_tp( opj_j2k_v2_t *p_j2k,
+ opj_cp_v2_t *cp,
+ OPJ_UINT32 * p_nb_tiles,
+ opj_image_t *image,
+ opj_event_mgr_t * p_manager);
static void opj_j2k_dump_MH_info(opj_j2k_v2_t* p_j2k, FILE* out_stream);
@@ -1710,36 +1707,6 @@ OPJ_UINT32 j2k_get_num_tp_v2(opj_cp_v2_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno
return tpnum;
}
-/** mem allocation for TLM marker*/
-int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *j2k ){
- int pino,tileno,totnum_tp=0;
-
- OPJ_ARG_NOT_USED(img_numcomp);
-
- j2k->cur_totnum_tp = (int *) opj_malloc(cp->tw * cp->th * sizeof(int));
- for (tileno = 0; tileno < cp->tw * cp->th; tileno++) {
- int cur_totnum_tp = 0;
- opj_tcp_t *tcp = &cp->tcps[tileno];
- for(pino = 0; pino <= tcp->numpocs; pino++) {
- int tp_num=0;
- opj_pi_iterator_t *pi = pi_initialise_encode(image, cp, tileno,FINAL_PASS);
- if(!pi) { return -1;}
- tp_num = j2k_get_num_tp(cp,pino,tileno);
- totnum_tp = totnum_tp + tp_num;
- cur_totnum_tp = cur_totnum_tp + tp_num;
- pi_destroy(pi, cp, tileno);
- }
- j2k->cur_totnum_tp[tileno] = cur_totnum_tp;
- /* INDEX >> */
- if (j2k->cstr_info) {
- j2k->cstr_info->tile[tileno].num_tps = cur_totnum_tp;
- j2k->cstr_info->tile[tileno].tp = (opj_tp_info_t *) opj_malloc(cur_totnum_tp * sizeof(opj_tp_info_t));
- }
- /* << INDEX */
- }
- return totnum_tp;
-}
-
/**
* Calculates the total number of tile parts needed by the encoder to
* encode such an image. If not enough memory is available, then the function return false.
@@ -1752,11 +1719,12 @@ int j2k_calculate_tp(opj_cp_t *cp,int img_numcomp,opj_image_t *image,opj_j2k_t *
*
* @return true if the function was successful, false else.
*/
-opj_bool j2k_calculate_tp_v2( opj_j2k_v2_t *p_j2k,
- opj_cp_v2_t *cp,
- OPJ_UINT32 * p_nb_tiles,
- opj_image_t *image,
- opj_event_mgr_t * p_manager)
+opj_bool opj_j2k_calculate_tp( opj_j2k_v2_t *p_j2k,
+ opj_cp_v2_t *cp,
+ OPJ_UINT32 * p_nb_tiles,
+ opj_image_t *image,
+ opj_event_mgr_t * p_manager
+ )
{
OPJ_UINT32 pino,tileno;
OPJ_UINT32 l_nb_tiles;
@@ -10762,7 +10730,7 @@ opj_bool opj_j2k_init_info( opj_j2k_v2_t *p_j2k,
l_cstr_info->marknum = 0;
}*/
- return j2k_calculate_tp_v2(p_j2k,&(p_j2k->m_cp),&p_j2k->m_specific_param.m_encoder.m_total_tile_parts,p_j2k->m_private_image,p_manager);
+ return opj_j2k_calculate_tp(p_j2k,&(p_j2k->m_cp),&p_j2k->m_specific_param.m_encoder.m_total_tile_parts,p_j2k->m_private_image,p_manager);
}
/**