update tcd.c to fix issue #1033

This commit is contained in:
fechen123 2017-10-18 19:46:29 -04:00 committed by GitHub
parent b7f042f431
commit 9bbbdccc89
1 changed files with 6 additions and 4 deletions

View File

@ -586,8 +586,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
if (distoachieved < distotarget) {
hi = thresh;
if (distoachieved > DBL_EPSILON)
if (distoachieved > DBL_EPSILON) {
stable_thresh = thresh;
}
continue;
} else {
lo = thresh;
@ -599,8 +600,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
if (distoachieved < distotarget) {
hi = thresh;
if (distoachieved > DBL_EPSILON)
if (distoachieved > DBL_EPSILON) {
stable_thresh = thresh;
}
continue;
}
lo = thresh;