The adder 350 adds the residual block output from the inverse transformer and the prediction block output from the inter-predictor or intra-predictor to reconstruct the current block. The pixels in the reconstructed current block are utilized as reference samples for intra-prediction of a block to be decoded later.
The filter unit 360 deblock-filters the boundaries between the reconstructed blocks in order to remove blocking artifacts caused by block-by-block decoding and stores the deblock-filtered blocks in the memory 370. When all the blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter-prediction of blocks in a subsequent picture to be decoded.
The encoding apparatus performs motion estimation and compensation in a coding unit (CU) in an inter-prediction operation, and then transmits a resulting motion vector (MV) value to the decoding apparatus. The encoding apparatus and the decoding apparatus may further correct the MV value in a pixel unit or a subblock unit (i.e., sub-CU) smaller than the CU using the BIO. That is, the BIO may precisely compensate for motion of the coding block CU in the unit of a 1×1 block (that is, one pixel) or the n×n block. In addition, since the BIO process is performed by applying an explicit equation using pre-decoded information shared between the encoding apparatus and the decoding apparatus, signaling of additional information for the BIO process from the encoding apparatus to the decoding apparatus is not required.