| CPC H04N 19/117 (2014.11) [H04N 19/124 (2014.11); H04N 19/132 (2014.11); H04N 19/167 (2014.11); H04N 19/176 (2014.11); H04N 19/80 (2014.11)] | 17 Claims |

|
1. A method performed by a decoder, the method comprising:
decoding all blocks of an image that has been encoded;
after the decoding of all blocks of the image, filtering at least one sample of at least one block of the image by, for each block being filtered:
for each sample being filtered of the at least one sample:
selecting a plurality of neighboring samples of the sample being filtered;
for at least one neighboring sample of the plurality of neighboring samples:
calculating a difference between the neighboring sample and the sample being filtered; and
obtaining a modifier value based on the difference;
deriving a modifier sum based on a sum of the modifier values for the plurality of neighboring samples;
determining a correction value based on one of
a conditional addition of at least one shifted version of the modifier sum, where each shift of the at least one shifted version has a same number of shift steps in each determination of the correction value, and
a multiplication using the modifier sum and a strength factor obtained based on at least one of a type of the block being filtered and a size of the block being filtered;
deriving a filtered sample based on the sample to be filtered and the correction value; and
storing the filtered sample; and
outputting the at least one block with the filtered sample towards an output of the decoder.
|