CPC H04N 19/117 (2014.11) [H04N 19/176 (2014.11); H04N 19/82 (2014.11); H04N 19/86 (2014.11); H04N 19/124 (2014.11); H04N 19/159 (2014.11); H04N 19/18 (2014.11); H04N 19/70 (2014.11)] | 1 Claim |
1. A device comprising:
a processor; and
a memory storing instructions that, when executed by the processor, cause the device to perform a method of filtering reconstructed video data, the method comprising:
receiving values of samples included in a first block and a second block, in the reconstructed video data, adjacent to a horizontal block boundary;
evaluating if a height of the first block is greater than or equal to 32 samples;
evaluating if a height of the second block is greater than or equal to 32 samples;
for the first block, calculating a first gradient value based on an equation (abs(sample2−2*sample1+sample0)+abs(sample5−2*sample4+sample3)+1)>>1;
for the second block, calculating a second gradient value based on an equation abs(sample2−2*sample1+sample0); and
determining whether to filter the samples included in the first block and the second block by using a linear interpolation, based on whether a variable calculated using a sum of the first gradient value and the second gradient value is less than a threshold, wherein
the linear interpolation uses a reference middle value calculated based on the following:
(2*(first block sample0+second block sample0)+second block sample0+2*(second block sample1+second block sample2)+first block sample1+second block sample1+first block sample2+first block sample3+first block sample4+first block sample5+first block sample6+8)>>4,
where abs(x) returns an absolute value of x,
where the sample0 is a value of a first sample immediately adjacent to the horizontal block boundary,
where the sample1 is a value of a second sample adjacent to the first sample and one position further from the horizontal block boundary,
where the sample2 is a value of a third sample adjacent to the second sample and one position further from the horizontal block boundary,
where the sample3 is a value of a fourth sample adjacent to the third sample and one position further from the horizontal block boundary,
where the sample4 is a value of a fifth sample adjacent to the fourth sample and one position further from the horizontal block boundary,
where the sample5 is a value of a sixth sample adjacent to the fifth sample and one position further from the horizontal block boundary, and
where the sample6 is a value of a seventh sample adjacent to the sixth sample and one position further from the horizontal block boundary.
|