When the motion vector and the reference picture of the current block are determined in the merge mode or the motion vector difference encoding mode, the inter-predictor 344 generates a prediction block for the current block using a block at the position indicated by the motion vector in the reference picture.
In the case of bidirectional prediction, the inter-predictor 344 selects a first reference picture and a second reference picture from reference picture list 0 and reference picture list 1 using syntax elements for the inter-prediction information, respectively, and determines first and second motion vectors referring to the respective reference pictures. Then, a first reference block is generated by the first motion vector referring to the first reference picture, and a second reference block is generated by the second motion vector referring to the second reference picture. A prediction block for the current block is generated by averaging or weighted-averaging the first reference block and the second reference block.
In addition, the inter-predictor 344 may perform the bidirectional optical flow (BIO) process of the present disclosure to generate a prediction block of the current block through bidirectional prediction. In other words, after determining bidirectional motion vectors for the current block, the inter-predictor 344 may generate a prediction block for the current block by motion compensation according the BIO process on a per pixel basis or a per subblock basis.
In motion compensation by bidirectional prediction, whether to apply the BIO process may be determined in various ways. Details of the BIO process and details of whether to apply the BIO process in the motion compensation procedure will be described with reference to