Home | History | Annotate | Download | only in lpng_v163

Lines Matching refs:reciprocal

1668          png_uint_32 reciprocal = 0;

1673 /* Calculate a reciprocal. The correct calculation is simply
1675 * allows correct rounding by adding .5 before the shift. 'reciprocal'
1679 reciprocal = ((0xffff<<15)+(alpha>>1))/alpha;
1697 * component*reciprocal is less than 2^31.
1701 png_uint_32 calc = component * reciprocal;
1726 * Calculate an alpha reciprocal to reverse pre-multiplication. As above the
1734 png_uint_32 reciprocal/*from the above macro*/)
1750 * component*reciprocal is less than 2^31.
1757 * be exact!) [Could also test reciprocal != 0]
1761 component *= reciprocal;
1818 png_uint_32 reciprocal = 0;
1825 reciprocal = UNP_RECIPROCAL(alpha);
1829 *out_ptr++ = png_unpremultiply(*in_ptr++, alpha, reciprocal);
1935 png_uint_32 reciprocal = 0;
1937 /* Calculate a reciprocal, as in the png_write_image_8bit code above
1942 reciprocal = (((0xffff*0xff)<<7)+(alpha>>1))/alpha;
1951 alpha, reciprocal);
1953 reciprocal);
1955 reciprocal);
1960 png_unpremultiply(entry[afirst], alpha, reciprocal);