<p>A loop filter (6) is configured from a region classification unit (12) for extracting each of the feature amounts of a plurality of regions that constitute a local decoded image, and classifying classes to which the regions belong according to the feature amounts, and a filter design/processing unit (13) for generating a Wiener filter that minimizes the sum of the square errors between image signals to be encoded and decoded image signals in one or more regions belonging to classes among the plurality of regions that constitute the local decoded image for each of the classes to which the one or more regions belong, and compensating distortion superimposed on the regions using the Wiener filter.</p>