<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][15087] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=15087">15087</a></dd>
<dt>Author</dt> <dd>mikej</dd>
<dt>Date</dt> <dd>2009-10-05 09:57:36 -0500 (Mon, 05 Oct 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>apply http://www.soft-switch.org/downloads/libtiff_fix_g3_2d_decode.patch from Steve Underwood</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunklibstiff382update">freeswitch/trunk/libs/tiff-3.8.2/.update</a></li>
<li><a href="#freeswitchtrunklibstiff382libtifftif_fax3c">freeswitch/trunk/libs/tiff-3.8.2/libtiff/tif_fax3.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunklibstiff382update"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/tiff-3.8.2/.update (15086 => 15087)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/tiff-3.8.2/.update        2009-10-05 14:52:54 UTC (rev 15086)
+++ freeswitch/trunk/libs/tiff-3.8.2/.update        2009-10-05 14:57:36 UTC (rev 15087)
</span><span class="lines">@@ -1 +1 @@
</span><del>-Wed Jul 22 15:05:52 EDT 2009
</del><ins>+Mon Oct 5 09:57:20 CDT 2009
</ins></span></pre></div>
<a id="freeswitchtrunklibstiff382libtifftif_fax3c"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/tiff-3.8.2/libtiff/tif_fax3.c (15086 => 15087)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/tiff-3.8.2/libtiff/tif_fax3.c        2009-10-05 14:52:54 UTC (rev 15086)
+++ freeswitch/trunk/libs/tiff-3.8.2/libtiff/tif_fax3.c        2009-10-05 14:57:36 UTC (rev 15087)
</span><span class="lines">@@ -85,6 +85,8 @@
</span><span class="cx">         unsigned char*        refline;        /* reference line for 2d decoding */
</span><span class="cx">         int        k;                        /* #rows left that can be 2d encoded */
</span><span class="cx">         int        maxk;                        /* max #rows that can be 2d encoded */
</span><ins>+
+        int line;
</ins><span class="cx"> } Fax3CodecState;
</span><span class="cx"> #define        DecoderState(tif)        ((Fax3CodecState*) Fax3State(tif))
</span><span class="cx"> #define        EncoderState(tif)        ((Fax3CodecState*) Fax3State(tif))
</span><span class="lines">@@ -167,6 +169,7 @@
</span><span class="cx">                 sp->refruns[0] = (uint32) sp->b.rowpixels;
</span><span class="cx">                 sp->refruns[1] = 0;
</span><span class="cx">         }
</span><ins>+        sp->line = 0;
</ins><span class="cx">         return (1);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -184,7 +187,7 @@
</span><span class="cx">          (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
</span><span class="cx">          (unsigned long) a0);
</span><span class="cx"> }
</span><del>-#define        unexpected(table, a0)        Fax3Unexpected(module, tif, line, a0)
</del><ins>+#define        unexpected(table, a0)        Fax3Unexpected(module, tif, sp->line, a0)
</ins><span class="cx">
</span><span class="cx"> static void
</span><span class="cx"> Fax3Extension(const char* module, TIFF* tif, uint32 line, uint32 a0)
</span><span class="lines">@@ -195,7 +198,7 @@
</span><span class="cx"> (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
</span><span class="cx"> (unsigned long) a0);
</span><span class="cx"> }
</span><del>-#define        extension(a0)        Fax3Extension(module, tif, line, a0)
</del><ins>+#define        extension(a0)        Fax3Extension(module, tif, sp->line, a0)
</ins><span class="cx">
</span><span class="cx"> static void
</span><span class="cx"> Fax3BadLength(const char* module, TIFF* tif, uint32 line, uint32 a0, uint32 lastx)
</span><span class="lines">@@ -207,7 +210,7 @@
</span><span class="cx"> (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
</span><span class="cx"> (unsigned long) a0, lastx);
</span><span class="cx"> }
</span><del>-#define        badlength(a0,lastx)        Fax3BadLength(module, tif, line, a0, lastx)
</del><ins>+#define        badlength(a0,lastx)        Fax3BadLength(module, tif, sp->line, a0, lastx)
</ins><span class="cx">
</span><span class="cx"> static void
</span><span class="cx"> Fax3PrematureEOF(const char* module, TIFF* tif, uint32 line, uint32 a0)
</span><span class="lines">@@ -218,7 +221,7 @@
</span><span class="cx"> (unsigned long) (isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip),
</span><span class="cx"> (unsigned long) a0);
</span><span class="cx"> }
</span><del>-#define        prematureEOF(a0)        Fax3PrematureEOF(module, tif, line, a0)
</del><ins>+#define        prematureEOF(a0)        Fax3PrematureEOF(module, tif, sp->line, a0)
</ins><span class="cx">
</span><span class="cx"> #define        Nop
</span><span class="cx">
</span><span class="lines">@@ -229,7 +232,6 @@
</span><span class="cx"> Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
</span><span class="cx"> {
</span><span class="cx">         DECLARE_STATE(tif, sp, "Fax3Decode1D");
</span><del>- int line = 0;
</del><span class="cx">
</span><span class="cx">         (void) s;
</span><span class="cx">         CACHE_STATE(tif, sp);
</span><span class="lines">@@ -248,7 +250,7 @@
</span><span class="cx">                 (*sp->fill)(buf, thisrun, pa, lastx);
</span><span class="cx">                 buf += sp->b.rowbytes;
</span><span class="cx">                 occ -= sp->b.rowbytes;
</span><del>- line++;
</del><ins>+                sp->line++;
</ins><span class="cx">                 continue;
</span><span class="cx">         EOF1D:                                /* premature EOF */
</span><span class="cx">                 CLEANUP_RUNS();
</span><span class="lines">@@ -269,7 +271,6 @@
</span><span class="cx"> Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
</span><span class="cx"> {
</span><span class="cx">         DECLARE_STATE_2D(tif, sp, "Fax3Decode2D");
</span><del>- int line = 0;
</del><span class="cx">         int is1D;                        /* current line is 1d/2d-encoded */
</span><span class="cx">
</span><span class="cx">         (void) s;
</span><span class="lines">@@ -302,7 +303,7 @@
</span><span class="cx">                 SWAP(uint32*, sp->curruns, sp->refruns);
</span><span class="cx">                 buf += sp->b.rowbytes;
</span><span class="cx">                 occ -= sp->b.rowbytes;
</span><del>- line++;
</del><ins>+                sp->line++;
</ins><span class="cx">                 continue;
</span><span class="cx">         EOF2D:                                /* premature EOF */
</span><span class="cx">                 CLEANUP_RUNS();
</span><span class="lines">@@ -492,14 +493,14 @@
</span><span class="cx">         );
</span><span class="cx">
</span><span class="cx">         nruns = needsRefLine ? 2*TIFFroundup(rowpixels,32) : rowpixels;
</span><del>-
-        dsp->runs = (uint32*) _TIFFCheckMalloc(tif, 2*nruns+3, sizeof (uint32),
</del><ins>+        nruns += 3;
+        dsp->runs = (uint32*) _TIFFCheckMalloc(tif, 2*nruns, sizeof (uint32),
</ins><span class="cx">                                          "for Group 3/4 run arrays");
</span><span class="cx">         if (dsp->runs == NULL)
</span><span class="cx">                 return (0);
</span><span class="cx">         dsp->curruns = dsp->runs;
</span><span class="cx">         if (needsRefLine)
</span><del>-                dsp->refruns = dsp->runs + (nruns>>1);
</del><ins>+                dsp->refruns = dsp->runs + nruns;
</ins><span class="cx">         else
</span><span class="cx">                 dsp->refruns = NULL;
</span><span class="cx">         if (td->td_compression == COMPRESSION_CCITTFAX3
</span><span class="lines">@@ -718,6 +719,7 @@
</span><span class="cx">                 sp->k = sp->maxk-1;
</span><span class="cx">         } else
</span><span class="cx">                 sp->k = sp->maxk = 0;
</span><ins>+        sp->line = 0;
</ins><span class="cx">         return (1);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1378,7 +1380,6 @@
</span><span class="cx"> Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
</span><span class="cx"> {
</span><span class="cx">         DECLARE_STATE_2D(tif, sp, "Fax4Decode");
</span><del>- int line = 0;
</del><span class="cx">
</span><span class="cx">         (void) s;
</span><span class="cx">         CACHE_STATE(tif, sp);
</span><span class="lines">@@ -1401,7 +1402,7 @@
</span><span class="cx">                 SWAP(uint32*, sp->curruns, sp->refruns);
</span><span class="cx">                 buf += sp->b.rowbytes;
</span><span class="cx">                 occ -= sp->b.rowbytes;
</span><del>- line++;
</del><ins>+                sp->line++;
</ins><span class="cx">                 continue;
</span><span class="cx">         EOFG4:
</span><span class="cx"> NeedBits16( 13, BADG4 );
</span><span class="lines">@@ -1487,7 +1488,6 @@
</span><span class="cx"> {
</span><span class="cx">         DECLARE_STATE(tif, sp, "Fax3DecodeRLE");
</span><span class="cx">         int mode = sp->b.mode;
</span><del>- int line = 0;
</del><span class="cx">
</span><span class="cx">         (void) s;
</span><span class="cx">         CACHE_STATE(tif, sp);
</span><span class="lines">@@ -1517,7 +1517,7 @@
</span><span class="cx">                 }
</span><span class="cx">                 buf += sp->b.rowbytes;
</span><span class="cx">                 occ -= sp->b.rowbytes;
</span><del>- line++;
</del><ins>+                sp->line++;
</ins><span class="cx">                 continue;
</span><span class="cx">         EOFRLE:                                /* premature EOF */
</span><span class="cx">                 (*sp->fill)(buf, thisrun, pa, lastx);
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>