diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-07-28 10:45:22 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-07-28 10:45:22 +0000 |
| commit | e716a316f60f66cd5a6fb07b88b2cb8b9c815cec (patch) | |
| tree | 4f7e13104780fa5ac5199111cd64088ada0d9918 /libopenjpeg | |
| parent | c2b0a8101b21babd3e3572c18497df2c9a1f85ac (diff) | |
manage case 0 frames inside yuv_num_frames function and correct some warnings with gcc4.5 (credit to Winfried)
Diffstat (limited to 'libopenjpeg')
| -rw-r--r-- | libopenjpeg/dwt.c | 2 | ||||
| -rw-r--r-- | libopenjpeg/j2k.c | 2 | ||||
| -rw-r--r-- | libopenjpeg/jpwl/jpwl.c | 11 | ||||
| -rw-r--r-- | libopenjpeg/jpwl/jpwl_lib.c | 9 |
4 files changed, 13 insertions, 11 deletions
diff --git a/libopenjpeg/dwt.c b/libopenjpeg/dwt.c index 3436b103..e7d74e2f 100644 --- a/libopenjpeg/dwt.c +++ b/libopenjpeg/dwt.c @@ -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) { diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index cbdee114..0b09899a 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -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[] = { diff --git a/libopenjpeg/jpwl/jpwl.c b/libopenjpeg/jpwl/jpwl.c index 707e46fd..a910ea78 100644 --- a/libopenjpeg/jpwl/jpwl.c +++ b/libopenjpeg/jpwl/jpwl.c @@ -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);
diff --git a/libopenjpeg/jpwl/jpwl_lib.c b/libopenjpeg/jpwl/jpwl_lib.c index f60d33b1..90a71cec 100644 --- a/libopenjpeg/jpwl/jpwl_lib.c +++ b/libopenjpeg/jpwl/jpwl_lib.c @@ -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 */ |
