/* 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_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum);
+ cstr_info->maxmarknum += 100;
+ cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum * sizeof(opj_marker_info_t));
}
/* add the marker */
jpwl_epb_ms_t *epb_mark;
jpwl_epc_ms_t *epc_mark;
jpwl_esd_ms_t *esd_mark;
+ (void)image;
/* find (SOC + SIZ) length */
/* I assume SIZ is always the first marker after SOC */
/* add all the lengths of the markers which are len-ready and stay within SOC and SOT */
for (mm = 0; mm < jwmarker_num; mm++) {
- if ((jwmarker[mm].pos >=0) && (jwmarker[mm].pos < sot_pos)) {
+ if ( jwmarker[mm].pos < sot_pos) { /* jwmarker[mm].pos >=0 since ulong */
if (jwmarker[mm].len_ready)
left_MHmarks_len += jwmarker[mm].len + 2;
else {
pprot = j2k->cp->pprot[packspec++];
}
- //printf("Tile %02d, pack %02d ==> %d\n", tileno, packno, pprot);
+ /*printf("Tile %02d, pack %02d ==> %d\n", tileno, packno, pprot);*/
}
unsigned char *jpwl_buf, *orig_buf;
unsigned long int orig_pos;
double epbcoding_time = 0.0, esdcoding_time = 0.0;
+ (void)image;
/* Order JPWL markers according to their wishlist position */
qsort((void *) jwmarker, (size_t) jwmarker_num, sizeof (jpwl_marker_t), jpwl_markcomp);
cio_seek(cio, Lepcp + Lepc);
}
+#if 0
void j2k_write_epc(opj_j2k_t *j2k) {
unsigned long int DL, Lepcp, Pcrcp, l;
j2k_add_marker(j2k->cstr_info, J2K_MS_EPC, Lepcp - 2, Lepc + 2);
}
+#endif
void j2k_read_epb(opj_j2k_t *j2k) {
unsigned long int LDPepb, Pepb;
}
}
+#else
+ (void)j2k;
+ (void)tcd;
+ (void)tileno;
#endif
return OPJ_TRUE;