An apparatus for video decoding, the apparatus comprising: a processor which is configured for obtaining, from a bitstream, information about a correction type of pixel values and, when the information about a correction type of pixel values indicates one of a band type and an edge type, obtaining a plurality of compensation values from the bitstream; a band type compensator which is configured for, when the information about a correction type of pixel values indicates the band type, adding a compensation value among the plurality of compensation values to a pixel in a band among pixels of a current block, wherein a total range of values of the pixels is from a minimum value of the values of the pixels to a maximum value of the values of the pixels, and a section corresponding to the total range of values of the pixels is uniformly split into a plurality of bands, the band is one of a plurality of bands, a value of the pixel is in a range of pixel values corresponding to the band, the plurality of compensation values correspond to the plurality of bands and the compensation value corresponds to the band; and an edge type compensator which is configured for, when the information about a correction type of pixel values indicates the edge type, adding compensation value among the plurality of compensation values, to a pixel corresponding to an edge value level among the pixels of a current block, wherein the edge value level is determined based on whether the value of the pixel is larger or smaller than values of neighboring restored pixels (31, 32, 33, 34, 35, 36, 37 and 38) on a vertical, a horizontal or a diagonal direction, the plurality of compensation values correspond to the plurality of edge value levels, and the compensation value corresponds to the edge value level among the plurality of edge value levels. a processor which is configured for obtaining, from a bitstream, information about a correction type of pixel values and, when the information about a correction type of pixel values indicates one of a band type and an edge type, obtaining a plurality of compensation values from the bitstream; a band type compensator which is configured for, when the information about a correction type of pixel values indicates the band type, adding a compensation value among the plurality of compensation values to a pixel in a band among pixels of a current block, wherein a total range of values of the pixels is from a minimum value of the values of the pixels to a maximum value of the values of the pixels, and a section corresponding to the total range of values of the pixels is uniformly split into a plurality of bands, the band is one of a plurality of bands, a value of the pixel is in a range of pixel values corresponding to the band, the plurality of compensation values correspond to the plurality of bands and the compensation value corresponds to the band; and an edge type compensator which is configured for, when the information about a correction type of pixel values indicates the edge type, adding compensation value among the plurality of compensation values, to a pixel corresponding to an edge value level among the pixels of a current block, wherein the edge value level is determined based on whether the value of the pixel is larger or smaller than values of neighboring restored pixels (31, 32, 33, 34, 35, 36, 37 and 38) on a vertical, a horizontal or a diagonal direction, the plurality of compensation values correspond to the plurality of edge value levels, and the compensation value corresponds to the edge value level among the plurality of edge value levels.