This application claims the priority benefit of Taiwan application serial no. 92136370, filed Dec. 22, 2003.
1. Field of the Invention
The present invention relates to a circuit and a method of image processing, and more particularly, to a circuit and a method of decompressing images.
2. Description of the Related Art
When storing the image data such as movies in various storage media, in order to save the storage space, an image compression standard such as Motion Picture Expert Group (MPEG) is commonly used to compress the original image data. Generally, the compression ratio of MPEG is about 8˜40 times. Therefore, when using a DVD player to play the images, the compressed image has to be decompressed by the image decompressing circuit first, such that the recovered image can be displayed in the display.
Although the VLD performs the debug analysis on the block which is being processed before the normal decompression, since the subsequent decoding, inverse quantization, inverse discrete cosine transformation, and motion compensation are simultaneously processed in a pipeline. When the VLD finds out that an image picture is severely damaged, it may not have sufficient time to generate next new picture and the system is enforced to replay the previous picture once more for compensating and preventing the damaged picture from displaying. In addition, when the VLD just finds out that there is an error, it is possible that a portion of the damage image picture has been displayed for a while, thus cause an unrecoverable error.
Therefore, it is an object of the present invention to provide a circuit and a method for decompressing images. A debug analysis is executed on a compressed image picture whose data amount is relatively small after the compressed image picture has been received. When the result of the debug analysis indicates that the compressed image picture is suitable for the subsequent decoding operation, a pipeline process is performed on the compressed image picture, such that the motion picture is displayed more smoothly and more accurately.
In accordance with the above objects and other advantages, a circuit for decompressing images is provided by the present invention. The circuit for decompressing images comprises a variable length decoding unit and an image picture recovery unit. Wherein, the variable length decoding unit receives a compressed image picture and executes a debug analysis on the compressed image picture. When the result of the debug analysis indicates that the compressed image picture is suitable for the subsequent decoding operation, a decoding operation is performed in pipeline on the compressed image picture. The image picture recovery unit electrically couples to the variable length decoding unit, and performs the subsequent operations such as inverse quantization, inverse discrete cosine transformation, and motion compensation with a pipeline process after the compressed image picture has been decoded with the pipeline process, so as to recover the received compressed image picture.
In an embodiment, if the valuable length decoding unit executes the debug analysis on the compressed image picture and cannot find any error data, this result of the debug analysis determines that the compressed image data is suitable for the subsequent decoding operation, so as to recover the received compressed image picture.
In an embodiment, if the valuable length decoding unit executes the debug analysis on the compressed image picture and finds an error data, then the compressed image picture is reloaded, and the debug analysis is executed on the compressed image picture again, so as to avoid wasting the system resource due to decoding the error data.
In an embodiment, if the valuable length decoding unit executes the debug analysis on the compressed image picture and finds more than one predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is severely damaged, the displaying of the compressed image picture is aborted, and the subsequent decoding operation is not performed, so as to avoid displaying the severely damaged picture.
In an embodiment, if the valuable length decoding unit executes the debug analysis on the compressed image picture and finds less than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is not severely damaged, this result of the debug analysis determines that the compressed image picture is suitable for the subsequent decoding operation, so as to perform the subsequent decoding operation.
In an embodiment, the variable length decoding unit of the image decompressing circuit can selectively turn on or turn off the debug analysis function for the compressed image picture.
The present invention further provides a method for decompressing images. The method comprises: receiving a compressed image picture, executing a debug analysis on the compressed image picture, and when the result of the debug analysis indicates that the compressed image picture is suitable for the subsequent decoding operation, executing the decoding operation on the compressed image picture with a pipeline process; and performing the subsequent operations such as inverse quantization, inverse discrete cosine transformation, and motion compensation with a pipeline process after the compressed image picture has been decoded with the pipeline process, so as to recover the received compressed image picture.
Wherein, when executing the debug analysis on the compressed image picture and not finding any error data, this result of the debug analysis determines that the compressed image data is suitable for the subsequent decoding operation, so as to recover the received compressed image picture.
Wherein, when executing the debug analysis on the compressed image picture and finding an error data, the compressed image picture is reloaded, and the debug analysis is executed on the compressed image picture again, so as to avoid wasting the system resource due to decoding the error data.
Wherein, when executing the debug analysis on the compressed image picture and finding more than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is severely damaged, the displaying of the compressed image picture is aborted, and the subsequent decoding operation is not performed, so as to avoid displaying the severely damage picture.
Wherein, when executing the debug analysis on the compressed image picture and finding less than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is not severely damaged, this result of the debug analysis determines that the compressed image picture is suitable for the subsequent decoding operation, so as to perform the subsequent decoding operation.
Wherein, the debug analysis function for the compressed image picture can be selectively turned on or turned off.
In summary, with the circuit and method for decompressing images provided by the present invention, since the debug analysis is performed on a compressed image picture in advance when the compressed image picture is just been received, and the decoding process is performed in pipeline on the compressed image picture only when the result of the debug analysis indicates that the compressed image picture is suitable for the subsequent decoding operation to avoid displaying the error picture, such that the motion picture is displayed more smoothly and more accurately.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The following drawings illustrate embodiments of the invention, and together with the description, serve to explain the principles of the invention.
As mentioned above, it is common that the compression ratio of the image compression standard such as MPEG is about 8˜40 times, which causes a great difference in the data amount it processes. In order to avoid excessive resource is spent in decoding the picture which is damaged and not suitable for displaying and thus causing the non-smooth display of the image, or even being forced to display the severely damaged picture which can be perceived as error image picture by the user. In the present invention, the variable length decoding unit 210 in the diagram performs syntax and semantics pre-check after the compressed image picture has been received. In other words, the debug analysis is performed on the entire compressed image picture first, and when the result of the debug analysis indicates that there is no error data, it is determined that the compressed image picture is suitable for the subsequent decoding operation. Then, the decoding process is performed in pipeline on the compressed image picture, and the decoded data is sent to the image picture recovery unit 220 for performing the further INVQ, IDCT, and MC processes in pipeline.
When no error data is found, it is determined that the compressed image picture is suitable for the subsequent decoding operation as mentioned above, the operations such as decoding, INVQ, IDCT, and MC are performed in pipeline on the compressed image picture. When error data is found, the compressed image picture is reloaded, and the debug analysis is performed on the compressed image picture again, so as to avoid wasting the system resource due to decoding the error data.
In addition, when the valuable length decoding unit 210 executes the debug analysis on the compressed image picture and finds more than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is severely damaged and not suitable for further decoding and displaying, the compressed image picture is aborted, and the subsequent decoding operation is not performed, so as to avoid displaying the severely damaged picture. Moreover, this picture is displayed in a stuff-picture displaying method.
In addition, when the valuable length decoding unit 210 executes the debug analysis on the compressed image picture and finds less than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is not severely damaged, this result of the debug analysis determines that the compressed image picture is suitable for the subsequent decoding operation, so as to perform the subsequent decoding operation for normally displaying the picture.
Besides several cases mentioned above, when the variable length decoding unit 210 continuously analyzes a couple of image pictures and cannot find any error data, the debug analysis function for the compressed image picture can be selectively turned on or turned off.
In summary, a method for decompressing images can be deduced. The method comprises: receiving a compressed image picture, executing a debug analysis on the compressed image picture, and when the result of the debug analysis indicates that the compressed image picture is suitable for the subsequent decoding operation, executing the decoding operation on the compressed image picture with a pipeline process; and performing the subsequent operations such as inverse quantization, inverse discrete cosine transformation, and motion compensation with a pipeline process after the compressed image picture has been decoded with the pipeline process, so as to recover the received compressed image picture.
Wherein, when executing the debug analysis on the compressed image picture and not finding any error data, this result of the debug analysis determines that the compressed image data is suitable for the subsequent decoding operation, so as to recover the received compressed image picture.
Wherein, when executing the debug analysis on the compressed image picture and finding an error data, the compressed image picture is reloaded, and the debug analysis is executed on the compressed image picture again, so as to avoid wasting the system resource due to decoding the error data.
Wherein, when executing the debug analysis on the compressed image picture and finding more than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is severely damaged, the displaying of the compressed image picture is aborted, and the subsequent decoding operation is not performed, so as to avoid displaying the severely damage picture.
Wherein, when executing the debug analysis on the compressed image picture and finding less than a predetermined number of the error data and there is no sufficient time to reload the compressed image picture and when the picture is not severely damaged, this result of the debug analysis determines that the compressed image picture is suitable for the subsequent decoding operation, so as to perform the subsequent decoding operation.
Wherein, the debug analysis function for the compressed image picture can be selectively turned on or turned off.
Although the invention has been described with reference to a particular embodiment thereof, it will be apparent to one of the ordinary skill in the art that modifications to the described embodiment may be made without departing from the spirit of the invention. Accordingly, the scope of the invention will be defined by the attached claims not by the above detailed description.
Number | Date | Country | Kind |
---|---|---|---|
92136370 | Dec 2003 | TW | national |