Re: Slow deep exr

Peter Hillman <[email protected]> Mon, 29 May 2017 16:27:17 +1200
Newsgroups gmane.comp.video.openexr.devel
Message-ID <[email protected]>
Hi Gonzalo,

I haven't been able to check the file but I assume it contains one deep 
part and one regular image part for the beauty. EXRs are slow if the 
data for parts is interleaved - when the file was written, Arnold 
possibly alternated between writing scanlines of deep and scanlines of 
regular image; reading back the beauty picture might require a skip 
every scanline, which can be quite time consuming.

Try running "exrstdattr input.exr output.exr" (no extra arguments 
required) and see if output.exr is faster: when exrstdattr copies the 
input EXR to the output it stores the data for each part in order, so 
all the data for part 0, then part 1, etc. The order of the parts will 
probably not be significant for read performance, as long as the are not 
interleaved together; storing the entire deep first then the beauty 
image shouldn't be slower to read than storing the image first then the 
deep. The order of the parts in the header doesn't need to match the 
order that their data appears, so you can store a file with a regular 
scanline EXR as part 0, and a deepscanline as part 1, but actually write 
the deep image first, then the regular scanline at the end of the render.

I suspect writing as tiled won't make any difference.

Peter


On 23/05/17 01:01, Gonzalo Garramuño wrote:
> Hi.  I have a user of my viewer, who is dealing with some big deep 
> exrs (360Mb-2Gb deep scanlines) generated by Arnold.  He currently is 
> not loading the deep data, but just the beauty picture.  The problem 
> is that it takes about 2-3 seconds for the beauty image to be read.  
> It seems the OpenEXR reader must skip to the beauty section and in a 
> GB image, this takes some noticeable time.
>
> I was wondering:
>
> 1) Will saving as a Deep Tile image help?
>
> 2) Is there a way for the deep data to be saved at the end of the 
> image, instead of (as I am guessing), at the beginning of the image.
>
> Here is a sample image:
>
> https://drive.google.com/open?id=0ByB8hk3_J5VZNDU2SXRjTWMtWm8
>
>
> Thanks in advance,
>