Patent ID: 7782962

Claim:
A decoding method for decoding a coded image, the coded image being generated by coding an image segmented into a plurality of blocks on a block basis, the method comprising: obtaining a filter selection parameter for the image, wherein the filter selection parameter is used to determine a threshold value for a quantization parameter and the threshold value is used to judge whether a filter for a coding distortion removal is to be applied to a block; decoding the coded image to obtain a reconstructed image; comparing a difference of pixel values between a pixel in a first block and a pixel in a second block adjacent to the first block, with the threshold value determined by the filter selection parameter; and removing a coding distortion in an area disposed on both sides of a block boundary between the first block and the adjacent second block in the reconstructed image on a block basis, by applying the filter for the coding distortion removal based on the result of said comparing, wherein the coding distortion removal is not conducted when said difference is greater than the threshold value, and the coding distortion removal is conducted by applying the filter when said difference is smaller than the threshold value.