Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx3.pub.mailpod2-cph3.one.com ([10.27.25.13])
	by mailstorage18.cst.mailpod2-cph3.one.com (Dovecot) with LMTP id Z1tqLsQkXVrnCAAAQS8vrQ
	for <filtered@awaresystems.be>; Mon, 15 Jan 2018 22:03:22 +0000
X-HalOne-ID: e632bf91-fa3f-11e7-9b3c-e0d84895d241
Received: from mail-oi0-f43.google.com (unknown [209.85.218.43])
	by mx3.pub.mailpod2-cph3.one.com (Halon) with ESMTPS
	id e632bf91-fa3f-11e7-9b3c-e0d84895d241;
	Mon, 15 Jan 2018 22:03:21 +0000 (UTC)
Received: by mail-oi0-f43.google.com with SMTP id g128so9257878oib.11
        for <filtered@awaresystems.be>; Mon, 15 Jan 2018 14:03:21 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-transfer-encoding:sender:errors-to;
        bh=nONJnacwvvEtU/ZR0UjzZ1qomh7f4dXU38ugrnrzbnU=;
        b=KXxmZpaHw9pogAG/zzhHMYQL5Xr7aFjpEPp+ME63N/FOrZ0w1Oh3R4LpBREF0GlhSQ
         DmeNqG21uHVGH2s/dY95CmUYnFH2cEgmuv767ThRXSsopFvVQfL0eoDTc3SVB2uwHU3j
         1lAW7AjTmZdvKcMiWGuVZEd24mzBpRvKX8DHTBQPFacQLSmw02XtPsuNx399Etub9UMC
         jrMuUsVQu4lD+7Lb3t3nbMknFYGUF170QXLzTZHK1aQY/+W36OmTdT860QgvYMVqGjP4
         j45oCl5FhcjTzJwWUlrj6PCrYf+TIfQaE5lUFhaRcYG9yt0T1KLjdzKz7vYkZAy4KJuT
         0/iw==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AKwxytdv9ZkToEPS1tnv00nLGFclo4gSgLqhJKjPPSRjmbDd/k+F2uNN
	dFfSykmLolVMkD5FxtGihfuJQdFeTUca0kIpeyKHcD53vfHFKQc=
X-Received: by 10.202.114.22 with SMTP id p22mr17032234oic.228.1516053800663;
        Mon, 15 Jan 2018 14:03:20 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.235.11 with SMTP id j11csp3382653oih;
        Mon, 15 Jan 2018 14:03:19 -0800 (PST)
X-Google-Smtp-Source: ACJfBosNUAsccL8L1Bqi2TF2jLq+BrBMyfi7VOFvc6T78OeokYv2tJKip0XwMrixcacHbFsDDe+b
X-Received: by 10.28.230.13 with SMTP id d13mr12132491wmh.125.1516053799488;
        Mon, 15 Jan 2018 14:03:19 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1516053799; cv=none;
        d=google.com; s=arc-20160816;
        b=dobLy5mVjkpPI3uF6MwkClXP8rbzDJFo7i0dNQ0OLm07P0jZL4fzYcWotX7bw9pPLU
         27M1q+J4iuMIo8fK6jJ/XRizdopDVCa7vovTu8Wr5LzPD3toKRWD1YiHxFjKNK3EK+7D
         P7HWWf7UVHNok7+Pp5NZEyuvjXlFNQEF8QduWe4wwi78CnPYX3IBYOHlcpPAxTclqJU/
         d0XtKLQMWOTiP3P5vMnppZloYoZ1IlJ9pG2+LwRAVp4pAEn1ISIWlxQdg1615sLuQpmf
         3/WJOOaImXJWQEgqA2PdIYPSRst8aKD+1Z866nsSDOX6YdzZnJyL563npvayax6vX1K5
         itxA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help
         :list-post:list-archive:list-unsubscribe:list-id:precedence:subject
         :cc:to:message-id:date:from:references:in-reply-to:mime-version
         :arc-authentication-results;
        bh=nONJnacwvvEtU/ZR0UjzZ1qomh7f4dXU38ugrnrzbnU=;
        b=YSjD9j0z3SfiLnTnm/vHVdCtKp/QACLvT326uJFBoJgNToVzU2iM1BgOdXBykoExm2
         H9rIIV0Cnrvu50JdRVA0s5+r4cv1aVpZ5h5GulRGzjwbtN09xhe5BtiSXznrIee46Ens
         vB4naH14rG3WsINGXa4q3bh/aAtVKFCRdEDpd3LJldO4FBQd39t2UXIhlcZC6b/OdWgB
         go9RmYjYHlNVOxqK5H1Tg5KfMWVtFksiA4I4gBj97VvSIBpytIIGYesDqePG/Dm5r35e
         Ez/hT/0XDNabmuW9z+hhsXsncRRHukk45QvgYq/Ym9AAqW8DRw/4EvWGqaZCgkGVHu/E
         wWfg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id n5si674957wmi.79.2018.01.15.14.03.19;
        Mon, 15 Jan 2018 14:03:19 -0800 (PST)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id D66F735C062;
	Mon, 15 Jan 2018 17:02:18 -0500 (EST)
Received: from mail-yw0-f173.google.com (mail-yw0-f173.google.com
	[209.85.161.173])
	by lists.maptools.org (Postfix) with ESMTPS id 8EB8235C060
	for <tiff@lists.maptools.org>; Mon, 15 Jan 2018 17:02:11 -0500 (EST)
Received: by mail-yw0-f173.google.com with SMTP id t201so5988544ywf.1
	for <tiff@lists.maptools.org>; Mon, 15 Jan 2018 14:02:11 -0800 (PST)
X-Received: by 10.129.111.65 with SMTP id k62mr19103134ywc.343.1516053730134; 
	Mon, 15 Jan 2018 14:02:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.37.142.17 with HTTP; Mon, 15 Jan 2018 14:02:09 -0800 (PST)
In-Reply-To: <39EE49FE-23A5-43DE-8998-51526287D182@larrygritz.com>
References: <39EE49FE-23A5-43DE-8998-51526287D182@larrygritz.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
Date: Mon, 15 Jan 2018 17:02:09 -0500
Message-ID: <CAAcuQeYzAK3ZvaoqZ1JXc27ZpSmh5gd7Y6t-OHss_u7BkyB-FA@mail.gmail.com>
To: Larry Gritz <lg@larrygritz.com>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Strategies for multi-core speedups
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

2018-01-15 14:17 GMT-05:00 Larry Gritz <lg@larrygritz.com>:
> But my plan was thwarted because it sure seems that the API for the codecs is inherently stateful and non-reentrant.
>
> Has anybody tried something like this? Any advice on how to compress/decompress multiple strips or tiles simultaneously? Is there some workaround, or perhaps I just don't understand the libtiff internals enough to see the solution?

On the read side, you can use several TIFF handles (one per thread).
It's not nice but it works. I don't know of any way to do it on the
write side. I did look several years ago and found the same codec
state issue you did.

Olivier
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
