Abstract:
An anti-aliasing method greatly reduces the required size of the look-up table (LUT) memory space. The LUT memory is divided into four partitions and the four partitions are partitioned in parallel. This method allows for a great reduction in the amount of memory which needs to be incorporated into an application-specific integrated circuit (ASIC) which results in lower costs.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to an anti-aliasing method using a partitioned look-up table (LUT), and more particularly, to a method by which the size of the LUT used in obtaining a mask for sub-pixels is reduced to one-sixteenth of the conventional size. 
     In computer graphics systems, a stepped edge of an object polygon may often be generated by the digitization of an on-screen image. The removal of such a phenomenon is called anti-aliasing. 
     Anti-aliasing is classified into a super-sampling method and an area sampling method. In the super-sampling method, the color value of a pixel is calculated by obtaining the color values of several sub-pixels within the pixel and averaging the thus-obtained color values. In area sampling, the area of the polygon occupying a pixel is calculated and then the color value of the area ratio is calculated. 
     In the case of performing anti-aliasing via hardware, the super-sampling method is widely adopted due to the ease of its implementation. However, the Schilling scheme, in which area sampling is supplemented, has been proposed to solve the drawbacks of super-sampling. 
     In the Schilling scheme, the distance from the center of a pixel to the edge of a polygon, and the slope of the edge are input to an LUT, and the sub-pixel mask generated for that case is obtained from an LUT. Thereafter, a color value in a corresponding frame buffer and a Z value are updated with respect to the sub-pixels which are set to &#34;1.&#34; 
     The sub-pixels are numbered correspondingly to the area covered by a polygon and stored in tie LUT as a sub-pixel mask having the most similar shape of the polygon within a pixel, based on the above distance and slope. Here, the distance from the center of the respective pixel to the edge of the polygon is obtained by interpolating an edge function (see &#34;A New Simple and Efficient Antialiasing with Subpixel Masks&#34; by Andreas Schilling, Computer Graphics, Volume 25, Number 4, July 1991, pp 133-141). 
     FIG. 1A shows screen units and the edge of a polygon used in the present invention. Tile screen units shown in FIG. 1A are pixel 100 and sub-pixels 102. In the present invention, it is assumed that a pixel is composed of 4×4 sub-pixels. 
     FIG. 1A also shows the distance (d) from the center of pixel 100 to a straight line of the polygon&#39;s edge, and the slope (s) of the straight line with respect to the X axis. An LUT is constituted using these two variables, thereby producing a sub-pixel mask for generating a desired screen display. 
     Referring to FIG. 1B which is a schematic block diagram of the conventional LUT for generating a pixel mask, the inputs of LUT 104 are d, d ex  and the sign of d ey . Here, d ex  is a variable representing the distance from the center of a pixel to the straight line of the polygon&#39;s edge, which depends on the increment of the X axis. Since the magnitude of d ex  is proportionate to the slope of a straight line of the polygon&#39;s edge, the d ex  functions as a slope value. The sign of d ey  determines whether a pixel location will fall inside or outside the polygon. In other words, a positive d ey  value means that the pixel lies in the positive direction from the straight line and a negative d ey  value means that the pixel lies in the negative direction from the straight line, with respect to the Y axis. 
     Therefore, LUT 104 selects a mask corresponding to three input variables and outputs the selected mask, to thereby display the mask on a screen as shown in FIG. 1C. 
     The anti-aliasing method of Schilling requires a 32K-bit LUT memory, supposing one pixel is composed of 4×4 sub-pixels. In order to process at high speed, the LUTs should be incorporated in a rasterizer chip. However, it is costly to incorporate such large-capacity memories into an application-specific integrated circuit (ASIC). 
     SUMMARY OF THE INVENTION 
     Therefore, it is an object of the present invention to provide an anti-aliasing method using a partitioned LUT, in order to reduce the memory amount required for constituting the LUT for performing anti-aliasing. 
     To accomplish the above object, an anti-aliasing method using partitioned LUTs comprises the steps of: dividing a pixel into four sub-blocks; obtaining each sub-pixel distance from the centers of the four sub-blocks to a straight line of the edge of a predetermined polygon, using a pixel distance from the center of the pixel to the straight line and the slope of the straight line; and respectively generating sub-masks corresponding to picture data of the respective sub-blocks by inputting the respective sub-pixel distances and the slope to the four LUTs. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The above objects and advantages of the present invention will become more apparent by describing in detail a preferred embodiment thereof with reference to the attached drawings in which: 
     FIG. 1A shows a screen unit and polygon edge used in the present invention; 
     FIG. 1B is a schematic block diagram of the conventional look-up table for generating a pixel mask; 
     FIG. 1C shows a screen of a pixel generated by a mask; 
     FIG. 2A shows how to process the pixel shown in FIG. 1A according to the present invention; 
     FIG. 2B shows the distances from the centers of the respective sub-blocks to a straight line of the edge of the polygon; and 
     FIG. 3 is a schematic block diagram of the apparatus for implementing the method according to the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     As shown in FIG. 2A, since the pixel 100 is processed by being divided into four sub-blocks B1, B2, B3 and B4, the LUT is also divided into four partitions for processing in parallel. 
     FIG. 2B shows the distances from the centers of the respective sub-blocks to the straight line of a polygon edge. 
     Therefore, since four independent LUTs are used with respect to one pixel in the present invention, the distances d1, d2, d3 and d4 from the centers of the sub-blocks B1, B2, B3 and B4 corresponding to the respective LUTs to the straight line of a polygonal edge can be obtained by respectively adding the distance (d) from the center of pixel 100 to the straight line of polygonal edge with the Δd 1 , Δd 2 , Δd 3  and Δd 4 , which are defined as follows: ##EQU1## where d ex  is equal to Δd/Δx and d ey  is equal to Δd/Δy. 
     In other words, since the distance (d) is obtained by the interpolation of Δd/Δx and Δd/Δy, Δd 1 , Δd 2 , Δd 3  and Δd 4  are defined as above and stored in registers. 
     FIG. 3 is a schematic block diagram of the apparatus for implementing the method according to the present invention and the apparatus is constituted by first to fourth adders 300, 302, 304 and 306 and first to fourth LUTs 308, 310, 312 and 314. 
     The operation according to the above configuration will now be described. 
     First adder 300 receives d and Δd 1  and adds them, thereby outputting d1 to first LUT 308, second adder 302 receives d and Δd 2  and adds them, thereby outputting d2 to second LUT 310, third adder 304 receives d and Δd 3  and adds them, thereby outputting d3 to third LUT 312, and fourth adder 306 receives d and Δd 4  and adds them, thereby outputting d4 to fourth LUT 314. 
     The respective LUTs 308, 310, 312 and 314 apply d1 to d4, d ex  and the sign of d ey  as their inputs as conventionally and generate sub-masks for the respective sub-blocks. 
     The present invention has an effect of diminishing the size of LUT by 1/16 by dividing LUT memory into four. In order to obtain an independent sub-mask, four adders 300, 302, 304 and 306 are required for obtaining the distance from the centers of the respective sub-blocks to the straight line of polygonal edge, which may delay operation by one clock. Also, error of the maximum 1/16 pixel may be produced due to accumulation of truncation error in the respective sub-blocks by calculating the area covered by the polygon within a pixel by four independent sub-blocks. 
     However, such an error is insignificant in a visual effect of color of a pixel. Also, one clock delayed processing speed is insignificant compared to the total time required for shading by the area sampling method. 
     Given that the number of samplings n×n (n 2 ) is expressed as m, the total LUT size is defined by the following equation: 
     
         2m×m×4×m=8m.sup.3                        Eq. (5) 
    
     where the first term (2m) is the number of cases d expressed in half-subpixel units, the second term (m) is the number of cases of slopes, the third term (4) is the number of cases by signs of d ey  and d ex , and the fourth term (m) is the number of sub-pixels. 
     Therefore, in the present invention, since four partitioned LUTs in which the sampling number is reduced to one-fourth are used by dividing an LUT into four partitions, the required LUT memory capacity can be reduced to one-sixteenth of the conventional size. 
     Also, in the case of 8×8 samplings, if the division by sixteen of the LUT is applied recursively until the sub-blocks become 2×2 samplings, the size of LUT can be diminished to 1/16 2 . At this time, the deeper the recursive depth becomes, the more registers and adders are required in proportion thereto. Thus, assuming a recursive depth of k, the size of LUT is 1/16 k .