Video encoding method using offset adjustments according to pixel classification and apparatus therefor, video decoding method and apparatus therefor
A video encoding method and apparatus and video decoding method and apparatus generate a restored image having a minimum error with respect to an original image based on offset merge information indicating whether offset parameters of a current block and at least one neighboring block from among blocks of video are identical.
1. A video decoding method comprising:
parsing, from a bitstream, offset merge information indicating whether an offset parameter of a current block is determined according to an offset parameter of a neighboring block;
when the offset merge information indicates that the offset parameter of the current block is determined according to the offset parameter of the neighboring block, determining the offset parameter of the current block using the offset parameter of the neighboring block; and
when the offset merge information indicates that the offset parameter of the current block is not determined according to the offset parameter of the neighboring block, obtaining, from the bitstream, offset type information of the current block;
when the offset type information indicates a band offset type obtaining, from the bitstream, absolute values of a plurality of offset values;
when the absolute values of the plurality of offset values are not zero, obtaining sign bits of the plurality of offset values from the bitstream; and
compensating for samples of the current block by using the absolute values of the plurality of offset values and the sign bits of the plurality of offset values,
wherein the neighboring block is one of a left block and an upper block adjacent to the current block.
2. The video decoding method of claim 1 , wherein when the offset merge information indicates that the offset parameter of the current block is determined according to the offset parameter of the neighboring block, the offset parameter of the current block is not parsed from the bitstream.