diff --git a/ChangeLog b/ChangeLog index cda13dfb..0e69da89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-12-19 Mike Welles *** 3.5.6 release *** + + * Took out LZW Encoding from tif_lzw.c + + * Created HOWTO-RELEASE + + * Created html/v3.5.6.html + + * updated index.html + 2000-12-01 Frank Warmerdam * Added patches for EOFB support in tif_fax3.c and tif_fax3.h. diff --git a/HOWTO-RELEASE b/HOWTO-RELEASE new file mode 100644 index 00000000..6ceecc80 --- /dev/null +++ b/HOWTO-RELEASE @@ -0,0 +1,74 @@ +HOWTO-RELEASE: +Notes on releasing. + +1. + +Commit any unsaved changes. + +2. + +"make clean" + +3. + +Create html/vX.X.html. Take ChangeLog entries and html-ify in +there. Easist thing to do is take html/vX.(X-1).html and use +it as a template. + +4. + +Add any new files that have been created that should be part +of the distrubituion (like the html file in step 2), to +TIFFFILES in Makefile.in + +5. + +Make sure tif_dir.c in lzw-compression-kit is in sync with the +main tree. + +6. + +Increment version in file "VERSION" + + +7. + +sh configure; make; make install (to test). + + +8. + +make release. + +9. + +make distclean + +10. + +cvs commit + +11. + +ftp ftp.onshore.com; +cd /home/ftp/pub/libtiff +put ../tiff-vn-n-n.zip . +put ../tiff-vn-n-n.tar.gz . + +12 + +ftp ftp.libtiff.org +lcd html +mput *.html +put ../tiff-vn-n-n.zip . +put ../tiff-vn-n-n.tar.gz . + +13. + +Announce to list, tiff@olympiakos.com + + + + + + diff --git a/RELEASE-DATE b/RELEASE-DATE index ece99fcc..075fa257 100644 --- a/RELEASE-DATE +++ b/RELEASE-DATE @@ -1 +1 @@ -04/12/2000 +12/19/2000 diff --git a/VERSION b/VERSION index 7d280e2c..c4928258 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.5 +3.5.6 diff --git a/dist/tiff.version b/dist/tiff.version index 14012de2..43d3e2e7 100644 --- a/dist/tiff.version +++ b/dist/tiff.version @@ -1 +1 @@ -define TIFF_VNUM "3.5.5 (release)" +define TIFF_VNUM "3.5.6 (release)" diff --git a/html/index.html b/html/index.html index 79109606..78ee38b1 100644 --- a/html/index.html +++ b/html/index.html @@ -14,11 +14,11 @@ TIFF Software Home Page: http://www.libtiff.org
FAQ Page: forthcoming
-Latest Release: v3.5.5
-Latest Software: v3.5.5
+Latest Release: v3.5.6
+Latest Software: v3.5.6
Master FTP Site: ftp.onshore.com , directory pub/libtiff (Active mode FTP only!)
-HTTP Download: http://www.libtiff.org/tiff-v3.5.5.tar.gz, http://www.libtiff.org/tiff-v3.5.5.zip
-LZW Compression Kit: libtiff-lzw-compression-kit-1.1.tar.gz
+HTTP Download: http://www.libtiff.org/tiff-v3.5.6.tar.gz, http://www.libtiff.org/tiff-v3.5.6.zip
+LZW Compression Kit: libtiff-lzw-compression-kit-1.1.tar.gz
Mailing List: tiff@olympiakos.com
Mailing List Subscription: tiff-request@olympiakos.com ("subscribe tiff" in body of message).
Mailing List Archive: http://www.remotesensing.org/lists/libtiff_archive/maillist.html
@@ -84,7 +84,7 @@ The following sections are included in this documentation:


