Method and apparatus to calculate any porter-duff compositing equation using pre-defined logical operations and pre-computed constants
AssigneeSun Microsystems, Inc.
InventorJames A. Graham
Life of this patent
Estimating the term…
Abstract
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 constant that includes 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.
Claims12
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.
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.
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.
Dependencies are inferred from the claim text.