Updating tcd.c to fix issue #1033
This commit is contained in:
parent
53d265576a
commit
b7f042f431
|
@ -586,6 +586,7 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
|
||||||
|
|
||||||
if (distoachieved < distotarget) {
|
if (distoachieved < distotarget) {
|
||||||
hi = thresh;
|
hi = thresh;
|
||||||
|
if (distoachieved > DBL_EPSILON)
|
||||||
stable_thresh = thresh;
|
stable_thresh = thresh;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -598,6 +599,7 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
|
||||||
|
|
||||||
if (distoachieved < distotarget) {
|
if (distoachieved < distotarget) {
|
||||||
hi = thresh;
|
hi = thresh;
|
||||||
|
if (distoachieved > DBL_EPSILON)
|
||||||
stable_thresh = thresh;
|
stable_thresh = thresh;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -618,7 +620,7 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goodthresh = stable_thresh == 0 ? thresh : stable_thresh;
|
goodthresh = stable_thresh == 0 ? lo : stable_thresh;
|
||||||
|
|
||||||
opj_t2_destroy(t2);
|
opj_t2_destroy(t2);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue