wrote in message
wrote:
Why doesn’t
Photoshop just convert everything coming in into high precision floating point?
Someday it will, probably, and cameras may capture directly to floating point format as well. Meantime, integer arithmetic remain an order of magnitude faster than floating point. To apply – for example – a curve to a channel, you would use floating point to load a table with 256 or 32K curved channel values. Once this lookup table is built use each channel value to index into the table – voila, almost instantaneous curving. Doing the same thing in pure floating point would be much slower, and only slightly more accurate.
There are some small optimizations that Photoshop does not bother with. For example, when you adjust both the RGB curve, and the individual channels, Photoshop does two layers of lookup – one for each channel, and a final lookup for the RGB curve. This leads to an addiitonal unnecessary quantization. Curvemeister – ahem – combines these into a single lookup operation, and the result is a very slightly faster, and more accurate result.
Since this went unanswered I assume there is something I am missing. But I do not see why it is nonsense because my HP28C calculator does something similar by using a kind of symbolic integer arithmetic for purposes of display while internally doing all calculations in high precision floating point. Even when the calculator is in a low precision floating point mode there are ordinarily no quantization (other than the inevitable) errors because internally the calculator is still processing in high precision mode – it just displays the results in low precision. Why can’t Photoshop work this way?
Not many people care if a calculator takes 2 microseconds or 2 milliseconds to show the answer, so it’s less critical to optimize this particular operation. Even so, a lot of expertise went into programming your calculator. There are other operations, such as calculating trig functions, use a lookup table initially, and then use floating point interpolation to clean up the result.
—
Mike Russell
www.curvemeister.com/forum/