| CPC H04N 19/105 (2014.11) [H04N 19/132 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/46 (2014.11)] | 4 Claims |

|
1. An image decoding apparatus comprising:
a parameter decoder configured to decode coded data into a template-based intra prediction flag;
a reference sample derivation unit configured to derive a reference sample by using an image of a template reference region near a target block;
a template derivation unit configured to derive a template image by right-shifting a pixel value of a pixel adjacent to the target block according to an image bit depth;
an intra prediction image derivation unit configured to derive a template prediction image by right-shifting a pixel value of the template reference region near the target block according to the image bit depth;
an intra prediction image generation unit configured to generate, by using the reference sample, the template prediction image for one of predetermined intra prediction mode candidates;
a template cost derivation unit configured to derive a cost from the template prediction image and the template image corresponding to the image near the target block; and
an intra prediction mode selection unit configured to select a template-based intra mode for the target block, from the predetermined intra prediction mode candidates, based on the cost, wherein
in a case that the template-based intra prediction flag has a predetermined value, the intra prediction image generation unit generates a prediction image of the target block using the template-based intra mode.
|