CPC H04N 19/577 (2014.11) [H04N 19/105 (2014.11); H04N 19/139 (2014.11); H04N 19/176 (2014.11)] | 11 Claims |
1. A video decoding apparatus for predicting a target block in a current picture to be decoded, the video decoding apparatus comprising:
a predictor configured to:
determine first and second reference pictures and first and second motion vectors for bi- prediction by decoding a bitstream;
generate a first reference block from the first reference picture referenced by the first motion vector and generate a second reference block from the second reference picture referenced by the second motion vector; and
generate a prediction block of the target block using the first and second reference blocks,
wherein the predictor is configured to generate the prediction block of the target block by performing a bi-directional optical flow process using the first and second reference blocks,
wherein the bi-directional optical flow process is not executed when luma weights assigned to each of the first and second reference pictures for prediction of a luma component of the target block are different from each other, and
wherein the bi-directional optical flow process is not executed when chroma weights assigned to each of the first and second reference pictures for prediction of a chroma component of the target block are different from each other,
wherein, when the bi-directional optical flow process is executed, the predictor is, for a subblock split from the target block, configured to:
generate first horizontal gradients and first vertical gradients for respective luma samples of a subblock in the first reference block corresponding to the subblock of the target block;
generate second horizontal gradients and second vertical gradients for respective luma samples of a subblock in the second reference block corresponding to the subblock of the target block;
calculate a motion offset corresponding to the subblock of the target block using the first and second horizontal gradients and the first and second vertical gradients for the luma samples; and
predict luma samples in the subblock of the target block using luma sample values of the subblock of the first reference block, luma sample values of the subblock of the second reference block, and the motion offset,
wherein the predictor is configured to predict the luma samples in the subblock of the target block by:
calculating a sample offset of a luma sample position in the subblock of the target block using a difference between first and second horizontal gradients corresponding to the luma sample position, a difference between first and second vertical gradients corresponding to the luma sample position, and the motion offset corresponding to the subblock of the target block, and
predicting a luma sample of the luma sample position using luma sample values in the first and second reference blocks corresponding to the luma sample position and the sample offset of the luma sample position.
|