In this case, the encoder may additionally transmit information on what bands the offset values are applied to the decoder.
As a second type of SAO, there is an edge offset considering edge information for each pixel. The edge offset is applied in consideration of an edge direction with respect to a current pixel and intensities of the current pixel and neighboring pixels.
FIG. 7 is a diagram illustrating examples of representative forms of edges which can occur in a block by directions. Referring to FIG. 7, FIGS. 7(a) to 7(d) illustrate an edge having a direction of 0 degrees, an edge having a direction of 90 degrees, an edge having a direction of 135 degrees, and an edge having a direction of 45 degrees, respectively. Therefore, four types for a single filtering unit, that is, an SAO application unit (of which the smallest unit is a LCU) may be used as the edge offset depending on the angles or directions of the edges. For the purpose of convenience of explanation, four edge types of the SAO application unit illustrated in FIG. 7 are referred to as edge types of the edge offset.