changed the name of j2k_realloc to opj_realloc

This commit is contained in:
Freeimage 2006-01-18 20:10:23 +00:00
parent 69dcece31a
commit 8f9f70f922
4 changed files with 6 additions and 6 deletions

View File

@ -843,7 +843,7 @@ static void j2k_read_ppm(opj_j2k_t *j2k) {
cp->ppm_data_first = cp->ppm_data;
cp->ppm_len = N_ppm;
} else { /* NON-first PPM marker */
cp->ppm_data = (unsigned char *) j2k_realloc(cp->ppm_data, (N_ppm + cp->ppm_store) * sizeof(unsigned char));
cp->ppm_data = (unsigned char *) opj_realloc(cp->ppm_data, (N_ppm + cp->ppm_store) * sizeof(unsigned char));
cp->ppm_data_first = cp->ppm_data;
cp->ppm_len = N_ppm + cp->ppm_store;
}
@ -875,7 +875,7 @@ static void j2k_read_ppt(opj_j2k_t *j2k) {
tcp->ppt_store = 0;
tcp->ppt_len = len - 3;
} else { /* NON-first PPT marker */
tcp->ppt_data = (unsigned char *) j2k_realloc(tcp->ppt_data, (len - 3 + tcp->ppt_store) * sizeof(unsigned char));
tcp->ppt_data = (unsigned char *) opj_realloc(tcp->ppt_data, (len - 3 + tcp->ppt_store) * sizeof(unsigned char));
tcp->ppt_data_first = tcp->ppt_data;
tcp->ppt_len = len - 3 + tcp->ppt_store;
}

View File

@ -65,7 +65,7 @@ void* opj_malloc( size_t size ) {
return memblock;
}
void* j2k_realloc( void *memblock, size_t size ) {
void* opj_realloc( void *memblock, size_t size ) {
return realloc(memblock, size);
}

View File

@ -58,7 +58,7 @@ Reallocate memory blocks.
@param size New size in bytes
@return Returns a void pointer to the reallocated (and possibly moved) memory block
*/
void* j2k_realloc( void *memblock, size_t size );
void* opj_realloc( void *memblock, size_t size );
/**
Deallocates or frees a memory block.

View File

@ -447,7 +447,7 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int cur
}
/* << Modification of the RATE */
/* tile->comps=(opj_tcd_tilecomp_t*)j2k_realloc(tile->comps,image->numcomps*sizeof(opj_tcd_tilecomp_t)); */
/* tile->comps=(opj_tcd_tilecomp_t*)opj_realloc(tile->comps,image->numcomps*sizeof(opj_tcd_tilecomp_t)); */
for (compno = 0; compno < tile->numcomps; compno++) {
opj_tccp_t *tccp = &tcp->tccps[compno];
@ -462,7 +462,7 @@ void tcd_init_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int cur
tilec->data = (int *) opj_malloc((tilec->x1 - tilec->x0) * (tilec->y1 - tilec->y0) * sizeof(int));
tilec->numresolutions = tccp->numresolutions;
/* tilec->resolutions=(opj_tcd_resolution_t*)j2k_realloc(tilec->resolutions,tilec->numresolutions*sizeof(opj_tcd_resolution_t)); */
/* tilec->resolutions=(opj_tcd_resolution_t*)opj_realloc(tilec->resolutions,tilec->numresolutions*sizeof(opj_tcd_resolution_t)); */
for (resno = 0; resno < tilec->numresolutions; resno++) {
int pdx, pdy;