Return-Path: <tiff-bounces@lists.osgeo.org>
Received: from mailgate202.isp.belgacom.be ([195.238.22.34])
          by mailfep001.skynet.be
          (InterMail vM.8.04.03.28.4 201-2389-100-182-103-20180124)
          with ESMTP
          id <20210502095146.ILOI7158.mailfep001.skynet.be@mailgate202.isp.belgacom.be>
          for <chris.lindelaan@skynet.be>; Sun, 2 May 2021 11:51:46 +0200
Authentication-Results: mx201.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 (mx201.skynet.be: no sender authenticity
  information available from domain of
  tiff-bounces@lists.osgeo.org) identity=pra;
  client-ip=140.211.15.3; receiver=mx201.skynet.be;
  envelope-from="tiff-bounces@lists.osgeo.org";
  x-sender="tiff-bounces@lists.osgeo.org";
  x-conformance=sidf_compatible
Received-SPF: Pass (mx201.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=mx201.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 (mx201.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=mx201.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: kZ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vSflQHIMc62Adwc4ds3CvcCOro7sexQcBxUqgTP+/Q+Azb7hDlyl2Q0DWClE2rco/Q
 H+4nPEz4GCl93+9RPGzW/U6P1t6b/c4/9OHtaFhMRQChiEsHfKWK1ZQLGJsD04p+uigWxa7e
 XkmBsrM8Rt5365RAjcynGBtDXI6zog52TvzlWVmxLYwPDRfj48BsZb7LgpACfx0VYqv913zc
 twrhqknqdQZCmvoA3A/dTSEzllmk2oyEBS9NI7vjh1XYcYVb5ctoB3xjIvLL4wWAbz6IUiGO
 4rM83G/vZRdjqhHgrkl1gq5setUHQ1FgqHRUZHmvX96VRroEw=
X-IronPort-Anti-Spam-Filtered: true
X-MGA-submission: =?us-ascii?q?MDHRBFCW1I6CxAFerTL8I/odBRz9DBVrha0r8r?=
 =?us-ascii?q?yFXypoq7H3ZWqTEwGTMigR/i+sOKJcOOctFUs5JZNTcuS/zwi5aDwmOB?=
 =?us-ascii?q?ez9q6c/hBUejzeOZjmxsa0yohQHxoXJ82JL3o=3D?=
Received: from osgeo6.osgeo.osuosl.org (HELO lists.osgeo.org) ([140.211.15.3])
  by mx201.skynet.be with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2021 11:51:43 +0200
Received: from osgeo6.osgeo.osuosl.org (localhost [127.0.0.1])
	by lists.osgeo.org (Postfix) with ESMTP id 123376144E46;
	Sun,  2 May 2021 02:51:38 -0700 (PDT)
Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240])
 by lists.osgeo.org (Postfix) with ESMTPS id 22C256146DC9
 for <tiff@lists.osgeo.org>; Sun,  2 May 2021 02:51:35 -0700 (PDT)
Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194])
 by mslow1.mail.gandi.net (Postfix) with ESMTP id 3C5F0DBD55
 for <tiff@lists.osgeo.org>; Sun,  2 May 2021 09:48:10 +0000 (UTC)
X-Originating-IP: 88.165.221.176
Received: from [192.168.0.17] (unknown [88.165.221.176])
 (Authenticated sender: even.rouault@spatialys.com)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 08EC240006;
 Sun,  2 May 2021 09:48:06 +0000 (UTC)
To: Larry Bank <laurencebank@gmail.com>, tiff@lists.osgeo.org
References: <CAHYwHP5NmH+--ckEVeidjxrBVHbFSptCH0CD5d600t8gq7Xafw@mail.gmail.com>
From: Even Rouault <even.rouault@spatialys.com>
Message-ID: <07baca89-e473-8e24-1d54-309152b05774@spatialys.com>
Date: Sun, 2 May 2021 11:48:06 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.7.1
MIME-Version: 1.0
In-Reply-To: <CAHYwHP5NmH+--ckEVeidjxrBVHbFSptCH0CD5d600t8gq7Xafw@mail.gmail.com>
Content-Type: multipart/mixed; boundary="------------7FF77C7189C3316321A9AEC0"
Content-Language: en-US
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>
Errors-To: tiff-bounces@lists.osgeo.org
Sender: "Tiff" <tiff-bounces@lists.osgeo.org>

This is a multi-part message in MIME format.
--------------7FF77C7189C3316321A9AEC0
Content-Type: multipart/alternative;
 boundary="------------36C14BBDD49E99F9C870AF92"


