Image predictive decoding method

Abstract: Disclosed is an image predictive decoding method in which image data obtained by compressively coding a variable-size image using a prescribed method is input, a prediction image is generated using, as a reference image, at least one reproduced image which has been reproduced before an image being an object of decoding, and the object image is subjected to predictive decoding. In this method, the prediction image is generated using, as a reference image, at least one reproduced image which has been recently reproduced and includes significant image data to be referred to. Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object to increase the compression efficiency, it is avoided that a variable-size image which has already disappeared is used as the reference image for predictive decoding. As a result, coded data obtained by efficient compressive coding that suppresses the code quantity can be appropriately decoded.

Description: FIELD OF THE INVENTION The present invention relates to image predictive decoding and image predictive coding and, more particularly, to image predictive decoding methods, image predictive decoding apparatuses, image predictive coding methods, image predictive coding apparatuses, and data storage media, which are used for processing variable-size images. BACKGROUND OF THE INVENTION In order to store or transmit a digital image with high efficiency, it is necessary to compressively code the digital image. As a typical method for compressive coding of a digital image, there is DCT (Discrete Cosine Transformation) represented by JPEG (Joint Photographic Experts Group) and MPEG (Moving Picture Experts Group). Besides, there are waveform coding methods such as sub-band coding, wavelet coding, and fractal coding. Further, in order to eliminate a redundant signal between images, inter-image prediction using motion compensation is carried out, and a difference signal is subjected to waveform coding. Here, an MPEG method based on motion compensation DCT will be described. Initially, an input image of one frame to be coded is divided into plural macroblocks each having the size of 16×16 pixels. Each macroblock is further divided into four blocks each having the size of 8×8 pixels, and each block of 8×8 pixels is subjected to DCT and quantization. This process is called "intra-frame coding". On the other hand, using a motion detecting method such as block matching, from a frame temporarily adjacent to an object frame including an object macroblock to be quantized, a prediction macroblock having the smallest error from the object macroblock is detected, and motion compensation from the past image is carried out on the basis of the detected motion, thereby to obtain an optimum prediction block. A signal showing the motion toward the prediction macroblock having the smallest error is a motion vector. An image used as a reference for generating the prediction macroblock is called a reference image, hereinafter. Thereafter, a difference between the object block and the corresponding prediction block is obtained, and this difference is subjected to DCT to obtain a DCT coefficient. The DCT coefficient is quantized, and the quantized output is transmitted or stored together with the motion information. This process is called "inter-frame coding". The inter-frame coding has two prediction modes: prediction from a previous image in the display order, and prediction from both of previous and future images. The former is called "forward prediction", and the latter is called "bidirectional prediction". On the decoder end, after restoring the quantized DCT coefficient to the original difference signal, the prediction block is obtained on the basis of the difference signal and the motion vector, and the prediction block and the difference signal are added to reproduce the image. In this conventional technique, it is premised that the size of the reference image (an image used as a reference for generating a prediction image) is equal to the size of the object image. In recent years, plural objects constituting an image (arbitrary shape images) are separately subjected to compressive coding and transmitted, thereby to improve the coding efficiency and to enable object by object reproduction. In coding and decoding of such arbitrary shape image, the size of the image changes very often. For example, a ball becomes smaller and smaller, till at last it disappears. Further, there is a case where the size of the image (object) becomes zero. In ordinary predictive coding, a reference image is a reproduced image just before an object image which is currently being processed. When the size of the reference image is zero, since nothing is defined in the reference image, i.e., since the reference image has no significant image data to be used for predictive coding, predictive coding cannot be carried out. In this case, there is no conventional way except the intra-frame coding. However, generally the intra-frame coding increases the quantity of coded data and reduces the compression efficiency. When an image disappears (image-size = zero) and appears frequently in a sequence of motion picture, the coding efficiency is significantly degraded. For example, in a motion picture of flashing spotlight, when the light disappears and appears in image units, all the images of lights must be subjected to the intra-frame coding. The document US-A-5 510 840 describes a motion vector detection circuit that detects the motion vector for each macroblock between an odd field and an even field. An encoding system decision circuit decides the type of the encoding system, that is if the encoding system is a field-based encoding system or a frame-based encoding system, based on a median of a motion vector. A control circuit controls gates and changeover switches, in accordance with the encoding system type as decided by the decision system, for generating a field-based reference picture or a frame-based reference picture from buffer memories. The circuitry from an additive node to a VLC circuit finds difference data between the reference picture and the picture to be encoded, while transforming the difference data by discrete cosine transform and variable length encoding the transformed data. The VLC circuit sets the encoding system type as a flag in a header of a predetermined hierarchical layer of a bit stream. A picture data-decoding device detects the flag and executes decoding by changing over field-based decoding to frame-based decoding or vice versa depending on the flag for reproducing the picture data. The document DE 195 06 372 describes a bi-directional motion estimation method and apparatus thereof in a low bit-rate moving video codec system, for filtering motion vectors by performing a bi-directional motion estimation in units of objects having the same motion in a constant domain and for compensating the motion using the motion vectors generated as the result of forward or backward motion prediction in accordance with the motion prediction mode of previously set frames, which can determine the precise motion vector compared to the existing block matching algorithm and depict the inter-frame motion with a smaller amount of information. Therefore, less data for compression is used and reconstructed picture quality may be improved. The document JP-A-08 154247 discloses a processor having an error detector that detects error in each compression data. An error processor replaces the image data corresponding to the detected error data so as to minimise frame deterioration since error data is immediately replaced. The document JP-A-08307875 discloses a detector having a write-in address generator (166) which outputs a set of x and y address for each pixel. The output addresses are formed so that the addresses remain the same while the x addresses correspond to alternate storage areas corresponding to two memory areas. These addresses then correspond to a rectangular area of page. When a minimum rectangular area or page identified, with same y address, then the data is read from the two memory areas alternately by successive y addresses that differ by 1. SUMMARY OF THE INVENTION It is an object of the present invention to provide an image predictive decoding method, which can realize efficient predictive decoding of a variable-size image even when the size of a reference image is zero or when the reference image is completely transparent, and is defined in the appended claims. Other objects and advantages of the invention will become apparent from the detailed description that follows. The detailed description and specific embodiments described are provided only for illustration since various additions and modifications within the scope of the invention will be apparent to those of skill in the art from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a flowchart of a prediction image generation process in an image predictive decoding method according to a first embodiment useful for understanding the present invention. Figures 2(a) and 2(b) are schematic diagrams for explaining image prediction in the image predictive decoding method according to the present invention. Figure 3 is a block diagram illustrating an image predictive decoding apparatus according to the first embodiment Figure 4 is a block diagram illustrating a frame memory unit used in the image predictive decoding apparatus according to the first embodiment. Figure 7 is a diagram showing image data according to the first embodiment. Figure 8 is a flowchart of a prediction image generation process in an image predictive decoding method according to a second embodiment of the invention. Figure 9 is a diagram showing image data according to the second embodiment of the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS [Embodiment 1] Figure 1 is a flowchart of a prediction image generation process in an image predictive decoding method according to a first embodiment. Before explaining figure 1, an image prediction method according to this first embodiment will be described using figures 2(a) and 2(b). The size of an input image used in the image predictive decoding method of this first embodiment is variable, and it may happen that the size becomes zero. Figure 2(a) shows images 201∼210 of a motion picture, which are arranged in the display order. The image 201 is the first frame to be displayed, followed by 202, 203, ..., and this order is shown by #1∼#10. Since the image #1 (201) is the first image, it is subjected to intra-frame coding. In this first embodiment, an image (one frame) is divided into plural blocks each having the size of 8×8 pixels, and each block of 8×8 pixels is subjected to DCT and quantization. The quantized coefficient is subjected to variable-length coding. In decoding, the coded data obtained by the variable-length coding is subjected to variable-length decoding, and the quantized coefficient obtained by the variable-length decoding is subjected to inverse quantization and inverse DCT, thereby reproducing the image. Next, the image #2 (202) is subjected to inter-frame predictive coding by referring to the reproduced image #1 (201). In this first embodiment, using block matching as a motion detection method, a prediction block having the smallest error from the object block currently being processed is detected from the image #1 (201). On the basis of the detected motion from the object block toward the prediction block, an optimum prediction block is obtained by motion compensation of the object block from the reproduced image #1 (201). Next, a difference between the object block and the corresponding prediction block is obtained, and the difference is subjected to DCT. The DCT coefficient is quantized, and the quantized output is transmitted or stored together with the motion information. The reproduced image #1 (201) serves as a reference image for the image #2 (202). This prediction is called "forward prediction". In decoding, the prediction block is added to the difference which has been subjected to inverse quantization and inverse DCT, thereby reproducing the image. In like manner, the image #3 (203) and the image #4 (204) are subjected to predictive coding using reference images shown by the arrows. Like the images #6 (206), #8 (208) and #10 (210), prediction may be carried out from a previous image but one. In contrast with the forward prediction, like the images #5 (205), #7 (207) and #9 (209), prediction may be carried out by referring to a future image to be displayed after the object image. This prediction is called "backward prediction". When both the forward prediction and the backward prediction are carried out, this is called "bidirectional prediction". The bidirectional prediction has three modes: forward prediction mode, backward prediction mode, interpolation mode for balancing the forward prediction and the backward prediction. Figure 2(b) shows the transmission order, i.e., decoding order, of the images predicted as shown in figure 2(a). The image #1 (211) is initially decoded and reproduced. Referring to the reproduced image #1, the image #2 (212) is decoded. With respect to the bidirectional prediction image like the image #5 (216), the reference images used for the prediction have to be decoded and reproduced before the prediction image. Therefore, the image #6 (215) is decoded before the image #5 (216). Likewise, the image #8 (217) and the image #10 (219) are transmitted, decoded and reproduced before the image #7 (218) and the image #9 (220), respectively. When transmitting a variable-size image, the size of the image must be transmitted. In this first embodiment, the image size is described at the head of the coded data of the image, and the horizontal and vertical sizes Hm and Vm are shown by 20 bits each. Figure 7 shows coded image data (VD) according to this first embodiment, and the coded data includes the motion vector, the quantization width, and the DCT coefficient, in addition to the horizontal and vertical sizes Hm and Vm. Next, a description is given of the prediction image generation process in the image predictive decoding method according to the first embodiment. In order to generate a prediction image, initially, the size of the previous reference image is input (step 102), and it is examined whether the size of the reference image is zero or not (step 103). In the decoding order shown in figure 2(b), a reference image always exists before an image being an object of decoding (in coding, an object of coding). That is, the reference image is a most recently reproduced image in the predictive decoding method of this first embodiment. For example, in figure 2(b), a reference image for the image #4 (214) is the image #3 (213). However, an image reproduced by bidirectional prediction cannot be used for prediction, so that this image cannot be a reference image. Therefore, for example, a reference image for the image #8 (217) is the image #6 (215). When it is decided in step 103 that the size of the reference mage is not zero, step 104 follows, wherein a prediction image is generated using the reference image. On the other hand, when it is detected in step 103 that the size of the reference image is zero, step 105 follows, wherein a prediction image is generated using, as a reference image, a recently reproduced image of which size is not zero. The way of detecting a recently reproduced image of which size is not zero will be described hereinafter using figure 2(b). In the case of generating a prediction image of-the image #4 (214), it is assumed that the size of the image #3 (213) just before the image #4 (214) is zero, and the size of the image #2 is not zero. In this case, a prediction image of the image #4 (214) is generated by referring to the image #2 (212). Likewise, in the case of generating a prediction image of the image #6 (215), assuming that the sizes of the images #3 (213) and #4 (214) are zero, the prediction image is generated by referring to the image #2 (212). This first embodiment employs block by block motion compensation as a method for generating a prediction image, like MPEG1. Figure 3 is a block diagram illustrating an image predictive decoding apparatus 300 according to the first embodiment. The image predictive decoding apparatus 300 receives image data obtained by compressively coding a variable-size image by a prescribed method, and performs predictive decoding of the image data. The image predictive decoding apparatus 300 includes a data analyzer 302, a decoder 303, and an adder 306. The data analyzer 302 analyzes the compressively coded image data, and outputs the quantization width and the DCT coefficient to the line 312, the motion vector to the line 318, and the image size to the line 321. The decoder 303 transforms the compressed block data (compressed block) from the data analyzer 302 to an expanded block by data expansion. The adder 306 adds the expanded block and the prediction block to generate a reproduced block. Further, the image predictive decoding apparatus 300 includes a frame memory unit 309 and a prediction image generator 310. The frame memory unit 309 stored the reproduced block. The prediction image generator 310 generates an address for accessing the frame memory unit 309 on the basis of the motion vector and obtains, as a prediction block, a block corresponding to the address from the image stored in the frame memory unit 309. In this first embodiment, the prediction image generator 310 decides, as a reference image, a single reproduced image which has been recently reproduced and includes significant image data to be referred to, on the basis of the image size from the data analyzer 302. The decision of a reference image may be carried out, as shown by dotted lines in figure 3, by using a controller 320 that controls the frame memory unit 309 according to the image size from the data analyzer 302. That is, the frame memory unit 309 is controlled by the controller 320 so as to select a single reproduced image which has been recently reproduced and includes significant image data to be referred to. The decoder 303 comprises an inverse quantizer 304 that inversely quantizes the compressed block from the data analyzer 302, and an inverse discrete cosine transformer (hereinafter referred to as IDCT) 305 that performs inverse DCT (transformation of a frequency region signal to a spatial region signal) to the output from the inverse quantizer 304. Further, reference numerals 301 and 307 designate an input terminal and an output terminal of the image predictive decoding apparatus 300. A description is given of the operation of the image predictive decoding apparatus shown in figure 3. First of all, image data (coded data) obtained by compressively coding a variable-size image in a prescribed method is input to the input terminal 301. In this first embodiment, compressive coding is carried out using motion compensation DCT as in MPEG1, so that the coded data includes the motion vector, quantization width, DCT coefficient, and data of image size. Next, in the data analyzer 302, the compressively coded image data is analyzed, and the quantization width and the DCT coefficient are transmitted, as compressed block data, through the line 312 to the decoder 303. Further, the motion vector analyzed in the data analyzer 302 is transmitted through the line 318 to the prediction image generator 310. Likewise, the image size analyzed by the data analyzer 302 is transmitted through the like 321 to the controller 320. In the decoder 303, the compressed block data, i.e., compressed block, are expanded by the inverse quantizer 304 and the inverse DCT transformer 305, thereby generating an expanded block 314. To be specific, the inverse quantizer 304 inversely quantizes the compressed block, and the inverse DCT transformer 305 transforms the frequency area signal to the spatial area signal, thereby generating the expanded block 314. In the prediction image generator 310, according to the motion vector transmitted through the line 318, an address 321 for accessing the frame memory unit 309 is generated, and this address 321 is input to the frame memory unit 309. Then, a prediction block 317 is generated from images stored in the frame memory unit 309. The prediction block 317 (319) and the expanded block 314 are input to the adder 306, wherein these blocks 319 and 314 are added, thereby generating a reproduced block 315. The reproduced block 315 is output from the output terminal 307 and, simultaneously, it is transmitted through the line 316 and stored in the frame memory unit 309. When intra-frame decoding is carried out, the sample values of the prediction block are all zero. The operation of the prediction image generator 310 is identical to that already described with respect to the flowchart of figure 1. That is, the size of the reference image is input to the prediction image generator 310, and the reference image is decided in the prediction image generator 310. The decision of the reference image may be carried out by controlling the frame memory unit 309 according to information whether the size of the reference image is zero or not, which information is transmitted through the controller 320 and the line 322. Figure 4 is a block diagram illustrating a frame memory bank 406 as an example of the frame memory unit 309 in the image predictive decoding apparatus 300 according to the first embodiment. The frame memory bank 406 includes three frame memories 401∼403. The reproduced image is stored in one of the frame memories 401∼403. When generating a prediction image, these frame memories 401∼403 are accessed. In this first embodiment, the frame memory bank 406 has switches 404 and 405. The switch 405 is to select a frame memory for storing the reproduced image which is input through the line 408 (corresponding to the line 316 in figure 3), from the frame memories 401∼403. The switch 405 selects the frame memories 401∼403 one by one, controlled by the controller 320, i.e., according to the control signal 322. That is, after the first reproduced image is stored in the frame memory 401, the second reproduced image is stored in the frame memory 402. After the third reproduced image is stored in the frame memory 403, the switch 405 selects the frame memory 401. The switch 404 is connected through the line 407 (corresponding to the line 317 in figure 3) to the prediction image generator 310. Also this switch 404 selects the frame memories 401∼403 one by one, controlled by the controller 320, i.e., according to the control signal 322. However, the switching order is changed according to the size of the reference image. For example, although the switch 404 is to be connected to the frame memory 402 for generation of a prediction image according to the given order, when the image size of the frame memory 402 is zero, the controller 320 controls the switch 404 so as to select the previous frame memory 401 (on the premise that the image size of the frame memory 401 is not zero). In this way, a prediction image can be generated from a reference image of which size is not zero. The switch 404 may be connected to plural frame memories at the same time. Further, in a unit where each frame memory is reset at every reproduction of a single image, a recently reproduced image of which size is not zero can be left in the frame memory by controlling the unit with the controller 320 so that the frame memory is not reset when the size of the reproduced image is zero. In other words, it is possible to prevent the frame memory from being updated. While in this first embodiment the block by block motion compensation DCT method is described, the present invention is applicable to other prediction methods using, for example, global motion compensation or arbitrary lattice-shaped block motion compensation. Further, although in this first embodiment a prediction image is generated from a single reproduced image serving as a reference image, the present invention is similarly applicable to the case where a prediction image is generated from plural reference images. As described above, according to the first embodiment, the size of a previous reference image which is input to the apparatus is detected and, when the size of the reference image is not zero, a prediction image is generated using the reference image. On the other hand, when the size of the previous reference image is zero, a prediction image is generated using a recently reproduced image of which size is not zero. Therefore, when plural objects constituting an image are subjected to compressive coding and transmitted object by object to increase the compression efficiency, it is avoided that a variable-size image which has already disappeared is used as a reference image for predictive decoding or coding, resulting in appropriate predictive decoding or coding capable of suppressing the'residual signal (difference signal). Further, the coded data obtained by the image predictive coding apparatus according to this first embodiment can be decoded correctly by the image predictive decoding apparatus according to the second embodiment. [Embodiment 2] In the first embodiment, it is detected whether the size of the reference image is zero or not, and the reference image is decided using the detected information. However, when the fact that the image size is zero is shown by another index (e.g., one-bit flag F), control can be carried out using this index. In this second embodiment of the invention, generation of a prediction image is controlled using such index. That is, in this second embodiment, as shown in figure 9, coded data of an object image includes a one-bit flag F showing that the image size is zero, i.e., the corresponding reference image is completely transparent and has no coded data, and this flag F is placed before the horizontal and vertical sizes Hm and Vm showing the image size. When the image size is zero, the flag F is "0". In this second embodiment, generation of a prediction image is controlled using the flag F. Hereinafter, a description is given of a prediction image generation process in the image predictive decoding method according to the second embodiment, using the flowchart of figure 8. To generate a prediction image, initially, a previous reference image is input in step 802, and it is examined in step 803 whether the flag F of the reference image is "1" or not. When it is decided in step 803 that the flag F of the reference image is "I", the size of this reference image is not zero, namely, the reference image is not completely transparent and has coded data. So, in step 804, a prediction image is generated using the previous reference image. When it is decided in step 803 that the flag F of the reference image is not "1", step 805 follows, wherein a prediction image is generated using, as a reference image, a recently reproduced image of which flag F is not "0". As described above, according to the second embodiment of the invention, when plural objects constituting an image are subjected to compressive coding and transmitted object by object, it is avoided that a variable-size image which has already disappeared is used as a reference image, resulting in appropriate predictive decoding'or coding capable of suppressing the residual signal (difference signal). In addition, the coded data of the object image has, at its head, a flag showing whether or not the previously reproduced image has significant coded data to be referred to, and the reference image is decided by detecting this flag. So, the operation of deciding the reference image is facilitated.

Claims: An image predictive decoding method for decoding first coded data (214) obtained by coding an image, comprising: determining (803) whether or not second coded data (213), which occurs before the first coded data (214) in a display order, includes coded image data (VD); generating (804, 805) a prediction image, by using, as a reference image, a reproduced image corresponding to the second coded data (213) when the second coded data (213) includes coded image data (VD), and when the second coded data (213) does not include coded image data (VD), by using, as a reference image, a reproduced image corresponding to third coded data (212) which includes coded image data (VD) and occurs before the second coded data (213) in a display order; and decoding the first coded data (214) by predictive decoding using the generated prediction image, wherein the determination is performed based on a flag (flag F) included in the second coded data (213), the flag (flag F) indicating whether or not the second coded data (213) includes coded image data (VD). The image predictive decoding method of claim 1, wherein said image includes an arbitrarily shaped object whose size is variable.

Inventors: BOON CHOONG SENG, BOON, CHOONG SENG
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1998
Main classification: H04N7
IPC codes: H04N7, G06T9