| CPC H04N 19/52 (2014.11) [H04N 19/105 (2014.11); H04N 19/176 (2014.11); H04N 19/59 (2014.11)] | 3 Claims |

|
1. An encoder that encodes a current block in a current picture, the encoder comprising:
a processor; and
memory, wherein
using the memory, the processor:
in a first inter prediction mode that derives a first final prediction image without using local motion estimation,
obtains a first prediction image with sub-pixel accuracy for the current block by referring to pixels in a first normal reference range in a first reference picture referred to for the current block;
obtains a second prediction image with sub-pixel accuracy for the current block by referring to pixels in a second normal reference range in a second reference picture referred to for the current block; and
generates the first final prediction image for the current block using the first prediction image and the second prediction image; and
in a second inter prediction mode that derives a second final prediction image using local motion estimation,
obtains a third prediction image with sub-pixel accuracy for the current block by referring to pixels in a first interpolation reference range in the first reference picture;
obtains a fourth prediction image with sub-pixel accuracy for the current block by referring to pixels in a second interpolation reference range in the second reference picture;
obtains a first gradient image including first gradient values of pixels included in the first reference picture, the first gradient values generated based on the pixels in the first interpolation reference range;
obtains a second gradient image including second gradient values of pixels included in the second reference picture, the second gradient values generated based on the pixels in the second interpolation reference range;
derives a local motion estimation value for each of sub-blocks based on the third and fourth prediction images and the first and second gradient images, the sub-blocks being obtained by partitioning the current block; and
generates the second final prediction image for the current block using the third and fourth prediction images and the local motion estimation value derived for each of the sub-blocks,
wherein the first and second interpolation reference ranges are included in the first and second normal reference ranges, respectively, such that the second inter prediction mode is performed using pixel data for the first and second normal reference ranges and without loading additional pixel data for the first and second interpolation reference ranges that is newer than the pixel data for the first and second normal reference ranges,
wherein the first gradient values and the second gradient values indicate vertical gradients.
|