To compress and encode an image by dividing the image into units of blocks, a
method in which features of each block are detected and different operations are
applied according to the features has been used often so as to reduce coding distortion
and improve subjective image quality, but this method requires additional information
representing features of blocks to be recorded and transmitted together, thereby
deteriorating the coding efficiency. A rounding operation with respect to a calculation
result is modified so that the rounding operation is varied according to features
detected as to each block. By so doing, adaptive compressing and coding is implemented
by only the processing upon coding, without recording or transmitting additional information.