Browse Prior Art Database

Efficient Conditional Float to Integer Conversion for Graphics and Image Applications

IP.com Disclosure Number: IPCOM000112335D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 80K

Publishing Venue

IBM

Related People

Karim, F: AUTHOR [+3]

Abstract

A graphics pipeline can be divided into two parts: geometric transformation and rasterization. The transformation pipeline works with mostly floating point numbers. At the end of the transformation pipeline, the floating point data is converted into integer or fixed point data. If the output of the transformation pipeline is fixed point data, we can assume that the data is integer data premultiplied by a real constant.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Efficient Conditional Float to Integer Conversion for Graphics and
Image Applications

      A graphics pipeline can be divided into two parts: geometric
transformation and rasterization.  The transformation pipeline works
with mostly floating point numbers.  At the end of the transformation
pipeline, the floating point data is converted into integer or fixed
point data.  If the output of the transformation pipeline is fixed
point data, we can assume that the data is integer data premultiplied
by a real constant.

      The required characteristic of input data to the rasterization
process is shown in the Figure.  The input data to the rasterizer is
sub-pixel fixed point data or integer data that was premultiplied by
a sub-pixel resolution constant.  The rasterizer typically receives
an opcode, X, Y, and Z coordinates and color values.  The coordinates
and the color values are unsigned integers and the introduction of
negative integers can stall the pipeline as the data always has to be
tested for positive sign first.  The decoding of data in the
rasterizer is not an efficient solution as it stalls the free
incoming data stream depending on the outcome.  Hence the
transformation pipeline that outputs only unsigned integer data is
the best solution.  The transformation pipeline conditionally checks
for negative floating point numbers and sets them to zero and
positive floating point data is converted in the usual conversion
scheme.  The code that performs these operations is:

                   if (a < 0)     /* a data type is float    */

                       x = 0;     /* x data type is integer  */

                   else

                       x = a;

Such conditional test and  assignment statements introduce bubbles in
the transformation pipeline.  To avoid bubbles in transformation
pipeline, a new instruction that performs the above opeartions in one
cycle is introduced in Graphics Floating Point Engine (GFPE).  As
GFPE is a superscalar processor with multiple execution units,
introduction of bubbles in the pipeline degrades the performance
dramatically.  The format of the GFPE instruction is as follows:

          fcviz ...