A non-transitory computer readable medium including stored therein an image decoding program that when executed by a computer causes the computer to execute a method comprising:
- decoding coding mode information and prediction assist information from a bit stream which includes data obtained by encoding the coding mode information for specifying between a first image prediction processing and second image prediction processing used for generating a prediction image with respect to each of a plurality of partial areas of predetermined size obtained by dividing an image of a decoding target and the prediction assist information for generating the prediction image by the first image prediction processing;
- generating the prediction image of a partial area, out of the plurality of partial areas, that is specified as an area of which the prediction image has to be generated by the first image prediction processing on the basis of the coding mode information, by the first image prediction processing using the prediction assist information;
- generating by the second image prediction processing the prediction image of a partial area, out of the plurality of partial areas, that is specified as an area for which the prediction image has to be generated by the second image prediction processing on the basis of the coding mode information;
- and storing a reproduced image that is based on the prediction image in a storage means, the prediction image being generated by a process in which an area containing a portion of pixels whose prediction signal has not been generated is defined as a template, the reproduced image stored in the storage means is defined as a reference area, an area in the reference area which has a high correlation with the template is selected as a duplicative reference area, and pixel values of corresponding pixels inside the duplicative reference area are given to pixels of which prediction signal has not been generated in the template, and the prediction assist information includes information regarding an extending direction of the reproduced image.