Encoder, decoder, encoding method, and decoding method for selecting the best candidate motion vector
A decoder that decodes a current block using a motion vector includes: a processor; and memory. Using the memory, the processor: derives a first candidate vector from one or more candidate vectors of one or more neighboring blocks that neighbor the current block; determines, in a first reference picture for the current block, a first adjacent region that includes a position indicated by the first candidate vector; calculates evaluation values of a plurality of candidate regions included in the first adjacent region; and determines a first motion vector of the current block, based on a first candidate region having a smallest evaluation value among the evaluation values. The first adjacent region is included in a first motion estimation region determined based on the position indicated by the first candidate vector.
1. A decoder that decodes a current block using a motion vector, the decoder comprising:
a processor; and
memory, wherein
using the memory, the processor:
derives a first candidate vector from one or more candidate vectors of one or more neighboring blocks that neighbor the current block;
determines, in a first reference picture for the current block, a first motion estimation region that includes a position indicated by the first candidate vector;
calculates first evaluation values of a plurality of candidate regions included in the first motion estimation region, the first evaluation value being a difference between the candidate region and a region in a second reference picture for the current block;
determines a first adjacent region included in the first motion estimation region, the first adjacent region being in a vicinity of the candidate region having a smallest first evaluation value among the plurality candidate regions included in the first motion estimation region; and
determines a first motion vector of the current block, the first motion vector being a vector indicating a region having a smallest second evaluation value among a plurality of regions included in the first adjacent region, the second evaluation value being a difference between the region included in the first adjacent region and the region in the second reference picture.
2. The decoder according to claim 1 , wherein
the processor further:
derives a second candidate vector from the one or more candidate vectors of the one or more neighboring blocks that neighbor the current block;
determines a second motion estimation region that includes a position indicated by the second candidate vector in a third reference picture for the current block;
calculates third evaluation values of a plurality of candidate regions included in the second motion estimation region, the third evaluation value being a difference between the candidate region and the region in a fourth reference picture for the current block;
determines a second adjacent region included in the second motion estimation region, the second adjacent region being in a vicinity of the candidate region having a smallest third evaluation value among the plurality candidate regions included in the second motion estimation region; and
determines a second motion vector of the current block, the second motion vector being a vector indicating a region having a smallest forth evaluation value among a plurality of regions included in the second adjacent region, the fourth evaluation value being a difference between the region included in the second adjacent region and the region in the fourth reference picture, and
a picture including the current block is temporally between the first reference picture and the third reference picture.
3. The decoder according to claim 1 , wherein
the first adjacent region has a size determined based on a horizontal pixel count and a vertical pixel count.
4. The decoder according to claim 1 , wherein
the first motion estimation region has a size determined based on a horizontal pixel count and a vertical pixel count.
5. A decoding method for decoding a current block using a motion vector, the decoding method comprising:
deriving a first candidate vector from one or more candidate vectors of one or more neighboring blocks that neighbor the current block;
determining, in a first reference picture for the current block, a first motion estimation region that includes a position indicated by the first candidate vector;
calculating first evaluation values of a plurality of candidate regions included in the first motion estimation region, the first evaluation value being a difference between the candidate region and a region in second reference picture for the current block;
determining a first adjacent region included in the first motion estimation region, the first adjacent region being in a vicinity of the candidate region having a smallest first evaluation value among the plurality candidate regions included in the first motion estimation region; and
determining a first motion vector of the current block, the first motion vector being a vector indicating a region having a smallest second evaluation value among a plurality of regions included in the first adjacent region, the second evaluation value being a difference between the region included in the first adjacent region and the region in the second reference picture.
6. The decoding method according to claim 5 , further comprising:
deriving a second candidate vector from the one or more candidate vectors of the one or more neighboring blocks that neighbor the current block;
determining a second motion estimation region that includes a position indicated by the second candidate vector in a third reference picture for the current block;
calculating third evaluation values of a plurality of candidate regions included in the second motion estimation region, the third evaluation value being a difference between the candidate region and a region in a fourth reference picture for the current block;
determining a second adjacent region included in the second motion estimation region, the second adjacent region being in a vicinity of the candidate region having a smallest third evaluation value among the plurality candidate regions included in the second motion estimation region; and
determining a second motion vector of the current block, the second motion vector being a vector indicating a region having a smallest forth evaluation value among a plurality of regions included in the second adjacent region, the fourth evaluation value being a difference between the region included in the second adjacent region and the region in the fourth reference picture, wherein
a picture including the current block is temporally between the first reference picture and the third reference picture.
7. The decoding method according to claim 5 , wherein
the first adjacent region has a size determined based on a horizontal pixel count and a vertical pixel count.
8. The decoding method according to claim 5 , wherein
the first motion estimation region has a size determined based on a horizontal pixel count and a vertical pixel count.
9. A non-transitory computer-readable recording medium for use in a computer, the non-transitory computer-readable recording medium having a program for causing a computer to perform decoding processing for decoding a current block using a motion vector, wherein
the decoding processing includes:
deriving a first candidate vector from one or more candidate vectors of one or more neighboring blocks that neighbor the current block;
determining, in a first reference picture for the current block, a first motion estimation region that includes a position indicated by the first candidate vector;
calculating first evaluation values of a plurality of candidate regions included in the first motion estimation region, the first evaluation value being a difference between the candidate region and a region in second reference picture for the current block;
determining a first adjacent region included in the first motion estimation region, the first adjacent region being in a vicinity of the candidate region having a smallest first evaluation value among the plurality candidate regions included in the first motion estimation region; and
determining a first motion vector of the current block, the first motion vector being a vector indicating a region having a smallest second evaluation value among a plurality of regions included in the first adjacent region, the second evaluation value being a difference between the region included in the first adjacent region and the region in the second reference picture.
10. The non-transitory computer-readable recording medium according to claim 9 , wherein
the decoding processing further includes:
deriving a second candidate vector from the one or more candidate vectors of the one or more neighboring blocks that neighbor the current block;
determining a second motion estimation region that includes a position indicated by the second candidate vector in a third reference picture for the current block;
calculating third evaluation values of a plurality of candidate regions included in the second motion estimation region, the third evaluation value being a difference between the candidate region and a region in a fourth reference picture for the current block;
determining a second adjacent region included in the second motion estimation region, the second adjacent region being in a vicinity of the candidate region having a smallest third evaluation value among the plurality candidate regions included in the second motion estimation region; and
determining a second motion vector of the current block, the second motion vector being a vector indicating a region having a smallest forth evaluation value among a plurality of regions included in the second adjacent region, the fourth evaluation value being a difference between the region included in the second adjacent region and the region in the fourth reference picture, and
a picture including the current block is temporally between the first reference picture and the third reference picture.
11. The non-transitory computer-readable recording medium according to claim 9 , wherein
the first adjacent region has a size determined based on a horizontal pixel count and a vertical pixel count.
12. The non-transitory computer-readable recording medium according to claim 9 , wherein
the first motion estimation region has a size determined based on a horizontal pixel count and a vertical pixel count.