manage case 0 frames inside yuv_num_frames function and correct some warnings with gcc4.5 (credit to Winfried)

This commit is contained in:
Mickael Savinaud
2011-07-28 10:45:22 +00:00
parent c2b0a8101b
commit e716a316f6
13 changed files with 45 additions and 50 deletions

View File

@@ -527,7 +527,7 @@ static void dwt_decode_tile(opj_tcd_tilecomp_t* tilec, int numres, DWT1DFN dwt_1
int w = tilec->x1 - tilec->x0;
h.mem = opj_aligned_malloc(dwt_decode_max_resolution(tr, numres) * sizeof(int));
h.mem = (int*)opj_aligned_malloc(dwt_decode_max_resolution(tr, numres) * sizeof(int));
v.mem = h.mem;
while( --numres) {

View File

@@ -236,7 +236,7 @@ static void j2k_read_unk(opj_j2k_t *j2k);
/* ----------------------------------------------------------------------- */
typedef struct j2k_prog_order{
OPJ_PROG_ORDER enum_prog;
char str_prog[4];
char str_prog[5];
}j2k_prog_order_t;
j2k_prog_order_t j2k_prog_order_list[] = {

View File

@@ -75,9 +75,10 @@ jpwl_epc_ms_t *jpwl_epc_create(opj_j2k_t *j2k, opj_bool esd_on, opj_bool red_on,
@param sensval pointer to an array of sensitivity values (if NULL, they will be automatically filled)
@return returns the freshly created ESD
*/
jpwl_esd_ms_t *jpwl_esd_create(opj_j2k_t *j2k, int comps, unsigned char addrm, unsigned char ad_size,
unsigned char senst, int se_size, int tileno,
unsigned long int svalnum, void *sensval);
jpwl_esd_ms_t *jpwl_esd_create(opj_j2k_t *j2k, int comps,
unsigned char addrm, unsigned char ad_size,
unsigned char senst, int se_size, int tileno,
unsigned long int svalnum, void *sensval);
/** this function is used to compare two JPWL markers based on
their relevant wishlist position
@@ -168,7 +169,7 @@ void j2k_add_marker(opj_codestream_info_t *cstr_info, unsigned short int type, i
/* expand the list? */
if ((cstr_info->marknum + 1) > cstr_info->maxmarknum) {
cstr_info->maxmarknum = 100 + (int) ((float) cstr_info->maxmarknum * 1.0F);
cstr_info->marker = opj_realloc(cstr_info->marker, cstr_info->maxmarknum);
cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum);
}
/* add the marker */
@@ -906,7 +907,7 @@ void j2k_read_epc(opj_j2k_t *j2k) {
unsigned short int Lepc, Pcrc = 0x0000;
unsigned char Pepc;
opj_cio_t *cio = j2k->cio;
char *ans1;
const char *ans1;
/* Simply read the EPC parameters */
Lepcp = cio_tell(cio);

View File

@@ -1200,9 +1200,10 @@ int jpwl_esds_add(opj_j2k_t *j2k, jpwl_marker_t *jwmarker, int *jwmarker_num,
return 0;
}
jpwl_esd_ms_t *jpwl_esd_create(opj_j2k_t *j2k, int comp, unsigned char addrm, unsigned char ad_size,
unsigned char senst, unsigned char se_size, int tileno,
unsigned long int svalnum, void *sensval) {
jpwl_esd_ms_t *jpwl_esd_create(opj_j2k_t *j2k, int comp,
unsigned char addrm, unsigned char ad_size,
unsigned char senst, int se_size, int tileno,
unsigned long int svalnum, void *sensval) {
jpwl_esd_ms_t *esd = NULL;
@@ -1232,7 +1233,7 @@ jpwl_esd_ms_t *jpwl_esd_create(opj_j2k_t *j2k, int comp, unsigned char addrm, un
/* packet mode */
case (0):
ad_size = 0; /* as per the standard */
esd->sensval_size = se_size;
esd->sensval_size = (unsigned int)se_size;
break;
/* byte range */