fixed bigendian support for swabbing double complex samples

This commit is contained in:
Frank Warmerdam 2005-07-31 03:33:11 +00:00
parent b7a295ef98
commit 165334b180
2 changed files with 9 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-07-30 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dir.c: Fixed up support for swapping "double complex"
values (128 bits as 2 64 bits doubles). GDAL gcore tests now
pass on bigendian (macosx) system.
2005-07-28 Andrey Kiselev <dron@remotesensing.org>
* libtiff/{tif_aux.c, tif_dirread.c, tif_fax3.c, tiffiop.h}: Rename

View File

@ -1,4 +1,4 @@
/* $Id: tif_dir.c,v 1.54 2005-07-27 19:56:44 dron Exp $ */
/* $Id: tif_dir.c,v 1.55 2005-07-31 03:33:12 fwarmerdam Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -156,6 +156,8 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
tif->tif_postdecode = _TIFFSwab32BitData;
else if (td->td_bitspersample == 64)
tif->tif_postdecode = _TIFFSwab64BitData;
else if (td->td_bitspersample == 128) /* two 64's */
tif->tif_postdecode = _TIFFSwab64BitData;
}
break;
case TIFFTAG_COMPRESSION:
@ -334,10 +336,6 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
&& td->td_bitspersample == 64
&& tif->tif_postdecode == _TIFFSwab64BitData )
tif->tif_postdecode = _TIFFSwab32BitData;
else if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP
&& td->td_bitspersample == 128
&& tif->tif_postdecode == NULL )
tif->tif_postdecode = _TIFFSwab64BitData;
break;
case TIFFTAG_IMAGEDEPTH:
td->td_imagedepth = va_arg(ap, uint32);