Phobos colour module?

via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 6 06:56:35 PST 2015


On Tuesday, 6 January 2015 at 14:28:52 UTC, Manu via 
Digitalmars-d wrote:
> 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.

Yeah, I agree. For fast on the CPU you want to use simd, and 
maybe one register for red, another for green, using saturating 
instructions, doing it differently on ARM vs x86 etc...

Besides, an accurate reference implementation is a good starting 
point and also very useful for unit testing a faster 
batch-oriented version later on.

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

Nice start. Most libraries use US-English "color", though. I 
guess phobos should try to be internally consistent (pick either 
UK or US vocabulary).


More information about the Digitalmars-d mailing list