#1838 closed defect (fixed)
Difference in checksum calculated for MrSID on PowerPC and x86 architectures
Reported by: | Mateusz Łoskot | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.5.0 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | mrsid checksum |
Cc: | warmerdam |
Description
GDAL on eptimetheus (PowerPC) reports different checksum for test MrSID dataset than on x86 architectures:
Running tests from gdrivers/mrsid.py TEST: mrsid_1 ... fail Checksum for mercator.sid is 54178, but expected 54132.
Possible reasons of the difference are:
- floating point variation
- different version of SDK
Frank's suggestion is to alter the test case to calculate the mean and standard deviation of the image within a tight band instead of using the checksum. Tests dependant on the checksum calculation seem to be risky for lossily compressed images.
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Cc: | added |
---|---|
Milestone: | → 1.5.0 |
Owner: | changed from | to
Mateusz,
Please rework the test to compute the mean and std.dev of the image, and verify that it stays within a very narrow band instead of depending on the fragile checksum.
There may be examples of this technique in ecw.py.
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Frank reworked the test to use statistics. Declaring this one dead.
comment:4 by , 16 years ago
I have a hunch about this one. x86 tends to use 80-bit floating point numbers for arithmetic unless you explicitly tell the compiler to use IEEE 754 floating point only. The Mr_SID code could very well be built without this flag, so on x86 it is using a long double instead of an IEEE double. Just a thought though.
The PowerPC uses an IEEE standard floating point format. It seems very likely that the different checksum is because of different bits being generated for the image