--------------36C14BBDD49E99F9C870AF92
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Larry,

That sounds interesting. I've given a try at your branch.

- The build error is due to a missing -mssse3 flag that is required for 
gcc. Otherwise for x86_64, it fallbacks to the baseline sse2 which is 
the only SIMD instruction set guaranteed to be available at runtime

- ideally we should have a generic build, that contains the base SSE2 
code path (or just x86 for x86 32 bit) and the SSSE3 optimized code 
path, but only takes the later if SSSE3 is available at runtime (for 
detection of instruction sets, I've code for that in 
https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.cpp 
/ https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.h 
that's compatible of libtiff license). The SSSE3 code should be put in a 
separate .c file that would be the only one built with -mssse3. I'm not 
familiar about the situation on the Arm / NEON side, but I presume this 
might be similar (or perhaps we could just live with an explicit 
turn-neon-simd flag at build time)

- we'd probably want autoconf support. (That's where maintaining several 
build systems is painful...)

- there is a bug in the SSSE3 code path. The pixel values I get after 
decompression are altered. The tiny attached file can demonstrate that.

- valgrind isn't happy either (not on the attached file, but on a 
slightly larger one : 400x200, stripped with strip height of 6, 3 
interleaved channels of 8-bit each)

==2742662== Invalid read of size 16
==2742662==    at 0x4890D68: _mm_loadu_si128 (emmintrin.h:703)
==2742662==    by 0x4890D68: horAcc8 (tif_predict.c:376)

- the libtiff test suite is seriously lacking (but we already knew that) 
as "make check" is happy despite those bugs. We should definitely have 
additions into it that verify the good working of the modified code 
paths. For ARM that would be a bit tricky as our CI is x86 only. I guess 
we could use a gcc cross-compiler and qemu user-mode emulation to build 
& test for ARM as well from x86 machines.

- regarding performance gains, I only got a 5% improvement however on a 
8000x8000 large image, lzw compressed, predictor 2, tiles of 512x512, 4 
channels, interleaved, 16bit, compression ratio 
(uncompressed_size/compressed_size) of 1.6. That seems a bit too low to 
justify all the above efforts.

Even

Le 02/05/2021 à 02:36, Larry Bank a écrit :
> Hi All,
> I've begun writing SIMD optimized code for libtiff. My last note to 
> this mailing list didn't get any responses, but I still would 
> appreciate support/feedback from interested parties. I don't have any 
> experience with the automatic build process on Gitlab, but it's 
> throwing an error from my changes for a certain target platform. The 
> code requires at least SSSE3 on Intel and NEON on Arm. This latest 
> round of code speeds up overall decode by 20+% if the 'predictor' is 
> used. There is a lot more code which needs optimization. I don't use 
> libtiff, so it would be helpful for people to speak up and tell me 
> what type of images they encode/decode with it. I can do similar 
> improvements to the encode side if it would be useful. I forked 
> libtiff and my latest changes are here:
>
> https://gitlab.com/bitbank/libtiff <https://gitlab.com/bitbank/libtiff>
>
> Larry B.
>
>
> _______________________________________________
> Tiff mailing list
> Tiff@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/tiff

-- 
http://www.spatialys.com
My software is free, but my time generally not.


