Claims
- 1. A method of performing a blending operation between a first pixel having a first pixel alpha value and a first pixel color data value and a second pixel having a second pixel alpha value and a second pixel color data value using a pre-defined set of logical operations and an associated set of pre-computed constants, comprising:
calculating a first pixel blending factor and a second pixel blending factor based upon a selected Porter-Duff compositing equation, the first pixel alpha value, and the second pixel alpha value, such that there are no decisions to be made in an innermost calculation loop.
- 2. A method as recited in claim 1, further comprising:
calculating a resulting alpha value based upon the first pixel blending factor, the second pixel blending factor, the first alpha value, and the second alpha value; calculating a resulting color value based upon the first pixel blending factor, the second pixel blending factor, the first pixel color data value, and the second pixel color data value; and associating the resulting alpha value and the resulting color data value with the second pixel.
- 3. A method as recited in claim 2, wherein the resulting alpha value is equal to the first pixel blending factor multiplied by the first pixel alpha value added to the second pixel blending factor multiplied by the second pixel alpha value.
- 4. A method as recited in claim 2, wherein the resulting color value is equal to the first pixel blending factor multiplied by the first pixel color data value added to the second pixel blending factor multiplied by the second pixel color data value.
- 5. A method as recited in claim 1, wherein the first pixel is a source pixel and the second pixel is a destination pixel.
- 6. Computer program product for performing a blending operation between a first pixel having a first pixel alpha value and a first pixel color data value and a second pixel having second pixel alpha value and a second pixel color data value using a pre-defined set of logical operations and an associated set of pre-computed constants, comprising:
computer code for calculating a first pixel blending factor and a second pixel blending factor based upon a selected Porter-Duff compositing equation, the first pixel alpha value, and the second pixel alpha value such that there are no decisions to be made in an innermost calculation loop.; and computer readable medium for storing the computer code.
- 7. Computer program product as recited in claim 6, further comprising:
computer code for calculating a resulting alpha value based upon the first pixel blending factor, the second pixel blending factor, the first alpha value, and the second alpha value; computer code for calculating a resulting color value based upon the first pixel blending factor, the second pixel blending factor, the first pixel color data value, and the second pixel color data value; and computer code for associating the resulting alpha value and the resulting color data value with the second pixel.
- 8. Computer program product as recited in claim 7, wherein the computer code for resulting alpha value further comprises computer code for multiplying the first pixel blending factor by the first pixel alpha value and adding to the product of the second pixel blending factor and the second pixel alpha value.
- 9. Computer program product as recited in claim 7, wherein the resulting color value is equal to the first pixel blending factor multiplied by the first pixel color data value added to the second pixel blending factor multiplied by the second pixel color data value.
- 10. Computer program product as recited in claim 6, wherein the first pixel is a source pixel and the second pixel is a destination pixel.
- 11. A method of performing a blending operation between a first pixel having a first pixel alpha value and a first pixel color data value and a second pixel having second pixel alpha value and a second pixel color data value using a pre-defined set of logical operations and an associated set of pre-computed constants, comprising:
fetching the alpha value for a first pixel; fetching a color data value for the first pixel; means for fetching the alpha value for a second pixel; fetching the color data value for the second pixel; selecting a Porter-Duff compositing equation; calculating a first pixel blending factor and a second pixel blending factor based upon the selected Porter-Duff compositing equation, the first pixel alpha value, and the second pixel alpha value; calculating a resulting alpha value based upon the first pixel blending factor, the second pixel blending factor, the first alpha value, and the second alpha value; calculating a resulting color value based upon the first pixel blending factor, the second pixel blending factor, the first color data value, and the second color data value; and associating the resulting alpha value and the resulting color value with the second pixel such that there are no decisions to be made in an innermost loop.
- 12. A method as recited in claim 1, wherein the first pixel is a source pixel and the second pixel is a destination pixel.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of priority from application Ser. No. 60/372,235, Entitled “METHOD AND APPARATUS TO CALCULATE ANY PORTER-DUFF COMPOSITION EQUATIONS USING 3 PRE-DEFINED LOGICAL OPERATIONS AND 3 PRE-COMPUTED CONSTANTS” by inventor James A. Graham filed on Apr. 11, 2002.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60372235 |
Apr 2002 |
US |