On Sun, Jul 15, 2012 at 9:33 AM, Stefan Stavrev <[email protected]> wrote:
> I implemented and tested all 12 Porter-Duff operations.
> It worked out nicely, very little changed in the code we already
> had for 'over'.
>
> https://github.com/StefanStavrev/oiio/commit/4d59cc94a11ec91faadd97ab94102cfde26714a4

Implementation suggestion:

It's worth checking whether your porter_duff function is more efficient
to implement as

float Fa = Fa0 + Fa1*alpha_b;
float Fb = Fb0 + Fb1*alpha_a;

Where you compute the float coefficients Fa0,Fa1,Fb0,Fb1 *outside* the
loop, rather than having a switch statement for each channel of each
pixel.

~Chris
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to