This commit is contained in:
fechen123 2022-11-01 05:42:35 +09:00 committed by GitHub
commit ae11c66a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -633,7 +633,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
if (distoachieved < distotarget) {
hi = thresh;
stable_thresh = thresh;
if (distoachieved > DBL_EPSILON) {
stable_thresh = thresh;
}
continue;
} else {
lo = thresh;
@ -645,7 +647,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
if (distoachieved < distotarget) {
hi = thresh;
stable_thresh = thresh;
if (distoachieved > DBL_EPSILON) {
stable_thresh = thresh;
}
continue;
}
lo = thresh;
@ -690,7 +694,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);
} else {