Abstract:
Provided is a method and system for performing color look-up table (CLUT) and gamma correction for video pixel data. A system includes a memory configured for storing CLUT parameters and gamma correction parameters therein. Also included is an input matrix coupled to the memory and configured to receive first and second type pixel data. The memory receives the first type pixel as an address to the stored CLUT parameters and receives the second type pixel data as an address to the stored gamma correction parameters.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention generally relates to RAM memory arrangements for accommodating color look-up tables (CLUTs) and gamma functions.  
         [0003]     2. Related Art  
         [0004]     A color look-up table (CLUT) is a stored graphics function that permits the use of an 8-bit pixel word as a memory index address. This 8-bit pixel word address, which is representative of a maximum of 256 video display colors, is used to produce 32-bit pixel data. The 32-bit pixel data is then used to provide color graphics arrangements. Embedded RAM memory is used in video graphics engines to support CLUT graphic functions.  
         [0005]     Gamma correction is a function to facilitate the correction of color components for television (TV) applications. Conventional gamma correction routines require relatively large numbers of separate RAMs to accommodate all of the table lookup features associated with gamma correction. Gamma correction also requires a separate RAM to store a conversion table to avoid complicated division operations. Thus, in conventional graphics engines, a first RAM and associated control mechanisms are required to support gamma correction functions. A second RAM, and associated control mechanisms are required to support CLUT functions. The requirement to have two separate RAMs with corresponding control mechanisms for supporting CLUT and gamma correction consumes or requires critical resources such as physical chip space and power.  
         [0006]     What is needed, therefore, is an integrated RAM arrangement that can be used efficiently accommodate both CLUT and gamma correction functions.  
       BRIEF SUMMARY OF THE INVENTION  
       [0007]     Consistent with the principles in the present invention as embodied and broadly described herein, an embodiment of the present invention includes an apparatus including a memory having CLUT parameters and gamma correction parameters stored therein. The apparatus includes an input matrix configured to receive first and second type pixel data. The memory is coupled to the input matrix and configured to associate one of the first and second type pixel data with the stored CLUT parameters and associate the other of the first and second type pixel data with the stored gamma correction parameters.  
         [0008]     There are primarily 2 types of graphics image format: the pixel contains all the color component information (e.g. YUV422 or ARGB8888) and the index (e.g. CLUT format). In order to support CLUT format and Gamma-correction function, conventionally two separate RAMs were needed. In the present invention, however, the CLUT function can be combined with the Gamma-Correction function by applying the Gamma-Correction equation on the Look-up-Table.  
         [0009]     The present invention provides one RAM for sharing both CLUT and gamma correction functions. More specifically, one RAM arrangement is integrated such that the same RAM can be used for CLUT+Gamma-Correction (for CLUT format) or just Gamma-Correction (for other formats). This RAM arrangement provides economies in terms of space savings on integrated circuit (IC) chip. It also provides for a more efficient process to implement CLUT and gamma correction functions. Further, the present invention similarly provides a more efficient software setup that does not require special arrangements or address swapping.  
         [0010]     Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below with reference to the accompanying drawings.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES  
       [0011]     The accompanying drawings, which are incorporated in and constitute part of the specification, illustrate embodiments of the invention and, together with the general description given above and detailed description given below, serve to explain the principles of the invention. In the drawings:  
         [0012]      FIG. 1  is an illustration of a RAM implementation of a color lookup table function;  
         [0013]      FIG. 2  is a RAM implementation of the gamma correction function; and  
         [0014]      FIG. 3  is a block diagram illustration of a RAM constructed and arranged in accordance with an embodiment of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0015]     The following detailed description of the present invention refers to the accompanying drawings that illustrate exemplary embodiments consistent with this invention. Other embodiments are possible, and modifications may be made to the embodiments within the spirit and scope of the invention. Therefore, the following detailed description is not meant to limit the invention. Rather, the scope of the invention is defined by the appended claims.  
         [0016]     It would be apparent to one of skill in the art that the present invention as described below, may be implemented in many different embodiments of hardware, software, firmware, and/or the entities illustrated in the figures. Any actual software code with the specialized, controlled hardware to implement the present invention is not limiting of the present invention. Thus, the operation and behavior of the present invention will be described with the understanding that modifications and variations of the embodiments are possible, given the level of detail presented herein.  
         [0017]      FIG. 1  is a RAM implementation of the CLUT function. In  FIG. 1 , a RAM  100  is configured to provide CLUT functionality for an 8-bit pixel word  101 . The 8-bit pixel word  101  is representative of color data graphics, and includes eight individual bit values  102  at assigned bit locations  103 . In an 8-bit pixel word, such as the pixel word  101 , each bit value  102  is representative of color information associated with the red, green, blue (RGB) color system. The three colors are combinable to form  256  colors.  
         [0018]     Within the 8-bit pixel word  101 , three bits, such as the bits in bit locations  5 ,  6  and  7 , are representative of the color red. The bits at locations  2 ,  3  and  4 , are representative of the color green. And the bits in bit-locations  0  and  1  of the pixel word  101 , are representative of the color blue. Thus, a videographic system for color display utilizing 8-bit pixel words such as the pixel word  101 , are typically limited to the 256 colors.  
         [0019]     The purpose of the color lookup table  100  is to expand the 8-bit pixel  101  into a 32-bit pixel word representing an expanded range of colors. That is, through use of the CLUT function, the 8-bit pixel  101  can be indexed to produce 32-bit data representing 256×32 different color combinations. Therefore, the RAM  100  has a dimension of 256×32 bits.  
         [0020]     As shown in  FIG. 1 , the RAM  100  receives 256 entries of color  104  and produces a 32-bit pixel word  105 . The 32-bit pixel word  105  includes dedicated 8 bits  108  for red, 8 bits  110  for green, and 8 bits  112  for blue. The remaining 8 alpha bits  114  are used for other purposes.  
         [0021]     During operation, a graphics engine (not shown), which is part of a larger video networking system, will receive the 8-bit pixel  101  as an input. The graphics engine will then index the 8-bit pixel  101  as an address to one of the 256 color entries  104  within the RAM  100 . The 32-bit data at that address is the 32-bit pixel word  105 . The 32-bit pixel word  105  represents more varied colors for use with associated video related functions.  
         [0022]      FIG. 2  is an illustration of a RAM arrangement  200  configured to support gamma correction functions. As noted above, the gamma correction function provides for correction of color components associated with videographics display systems such as TVs. Such degradation is introduced by the transfer characteristic of the CRT (Cathode-Ray Tube) Display. In  FIG. 2 , a gamma lookup table arrangement  200  includes three separate  256 × 8  RAMs  202 ,  204  and  206 . The gamma correction arrangement  200  is configured to provide color correction for a color component  208 , including 8-bit video color components  210 ,  212  and  214 , which are associated with the RGB color system.  
         [0023]     More specifically, the gamma correction arrangement  200  provides for color component correction in accordance with the following gamma-correction equation: 
 
