[cairo] Compositing benchmarks

Bill Spitzak spitzak at d2.com
Tue Mar 6 03:40:52 PST 2007


Jeff Muizelaar wrote:

> I had a look at the routine (_op_blend_p_dp_mmx) in evas and it looks it
> is doing: a*b/256. Is this correct? The routine used in liboil
> (composite_over_argb_sse2_3) appears to be using the exact and
> traditional blin95 formula: (a*b+128)*(257/65536), however, I could be
> misreading the code. Cairo also uses the blin95 formula.

int((a*b+255)/256) produces much more accurate values and is probably 
fast enough. It also produces the same answer for all cases where a and 
b are 0, 128, and 255.


More information about the cairo mailing list