The decoder may apply a loop filter to the reconstructed block (S1530). The loop filtering may be performed by the filter module illustrated in
When the SAO is applied, the filter module may apply an offset in the unit of pixel. Here, the filter module may derive an SAO parameter on the basis of syntax elements transmitted from the encoder. The filter module may apply a band offset to a current pixel on the basis of the number of offsets (the number of bands), the band groups, and the like indicated by SAO application information such as the SAO parameter. Here, only an offset for an effective band may be transmitted to the decoder. The filter module may apply plural edge offsets to the SAO application region in accordance with indication of the SAO parameter or the like. Specific details thereof are the same as described above.
The filter module may apply the SAO to chroma pixel. The SAO application region may be independently determined depending on luma and chroma and relevant information may be transmitted from the encoder. In addition, information on the number of bands and the band groups for applying the band offset to the chroma pixels and information on the number of categories for applying the edge offset to the chroma pixels may be transmitted from the encoder. The decoder may apply the SAO to the chroma pixels on the basis of the transmitted information. Specific details thereof are the same as described above.