1. Field of the Invention
This invention relates generally to computer systems and more particularly to a method and apparatus for more efficiently storing image data to be displayed.
2. Description of the Related Art
Current liquid crystal display (LCD) controller designs incorporate display buffers that only support display data in RGB format. As is generally known, RGB format display data varies in color depth from 8, 16, or 24 bit-per-pixel (bpp). Newer LCD controllers incorporating digital video features, such as video input ports, JPEG, and MPEG functionality, require 16 or 24 bpp color depths to properly display live video or still images. Typically, the display data coming from various modules are converted to RGB format before storage into the display buffer. The support for higher color depths and increased display sizes, strains the memory allocation for the display buffer (internal RAM) because a large portion of the resulting manufacturing cost of an LCD controller is determined by the allocation of silicon for embedded RAM.
For current generations of LCD controllers that support a camera interface and a JPEG CODEC, incoming YUV data from these modules are first converted to 16 bpp or 24 bpp (unpacked 32-bits wide) RGB data format by a YUV-RGB Converter (YRC). The converted data is then stored in the display buffer. However, this process decompresses the display data resulting in a larger RAM requirement for storage in the display buffer. For example, YUV 4:2:2 pixel data coming from the camera interface is 16-bits wide and equivalent to 24 bpp. A resultant YUV-RGB conversion to 24 bpp unpacked (32-bits wide) would increase the memory storage requirement by 2 times. A resultant YUV-RGB conversion to 16 bpp would not increase the memory storage requirement but the resulting image fidelity is decreased (color depth from 24 bpp to 16 bpp).
As a result, there is a need to solve the problems of the prior art to provide a display controller configured to support storage of the YUV color format in order to minimize the memory capacity necessary for the storage of the display data.
Broadly speaking, the present invention fills these needs by providing a display buffer that supports display data in various YUV formats. It should be appreciated that the present invention can be implemented in numerous ways, including as a process, a system, or a device. Several inventive embodiments of the present invention are described below.
In one embodiment, a method for enhancing storage capability for a display controller is provided. The method initiates with receiving video display data having a color format associated with a first sub-sampling scheme. Then, a size associated with the video display data is adjusted. Next, the video display data is compressed through a second sub-sampling scheme. Then, the compressed data having the color format is stored.
In another embodiment, a computer readable medium having program instructions for enhancing storage capability for a display controller is provided. The computer readable medium includes program instructions for receiving video display data having a color format associated with a first sub-sampling scheme. Program instructions for adjusting a size associated with the video display data are included. Program instructions for compressing the video display data through a second sub-sampling scheme are provided. Program instructions for storing the compressed data having the color format are also included.
In yet another embodiment, a display controller is provided. The display controller includes a resizer block configured to receive digital video data defined through a YUV color format. The resizer block is capable of scaling and cropping the digital video data. A conversion module configured to compress the digital video data defined through the YUV color format is included. A memory region configured to store the compressed digital video data and a color space conversion block configured to convert the compressed digital video data from the YUV color format to an RGB color format for display are included in the display controller.
In still yet another embodiment, a digital video device is provided. The digital video device includes a central processing unit (CPU). A display controller is also included. The display controller includes a resizer block configured to receive digital video data defined through a YUV color format. The resizer block is capable of scaling and cropping the digital video data. A conversion module configured to compress the digital video data defined through the YUV color format is included in the display controller. A memory region configured to store the compressed digital video data is provided in the display controller. The digital video device includes a display panel configured to display the stored digital video data. A bus over which the CPU, the display controller and the display panel communicate is also provided.
In another embodiment, an integrated circuit is provided. The integrated circuit includes circuitry for receiving previously compressed digital video data. Circuitry for sub-sampling the previously compressed digital video data is provided. Circuitry for storing the sub-sampled data is also included.
Other aspects and advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.
The present invention will be readily understood by the following detailed description in conjunction with the accompanying drawings, and like reference numerals designate like structural elements.
An invention is described for an apparatus and method for exploiting the compression options associated with YUV color formatted data, or data derived from YUV color data, in order to conserve memory space. It will be apparent, however, to one skilled in the art, in light of the present disclosure, that the present invention may be practiced without some or all of these specific details. In other instances, well known process operations have not been described in detail in order not to unnecessarily obscure the present invention.
The embodiments of the present invention provide a display controller having a display buffer that natively supports various YUV formats. One skilled in the art will appreciate that the various YUV formats include Y′CbCr, YIQ, etc. The embodiments described herein avoid converting the YUV format to a RGB format and subsequently storing the data in memory as RGB formatted data. Consequently, the YUV display buffer may hold more display data relative to a display buffer holding RGB formatted data. Furthermore, higher color depths and larger display sizes may be supported with smaller display buffer sizes. As will be explained in more detail below, the increased storage capability is accomplished by compressing the YUV data through various schemes of sub-sampling chrominance pixel data, e.g., UV pixel data and CbCr pixel data. The sub-sampling results in negligible loss of image fidelity as the human eye is more sensitive to the luminance detail than the color detail.
In one embodiment, the display controller is capable of supporting any of the following four YUV formats:
It should be appreciated that each of the above four formats is equivalent to an RGB color depth of 24 bits per pixel (bpp), thereby allowing varying levels of lossy compression. Table 1 illustrates the memory requirements for each YUV format and compression achieved as compared to RGB data at 24 bpp.
As can be seen the compression ratios can range anywhere from 1.3:1 to 2:1. Thus a significant savings in terms of memory may be realized through the embodiments described herein. As most digital video devices transmit YUV data associated with a 4:2:2 compression format, it should be appreciated that in this situation, the 4:2:2 compression format is downsampled to yield a 4:1:1 or 4:2:0 compression format. However, where 4:4:4 YUV data is received, the embodiments described herein also apply.
Table 2 illustrates the memory requirements for a 320×240 image in each of the compressed YUV formats. One skilled in the art will appreciate that the 320×240 image size is characteristic of a display screen for a personal digital assistant (PDA). However, it should be appreciated that the embodiments described herein are not limited to this size screen and may be applied to any suitable size screen.
With reference to Table 2, YUV data storage would give a best case savings in memory requirements of 62.5% as compared against RGB 24 bpp unpacked data and a 25% savings against RGB 16 bpp. The worst case savings in memory requirements would be 25% against 24 bpp unpacked RGB and no savings against RGB 16 bpp, however, the YUV format offers higher color depth than the RGB format.
Converter 128 is configured to sub-sample the image data in order to further compress the data to conserve space within memory 114. For example, the incoming digital data is typically of a YUV color format which has been compressed through a 4:2:2 compression scheme. Converter 128 will take the color data in the 4:2:2 compression scheme and sub-sample the data to convert the data to a YUV format having either a 4:1:1 compression ratio or a 4:2:0 compression ratio. The further compressed YUV data is then stored in memory 114. As illustrated in Tables 1 and 2, a significant savings may be achieved by storing the further compressed YUV data in memory 114 as opposed to 24 bpp RGB data.
Still referring to
Still referring to
The method of
In summary, the above-described embodiments allow for the efficient use of memory by utilizing the compression of incoming YUV color data. That is, YUV data having a 4:2:2 format is associated with a bit size of 16 bits per pixel while RGB data is associated with a bit size of 24 bits per pixel. Therefore, it is optimal to store YUV data in a 4:2:2 compression scheme or some other lower compression scheme in memory. The display controller described herein is a LCD controller in one embodiment. However, the display controller is not limited to a LCD controller as the display controller may be any suitable display controller.
With the above embodiments in mind, it should be understood that the invention may employ various computer-implemented operations involving data stored in computer systems. These operations are those requiring physical manipulation of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. Further, the manipulations performed are often referred to in terms, such as producing, identifying, determining, or comparing.
Any of the operations described herein that form part of the invention are useful machine operations. The invention also relates to a device or an apparatus for performing these operations. The apparatus may be specially constructed for the required purposes, or it may be a general purpose computer selectively activated or configured by a computer program stored in the computer. In particular, various general purpose machines may be used with computer programs written in accordance with the teachings herein, or it may be more convenient to construct a more specialized apparatus to perform the required operations.
The invention can also be embodied as computer readable code on a computer readable medium. The computer readable medium is any data storage device that can store data which can be thereafter read by a computer system. The computer readable medium also includes an electromagnetic carrier wave in which the computer code is embodied. Examples of the computer readable medium include hard drives, network attached storage (NAS), read-only memory, random-access memory, CD-ROMs, CD-Rs, CD-RWs, magnetic tapes, and other optical and non-optical data storage devices. The computer readable medium can also be distributed over a network coupled computer system so that the computer readable code is stored and executed in a distributed fashion.
The above described invention may be practiced with other computer system configurations including hand-held devices, microprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers and the like. Although the foregoing invention has been described in some detail for purposes of clarity of understanding, it will be apparent that certain changes and modifications may be practiced within the scope of the appended claims. Accordingly, the present embodiments are to be considered as illustrative and not restrictive, and the invention is not to be limited to the details given herein, but may be modified within the scope and equivalents of the appended claims. In the claims, elements and/or steps do not imply any particular order of operation, unless explicitly stated in the claims.
This application is related to U.S. patent application Ser. No. ______ (Attorney Docket No. VP088), filed on the same day as the instant application and entitled “METHOD AND APPARATUS FOR COLOR SPACE CONVERSION.” This application is hereby incorporated by reference in its entirety for all purposes.