sub block based on an intra prediction mode equal to the intra prediction mode of the current block a subtractor 122 for generating a residual sub block by calculating a difference between the selected single sub block and a corresponding predicted sub block a transform unit 123 for performing a discrete cosine transform dct on the generated residual sub block a quantizer 124 for quantizing the transformed residual sub block and an encoder 125 for encoding the quantized residual sub block here each of the divided sub blocks is a transform based block in the transform unit 123 and may be a frequency transform based block each of the intra predictor 121 the subtractor 122 the transform unit 123 the quantizer 124 and the encoder 125 is implemented by or includes one or more processors and or application specific integrated circuits asics specified for respectively corresponding operations and functions described herein the sequence in which a plurality of sub blocks are intra prediction encoded may be a sequence of a raster scan or a zigzag sequence it may be more efficient to perform the intra prediction encoding by selecting one sub block from a plurality of sub blocks according to the sequence of a raster scan than the zigzag sequence although only two cases including the sequence of a raster scan and the zigzag sequence are.