Corrected allocation to take into account the EOC marker
This commit is contained in:
parent
17f0828c74
commit
00e440ebdb
|
@ -172,6 +172,10 @@ void tcd_malloc_encode(opj_tcd_t *tcd, opj_image_t * image, opj_cp_t * cp, int c
|
||||||
if (!j && tcp->rates[j] < 30)
|
if (!j && tcp->rates[j] < 30)
|
||||||
tcp->rates[j] = 30;
|
tcp->rates[j] = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(j == (tcp->numlayers-1)){
|
||||||
|
tcp->rates[j] = tcp->rates[j]- 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* << Modification of the RATE */
|
/* << Modification of the RATE */
|
||||||
|
@ -1055,8 +1059,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
|
||||||
double lo = min;
|
double lo = min;
|
||||||
double hi = max;
|
double hi = max;
|
||||||
int success = 0;
|
int success = 0;
|
||||||
/* TODO: remove maxlen */
|
int maxlen = tcd_tcp->rates[layno] ? int_min(((int) ceil(tcd_tcp->rates[layno])), len) : len;
|
||||||
int maxlen = tcd_tcp->rates[layno] ? int_min(((int) ceil(tcd_tcp->rates[layno]- 2)), len) : len;
|
|
||||||
double goodthresh = 0;
|
double goodthresh = 0;
|
||||||
double stable_thresh = 0;
|
double stable_thresh = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1444,3 +1447,4 @@ void tcd_free_decode_tile(opj_tcd_t *tcd, int tileno) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue