Like the title suggests I'm trying to implement camera response functions as a tonemapping option (like described in issue 632
The problem is that the tonemappers that we have now (reinhard, linear, contrast and maxwhite) use the XYZ values to apply their algorithms to. The conversion from XYZ to RGB takes place later in the imaging pipeline (not in the tonemapper itself).
But the camera response functions have to be applied to the RGB values.
One option would be to convert XYZ -> RGB, apply the response function and convert back to XYZ. Then the imaging pipeline would again convert from XYZ -> RGB.
Because this is wasted computing time LordCrc suggested that the tonemappers themselves have to apply the conversion from XYZ to RGB. That requires not much change to the code and seems like a good solution to me.
Another suggestion of LordCrc is to apply the camera response function *after* (and additionally to) the tonemapping. But I don't know if this is correct. Does anybody know how Indigo uses CRFs? As a real tonemapping option or as an addition to the tonemapping?