~ubuntu-branches/ubuntu/natty/tiff/natty

« back to all changes in this revision

Viewing changes to debian/patches/ycbcr-read-scanline.patch

  • Committer: Bazaar Package Importer
  • Author(s): Jay Berkenbilt
  • Date: 2010-06-18 21:28:11 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100618212811-3t5mffcr8gpfpuel
Tags: 3.9.4-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: fix TIFFReadScanline with ycbcr JPEG images
2
 
 Patch from upstream CVS from Relase-v3-9-2 to 2010-01-10
3
 
Origin: upstream
4
 
Bug: http://bugzilla.maptools.org/show_bug.cgi?id=1936
5
 
Bug-Debian: http://bugs.debian.org/510792
6
 
Forwarded: not-needed
7
 
 
8
 
Index: tiff-3.9.2/ChangeLog
9
 
===================================================================
10
 
--- tiff-3.9.2.orig/ChangeLog   2009-11-04 12:12:17.000000000 -0500
11
 
+++ tiff-3.9.2/ChangeLog        2010-01-10 09:40:52.752917618 -0500
12
 
@@ -1,3 +1,16 @@
13
 
+2010-01-06  Frank Warmerdam  <warmerdam@pobox.com>
14
 
+
15
 
+       * libtiff/tif_dir.c: Ensure tile and scanline sizes are reset
16
 
+       when moving to new directories. 
17
 
+       http://bugzilla.maptools.org/show_bug.cgi?id=1936
18
 
+
19
 
+2009-12-03  Frank Warmerdam  <warmerdam@pobox.com>
20
 
+
21
 
+       * libtiff/tif_jpeg.c: Fix a couple of issues that trigger failures in
22
 
+       some cases when using TIFFReadScanline() with JPEG compressed 
23
 
+       subsampled ycbcr images.
24
 
+       http://bugzilla.maptools.org/show_bug.cgi?id=1936
25
 
+
26
 
 2009-11-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
27
 
 
28
 
        * libtiff 3.9.2 released.
29
 
Index: tiff-3.9.2/libtiff/tif_dir.c
30
 
===================================================================
31
 
--- tiff-3.9.2.orig/libtiff/tif_dir.c   2008-12-31 19:10:43.000000000 -0500
32
 
+++ tiff-3.9.2/libtiff/tif_dir.c        2010-01-10 09:40:52.752917618 -0500
33
 
@@ -1,4 +1,4 @@
34
 
-/* $Id: tif_dir.c,v 1.75.2.2 2009-01-01 00:10:43 bfriesen Exp $ */
35
 
+/* $Id: tif_dir.c,v 1.75.2.3 2010-01-07 04:05:39 fwarmerdam Exp $ */
36
 
 
37
 
 /*
38
 
  * Copyright (c) 1988-1997 Sam Leffler
39
 
@@ -1099,6 +1099,11 @@
40
 
         * Should we also be clearing stuff like INSUBIFD?
41
 
         */
42
 
        tif->tif_flags &= ~TIFF_ISTILED;
43
 
+        /*
44
 
+         * Clear other directory-specific fields.
45
 
+         */
46
 
+        tif->tif_tilesize = -1;
47
 
+        tif->tif_scanlinesize = -1;
48
 
 
49
 
        return (1);
50
 
 }
51
 
Index: tiff-3.9.2/libtiff/tif_jpeg.c
52
 
===================================================================
53
 
--- tiff-3.9.2.orig/libtiff/tif_jpeg.c  2009-08-30 12:21:46.000000000 -0400
54
 
+++ tiff-3.9.2/libtiff/tif_jpeg.c       2010-01-10 09:40:52.980917084 -0500
55
 
@@ -1,4 +1,4 @@
56
 
-/* $Id: tif_jpeg.c,v 1.50.2.4 2009-08-30 16:21:46 bfriesen Exp $ */
57
 
+/* $Id: tif_jpeg.c,v 1.50.2.5 2009-12-04 01:04:00 fwarmerdam Exp $ */
58
 
 
59
 
 /*
60
 
  * Copyright (c) 1994-1997 Sam Leffler
61
 
@@ -1613,7 +1613,11 @@
62
 
         * Must recalculate cached tile size in case sampling state changed.
63
 
         * Should we really be doing this now if image size isn't set? 
64
 
         */
65
 
-       tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
66
 
+        if( tif->tif_tilesize > 0 )
67
 
+            tif->tif_tilesize = isTiled(tif) ? TIFFTileSize(tif) : (tsize_t) -1;
68
 
+
69
 
+        if(tif->tif_scanlinesize > 0 )
70
 
+            tif->tif_scanlinesize = TIFFScanlineSize(tif); 
71
 
 }
72
 
 
73
 
 static int
74
 
@@ -1741,13 +1745,21 @@
75
 
                        return;
76
 
     }
77
 
     else
78
 
-       {
79
 
+    {
80
 
         if( !TIFFFillStrip( tif, 0 ) )
81
 
             return;
82
 
     }
83
 
 
84
 
     TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
85
 
                   (uint16) sp->h_sampling, (uint16) sp->v_sampling );
86
 
+
87
 
+    /*
88
 
+    ** We want to clear the loaded strip so the application has time
89
 
+    ** to set JPEGCOLORMODE or other behavior modifiers.  This essentially
90
 
+    ** undoes the JPEGPreDecode triggers by TIFFFileStrip().  (#1936)
91
 
+    */
92
 
+    tif->tif_curstrip = -1;
93
 
+
94
 
 #endif /* CHECK_JPEG_YCBCR_SUBSAMPLING */
95
 
 }
96