Merge 9bbbdccc89
into 2d606701e8
This commit is contained in:
commit
ae11c66a93
|
@ -633,7 +633,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
|
||||||
|
|
||||||
if (distoachieved < distotarget) {
|
if (distoachieved < distotarget) {
|
||||||
hi = thresh;
|
hi = thresh;
|
||||||
stable_thresh = thresh;
|
if (distoachieved > DBL_EPSILON) {
|
||||||
|
stable_thresh = thresh;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
lo = thresh;
|
lo = thresh;
|
||||||
|
@ -645,7 +647,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd,
|
||||||
|
|
||||||
if (distoachieved < distotarget) {
|
if (distoachieved < distotarget) {
|
||||||
hi = thresh;
|
hi = thresh;
|
||||||
stable_thresh = thresh;
|
if (distoachieved > DBL_EPSILON) {
|
||||||
|
stable_thresh = thresh;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
lo = thresh;
|
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);
|
opj_t2_destroy(t2);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue