This application claims the priority of Korean Patent Application No. 10-2004-0037689, filed on May 27, 2004, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein in its entirety by reference.
1. Field of the Invention
The present invention relates to encoding and decoding of a moving image, and, more particularly, to a moving image encoding/decoding apparatus and method capable of eliminating from a moving image an error that occurs when encoding the moving image.
2. Description of the Related Art
The amount of data included in a moving image is great compared with the amount of data included in a voice or a still image. Accordingly, a large hardware capacity including a memory is required to store or transmit such a large amount of data without processing it. Hence, a moving image needs to be compressed using an encoder before it is stored or transmitted and then received and reproduced by a decoder. There are two types of compression methods: lossy compression and lossless compression. Since the amount of data included in a moving image is large, the lossy compression method is used to reduce the amount of data. This compression method includes MPEG-1, MPEG-2, MPEG-4, H.263, and H.264.
When a moving image is compressed using one of these compression methods, some of the moving image is lost (hereinafter, referred to as an error) during discrete cosine transform (DCT), inverse DCT (IDCT), and quantization processes. Therefore, the resultant moving image is different from what it originally was.
The present invention provides a moving image encoding/decoding apparatus and method in which not only moving image data but also error information on the moving image data, which is generated while the moving image data are encoded and decoded, thereby reproducing the moving image data without an error.
According to an aspect of the present invention, there is provided a moving image encoder including a base layer encoder receiving an original image and encoding the original image using a predetermined lossy encoding method; and an enhancement layer encoder receiving an error image created by decoding the encoded original image and receiving the original image, and losslessly entropy-encoding an error component obtained by subtracting the original image from the image with error.
According to another aspect of the present invention, there is provided a moving image decoder including a base layer decoder receiving a base layer bit stream created by encoding an original image using a predetermined lossy encoding method and decoding the base layer bit stream; and an enhancement layer decoder receiving an enhancement bit stream created by losslessly entropy-encoding an error component obtained by subtracting an original image from an image with error created by decoding the encoded original image and entropy-decoding the enhancement bit stream.
The moving image decoder further includes a subtracter subtracting the error component decoded by the enhancement layer decoder from a base layer image decoded by the base layer decoder and outputting the result of subtraction.
According to another aspect of the present invention, there is provided a moving image encoding method including receiving an original image and encoding the original image using a predetermined lossy encoding method; and receiving an error image created by decoding the encoded original image and receiving the original image, and losslessly entropy-encoding an error component obtained by subtracting the original image from the image with error.
According to another aspect of the present invention, there is provided a moving image decoding method including receiving a base layer bit stream created by encoding an original image using a predetermined lossy encoding method, decoding the base layer bit stream, and outputting a decoded base layer image; receiving an enhancement bit stream created by losslessly entropy-encoding an error component obtained by subtracting an original image from an image with error created by decoding the encoded original image and entropy-decoding the enhancement bit stream; and subtracting the entropy-decoded error component from the decoded base layer image and outputting the result.
The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown. The invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth therein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art.
Referring to
The motion estimator 210 searches the reference frame for a macro-block and outputs the difference between the position of an image in the macro-block of the reference frame and the position of the image in a macro-block of a current frame as a motion vector. In other words, the motion estimator 210 searches for a desired macro-block within a predetermined search area of the reference frame, finds a macro block most similar to what was desired, and outputs the distance travelled by the image, which is the difference between the position of the image in the macro-block of the reference frame and that of the image in the macro-block of the current frame, as a motion vector. The motion compensator 220 extracts a prediction macro-block corresponding to the motion vector from the reference frame and motion-compensates for the prediction macro-block of the reference frame.
Then, the motion-compensated prediction macro-block of the reference frame is subtracted from the macro-block of the current frame. The DCT performer 230 DCTs the result of the subtraction and outputs a DCT coefficient. The quantizer 240 quantizes the DCT coefficient and transmits the quantized DCT coefficient to the entropy coder 250. The entropy coder 250 codes the quantized DCT coefficient and outputs texture information. The multiplexer 290 multiplexes the texture information together with the motion vector and outputs an encoded bit stream. When the current frame is the I frame, the DCT performer 230 DCTs the macro-block of the current frame without motion estimation and compensation and outputs a DCT coefficient. Then, the DCT coefficient is quantized, coded, and multiplexed by the quantizer 240, the entropy coder 250, and the multiplexer 290, respectively, and finally output as an encoded bit stream.
A value obtained by subtracting the motion-compensated macro-block of the reference image frame from the macro-block of the current frame is called a residual value. The residual value is encoded to reduce data volume when encoding. Since errors occur in a quantizing process, a moving image created as a bit stream contains the errors that occurred in the DCT and the quantizing processes.
To obtain a reference frame, a quantized residual signal is passed through the de-quantizer 260 and the IDCT performer 270, combined with a motion-estimated/compensated image, and stored in the reference frame storage unit 280. When the current frame is the I frame, it is stored in the reference frame storage unit 280 via the de-quantizer 260 and the IDCT performer 270 without motion-compensation. Therefore, a reference frame stored in the reference frame storage unit 280 includes the current frame with an encoded error that occurred in the DCT and the quantizing processes.
In other words, it is assumed that an original image (frame) is A and a predicted image (frame) after motion-estimation/compensation is B. The DCT performer 230 receives A-B, which is a difference betveen the original image and the predicted image, and DCTs the A-B. Since an error component E is created in the quantizing process, a bit stream output from the IDCT performer 270 is (A-B)+E. Then, the predicted image B is added to (A-B)+E. Therefore, A+E, that is, the original image with the error component E, is stored in the reference frame storage unit 280 as a reference frame.
The moving image decoder includes a motion compensator 310, an IDCT performer 320, a de-quantizer 330, an entropy decoder 340, a reference frame storage unit 350, and a de-multiplexer 360.
The encoded bit stream output from the moving image encoder of
A scalable coding method is a type of moving image encoding method. In the scalable coding method, an original image is divided into a base layer image and an enhancement layer image and encoded separately. When a scalable decoder decoding a bit stream coded using the scalable coding method receives only a base layer bit stream due to network states or available resources, it decodes the base layer bit stream and outputs a moving image stream with degraded image quality. When the scalable decoder receives a base layer bit stream and an enhancement layer bit stream, it combines an image created by decoding the base layer bit stream with an image created by decoding the enhancement layer bit stream and outputs a high-definition moving image.
Referring to
In other words, an image encoded by the base layer encoder 410 is A+E, which is an original image A plus an error component E. The enhancement layer encoder 420 subtracts the original image A from A+E, entropy-codes the image obtained by subtracting A from A+E, and outputs only the error component E.
The base layer bit stream is decoded (Operation S620). A decoded base layer bit stream contains an error component. An error image is created by subtracting the original image from the decoded base layer bit stream containing the error component (Operation S630). Only the error component is losslessly entropy-encoded and output as an enhancement layer bit stream (Operation S640).
The scalable moving image encoding and decoding method described above may be written as a computer program. Codes and code segments of the computer program may be easily derived by computer programmers of ordinary skill in the art. The computer program is recorded onto a computer-readable recording medium. The scalable moving image encoding and decoding method is implemented when the computer program is read and executed by a computer. The computer readable recording medium includes a magnetic recording medium, an optical recording medium, and a carrier wave medium.
As described above, the present invention provides a lossless and scalable encoding/decoding method based on conventional moving image encoding/decoding technologies, thereby offering moving image services with desired quality.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2004-0037689 | May 2004 | KR | national |