Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate112.isp.belgacom.be ([195.238.20.44])
          by mailfep009.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20210504210841.UIRY7576.mailfep009.skynet.be@mailgate112.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Tue, 4 May 2021 23:08:41 +0200
Authentication-Results: mx101.skynet.be; dkim=none (message not signed) header.i=none; spf=None smtp.pra=tiff-bounces@lists.osgeo.org; spf=Pass smtp.mailfrom=tiff-bounces@lists.osgeo.org; spf=Pass smtp.helo=postmaster@lists.osgeo.org
Received-SPF: None (mx101.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx101.skynet.be: domain of
  tiff-bounces@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=mailfrom; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
Received-SPF: Pass (mx101.skynet.be: domain of
  postmaster@lists.osgeo.org designates 140.211.15.3 as
  permitted sender) identity=helo; client-ip=140.211.15.3;
  receiver=mx101.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="postmaster@lists.osgeo.org";
  x-conformance=sidf_compatible; x-record-type="v=spf1";
  x-record-text="v=spf1 mx a:mail.osgeo.org a:lists.osgeo.org
  a:mail.osgeo.osuosl.org a:tracsvn.osgeo.osuosl.org -all"
X-Ironport-Dmarc-Check-Result: validskip
IronPort-SDR: ND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rJ72eiLooCs2djNU3PMa93
 LZ+jaJlpmLlvGg11vny2TI5Y9Xk9eJ8KowOOWoitIJbgnqkBqifo57W7aP1QpF0d2HzHYPvJ
 3yrww7P8J1gkmhGF2dhRf2wQHv3HIPxhbZuDilqF35r8T/RCEzFspGgutiA3/kwnM6sNtx3a
 5N1W7xjespMTr6kC7w58fFWnhR/yLezBZMrccpg3NSSocYYrNKxLZvn399KpsGES7ggbpXZt
 VGNt3W5/pdbDqhHgrkl1Rv29ClUzASGRqLUyE5y7eo+gVR9UoZ82IogOcSknA89Z4nR/B/lp
 n5G5UtuqpDXsoXd78VPo08aPryLmTMRB7WWVjiWGjPJeUiM3LJr5bxpIo4//urfptg9upPpK
 j8
X-IronPort-Anti-Spam-Filtered: true
X-MGA-submission: =?us-ascii?q?MDFNHJ0iZSyRaUqlYm3nrJ0J9K14hav0zkhnVC?=
 =?us-ascii?q?8PTdyiz3TW2sPk9zz0IvcLxiKCzMwQrxu11VIfBkrk6HnHh/B/TvE34x?=
 =?us-ascii?q?hvaLHYc1R8VDyHAEtiDmw1T7xd9aGpTC5wQWU=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx101.skynet.be with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2021 23:08:39 +0200
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 7B345615CF01;
	Tue,  4 May 2021 14:08:35 -0700 (PDT)
X-Greylist: delayed 537 seconds by postgrey-1.35 at osgeo6;
 Tue, 04 May 2021 14:08:33 PDT
Received: from Mail3.MaSSoftware.Com (massoftware.com [104.254.247.58])
 by lists.osgeo.org (Postfix) with ESMTPS id 16770615CEEA
 for <tiff@lists.osgeo.org>; Tue,  4 May 2021 14:08:33 -0700 (PDT)
Received: from localmail2.massoftware.com
 (cpeb4fbe41c0a02-cm84948c576700.cpe.net.cable.rogers.com [99.245.116.14])
 by Mail3.MaSSoftware.Com (8.14.7/8.14.7) with ESMTP id 144KwgDX021614
 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO);
 Tue, 4 May 2021 16:58:43 -0400
Received: from MaSCom10 ([192.168.127.155])
 by localmail2.massoftware.com (8.14.7/8.14.7) with ESMTP id 144KxNAC007329;
 Tue, 4 May 2021 16:59:23 -0400