For R, G, B&lt;0.018,  R′= 4.5 *R, G′= 4.5 *G , and  B′= 4.5 *B.  
 
For R, G, B&gt;=0.018,  R′= 1.099 *R   0.45 −0.099,  G′= 1.099 *G   0.45 −0.099,  B′= 1.099 *B   0.45 −0.099 
 
         [0024]     Using lookup values stored within the RAMs  202 ,  204  and  206 , the separate color components  210 ,  212  and  214  are corrected to provide corresponding color components  210   a ,  212   a  and  214   a . In the example of  FIG. 2 , the 8-bit color component  210 , representing red, is associated with a color component having color deficiencies, such as a defective pixel. In order to correct the deficiencies, the 8-bit component  210  is indexed as an address into the RAM  202 . Based upon its corresponding address locations within the RAM  202 , the RAM  202  outputs the 8-bit component  210   a , or R′, which replaces  210  and R respectively. The component  210   a  contains appropriate corrections based on predetermined look-up table values. The RAMs  204  and  206  contain similar color correction information that is used to index the color components  212  and  214 . The indexed components  212  and  214  are used to retrieve corresponding corrected color components  212   a  and  214   a  from the RAMs  204  and  206  respectively.  
         [0025]     In  FIG. 3 , an exemplary RAM memory system  300  is configured to perform both CLUT and gamma correction functions, in accordance with the present invention. The RAM memory system  300  includes an input matrix  301 , a memory section  302 , and an output matrix  303  that are configured to receive the input pixel words  101 ,  210 ,  212 , and  214  of  FIGS. 1 and 2 . The memory section  302  includes RAMs  304 ,  305 ,  306  and  308 . In the example of  FIG. 3 , the RAMs  304 - 306  and  308  each have a dimension of 32×64 bits. The present invention is not, however, limited to the example of  FIG. 3 . The RAM  304  is configured to receive, as an input, the 8-bit pixel word  101 . The RAMs  305 ,  306 , and  308  are respectively connected to input multiplexing devices  310 ,  312  and  314 . Although the exemplary embodiment of  FIG. 3  provides an illustration using an 8-bit word, in practice the input pixel word can be 8-bits, 4-bits, 2 bits, or some other acceptable bit configuration.  
         [0026]     The multiplexing device  310 ,  312 ,  314  includes a CLUT/(gamma correction) selection switch  316  to configure the memory system  300  for CLUT mode or gamma correction mode. In CLUT mode the enabling switch  316  control the input matrix  301  to index the pixel word  101  as an address to each of the RAM blocks  304 - 306  and  308 . This address ultimately results in production of a 32-bit pixel value as an output  344  from the memory system  300 . In gamma correction mode, the pixel words  210 ,  212 , and  214  are individually provided to RAM blocks  305 ,  306 , and  308 , respectively. The pixel words  210 ,  212 , and  214  ultimately result in production of a 24-bit pixel value as the output  344  from the memory system  300 .  
         [0027]     The output matrix  303  includes a first multiplexing device  324  is configured to receive as inputs respective outputs of RAM blocks  304 - 306  and  308 . The multiplexing device  324  can be implemented, for example, as a 4×1 multiplexer. The output matrix  303  also includes multiplexing devices  326 ,  328 , and  330 , connected as shown in  FIG. 3 . An output of the multiplexing device  324  is provided to a multiplexing device  340 . Finally, a multiplexing device  342  receives one input from the multiplexing device  340  and other inputs from the multiplexing devices  326 ,  328  and  330 , to provide an output  344 . Operation of the exemplary RAM memory system  300  will be explained in greater detail below.  
         [0028]     In the exemplary embodiment of  FIG. 3 , the memory system  300  is configured in a CLUT mode or a gamma correction mode by providing an appropriate input to the switch  316 . By way of example, when configured for CLUT mode, the pixel word  101  is indexed through the input matrix  301  to the RAM blocks  304 - 306  and  308 . More specifically, the most significant bits (MSBs)  3 - 7 , are provided as inputs to one of the respective RAM blocks  304 - 306  and  308 . The specific value represented by the MSBs  3 - 7  determines which of RAM blocks  304 - 306  and  308  will be used. This indexing produces a corresponding 32-bit word, such as the pixel word  105  of  FIG. 1 . The 32-bit pixel word  105  represents the expanded colors derived from the 8-bit word  101 .  
         [0029]     Four data paths  322 , each capable of providing 32 bit data, are coupled to the multiplexing device  324 . When the pixel word  101  is provided as an input to the input matrix  301 , the multiplexing device  324  is controlled by a control signal  346  to cause the multiplexing device  324  to output one of the four data paths  322 . It is also provided along a data path  346 . Only one of the four data paths  322  are selected, since only one of the RAM blocks  304 - 306 , and  308  was indexed as an address by the 8-bit pixel word  101 . The data from the selected path of the paths  322  is provided as an output from the device  324 .  
         [0030]     The control signal  346  can be generated from the pixel word  101 . For example, bits of the pixel word  101 , such as the bits  1  and  2 , can be used to select one of the data paths  322  from the RAM blocks  304 - 306  and  308 . While bits  1  and  2  of the pixel word  101  are used to select a particular one of the data paths  322 , a remaining bit of the pixel word  101 , such as bit  0 , is provided as an input to the multiplexing device  340  along the data path  346 . The multiplexing device  340  permits selection of the desired 32-bits of data output from the multiplexing device  324 .  
         [0031]     Alternatively, the user can configure the RAM memory system  300  for the gamma correction mode using the switch  316 . When configured for the gamma correction mode, individual color components  210 ,  212 , and  214  of  FIG. 2  are provided as inputs to respective multiplexing devices  310 ,  312 , and 
        314. The example of  FIG. 2  associates the color components  210 ,  212  and  214  with the RGB color system. Alternatively or additionally, luminance and chrominance components (YUV) can be used as inputs.        
 
         [0033]     As in the case with the pixel word  101 , selected bits, such as the MSBs  3 - 7  of each of the components  210 ,  212  and  214 , are used as the inputs to the RAM blocks  305 ,  306 , and  308 . At the same time, the color components  210 ,  212 , and  214  (associated with gamma correction) are provided along data lines  348  as inputs to respective multiplexing devices  326 ,  328 , and  330 . The multiplexing devices  326 ,  328 , and  330  can be implemented as 8 to 1 multiplexers.  
         [0034]     When the system  300  is configured for gamma correction, the multiplexing devices  326 ,  328 , and  330  are configured to select a desired 8-bits from within the data output from the respective RAM blocks  305 ,  306 , and  308 . The selected 8-bits are the gamma corrected color components that correspond to the pixels  210 ,  212 , and  214 . As shown in  FIG. 3 , the multiplexing device  324  and  340  are not used during gamma correction.  
         [0035]     The respective outputs of the multiplexing devices  326 ,  328 , and  330  are provided to the multiplexing device  342 . Thus, the multiplexing device  342  receives either the 32-bit word data associated with the CLUT mode or a 24-bit word data associated with the three combined 8-bit gamma corrected outputs. The multiplexing device  342  provides the 32-bit data or the 24-bit data as an output based upon a signal received from the CLUT/(gamma correction) selection switch  316 . The output  344 , therefore, includes CLUT data or gamma corrected data.  
         [0036]     Thus, the present invention as illustrated in the exemplary embodiment of  FIG. 3 , provides color lookup function and gamma correction using the same RAM memory system  300 . More specifically, 8-bit or other similar pixel data can be used as index addresses to retrieve 32-bit or 24-bit pixel values from the RAM memory system  300  for CLUT or gamma correction. In this manner, an integrated RAM system can be used to accommodate both CLUT and gamma correction functions providing significant economies in terms of space savings, functionality, and software setup.  
         [0037]     The present invention has been described above with the aid of functional building blocks illustrating the performance of specified functions and relationships thereof. The boundaries of these functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternate boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed.  
         [0038]     Any such alternate boundaries are thus within the scope and spirit of the claimed invention. One skilled in the art will recognize that these functional building blocks can be implemented by analog and/or digital circuits, discrete components, application-specific integrated circuits, firmware, processors executing appropriate software, and the like, or any combination thereof. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.