In a dequantization unit 140 and an inverse transform unit 145, values quantized in a quantization unit 135 are dequantized and values transformed in a transform unit 130 are inverse-transformed. A reconstructed block may be generated by combining a residual value generated in a dequantization unit 140 and an inverse transform unit 145 with a prediction unit which is predicted through a motion prediction unit, a motion compensation unit and an intra prediction unit included in a prediction unit 120 and 125.
A filter unit 150 may include at least one of a deblocking filter, an offset modification unit or ALF (Adaptive Loop Filter).
A deblocking filter may remove block distortion generated by a boundary between blocks in a reconstructed picture. Whether a deblocking filter will be applied to a current block may be determined based on a pixel included in several columns or rows included in a block in order to determine whether deblocking is performed. When a deblocking filter is applied to a block, a strong filter or a weak filter may be applied according to strength of necessary deblocking filtering. In addition, in applying a deblocking filter, horizontal directional filtering and vertical directional filtering may be processed in parallel when vertical filtering and horizontal filtering are performed.
An offset modification unit may modify an offset with an original image in a pixel unit for an image performing deblocking. A method in which a pixel included in an image is divided into the certain number of regions, a region which will perform an offset is determined and an offset is applied to the corresponding region or a method in which an offset is applied by considering edge information of each pixel may be used to perform offset modification for a specific picture.