From: "Michael Shiels [ MaS Software Inc ]" <MaSSoft@massoftware.com>
To: "'Toby Thain'" <toby@telegraphics.com.au>,
 "'Larry Bank'" <laurencebank@gmail.com>, <steveu@coppice.org>
Cc: <tiff@lists.osgeo.org>
References: <2021.05.04.0748.29595@afu.wta.att.ne.jp>
 <55f40245-4bd8-92a3-1cd8-03969250043c@gmail.com>
 <CAHYwHP4xx98y4f=kx-BY2+q_m6JT6U8SdjOQfLgpYUgUVZnAjw@mail.gmail.com>
 <8c9aaa7a-7349-2a08-b7f5-896e535e0048@telegraphics.com.au>
In-Reply-To: <8c9aaa7a-7349-2a08-b7f5-896e535e0048@telegraphics.com.au>
Date: Tue, 4 May 2021 16:59:19 -0400
Organization: MaS Software Inc
Message-ID: <073601d74128$5a6e8a10$0f4b9e30$@MaSSoftware.Com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AQCvdfhsIutUwWAeHWNJqkwFRJnaaQIejwZAAe1H3lMCcgBRIKzvdTrg
Subject: Re: [Tiff] SIMD optimizations
X-BeenThere: tiff@lists.osgeo.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.osgeo.org>
List-Unsubscribe: <https://lists.osgeo.org/mailman/options/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=unsubscribe>
List-Post: <mailto:tiff@lists.osgeo.org>
List-Help: <mailto:tiff-request@lists.osgeo.org?subject=help>
List-Subscribe: <https://lists.osgeo.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.osgeo.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

I think the only thing I have ever seen that was super fast, was hand generated assembler, using specific pieces of code for each data byte as it moved through things.  Very old library and used to be very expensive.   But insanely fast decoder, not sure I dug too far into it's encoding but again I bet it was literally similar. Kinda state machine but with specific pieces of code to do with the next byte at any time.  So big code, but fast.

-----Original Message-----
From: Tiff <tiff-bounces@lists.osgeo.org> On Behalf Of Toby Thain
Sent: Tuesday, May 4, 2021 2:08 PM
To: Larry Bank <laurencebank@gmail.com>; steveu@coppice.org
Cc: tiff@lists.osgeo.org
Subject: Re: [Tiff] SIMD optimizations

On 2021-05-04 1:44 p.m., Larry Bank wrote:
> Steve,
> I brought up this issue years ago. The libtiff G4 encoder is 
> needlessly inefficient in both its encoding of the output bits and its 
> searching the current and reference lines for runs of bits. There 
> isn't just a tweak to fix it, the encoder needs to be tossed out and 
> replaced. A faster encoder will use a bit more memory, but at this 
> point I don't think anyone will mind using an additional 8 bytes per 
> pixel width (current + reference line runs as uint32_t). I've been 
> recently reminded on this mailing list that my time is better spent 
> optimizing more important libraries like libpng. Are there any good 
> reasons to change my mind? I still think that libtiff G4 encoding is 
> used widely in scanned document generation (embedded in scanners and 
> on PCs/mobile), so it should be improved.

I use G4 for every bilevel scanned document I ship, so yes. However, the existing encoder is still pretty darn fast :)

--Toby


> 
> Larry B.
> 
> 
> Il giorno mar 4 mag 2021 alle ore 13:35 Steve Underwood 
> <coppice12@gmail.com <mailto:coppice12@gmail.com>> ha scritto:
> 
>     On 03/05/2021 23:50, Akira Urushibata wrote:
>     > Bob Friesenhahn wrote:
>     >
>     >> A list member posted repeatedly that he had private/proprietary CCITT
>     >> Group 4 fax support which was much faster than what is in libtiff.
>     >> Given this, one must assume that libtiff's implementation can be
>     >> faster.
>     > I work on Netpbm and I have written the code for CCITT Group 3 fax
>     > in the programs g3topbm and pbmtog3.
>     >...
_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff

_______________________________________________
Tiff mailing list
Tiff@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/tiff
