Re: Review: API Change to ColorSpace.GPUAllocation

Jeremy Selan <jeremy...@...>

No one has objected, so I'll roll this into the master branch.

-- Jeremy

On Nov 16, 11:43 am, Jeremy Selan <jeremy...@...> wrote:
This updates the API for setting the ColorSpace GPU allocation hint.
(The allocation is used to determine how a particular lattice is best
sampled using a fixed domain lut on the GPU).  Previously all
allocations were configured with 2 fixed arguments (min, max):

Uniform:    x mapped from  [min, max] to [0,1]
Log2         log2(x) mapped from [min, max] to [0,1]

Now, allocations can be configured with a variable number of
arguments. (The definition of which is allocation specific).  This is
useful as it allows for (optionally) more sophisticated allocations on
the GPU.   The first allocation to take advantage of this is "LG2",
which adds a linear offset value as the 3rd variable:

Log2         log2(x+offset) mapped from [min, max] to [0,1]

Using a small, positive offset allows a log allocation to represent
the value 0.0 precisely, which is useful in some configurations.

This update also names GpuAllocation -> Allocation, as what it
represents is not GPU specific. (GPU is the use case, rather than the
description of what the data is).


-- Jeremy

Join { to automatically receive all group messages.