Image decoding device, image decoding method, and image decoding program
A merge candidate list is generated, a merge candidate is selected from the merge candidate list as a merge candidate, a bitstream is decoded to derive a motion vector difference, and a corrected merge candidate is derived by adding the motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling.
1. An image decoding device comprising:
a merge candidate list generation unit that generates a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a decoded image located at the same position as the block subject to prediction;
a merge candidate selection unit that selects, as a selected merge candidate, a merge candidate from the merge candidate list;
a bitstream decoding unit that decodes a bitstream to derive a motion vector difference; and
a merge candidate correction unit that derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture.
2. An image decoding method comprising:
generating a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a decoded image located at the same position as the block subject to prediction;
selecting, as a selected merge candidate, a merge candidate from the merge candidate list;
decoding a bitstream to derive a motion vector difference; and
deriving a corrected merge candidate of bidirectional prediction by adding the motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and deriving a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture.
3. A recording medium encoded with an image decoding program, the program comprising computer-implemented modules including:
a module that generates a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a decoded image located at the same position as the block subject to prediction;
a module that selects, as a selected merge candidate, a merge candidate from the merge candidate list;
a module that decodes a bitstream to derive a motion vector difference; and
a module that derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture.
4. An image coding device comprising:
a merge candidate list generation unit that generates a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a coded image located at the same position as the block subject to prediction;
a merge candidate selection unit that selects, as a selected merge candidate, a merge candidate from the merge candidate list;
a merge candidate correction unit that derives a corrected merge candidate of bidirectional prediction by adding a motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture; and
a bitstream coding unit that codes the motion vector difference into a bitstream.
5. An image coding method comprising:
generating a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a coded image located at the same position as the block subject to prediction;
selecting, as a selected merge candidate, a merge candidate from the merge candidate list;
deriving a corrected merge candidate of bidirectional prediction by adding a motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and deriving a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture; and
coding the motion vector difference into a bitstream.
6. A recording medium encoded with an image coding program, the program comprising computer-implemented modules including:
a module that generates a merge candidate list including, as a merge candidate, motion information on a plurality of blocks neighboring a block subject to prediction and motion information having a motion vector derived by scaling a motion vector of a block on a coded image located at the same position as the block subject to prediction;
a module that selects, as a selected merge candidate, a merge candidate from the merge candidate list;
a module that derives a corrected merge candidate of bidirectional prediction by adding a motion vector difference to a motion vector of the selected merge candidate for a first prediction without scaling and subtracting the motion vector difference from a motion vector of the selected merge candidate for a second prediction without scaling, when a reference picture of the selected merge candidate for a first prediction or a reference picture of the selected merge candidate for a second prediction is a long-term reference picture and the reference picture of the selected merge candidate for the first prediction and the reference picture of the selected merge candidate for the second prediction are located in opposite directions with respect to a picture subject to prediction including the block subject to prediction, and derives a corrected merge candidate of bidirectional prediction by adding the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, to a motion vector of the selected merge candidate for a first prediction and subtracting the motion vector difference, which is scaled in accordance with an interval between a picture subject to prediction and the reference picture, from a motion vector of the selected merge candidate for a second prediction, when the reference picture of the selected merge candidate for the first prediction is not a long-term reference picture and the reference picture of the selected merge candidate for the second prediction is not a long-term reference picture; and
a module that codes the motion vector difference into a bitstream.