-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct lossless issue on linux x86 #579
Conversation
this fixes the symptoms, not the bug |
opj_tcd_makelayer takes a threshold that's computed in opj_tcd_rateallocate the computation for the threshold in case of lossless transform is identical to the computation in opj_tcd_makelayer. Thus, it expects "computation" == stored_threshold to be true at some point. IMHO, this PR removes the dependency on 64bits precision. If you fill it does not fix the issue properly, I'll revert the "invalid fix" & only merge the tests in. |
It doesn't change the outcome of the test suite, that's weird...
Given the definition of DBL_EPSILON: #define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ It might not be a good fix. We might want to make the check with epsilon directly in the test in opj_tcd_makelayer if ((thresh - (dd / dr)) <= DBL_EPSILON) /* do not rely on float equality, check with DBL_EPSILON margin */
n = passno + 1; I think the later would be OK, do you agree ? |
@mayeut that's a lot better ! I still do not like the equality (does not work for floating point anyway). So I would write:
Do we need an |
Remove float equality test. Such a test has no meaning.
I removed if ((thresh - (dd / dr)) < DBL_EPSILON)
|
ACK. Everything is fine for me. Thx |
Correct lossless issue on linux x86 Fix #571
Update #571