Patent ID: 9538194
Date: 2017-01-03
CPC Classifications: H04N

Claim:
1. A video decoding apparatus comprising: a processor which is configured for compensating for samples of a current block by using offset values, wherein: in response to determining that an offset parameter of the current block is determined according to an offset parameter of a left block, the processor is configured for determining an offset type of a luma component of the current block using an offset type of a luma component of the left block and determining an offset type of a chroma component of the current block using an offset type of a chroma component of the left block; in response to determining that the offset parameter of the current block is not determined according to the offset parameter of the left block, the processor is configured for determining whether the offset parameter of the current block is determined according to an offset parameter of an upper block; in response to determining that the offset parameter of the current block is determined according to the offset parameter of the upper block, the processor is configured for determining the offset type of the luma component of the current block using an offset type of a luma component of the upper block and determining the offset type of the chroma component of the current block using an offset type of a chroma component of the upper block; in response to determining that the offset parameter of the current block is not determined according to the offset parameter of the upper block, the processor is configured for determining, from a bitstream, offset type information of the luma component of the current block and offset type information of the chroma component of the current block; when the offset type information of the luma component of the current block indicates an edge offset type, the processor is configured for obtaining, from the bitstream, absolute values of luma offset values and a luma edge class indicating a direction of a luma edge of the current block and compensating for luma samples of the current block by using the absolute values of the luma offset values and the luma edge class; when the offset type information of the chroma component of the current block indicates the edge offset type, the processor is configured for obtaining, from the bitstream, absolute values of chroma offset values and a chroma edge class indicating a direction of a chroma edge of the current block and compensating for chroma samples of the current block by using the absolute values of the chroma offset values and the chroma edge class; when the offset type information of the luma component of the current block indicates a band offset type, the processor is configured for obtaining, from the bitstream, the luma offset values, and compensating for the luma samples of the current block by using the luma offset values; and when the offset type information of the chroma component of the current block indicates the band offset type, the processor is configured for obtaining, from the bitstream, the chroma offset values, and compensating for the chroma samples of the current block by using the chroma offset values.