2018.01.15 22:38 "Re: [Tiff] Strategies for multi-core speedups", by Craig Bruce
On 01/15/2018 03:17 PM, Larry Gritz wrote:
I tried to do this myself using libtiff -- for the common case of needing to read an entire image, my aim was read all the raw strips (TIFFReadRawStrip, serially), then dole them out to different threads to decompress in parallel (and when writing, compress in parallel, then TIFFWriteRawStrip each one serially). If libIlmImf is any indication, doing this on our typical 12 or 16 core machines ought to speed up TIFF I/O by an order of magnitude, easily.
But my plan was thwarted because it sure seems that the API for the codecs is inherently stateful and non-reentrant.
Would it work if you opened the same file multiple times over with separate TIFF handles and read different sections of the image the normal way in different threads and then combined the results later?
Dr. Craig S. Bruce
Senior Software Developer