| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2009.10.07 21:10 "Re: Wrong Native Bit Order on Intel x86_64", by Toby ThainOn 7-Oct-09, at 4:47 PM, Igor Skochinsky wrote: > Hello Bob, > > Wednesday, October 7, 2009, 9:59:45 PM, you wrote: > > BF> On Wed, 7 Oct 2009, Eskandar Ensafi wrote: >>> >>> I noticed that when I tried to compile tiff-4.0.0-beta4, the >>> native bit order on 64-bit x86_64 systems was >>> determined to be FILLORDER_MSB2LSB (not correct as far as I know) >>> whereas on 32-bit x86 systems, it is >>> correctly determined to be FILLORDER_LSB2MSB. I checked my >>> current tiff-3.8.2 installation (the standard >>> package provided in Red Hat Enterprise Linux 5.4), and the same >>> discrepancy existed in tiff-3.8. > > BF> This is very interesting. It seems like there should be some > BF> efficient way to determine this at run-time rather than via the > BF> configure script. I am not sure how to test for native fill order > BF> though. > > My guess would be: > > if ( (1<<1) == 2 ) > // LSB2MSB > else > // MSB2LSB This cannot work, of course. As Eskandar suspected, native bit numbering is not visible to C. You could expose it using platform specific assembler, but it's probably pointless effort. --Toby > > -- > WBR, > Igor mailto:skochinsky@mail.ru > > _______________________________________________ > Tiff mailing list: Tiff@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/tiff > http://www.remotesensing.org/libtiff/ |
|||||||