Phobos colour module?

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 6 06:28:43 PST 2015


On 6 January 2015 at 19:31, via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Tuesday, 6 January 2015 at 09:19:46 UTC, John Colvin wrote:
>>
>> What's wrong with old-fashioned `Fast` postfixes on entry points where a
>> faster but less precise method is available? Or template arguments like
>> std.algorithm.SortStrategy?
>
>
> If this is for phobos it should follow a common model. But since a fast
> implementation might involve an object which builds a table before
> processing....
>
> Another problem is that "precise" is a very loose term if the conversion is
> for display or for composition in a shader. What you want depends on the
> kind of post processing that happens after this and how it affects the
> nonlinearities of human perception.

I think an important facet of 'fast' image processing is in the loop
that processes batches of pixels, rather than in the api that
processes a single pixel.
I've gone with accurate; that's the strategy throughout phobos.

I can't create look-up-tables at the moment, since '^^' doesn't work
in CTFE! >_<

Here's a PR to see where I'm at:
https://github.com/D-Programming-Language/phobos/pull/2845


More information about the Digitalmars-d mailing list