[1.5] enhance some new JPIP files with opj_config inclusion and using of opj_free/opj_calloc functions (credit to Julien Malik)

This commit is contained in:
Mickael Savinaud 2011-10-06 09:36:22 +00:00
parent 40b4ecfaec
commit 73106fe839
7 changed files with 15 additions and 20 deletions

View File

@ -7,6 +7,7 @@ What's New for OpenJPEG
October 6, 2011
+ [mickael] enhance html documentation generation with cmake and add a openjpeg mainpage to this doc
+ [mickael] enhance some new JPIP files with opj_config inclusion and using of opj_free/opj_calloc functions (credit to Julien Malik)
October 1, 2011
+ [vincent] fix output when --disable-shared or --disable-static is passed to configure. Minor fix for jpwl compilation.

View File

@ -31,9 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "cidx_manager.h"
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
/*
@ -76,7 +74,7 @@ int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_i
int num_box = 0;
opj_bool EPHused;
box = (opj_jp2_box_t *)calloc( 32, sizeof(opj_jp2_box_t));
box = (opj_jp2_box_t *)opj_calloc( 32, sizeof(opj_jp2_box_t));
for (i=0;i<2;i++){
@ -120,7 +118,7 @@ int write_cidx( int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_i
cio_seek( cio, lenp+len);
}
free( box);
opj_free( box);
return len;
}

View File

@ -107,6 +107,7 @@ static INLINE long lrintf(float f){
#include "j2k_lib.h"
#include "opj_malloc.h"
#include "event.h"
#include "bio.h"
#include "cio.h"
#include "image.h"

View File

@ -35,8 +35,7 @@
#include <stdlib.h>
#include <math.h>
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
/*
* Write faix box of phix
@ -56,7 +55,7 @@ int write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
int len, lenp=0, compno, i;
opj_jp2_box_t *box;
box = (opj_jp2_box_t *)calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t));
box = (opj_jp2_box_t *)opj_calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t));
for( i=0;i<2;i++){
if (i) cio_seek( cio, lenp);
@ -78,7 +77,7 @@ int write_phix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
cio_seek( cio, lenp+len);
}
free(box);
opj_free(box);
return len;
}

View File

@ -36,8 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
/*
* Write faix box of ppix
@ -59,7 +58,7 @@ int write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
// printf("cstr_info.packno %d\n", cstr_info.packno); //NMAX?
box = (opj_jp2_box_t *)calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t));
box = (opj_jp2_box_t *)opj_calloc( cstr_info.numcomps, sizeof(opj_jp2_box_t));
for (i=0;i<2;i++){
if (i) cio_seek( cio, lenp);
@ -81,7 +80,7 @@ int write_ppix( int coff, opj_codestream_info_t cstr_info, opj_bool EPHused, int
cio_seek( cio, lenp+len);
}
free(box);
opj_free(box);
return len;
}

View File

@ -36,8 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
/*
* Write tile-part headers mhix box
@ -57,7 +56,7 @@ int write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio)
opj_jp2_box_t *box;
lenp = 0;
box = (opj_jp2_box_t *)calloc( cstr_info.tw*cstr_info.th, sizeof(opj_jp2_box_t));
box = (opj_jp2_box_t *)opj_calloc( cstr_info.tw*cstr_info.th, sizeof(opj_jp2_box_t));
for ( i = 0; i < 2 ; i++ ){
if (i)
@ -79,7 +78,7 @@ int write_thix( int coff, opj_codestream_info_t cstr_info, opj_cio_t *cio)
cio_seek( cio, lenp+len);
}
free(box);
opj_free(box);
return len;
}
@ -89,7 +88,6 @@ int write_tilemhix( int coff, opj_codestream_info_t cstr_info, int tileno, opj_c
int i;
opj_tile_info_t tile;
opj_tp_info_t tp;
int marknum;
int len, lenp;
opj_marker_info_t *marker;

View File

@ -34,8 +34,7 @@
*/
#include <math.h>
#include "indexbox_manager.h"
#include "cio.h"
#include "opj_includes.h"
#define MAX(a,b) ((a)>(b)?(a):(b))