1. Field of the Invention
The present invention relates to the usage of video memory, especially to a method and apparatus for sharing the video memory of a graphic chip.
2. Description of the Prior Art
Generally, a graphic engine obtains the graphic block from a source/destination/pattern block and the pattern block from the other source/destination/pattern block to have various logic executions, and then writes back to a frame buffer to be displayed in a screen. Therein, the source block can be obtained from a CPU, main memory and the frame buffer itself. The pattern block can also be obtained from the CPU, pattern memory and pattern register to write back to the destination block after executing a masking operation. But among the obtained blocks, the pattern memory is the largest block in a graphic chip. Taking a 16×16-pixel true color video area as an example, a 768-byte (16×16×3) memory is configured in a graphic chip (in true color, every pixel includes 3 bytes to represent 3 primary colors) to work as a pattern memory.
In another side,
FIG.2 is the graphic chip block diagram of a prior art, including a graphic engine 220, a video memory 230, and a graph and video superposition unit 240. The video memory 230 includes a pattern memory 231 and a color LUT 232. Besides, a frame buffer can store digitalized images temporarily; therefore, the graphic chip can also include a frame buffer 250. A microprocessor 210 instructs the graphic engine 220 to obtain the graphic block from the pattern memory 231 of the video memory 230 and the frame buffer 250 to write back to the frame buffer 250 after executing the pattern block process, like masking operation, and then the graphic block is sent directly to the graph and video superposition unit 240. If the displayed colors are 256 or under 256 color-scaled colors, a color expansion through the color LUT 232 is needed and then sent graph and video superposition unit 240. Besides, if the input color format is different from the covering color format, a color space conversion (CSC) is also needed. For example, if the input format is Y, Cb and Cr, but the output format is R, G and B, and the output format is Y, Cb and Cr, a process of the color space conversion is necessary to make the color formats in accordance (because it is not the emphasis of this invention, it will not be described in detail).
Because the usage moment of the pattern memory and color LUT are exclusive and in timing order, and the access paths of the pattern area and the color expansion are overlapped because they both are in the pattern memory, how to reduce the layout of the pattern memory in the graphic chip and how to use the video memory in the graphic chip are the challenges that the technology field has to face.
The present invention provides a method for sharing the video memory of a graphic chip comprising the steps of storing a color look up table (LUT) in a sharing memory of pattern and color LUT in the video memory of the graphic chip while a destination block of a frame buffer executes color expansion; and storing a plurality of pattern blocks in the sharing memory of pattern and color LUT for the access of the graphic engine while the graphic engine accesses a pattern memory.
The present invention also provides a design method of a graphic chip comprising a sharing memory of pattern and color LUT is configured in a video memory of the graphic chip, wherein the sharing memory of pattern and color LUT works as a color LUT when a destination block of a frame buffer proceeds to color expansion, and works as a pattern memory when a graphic engine accesses a pattern block.
Again, the present invention provides a graphic chip sharing video memory comprising a video memory for storing one sharing memory of a pattern and color LUT at least, and the contents of the sharing memory of pattern and color LUT adjusted in accordance with an access apparatus; and a graphic engine for accessing and processing a plurality of pattern blocks of the sharing memory of pattern and color LUT.
The physical layout area of a graphic chip can be reduced so that the cost drops by a method for sharing the video memory of a graphic chip and the design method of the graphic chip based on the present invention.
Some embodiments of the present invention will be described in detail as the following. But, besides the description in detail, the present invention can be implemented in the other embodiments broadly, and the scope of the present invention is not limited, in accordance with the following claims.
For providing clearer description and understanding the present invention more easily, every part of the drawings is not drew in its relative dimensions. Certain dimensions and the other ratios of the relative scales are exaggerated. The irrelevant details are not drawn completely for the simplicity of the drawings.
While the described embodiment represents the preferred form of the present invention, it is to be understood that modifications will occur to those skilled in that art without departing from the spirit of the invention. The scope of the invention is therefore to be determined solely by the appended claims.
Number | Date | Country | |
---|---|---|---|
60472732 | May 2003 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10851220 | May 2004 | US |
Child | 11335597 | Jan 2006 | US |