Amounts of image data to be processed by a device and a system go on increasing explosively, with a fast growing development of a semiconductor technique and higher definition of the image data of recent years. Meanwhile, in many cases, intermediate image data in a middle of processing needs to be temporarily held during processing of image information.
In an image information processing apparatus, the image data is generally stored in an internal buffer or an external memory through a memory interface or a bus. However, for example, when 60 full high-vision images of 30 bits transmitted per second are processed, while holding the intermediate image data of three screens per one screen, a data transfer capacity of 1920 (pixel)×1080 (pixel)×60 (images)×30(bit)×3 (screen)×2 (the number of times of read/write))=about 22.4 G bits/second, and the memory capacity of 1920 (pixel)×1080 (pixel)×30 (bit)×3 (screen)=about 186 M bits, are needed, to thereby make it difficult to realize the processing in a practical circuit. Therefore, reduction of the amount of data stored in a memory is extremely important.
As one of the methods of reducing the amount of data, there is a method of performing encoding processing to the image data. As such an encoding method, conventionally, there are methods such as PCM (Pulse Code Modulation) and DPCM (Differential Pulse Code Modulation).
The PCM is a method of carrying out sampling of a signal in every fixed time, and quantizing the sampled signal to an integer value of defined bits, and this is originally a method of converting an analogue signal to a digital signal. However, the PCM can also be applied to a compression of digital data. Meanwhile, the DPCM is a predictive encoding method of not encoding a sampled value as it is, but encoding a differential value between the sampled value and a signal value of a predicted image. Further, an adaptive DPCM (ADPCM) method is proposed as an improvement of the DPCM method, wherein a quantization step is adaptively changed by using information such as local complexity of the image.
Various image compression techniques are proposed other than the PCM and DPCM. For example, a variable length encoding method such as Huffman encoding is employed in a part of various compression methods, particularly as a reversible conversion, and a complicated processing technique using an orthogonal conversion represented by DCT (Discrete Cosine Transform) is employed in an image compression algorithm aiming at a high compression rate such as JPEG and MPEG.
Incidentally, in a case of an image compression directed to the image memory interface, it is desirable to reduce the image degradation due to compression as small as possible, under restriction that an encoding delay is small and a fixed length code is used for the image data. This is because when the encoding delay is large, processing time is increased, because it takes time to set the intermediate image data stored in the memory, in an utilizable state in a later processing. Further, this is because when an encoding length of the encoded data after applying compression to each pixel data is not fixed, it is necessary to manage which address is used to store the encoded data for each pixel data, or it is necessary to perform re-calculation for every access.
According to the predictive encoding method such as DPCM method and ADPCM method, the encoding delay is small, and the image data can be encoded with fixed length for every pixel. However, in order to encode with a fixed length, when encoding is applied to an image at a part, where the differential value is large, like an edge of the image, with the same bits as bits required for encoding at a part where the differential value is small, there is a problem that image degradation is easily generated. Reversely, in order to prevent the image degradation, when encoding is performed with the same bits as bits required for encoding at a part where the differential value is large, encoding with unnecessarily large bits is performed at a part where the differential value is small, resulting in an increase of the bits as a whole after encoding.
Further, a gradation value is quantized as it is by the PCM method, and therefore the difference of the image data between neighboring pixels is poorly reproduced, thus generating the image degradation due to lack of a nuance of the image.
Under such a background, patent document 1 as described below discloses a device for reducing and preventing the image degradation by selecting encoding means with small signal degradation, out of the means for encoding an input sample value (PCM processing) and the means for applying differential encoding to the input sample value (DPCM processing).
FIG. 21 is a block diagram showing an outline structure of an encoding device of the patent document 1 as described below.
A conventional encoding device 101 shown in FIG. 21 includes: a subtractor 142; PCM quantization means 144; DPCM quantization means 146, PCM inverse quantization means 148, DPCM inverse quantization means 150; prediction means 156; and a decision circuit 159. The PCM quantization means 144 quantizes input data xi inputted from an input terminal 140 by PCM processing, and transmits the obtained data to a contact point “a” between the PCM inverse quantization means 148 and a switch 160. The subtractor 142 generates differential value data ei between input data xi and predicted value data xip predicted by the prediction means 156, and transmits it to the DPCM quantization means 146. The DPCM quantization means 146 quantizes the differential value data ei by DPCM processing, and transmits the obtained data to the DPCM inverse quantization means 150 and a contact point “b” of the switch 160.
The PCM inverse quantization means 148 restores the data to original input data based on PCM quantized data outputted from the PCM quantization means 144, and transmits it to the contact point “a” of a switch 158. Further, the DPCM inverse quantization means 150 restores the data to original input data based on the DPCM quantized data outputted from the DPCM quantization means 146, and transmits it to the contact point “b” of the switch 158.
The decision circuit 159 compares an absolute value of the differential value data ei serving as an output of the subtractor 142, with a prescribed threshold value, and when the absolute value is larger than the threshold value, connects the switches 158 and 160 to the contact point “a” side, and when the absolute value is smaller than or equal to the threshold value, connects both switches to the contact point “b” side. Thus, the quantized data based on the PCM quantization means 144 is used at an edge portion of the image, and the quantized data based on the DPCM quantization means 146 is used at a part where the differential value is small. Note that in FIG. 21, outputted data is expressed as output data yi.
Note that appearance probability of the differential value between the input data xi and the predicted value data xip is focused in the neighborhood of 0, and therefore, in a normal state, the switches 158 and 160 are connected to the contact point “b” side. Only when the absolute value of the differential value data ei exceeds the threshold value, the DPCM quantization means 146 transmits the quantized data after a prescribed control code is previously transmitted, showing switch of a connection. When the control code is recognized, the switch 160 switches the connection to the-contact point “a” side. Note that normally, quantization is achieved with less bits in a case that the data is quantized by DPCM processing, compared with PCM processing, and therefore excess bits are generated, and the excess bits can be used as the control code.
FIG. 22 is a block diagram showing an outline structure of a decoding device corresponding to FIG. 21. The decoding device is used for restoring the image data from the data to which encoding processing is applied by the encoding device shown in FIG. 21.
A conventional decoding device 102 shown in FIG. 22 includes: PCM inverse quantization means 168; DPCM inverse quantization means 170; and control code detecting means 178.
When detecting a control code is added to the inputted encoded data yi, the control code detecting means 178 connects a switch 180 to the contact point “a”, so that inverse quantized data is outputted by the PCM inverse quantization means 168. Further, as long as the control code is not detected, the control code detecting means 178 connects the switch 180 to the contact point “b”, so that the inverse quantized data by the DPCM inverse quantization means 170 is outputted.
According to the above-described conventional method, at a normal time, the quantization can be performed by DPCM processing, and in the neighborhood of the edge of the image where the differential value from the neighboring pixel is large, the quantization can be performed by PCM processing.
Patent document 1: Japanese Patent Laid Open Publication No. 02-285720
USPTO Backgrounds
USPTO Backgrounds