--------------36C14BBDD49E99F9C870AF92
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Larry,</p>
    <p>That sounds interesting. I've given a try at your branch.</p>
    <p>- The build error is due to a missing -mssse3 flag that is
      required for gcc. Otherwise for x86_64, it fallbacks to the
      baseline sse2 which is the only SIMD instruction set guaranteed to
      be available at runtime<br>
    </p>
    <p>- ideally we should have a generic build, that contains the base
      SSE2 code path (or just x86 for x86 32 bit) and the SSSE3
      optimized code path, but only takes the later if SSSE3 is
      available at runtime (for detection of instruction sets, I've code
      for that in
      <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.cpp">https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.cpp</a>
      /
      <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.h">https://github.com/OSGeo/gdal/blob/master/gdal/port/cpl_cpu_features.h</a>
      that's compatible of libtiff license). The SSSE3 code should be
      put in a separate .c file that would be the only one built with
      -mssse3. I'm not familiar about the situation on the Arm / NEON
      side, but I presume this might be similar (or perhaps we could
      just live with an explicit turn-neon-simd flag at build time)</p>
    <p>- we'd probably want autoconf support. (That's where maintaining
      several build systems is painful...)<br>
    </p>
    <p>- there is a bug in the SSSE3 code path. The pixel values I get
      after decompression are altered. The tiny attached file can
      demonstrate that.</p>
    <p>- valgrind isn't happy either (not on the attached file, but on a
      slightly larger one : 400x200, stripped with strip height of 6, 3
      interleaved channels of 8-bit each)<br>
    </p>
    <p>==2742662== Invalid read of size 16<br>
      ==2742662==    at 0x4890D68: _mm_loadu_si128 (emmintrin.h:703)<br>
      ==2742662==    by 0x4890D68: horAcc8 (tif_predict.c:376)<br>
      <br>
    </p>
    <p>- the libtiff test suite is seriously lacking (but we already
      knew that) as "make check" is happy despite those bugs. We should
      definitely have additions into it that verify the good working of
      the modified code paths. For ARM that would be a bit tricky as our
      CI is x86 only. I guess we could use a gcc cross-compiler and qemu
      user-mode emulation to build &amp; test for ARM as well from x86
      machines.<br>
    </p>
    <p>- regarding performance gains, I only got a 5% improvement
      however on a 8000x8000 large image, lzw compressed, predictor 2,
      tiles of 512x512, 4 channels, interleaved, 16bit, compression
      ratio (uncompressed_size/compressed_size) of 1.6. That seems a bit
      too low to justify all the above efforts.<br>
    </p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 02/05/2021 à 02:36, Larry Bank a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHYwHP5NmH+--ckEVeidjxrBVHbFSptCH0CD5d600t8gq7Xafw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_default">Hi All,</div>
        <div class="gmail_default">I've begun writing SIMD optimized
          code for libtiff. My last note to this mailing list didn't get
          any responses, but I still would appreciate support/feedback
          from interested parties. I don't have any experience with the
          automatic build process on Gitlab, but it's throwing an error
          from my changes for a certain target platform. The code
          requires at least SSSE3 on Intel and NEON on Arm. This latest
          round of code speeds up overall decode by 20+% if the
          'predictor' is used. There is a lot more code which needs
          optimization. I don't use libtiff, so it would be helpful for
          people to speak up and tell me what type of images they
          encode/decode with it. I can do similar improvements to the
          encode side if it would be useful. I forked libtiff and my
          latest changes are here:</div>
        <div class="gmail_default"><br>
        </div>
        <div class="gmail_default"><a
            href="https://gitlab.com/bitbank/libtiff"
            moz-do-not-send="true">https://gitlab.com/bitbank/libtiff</a></div>
        <div class="gmail_default"><br>
        </div>
        <div class="gmail_default">Larry B.</div>
        <div class="gmail_default"><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Tiff mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Tiff@lists.osgeo.org">Tiff@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/tiff">https://lists.osgeo.org/mailman/listinfo/tiff</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>

--------------36C14BBDD49E99F9C870AF92--

--------------7FF77C7189C3316321A9AEC0
Content-Type: image/tiff;
 name="rgbsmall_lzw_predictor2.tif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="rgbsmall_lzw_predictor2.tif"

SUkqAAgAAAARAAABAwABAAAAMgAAAAEBAwABAAAAMgAAAAIBAwADAAAA2gAAAAMBAwABAAAA
BQAAAAYBAwABAAAAAgAAABEBBAABAAAAhgEAABUBAwABAAAAAwAAABYBAwABAAAAMgAAABcB
BAABAAAA+hUAABwBAwABAAAAAQAAAD0BAwABAAAAAgAAAFMBAwADAAAA4AAAAA6DDAADAAAA
5gAAAIKEDAAGAAAA/gAAAK+HAwAgAAAALgEAALCHDAACAAAAbgEAALGHAgAIAAAAfgEAAAAA
AAAIAAgACAABAAEAAQAW31D4bB1sPxbfUPhsHWw/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAABdFhObj2tGwNrFNNO97jbAAAAAAAAAAAABAAEAAAAHAAAEAAABAAIAAQQAAAEA
AQAACAAAAQDmEAEIsYcHAAAABggAAAEAjiMJCLCHAQABAAsIsIcBAAAAiG10lh2kckAAAABA
plRYQVdHUyA4NHwAgAAgUDgkFg0HhEJhULhkNgQBgQCiAVDAAHA+EgoFYfdzxdT8Aj/Ag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uxl+SJ+vl+AN/AKhgCAg==
--------------7FF77C7189C3316321A9AEC0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--------------7FF77C7189C3316321A9AEC0--
