1. A method of video encoding, performed by at least one processor, the method comprising: generating information about compensation type of a current block for indicating a band type or an edge type; and generating a compensation value applied to at least one pixel of the current block to perform pixel value compensation, wherein: when the at least one pixel is categorized as a band and the compensation value corresponds to the band, the information about compensation type of the current block is generated to indicate the band type and, when the at least one pixel is categorized as an edge level and the compensation value corresponds to the edge level, the information about compensation type of the current block is generated to indicate the edge type, the band is one of a plurality of bands, and the edge level is one of a plurality of edge levels.