if (!l_pi) {
return NULL;
}
- memset(l_pi,0,l_poc_bound * sizeof(opj_pi_iterator_t));
l_current_pi = l_pi;
for (pino = 0; pino < l_poc_bound ; ++pino) {
}
l_current_pi->numcomps = image->numcomps;
- memset(l_current_pi->comps,0,image->numcomps * sizeof(opj_pi_comp_t));
for (compno = 0; compno < image->numcomps; ++compno) {
opj_pi_comp_t *comp = &l_current_pi->comps[compno];
tccp = &tcp->tccps[compno];
- comp->resolutions = (opj_pi_resolution_t*) opj_malloc(tccp->numresolutions * sizeof(opj_pi_resolution_t));
+ comp->resolutions = (opj_pi_resolution_t*) opj_calloc(tccp->numresolutions, sizeof(opj_pi_resolution_t));
if (!comp->resolutions) {
opj_pi_destroy(l_pi, l_poc_bound);
return 00;
}
comp->numresolutions = tccp->numresolutions;
- memset(comp->resolutions,0,tccp->numresolutions * sizeof(opj_pi_resolution_t));
}
++l_current_pi;
}
break;
case 'P':
switch(tcp->prg){
- case OPJ_LRCP||OPJ_RLCP:
+ case OPJ_LRCP: // fall through
+ case OPJ_RLCP:
if(tcp->prc_t == tcp->prcE){
if(opj_pi_check_next_level(i-1,cp,tileno,pino,prog)){
return OPJ_TRUE;
opj_pi_destroy(l_pi, l_bound);
return 00;
}
- memset(l_current_pi->include,0, (l_tcp->numlayers + 1) * l_step_l* sizeof(OPJ_INT16));
/* special treatment for the first packet iterator */
l_current_comp = l_current_pi->comps;
opj_pi_destroy(l_pi, l_bound);
return 00;
}
- memset(l_current_pi->include,0,l_tcp->numlayers * l_step_l* sizeof(OPJ_INT16));
/* special treatment for the first packet iterator*/
l_current_comp = l_current_pi->comps;
opj_free(l_tmp_ptr);
l_tmp_ptr = 00;
- if (l_tcp->POC && ( p_cp->m_specific_param.m_enc.m_cinema || p_t2_mode == FINAL_PASS)) {
+ if (l_tcp->POC && (OPJ_IS_CINEMA(p_cp->rsiz) || p_t2_mode == FINAL_PASS)) {
opj_pi_update_encode_poc_and_final(p_cp,p_tile_no,l_tx0,l_tx1,l_ty0,l_ty1,l_max_prec,l_max_res,l_dx_min,l_dy_min);
}
else {
pi[pino].first = 1;
pi[pino].poc.prg = tcp->prg;
- if(!(cp->m_specific_param.m_enc.m_tp_on && ((!cp->m_specific_param.m_enc.m_cinema && (t2_mode == FINAL_PASS)) || cp->m_specific_param.m_enc.m_cinema))){
+ if(!(cp->m_specific_param.m_enc.m_tp_on && ((!OPJ_IS_CINEMA(cp->rsiz) && (t2_mode == FINAL_PASS)) || OPJ_IS_CINEMA(cp->rsiz)))){
pi[pino].poc.resno0 = tcp->resS;
pi[pino].poc.resno1 = tcp->resE;
pi[pino].poc.compno0 = tcp->compS;