With reference to Table 13 and Tables 8 to 11, when the value of sao_type_idx is less than 5, the edge offset is applied. Here, num_edge_offset indicates the total number of offsets of the edge offset.
With reference to Table 13, the edge offsets corresponding to the number indicated by num_edge_offset may be applied to the SAO application region.
<SAO Application to Chroma>
On the other hand, in consideration of the difference between luma and chroma in applying the SAO, the SAO may be applied to chroma pixels.
FIG. 11 illustrates local distributions of histograms for the same picture.
For example, FIG. 11(b) illustrates a histogram difference between a luma original picture and a reconstructed picture in Regions A and B in FIG. 11(a) which is in a picture of the same video.
FIG. 11(c) illustrates a histogram difference between a chroma (Cr) original picture and a reconstructed picture in Regions A and B in FIG. 11(a). FIG. 11(d) illustrates a histogram difference between a chroma (Cb) original picture and a reconstructed picture in Regions A and B in FIG. 11(a).