CPC H04N 19/174 (2014.11) [H04N 19/117 (2014.11); H04N 19/176 (2014.11); H04N 19/60 (2014.11); H04N 19/82 (2014.11)] | 3 Claims |
1. A video decoding method comprising:
reconstructing a current block comprising a current pixel via a prediction and an inverse transformation;
obtaining, from a bitstream, information indicating whether an in-loop filtering by using at least one pixel located outside a boundary of a current slice is applicable;
when a slice comprising a first adjacent pixel located at an upper-left side of the current pixel is different from the current slice comprising the current pixel, and the information indicates that the in-loop filtering by using the at least one pixel located outside the boundary of the current slice is not applicable, padding a value of the first adjacent pixel as a value of a second adjacent pixel, from among pixels located in the current slice, at a closest location to a location of the first adjacent pixel in a horizontal direction of the location of the first adjacent pixel;
determining filter coefficients corresponding to locations of third adjacent pixels used for an adaptive loop filter (ALF) of the current pixel based on a value of the current pixel and values of the third adjacent pixels, wherein the third adjacent pixels include the first adjacent pixel and the locations of the third adjacent pixels are predetermined; and
obtaining a value of a filtered current pixel by adding the value of the current pixel and a value obtained by applying a filter coefficient from among the filter coefficients to a difference between a value of one adjacent pixel from among the third adjacent pixels and the value of the current pixel.
|