An image decoding device which receives, as an input, a bitstream which is acquired by compression-encoding each predetermined block of an image by using a motion-compensated prediction, and which carries out a decoding expansion process on said each block, said image decoding device comprising:
- a first prediction image generating unit for decoding a motion vector of said each block from the bitstream, and for generating a first prediction image by using said motion vector;
- a decoding unit for decoding encoded data about a difference image for motion-compensated prediction of said each block from the bitstream, and for generating a decoded difference image from said encoded data;
- an adding unit for adding said first prediction image and said decoded difference image to acquire a decoded image;
- a memory for holding a motion vector which is acquired by decoding said bitstream;
- a second prediction image generating unit for generating a second prediction image by using a motion vector of a block to be decoded which is generated on a basis of the motion vector held by said memory;
- and
- a filtering unit for carrying out a smoothing process on a block boundary in the second prediction image generated by said second prediction image generating unit, wherein
- for each predetermined image area which consists of one or more of said blocks, said image decoding device decodes identification information showing that either the decoded image outputted from said adding unit or an image outputted from said filtering unit is a final decoded image in all of said one or more blocks in said image area from the bitstream, and generates a final decoded image on a basis of said identification information.