Patent ID: 8085856

Claim:
A distortion removing method for removing coding distortion between blocks, the coding distortion occurring when both of a current block and a neighboring block are coded by inter picture prediction coding and do not contain coded data, the current block constituting a picture employing prediction coding using two reference pictures, the neighboring block being adjacent to the current block, and the coded data being obtained by coding a coefficient that indicates a spatial frequency component resulting from an orthogonal transformation, the distortion removing method comprising: determining a filtering strength from among a plurality of filtering strengths including one filtering strength corresponding to no filtering being performed; and removing the coding distortion between the blocks, by performing a filtering with the filtering strength determined in the determining of the filtering strength, wherein in the determining of the filtering strength, when the number of reference pictures referred to by the current block and a number of reference pictures referred to by the neighboring block are not the same, a weakest filtering strength among the plurality of the filtering strengths, excluding the one filtering strength corresponding to no filtering being performed, is selected as the filtering strength, and when the number of reference pictures referred to by the current block and the number of reference pictures referred to by the neighboring block are the same, one of (i) a weakest filtering strength among the plurality of the filtering strengths, excluding the one filtering strength corresponding to no filtering being performed, and (ii) the filtering strength corresponding to no filtering being performed is selected as the filtering strength.