Image decoding device, image decoding method, and program
An image decoding device ( 200 ) includes a circuit that selects the motion vector candidates from among motion vectors of neighboring blocks of a block to be decoded based on the control information.
1 . An image decoding device comprising:
a circuit configured to:
decode control information and a quantized value;
inversely quantize the quantized value to obtain a transform coefficient;
inversely transform the transform coefficient to obtain a prediction residual;
generate a first predicted sample based on a decoded sample and the control information;
accumulate the decoded sample;
determine a motion vector based on the control information and motion vector candidates to obtain motion information;
generate a second predicted sample based on the decoded sample, the motion information, and the control information;
generate a third predicted sample based on the first predicted image, the second predicted sample, and the control information;
add one of the first to third predicted samples and the prediction residual to obtain a decoded sample; and
select the motion vector candidates from among motion vectors of neighboring blocks of a block to be decoded based on the control information to construct a motion vector candidate list from which the motion vector is determined,
wherein the circuit is configured to construct the motion vector candidate list by conditionally selecting, adding, or ordering motion vector candidates according to spatial positional relationships and contact states between (i) respective partitioned small areas of the block to be decoded obtained by partitioning the block to be decoded and (ii) the neighboring blocks, and
wherein when both the block to be decoded and the neighboring blocks are partitioned into small areas, the circuit adds, to the motion vector candidates, from among motion vectors of small areas of a neighboring block having sides that contact a small area of the block to be decoded, a motion vector of a small area of the neighboring block having a side that contacts the small area of the block to be decoded over a longer length than a side of another small area of the neighboring block that contacts the block to be decoded.
2 . The image decoding device according to claim 1 , wherein the circuit limits the motion vector candidates according to a partitioned shape of the block to be decoded.
3 . The image decoding device according to claim 1 , wherein the circuit determines the motion vector from among the selected motion vector candidates based on the control information.
4 . The image decoding device according to claim 1 , wherein the circuit configures the motion vector candidates differently between the partitioned small areas.
5 . The image decoding device according to claim 4 , wherein the motion vector candidates overlap between the small areas.
6 . The image decoding device according to claim 4 , wherein the motion vector candidates for each of the small areas are exclusive.
7 . The image decoding device according to claim 1 , wherein
when a small area obtained by partitioning the block to be decoded is in contact with only one of an upper block and a left block, the circuit limits the motion vector candidates for the small area based on the contact state between the small area and said one of the upper block and the left block, and
when the small area is in contact with both the upper block and the left block, the circuit selects the motion vector candidates for the small area without limiting the motion vector candidates for the small area.
8 . The image decoding device according to claim 1 , wherein when the number of selected motion vector candidates is smaller than a predetermined number, the circuit newly generates a motion vector and adds the newly generated motion vector to the motion vector candidates.
9 . The image decoding device according to claim 1 , wherein the circuit changes an order in which the motion vector candidates are arranged according to a partitioned shape of the block to be decoded.
10 . The image decoding device according to claim 9 , wherein with respect to the order in which the motion vector candidates are arranged in the motion vector candidate list, the circuit prioritizes a motion vector of a neighboring block directly contacting the block to be decoded more than a motion vector of a neighboring block indirectly contacting the block to be decoded.
11 . The image decoding device according to claim 9 , wherein with respect to the order in which the motion vector candidates are arranged in the motion vector candidate list, the circuit gives priority to a motion vector of a neighboring block or small area having a side contacting a small area obtained by partitioning the block to be decoded over a longer length than a side of another neighboring block or small area that contacts the small area of the block to be decoded.
12 . An image decoding method executed by a circuit of an image coding device, the method comprising:
(A) decoding control information and a quantized value;
(B) inversely quantizing the quantized value to obtain a transform coefficient;
(C) inversely transforming the transform coefficient to obtain a prediction residual;
(D) generating a first predicted sample based on a decoded sample and the control information;
(E) accumulating the decoded sample;
(F) determining a motion vector based on the control information and motion vector candidates to obtain motion information;
(G) generating a second predicted sample based on the decoded sample, the motion information, and the control information;
(H) generating a third predicted sample based on the first predicted image, the second predicted sample, and the control information; and
(I) adding one of the first to third predicted samples and the prediction residual to obtain a decoded sample,
wherein
in the (F), the motion vector candidates are selected from among motion vectors of neighboring blocks of a block to be decoded based on the control information to construct a motion vector candidate list from which the motion vector is determined,
in the (F), the motion vector candidate list is constructed by conditionally selecting, adding, or ordering motion vector candidates according to spatial positional relationships and contact states between (i) respective partitioned small areas of the block to be decoded obtained by partitioning the block to be decoded and (ii) the neighboring blocks, and
in the (F), when both the block to be decoded and the neighboring blocks are partitioned into small areas, the circuit adds, to the motion vector candidates, from among motion vectors of small areas of a neighboring block having sides that contact a small area of the block to be decoded, a motion vector of a small area of the neighboring block having a side that contacts the small area of the block to be decoded over a longer length than a side of another small area of the neighboring block that contacts the block to be decoded.
13 . A non-transitory computer-readable medium having stored thereon a program that is executable by a computer to cause the computer to function as an image decoding device comprising a circuit that is configured to:
decode control information and a quantized value;
inversely quantize the quantized value to obtain a transform coefficient;
inversely transform the transform coefficient to obtain a prediction residual;
generate a first predicted sample based on a decoded sample and the control information;
accumulate the decoded sample;
determine a motion vector based on the control information and motion vector candidates to obtain motion information;
generate a second predicted sample based on the decoded sample, the motion information, and the control information;
generate a third predicted sample based on the first predicted image, the second predicted sample, and the control information;
add one of the first to third predicted samples and the prediction residual to obtain a decoded sample; and
select the motion vector candidates from among motion vectors of neighboring blocks of a block to be decoded based on the control information to construct a motion vector candidate list from which the motion vector is determined,
wherein the circuit is configured to construct the motion vector candidate list by conditionally selecting, adding, or ordering motion vector candidates according to spatial positional relationships and contact states between (i) respective partitioned small areas of the block to be decoded obtained by partitioning the block to be decoded and (ii) the neighboring blocks, and
wherein when both the block to be decoded and the neighboring blocks are partitioned into small areas, the circuit adds, to the motion vector candidates, from among motion vectors of small areas of a neighboring block having sides that contact a small area of the block to be decoded, a motion vector of a small area of the neighboring block having a side that contacts the small area of the block to be decoded over a longer length than a side of another small area of the neighboring block that contacts the block to be decoded.