-$Id: index.html,v 1.28 2000-07-13 14:58:16 mwelles Exp $ +$Id: index.html,v 1.29 2000-12-19 20:12:53 mwelles Exp $ diff --git a/html/v3.5.5.html b/html/v3.5.5.html index ebbad1b9..fcba45e6 100644 --- a/html/v3.5.5.html +++ b/html/v3.5.5.html @@ -1,7 +1,7 @@ -Changes in TIFF v3.5.4 +Changes in TIFF v3.5.5 @@ -149,7 +149,7 @@ The following information is located here:
-Last updated $Date: 2000-03-29 04:35:28 $. +Last updated $Date: 2000-12-19 20:12:53 $. diff --git a/html/v3.5.6.html b/html/v3.5.6.html new file mode 100644 index 00000000..8f107379 --- /dev/null +++ b/html/v3.5.6.html @@ -0,0 +1,180 @@ + + + +Changes in TIFF v3.5.6 + + + + + + + + +TIFF CHANGE INFORMATION + + + + +

+This document describes the changes made to the software between the +previous and current versions (see above). +If you don't find something listed here, then it was not done in this +timeframe, or it was not considered important enough to be mentioned. +The following information is located here: +

+

+


+ +CHANGES IN THE SOFTWARE CONFIGURATION: + +
    + +
  • Added GNULDdso target an`d switched linux and freebsd to use it. +
  • tools/Makefile.in: Modified to install properly on SGI. +
  • configure: Fixed stupid mistake in libc6 test on Linux +
+ +


+ +CHANGES IN LIBTIFF: + + +
    + +
  • tools/rgb2ycbcr.c: fixed output strip size to account for vertical + roundup if rows_per_strip not a multiple of vertical sample size. + +
  • tif_dir.c: Clear TIFF_ISTILED flag in TIFFDefaultDirectory + as per http://bugzilla.remotesensing.org/show_bug.cgi?id=18 + from vandrove@vc.cvut.cz. + +
  • Modified tif_packbits.c decoding to avoid overrunning the + output buffer, and to issue a warning if data needs to be + discarded. See http://bugzilla.remotesensing.org/show_bug.cgi?id=18 + +
  • Modified TIFFClientOpen() to emit an error on an attempt to + open a comperessed file for update (O_RDWR/r+) access. This is + because the compressor/decompressor code gets very confused when + the mode is O_RDWR, assuming this means writing only. See + bug http://bugzilla.remotesensing.org/show_bug.cgi?id=13 + +
  • Applied patch for 0x0000 sequences in tif_fax3.h's definition + of EXPAND1D() as per bug 11 (from Roman). + +
  • Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve + cygwin compatibility. + +
  • Applied patch from Roman Shpount to tif_fax3.c. This seems to + be a proper fix to the buffer sizing problem. See + http://bugzilla.remotesensing.org/show_bug.cgi?id=11 + +
  • Fixed tif_getimage.c to fix overrun bug with YCbCr images without + downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10 + Thanks to Nick Lamb for reporting the + bug and proving the patch. + +
  • Fixed tif_jpeg.c so avoid destroying the decompressor before + we are done access data thanks to bug report from: + Michael Eckstein . + +
  • tif_flush.c: Changed so that TIFFFlushData() doesn't return an + error when TIFF_BEENWRITING is not set. This ensures that the + directory contents can still be flushed by TIFFFlush(). + +
  • Reverted tif_flush change. + +
  • tif_open.c: Don't set MMAP for O_RDWR files. + +
  • tif_open.c: Set STRIPCHOP_DEFAULT for O_RDWR as well as O_RDONLY + so that files opened for update can be strip chopped too. + +
  • tif_read.c: fixed up bug with files missing rowsperstrip and + the strips per separation fix done a few weeks ago. + +
  • Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and + SAMPLEFORMAT_COMPLEXINT. + +
  • index.html, bugs.html: added bugzilla info. + +
  • tif_read.c: fix subtle bug with determining the number of + rows for strips that are the last strip in a separation but + not the last strip of all in TIFFReadEncodedStrip(). + +
  • Applied 16/32 bit fix to tif_fax3.c. Fix supplied by + Peter Skarpetis + +
  • Modified tiffio.h logic with regard to including windows.h. It + won't include it when building with __CYGWIN__. + +
  • README: update to mention www.libtiff.org, don't list Sam's old + email address. + +
  • configure: Fixed DSO test for Linux as per patch from + Jan Van Buggenhout . + +
  • libtiff/tif_dirread.c: Don't use estimate strip byte count for + one tile/strip images with an offset, and byte count of zero. These + could be "unpopulated" images. + +
  • contrib/addtiffo: Added "averaging" resampling option. + +
  • tools/tiffsplit.c: Copy TIFFTAG_SAMPLEFORMAT. + +
  • tif_win32.c: Applied patch to fix overreads and ovverwrites + caught by BoundsChecker. From Arvan Pritchard + (untested). + +
  • tif_getimage.c: Applied patch to silence VC6 warnings. From + Arvan Pritchard + +
  • tif_lzw.c: Applied patch to silence VC6 warnings. From + Arvan Pritchard + + + +
+ +


+ +CHANGES IN THE TOOLS: + +
    + +
  • Modified tiff2bw to ensure portions add to 100%, and that + white is properly recovered. See bug + http://bugzilla.remotesensing.org/show_bug.cgi?id=15 Patch + c/o Stanislav Brabec + +
  • Added contrib/stream (stream io) code submitted by Avi Bleiweiss. + +
+ +


+ +CHANGES IN THE LZW COMPRESSION KIT +
    + +
  • updated tif_dir.c to reflect changes to no-lzw tif_dir.c + +
+ + TIFF home page.
+ +
+ +Last updated $Date: 2000-12-19 20:12:53 $. + + + diff --git a/libtiff/tif_lzw.c b/libtiff/tif_lzw.c index 812052ad..4afeca30 100644 --- a/libtiff/tif_lzw.c +++ b/libtiff/tif_lzw.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_lzw.c,v 1.6 2000-04-04 14:43:35 mwelles Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_lzw.c,v 1.7 2000-12-19 20:12:53 mwelles Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -636,299 +636,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s) } #endif /* LZW_COMPAT */ -/* - * LZW Encoding. - */ -static int -LZWSetupEncode(TIFF* tif) -{ - LZWEncodeState* sp = EncoderState(tif); - static const char module[] = "LZWSetupEncode"; - - assert(sp != NULL); - sp->enc_hashtab = (hash_t*) _TIFFmalloc(HSIZE*sizeof (hash_t)); - if (sp->enc_hashtab == NULL) { - TIFFError(module, "No space for LZW hash table"); - return (0); - } - return (1); -} - -/* - * Reset encoding state at the start of a strip. - */ -static int -LZWPreEncode(TIFF* tif, tsample_t s) -{ - LZWEncodeState *sp = EncoderState(tif); - - (void) s; - assert(sp != NULL); - sp->lzw_nbits = BITS_MIN; - sp->lzw_maxcode = MAXCODE(BITS_MIN); - sp->lzw_free_ent = CODE_FIRST; - sp->lzw_nextbits = 0; - sp->lzw_nextdata = 0; - sp->enc_checkpoint = CHECK_GAP; - sp->enc_ratio = 0; - sp->enc_incount = 0; - sp->enc_outcount = 0; - /* - * The 4 here insures there is space for 2 max-sized - * codes in LZWEncode and LZWPostDecode. - */ - sp->enc_rawlimit = tif->tif_rawdata + tif->tif_rawdatasize-1 - 4; - cl_hash(sp); /* clear hash table */ - sp->enc_oldcode = (hcode_t) -1; /* generates CODE_CLEAR in LZWEncode */ - return (1); -} - -#define CALCRATIO(sp, rat) { \ - if (incount > 0x007fffff) { /* NB: shift will overflow */\ - rat = outcount >> 8; \ - rat = (rat == 0 ? 0x7fffffff : incount/rat); \ - } else \ - rat = (incount<<8) / outcount; \ -} -#define PutNextCode(op, c) { \ - nextdata = (nextdata << nbits) | c; \ - nextbits += nbits; \ - *op++ = (u_char)(nextdata >> (nextbits-8)); \ - nextbits -= 8; \ - if (nextbits >= 8) { \ - *op++ = (u_char)(nextdata >> (nextbits-8)); \ - nextbits -= 8; \ - } \ - outcount += nbits; \ -} - -/* - * Encode a chunk of pixels. - * - * Uses an open addressing double hashing (no chaining) on the - * prefix code/next character combination. We do a variant of - * Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's - * relatively-prime secondary probe. Here, the modular division - * first probe is gives way to a faster exclusive-or manipulation. - * Also do block compression with an adaptive reset, whereby the - * code table is cleared when the compression ratio decreases, - * but after the table fills. The variable-length output codes - * are re-sized at this point, and a CODE_CLEAR is generated - * for the decoder. - */ -static int -LZWEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s) -{ - register LZWEncodeState *sp = EncoderState(tif); - register long fcode; - register hash_t *hp; - register int h, c; - hcode_t ent; - long disp; - long incount, outcount, checkpoint; - long nextdata, nextbits; - int free_ent, maxcode, nbits; - tidata_t op, limit; - - (void) s; - if (sp == NULL) - return (0); - /* - * Load local state. - */ - incount = sp->enc_incount; - outcount = sp->enc_outcount; - checkpoint = sp->enc_checkpoint; - nextdata = sp->lzw_nextdata; - nextbits = sp->lzw_nextbits; - free_ent = sp->lzw_free_ent; - maxcode = sp->lzw_maxcode; - nbits = sp->lzw_nbits; - op = tif->tif_rawcp; - limit = sp->enc_rawlimit; - ent = sp->enc_oldcode; - - if (ent == (hcode_t) -1 && cc > 0) { - /* - * NB: This is safe because it can only happen - * at the start of a strip where we know there - * is space in the data buffer. - */ - PutNextCode(op, CODE_CLEAR); - ent = *bp++; cc--; incount++; - } - while (cc > 0) { - c = *bp++; cc--; incount++; - fcode = ((long)c << BITS_MAX) + ent; - h = (c << HSHIFT) ^ ent; /* xor hashing */ -#ifdef _WINDOWS - /* - * Check hash index for an overflow. - */ - if (h >= HSIZE) - h -= HSIZE; -#endif - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) { - ent = hp->code; - continue; - } - if (hp->hash >= 0) { - /* - * Primary hash failed, check secondary hash. - */ - disp = HSIZE - h; - if (h == 0) - disp = 1; - do { - /* - * Avoid pointer arithmetic 'cuz of - * wraparound problems with segments. - */ - if ((h -= disp) < 0) - h += HSIZE; - hp = &sp->enc_hashtab[h]; - if (hp->hash == fcode) { - ent = hp->code; - goto hit; - } - } while (hp->hash >= 0); - } - /* - * New entry, emit code and add to table. - */ - /* - * Verify there is space in the buffer for the code - * and any potential Clear code that might be emitted - * below. The value of limit is setup so that there - * are at least 4 bytes free--room for 2 codes. - */ - if (op > limit) { - tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); - TIFFFlushData1(tif); - op = tif->tif_rawdata; - } - PutNextCode(op, ent); - ent = c; - hp->code = free_ent++; - hp->hash = fcode; - if (free_ent == CODE_MAX-1) { - /* table is full, emit clear code and reset */ - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } else { - /* - * If the next entry is going to be too big for - * the code size, then increase it, if possible. - */ - if (free_ent > maxcode) { - nbits++; - assert(nbits <= BITS_MAX); - maxcode = (int) MAXCODE(nbits); - } else if (incount >= checkpoint) { - long rat; - /* - * Check compression ratio and, if things seem - * to be slipping, clear the hash table and - * reset state. The compression ratio is a - * 24+8-bit fractional number. - */ - checkpoint = incount+CHECK_GAP; - CALCRATIO(sp, rat); - if (rat <= sp->enc_ratio) { - cl_hash(sp); - sp->enc_ratio = 0; - incount = 0; - outcount = 0; - free_ent = CODE_FIRST; - PutNextCode(op, CODE_CLEAR); - nbits = BITS_MIN; - maxcode = MAXCODE(BITS_MIN); - } else - sp->enc_ratio = rat; - } - } - hit: - ; - } - - /* - * Restore global state. - */ - sp->enc_incount = incount; - sp->enc_outcount = outcount; - sp->enc_checkpoint = checkpoint; - sp->enc_oldcode = ent; - sp->lzw_nextdata = nextdata; - sp->lzw_nextbits = nextbits; - sp->lzw_free_ent = free_ent; - sp->lzw_maxcode = maxcode; - sp->lzw_nbits = nbits; - tif->tif_rawcp = op; - return (1); -} - -/* - * Finish off an encoded strip by flushing the last - * string and tacking on an End Of Information code. - */ -static int -LZWPostEncode(TIFF* tif) -{ - register LZWEncodeState *sp = EncoderState(tif); - tidata_t op = tif->tif_rawcp; - long nextbits = sp->lzw_nextbits; - long nextdata = sp->lzw_nextdata; - long outcount = sp->enc_outcount; - int nbits = sp->lzw_nbits; - - if (op > sp->enc_rawlimit) { - tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); - TIFFFlushData1(tif); - op = tif->tif_rawdata; - } - if (sp->enc_oldcode != (hcode_t) -1) { - PutNextCode(op, sp->enc_oldcode); - sp->enc_oldcode = (hcode_t) -1; - } - PutNextCode(op, CODE_EOI); - if (nextbits > 0) - *op++ = (u_char)(nextdata << (8-nextbits)); - tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); - return (1); -} - -/* - * Reset encoding hash table. - */ -static void -cl_hash(LZWEncodeState* sp) -{ - register hash_t *hp = &sp->enc_hashtab[HSIZE-1]; - register long i = HSIZE-8; - - do { - i -= 8; - hp[-7].hash = -1; - hp[-6].hash = -1; - hp[-5].hash = -1; - hp[-4].hash = -1; - hp[-3].hash = -1; - hp[-2].hash = -1; - hp[-1].hash = -1; - hp[ 0].hash = -1; - hp -= 8; - } while (i >= 0); - for (i += 8; i > 0; i--, hp--) - hp->hash = -1; -} static void LZWCleanup(TIFF* tif) @@ -937,9 +645,6 @@ LZWCleanup(TIFF* tif) if (tif->tif_mode == O_RDONLY) { if (DecoderState(tif)->dec_codetab) _TIFFfree(DecoderState(tif)->dec_codetab); - } else { - if (EncoderState(tif)->enc_hashtab) - _TIFFfree(EncoderState(tif)->enc_hashtab); } _TIFFfree(tif->tif_data); tif->tif_data = NULL; @@ -959,12 +664,8 @@ TIFFInitLZW(TIFF* tif, int scheme) goto bad; DecoderState(tif)->dec_codetab = NULL; DecoderState(tif)->dec_decode = NULL; - } else { - tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWEncodeState)); - if (tif->tif_data == NULL) - goto bad; - EncoderState(tif)->enc_hashtab = NULL; - } + } + /* * Install codec methods. */ @@ -973,12 +674,6 @@ TIFFInitLZW(TIFF* tif, int scheme) tif->tif_decoderow = LZWDecode; tif->tif_decodestrip = LZWDecode; tif->tif_decodetile = LZWDecode; - tif->tif_setupencode = LZWSetupEncode; - tif->tif_preencode = LZWPreEncode; - tif->tif_postencode = LZWPostEncode; - tif->tif_encoderow = LZWEncode; - tif->tif_encodestrip = LZWEncode; - tif->tif_encodetile = LZWEncode; tif->tif_cleanup = LZWCleanup; /* * Setup predictor setup.