Re: Review: Refactored baker code to allow for more advanced lut output

Oliver Farkas <oliver...@...>

Hey Jeremy, sorry about the late reply, I seem to have looked over this email.

This is really helpful, thanks for this.

I found a crash bug in the OCIO code. Ocioconvert crashes when you feed in EXR's that have render errors in them, basically pixel values that are  way off. After loading the file with OIIO calls, these values come out as NaNs and cause the processor->apply code to segfault and crash.

It happens in Lut1Dop.cpp on line 272.

I could work around this by checking for the buffer values in this function, and replacing them if they're NaN, but it's obviously not the best place to do this sort of check. I have had not much time to dig deeper but I thought it's gonna help you to fix it.

Thanks again for your fix, 

On Sat, May 14, 2011 at 4:18 AM, Jeremy Selan <jeremy...@...> wrote:

This addresses oliver's bug where an HDR lin -> Dreamcolor ociobakelut
command was clipping the highlights.
After this fix, you can get a proper output .csp both with and without
the --shaper specified.  (if the shaper is not
specified, it will fall back on the allocation for the input space,
and for oliver's linear example (lg2, -7.5, 4) will match
the 'log' shaper space almost exactly.

There is one known regression in this code - I have temporarily
disabled the .hdl lut baking as I have not ported that code.
But I wanted to get this checkin in before then, as it's such a large
change (in terms of number of lines of code).

Other changes:
* Added .3dl baking
* Added Processor.hasChannelCrosstalk()
* Exposed both FormatName + FormatExtension
* FileFormats can register multiple names. (ex: lustre 3dl / flame 3dl)
* Baker defaults are format specific
* ociobakeluts has cleaned up syntax, fewer args needed in most cases

The bakelut logic has been moved from the Baker.cpp, into each output format.
This can eventually be re-refactored, but in the meantime until we have more
examples I think we can get higher quality (format specific) color output
by doing the logic in each outputter.

Remaining tasks:
* update houdini lut baker to work again. (currently disabled)
* let the .csp output dynamically pick between a 1d and 3d output (now
that hasChannelCrosstalk is exposed, this will be trivial)

-- Jeremy

Join to automatically receive all group messages.