Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#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 darkblueB, 17 years ago

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

comment:2 by warmerdam, 17 years ago

Cc: warmerdam added
Milestone: 1.5.0
Owner: changed from warmerdam to Mateusz Łoskot

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 hobu, 16 years ago

Resolution: fixed
Status: newclosed

Frank reworked the test to use statistics. Declaring this one dead.

comment:4 by pvachon, 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.

Note: See TracTickets for help on using tickets.