To reduce block distortion by providing an error calculating means and an encoding process part which selects the value having a minimum difference between an error obtained from a calculation result and an error generated when a data group in specific units in a 2nd space is encoded out of candidate values and encodes it.
When a value obtained after quantization is, for example, 105 at the time of a rounding process for a decimal part generated by quantizing data obtained by performing discrete cosine transformation(DCT) for input image data S1, the encoding device 10 regards integers consisting of the closest values when the value is made integral, i.e., 10 and 11 as candidate values. Further, an error included in the image data is detected by restoring and rounding adjacent blocks which are already encoded and one of the candidate values, i.e., integers 10 and 11 is selected and rounded so that the difference between errors between adjacent blocks becomes minimum. Consequently, the block distortion can be reduced.
Next Patent: VIDEO SIGNAL DECODING DEVICE