OpenImageIO/oiio — pull request #925 by mikaelsundell (2014-07-30 13:47:51+00:00)
Title: Attribute for chunk in ImageInput

Another one up for discussion, when reading lots of images for playback in multiple threads it's faster (on my test machines) to read scanline images with chunk = m_spec.height.

First results:

./test_stats: stat file: /Users/mikaelsundell/Desktop/test.exr
./test_stats: oiio ImageInput: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.131, chunks: 256
read was not necessary -- using cache
going to have to read /Users/mikaelsundell/Desktop/test.exr: float vs unknown
./test_stats: oiio ImageBuf/ImageCache: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.43, chunks: 256
./test_stats: core ImageLoader: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.071, chunks: 256
./test_stats: core ImageLoader: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.061, chunks: 0
./test_stats: exr RgbaInputFile: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.215
./test_stats: exr framebuffer: /Users/mikaelsundell/Desktop/test.exr, elapsed time: 0.094

Sets oiio_chunk to 256 per default and a value of 0 means m_spec.height in ImageInput.
If not set the ImageInput scanline reader will fallback to 256, if set to zero the m_spec.height will be used.

core ImageLoader is class that only uses ImageInput::open/read_image without ImageCache.