When the size of the current block is sufficiently small, the motion vector of the current block is likely to have a value substantially similar to the pixel-based or subblock-based BIO, and thus the compensation effect obtained by performing BIO may be small. In this case, decrease in complexity obtained by skipping the BIO is likely to be a greater benefit than precision loss due to skipping the BIO.
As described above, the motion vector of the current block may be encoded in a merge mode or in a mode for encoding a motion vector difference. When the motion vector of the current block is encoded in the merge mode, the motion vector of the current block is merged with the motion vector of a neighboring block. That is, the motion vector of the current block is set to equal to the motion vector of the neighboring block. In this case, an additional compensation effect may be obtained through the BIO.
Accordingly, in the present embodiment, the BIO process is skipped based on at least one of the size of the current block or the mode information indicating the encoding mode of the motion vector.