l_tilec->y1 = y1;
nValues = (size_t)(l_tilec->x1 - l_tilec->x0) *
(size_t)(l_tilec->y1 - l_tilec->y0);
- l_tilec->data = opj_malloc(sizeof(OPJ_INT32) * nValues);
+ l_tilec->data = (OPJ_INT32*) opj_malloc(sizeof(OPJ_INT32) * nValues);
for (i = 0; i < nValues; i++) {
l_tilec->data[i] = getValue((OPJ_UINT32)i);
}
l_tilec->numresolutions = numresolutions;
- l_tilec->resolutions = opj_calloc(l_tilec->numresolutions,
- sizeof(opj_tcd_resolution_t));
+ l_tilec->resolutions = (opj_tcd_resolution_t*) opj_calloc(
+ l_tilec->numresolutions,
+ sizeof(opj_tcd_resolution_t));
l_level_no = l_tilec->numresolutions;
l_res = l_tilec->resolutions;
return NULL;
}
- sa = opj_calloc(1, sizeof(opj_sparse_array_int32_t));
+ sa = (opj_sparse_array_int32_t*) opj_calloc(1,
+ sizeof(opj_sparse_array_int32_t));
sa->width = width;
sa->height = height;
sa->block_width = block_width;
opj_free(sa);
return NULL;
}
- sa->data_blocks = opj_calloc(sizeof(OPJ_INT32*),
- sa->block_count_hor * sa->block_count_ver);
+ sa->data_blocks = (OPJ_INT32**) opj_calloc(sizeof(OPJ_INT32*),
+ sa->block_count_hor * sa->block_count_ver);
if (sa->data_blocks == NULL) {
opj_free(sa);
return NULL;
}
} else {
if (src_block == NULL) {
- src_block = opj_calloc(1,
- sa->block_width * sa->block_height * sizeof(OPJ_INT32));
+ src_block = (OPJ_INT32*) opj_calloc(1,
+ sa->block_width * sa->block_height * sizeof(OPJ_INT32));
if (src_block == NULL) {
return OPJ_FALSE;
}
for (ci = runlen; ci < lim; ++ci) {
OPJ_UINT32 vsc;
opj_flag_t flags;
+ OPJ_UINT32 ctxt1;
flags = *flagsp;
}
if (!(flags & ((T1_SIGMA_THIS | T1_PI_THIS) << (ci * 3U)))) {
- OPJ_UINT32 ctxt1 = opj_t1_getctxno_zc(mqc, flags >> (ci * 3U));
+ ctxt1 = opj_t1_getctxno_zc(mqc, flags >> (ci * 3U));
#ifdef DEBUG_ENC_CLN
printf(" ctxt1=%d\n", ctxt1);
#endif
cblk_w = (OPJ_UINT32)(cblk->x1 - cblk->x0);
cblk_h = (OPJ_UINT32)(cblk->y1 - cblk->y0);
- cblk->decoded_data = opj_aligned_malloc(cblk_w * cblk_h * sizeof(OPJ_INT32));
+ cblk->decoded_data = (OPJ_INT32*)opj_aligned_malloc(cblk_w * cblk_h * sizeof(
+ OPJ_INT32));
if (cblk->decoded_data == NULL) {
if (job->p_manager_mutex) {
opj_mutex_lock(job->p_manager_mutex);
}
l_data_size *= sizeof(OPJ_INT32);
- tilec->data_win = opj_image_data_alloc(l_data_size);
+ tilec->data_win = (OPJ_INT32*) opj_image_data_alloc(l_data_size);
if (tilec->data_win == NULL) {
opj_event_msg(p_manager, EVT_ERROR,
"Size of tile data exceeds system limits\n");
l_res = l_tile_comp->resolutions;
if (l_res) {
- l_nb_resolutions = l_tile_comp->resolutions_size / sizeof(opj_tcd_resolution_t);
+ l_nb_resolutions = l_tile_comp->resolutions_size / (OPJ_UINT32)sizeof(
+ opj_tcd_resolution_t);
for (resno = 0; resno < l_nb_resolutions; ++resno) {
l_band = l_res->bands;
for (bandno = 0; bandno < 3; ++bandno) {
l_precinct = l_band->precincts;
if (l_precinct) {
- l_nb_precincts = l_band->precincts_data_size / sizeof(opj_tcd_precinct_t);
+ l_nb_precincts = l_band->precincts_data_size / (OPJ_UINT32)sizeof(
+ opj_tcd_precinct_t);
for (precno = 0; precno < l_nb_precincts; ++precno) {
opj_tgt_destroy(l_precinct->incltree);
l_precinct->incltree = 00;
l_code_block->numbps, l_code_block->numlenbits, l_code_block->len, l_code_block->numnewpasses, l_code_block->real_num_segs, l_code_block->m_current_max_segs );*/
- l_nb_code_blocks = p_precinct->block_size / sizeof(opj_tcd_cblk_dec_t);
+ l_nb_code_blocks = p_precinct->block_size / (OPJ_UINT32)sizeof(
+ opj_tcd_cblk_dec_t);
/*fprintf(stderr,"nb_code_blocks =%d\t}\n", l_nb_code_blocks);*/
for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) {
opj_tcd_cblk_enc_t * l_code_block = p_precinct->cblks.enc;
if (l_code_block) {
- l_nb_code_blocks = p_precinct->block_size / sizeof(opj_tcd_cblk_enc_t);
+ l_nb_code_blocks = p_precinct->block_size / (OPJ_UINT32)sizeof(
+ opj_tcd_cblk_enc_t);
for (cblkno = 0; cblkno < l_nb_code_blocks; ++cblkno) {
if (l_code_block->data) {