pel of the target block are output. At this time, as the coding of the shape value Spel of the target block, one of the intra-frame coding and inter-frame coding is performed in accordance with the coding mode signal IPmode. 