| CPC H04N 19/117 (2014.11) [H04N 19/167 (2014.11); H04N 19/176 (2014.11); H04N 19/96 (2014.11)] | 14 Claims |

|
1. A method of filtering a sample value of a picture, wherein the method comprises:
obtaining a reconstructed sample value for a block of the picture;
obtaining filter coefficients for adaptive loop filtering according to a bitstream;
obtaining a sum value according to the filter coefficients, and the reconstructed sample value for the block;
rounding the sum value according to a vertical position of a sample in the block to obtain a rounded sum value, wherein the vertical position of the sample in the block is a luma sample position, and wherein the rounded sum value equals curr+((sum+roundY)>>alfShiftY) and satisfies the following table:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
wherein
y represents the vertical position of the sample;
curr represents the reconstructed sample value for the block;
sum represents the sum value;
CtbSizeY represents a size of a coding tree block (CTB) corresponding to the block;
v1, y2 and y3 represent vertical sample position offsets indicating other reconstructed sample values involved in the obtaining the sum value;
roundY and alfShiftY are variables that are determined based on the vertical position of the sample;
apply AlfLineBufBoundary is an index and derived as follows:
if a bottom boundary of the coding tree block is a bottom boundary of the picture and pic_height_in_luma_samples−yCtb≤CtbSizeY−4,
apply AlfLineBufBoundary is set equal to 0, otherwise,
apply AlfLineBufBoundary is set equal to 1,
wherein the pic_height_in_luma_samples represents a height of the picture in luma samples, and (xCtb, yCtb) represents a location of the CTB; and
obtaining a filter reconstructed sample value for the block according to the rounded sum value.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||