Signaling intensity dependent deblocking filtering for video coding
A method of decoding video data includes generating a prediction block for a current block of the video data and decoding a residual block for the current block of the video data. The method includes combining the prediction block and the residual block to generate a reconstructed block of the video data and determining a variable M×N sample pattern based on a block size of the current block. The method includes estimating a local luma level for samples of the reconstructed block using the variable M×N sample pattern and applying, based on the estimated local luma level, a deblocking filter to the samples of the reconstructed block to generate filtered samples. The method includes generating final samples of the video data based on the filtered samples.
1. A method of decoding video data, the method comprising:
generating a prediction block for a current block of the video data;
decoding a residual block for the current block of the video data;
combining the prediction block and the residual block to generate a reconstructed block of the video data;
determining a variable M×N sample pattern based on a block size of the current block, wherein M and N are each integer values being equal to or larger than 1;
estimating a local luma level for samples of the reconstructed block using the variable M×N sample pattern, wherein estimating the estimated local luma level comprises calculating a weighted average for samples of the reconstructed block using the variable M×N sample pattern;
applying, based on the estimated local luma level, a deblocking filter to the samples of the reconstructed block to generate filtered samples; and
generating final samples of the video data based on the filtered samples.
2. The method of claim 1 , wherein applying the deblocking filter comprises determining one or more parameters for the deblocking filter based on the estimated local luma level for the samples of the reconstructed block.
3. The method of claim 2 , where the one or more parameters for the deblocking filter include one or more of a frequency response of the deblocking filter, a filter tap length of the deblocking filter, or a filter type of the deblocking filter.
4. The method of claim 2 , where the one or more parameters for the deblocking filter include one or more of a support area of samples or a filter strength.
5. The method of claim 1 , wherein determining the variable M×N sample pattern is further based on one or more boundaries from block partitioning.
6. The method of claim 1 , wherein estimating comprises determining the estimated local luma level using intermediate lines, wherein the estimated local luma level represents local brightness of filtered samples on each side of the deblocking filter that results in 3, 5, or 7 final samples on each side of the deblocking filter.
7. The method of claim 1 , wherein estimating comprises determining the estimated local luma level using intermediate lines within a P block or within a Q block and a group of samples from the zeroth lines and third lines per column of a video picture.
8. The method of claim 1 , wherein the estimated local luma level or a control offset for luma deblocking filtering is used to control a chroma deblocking filter.
9. The method of claim 1 , wherein a quantization parameter value for a chroma component is based on a quantization parameter offset value for a co-located luma block using the estimated local luma level.
10. The method of claim 1 , wherein the weighted average of the estimated local luma level is computed using at least one intermediate line and a zeroth line.
11. The method of claim 1 , wherein:
if the current block uses subblock merge or affine mode, M is a length of a subblock divided by 2 to enable parallel processing and an application of the luma deblocking is on a subblock level.
12. The method of claim 1 , further comprising determining M further based on a filter tap length of the deblocking filter.
13. The method of claim 1 , further comprising setting M equal to a filter tap length of the deblocking filter.
14. The method of claim 1 , wherein N is 4 and wherein estimating the estimated local luma level comprises calculating:
LL i =( pi, 0+ pi,MP− 1+ qi, 0+ qi,MQ )
LL=((LL0+LL1+LL2+LL3)>>>4)/(1<<bitDepth)
wherein LLi represents a local luma level for line i, pi,0 represents a sample at line i and column 0 of the current block, pi,MP−1 represents a sample at line i and column MP−1 of the current block, MP is set to M, qi,0 represents a sample at line i and column 0 of an adjacent block, qi,MQ represents a sample at line i and column MQ of the adjacent block, MQ is set to M, and LL is the estimated local luma level.
15. A method of encoding video data, the method comprising:
generating a prediction block for a current block of the video data;
encoding a residual block for the current block of the video data;
reconstructing the residual block for the current block of the video data to generate a reconstructed residual block;
combining the prediction block and the reconstructed residual block to generate a reconstructed block of the video data;
determining a variable M×N sample pattern based on a block size of the current block, wherein M and N are each integer values being equal to or larger than 1;
estimating a local luma level for samples of the reconstructed block using the variable M×N sample pattern, wherein estimating the estimated local luma level comprises calculating a weighted average for samples of the reconstructed block using the variable M×N sample pattern;
applying, based on the estimated local luma level, a deblocking filter to the samples of the reconstructed block to generate filtered samples; and
generating final samples of the video data based on the filtered samples.
16. The method of claim 15 , wherein applying the deblocking filter comprises determining one or more parameters for the deblocking filter based on the estimated local luma level for the samples of the reconstructed block.
17. The method of claim 16 , where the one or more parameters for the deblocking filter include one or more of a frequency response of the deblocking filter, a filter tap length of the deblocking filter, or a filter type of the deblocking filter.
18. The method of claim 16 , where the one or more parameters for the deblocking filter include one or more of a support area of samples or a filter strength.
19. The method of claim 15 , wherein determining the variable M×N sample pattern is further based on one or more boundaries from block partitioning.
20. The method of claim 15 , wherein estimating comprises determining the estimated local luma level using intermediate lines, wherein the estimated local luma level represents local brightness of filtered samples on each side of the deblocking filter that results in 3, 5, or 7 final samples on each side of the deblocking filter.
21. The method of claim 15 , wherein estimating comprises determining the estimated local luma level using intermediate lines within a P block or within a Q block and a group of samples from the zeroth lines and third lines per column of a video picture.
22. The method of claim 15 , wherein the estimated local luma level or a control offset for luma deblocking filtering is used to control a chroma deblocking filter.
23. The method of claim 15 , wherein a quantization parameter value for a chroma component is based on a quantization parameter offset value for a co-located luma block using the estimated local luma level.
24. The method of claim 15 , wherein the weighted average of the estimated local luma level is computed using at least one intermediate line and a zeroth line.
25. The method of claim 15 , wherein:
if the current block uses subblock merge or affine mode, M is a length of a subblock divided by 2 to enable parallel processing and an application of the luma deblocking is on a subblock level.
26. The method of claim 15 , further comprising determining M further based on a filter tap length of the deblocking filter.
27. The method of claim 15 , further comprising setting M equal to a filter tap length of the deblocking filter.
28. A device for decoding video data, the device comprising one or more processors implemented in circuitry and configured to:
generate a prediction block for a current block of the video data;
decode a residual block for the current block of the video data;
combine the prediction block and the residual block to generate a reconstructed block of the video data;
determine a variable M×N sample pattern based on a block size of the current block, wherein M and N are each integer values being equal to or larger than 1;
estimate a local luma level for samples of the reconstructed block using the variable M×N sample pattern, wherein, to estimate the estimated local luma level, the one or more processors are configured to calculate a weighted average for samples of the reconstructed block using the variable M×N sample pattern;
apply, based on the estimated local luma level, a deblocking filter to the samples of the reconstructed block to generate filtered samples; and
generate final samples of the video data based on the filtered samples.
29. A device for encoding video data, the device comprising one or more processors implemented in circuitry and configured to:
generate a prediction block for a current block of the video data;
encode a residual block for the current block of the video data;
reconstruct the residual block for the current block of the video data to generate a reconstructed residual block;
combine the prediction block and the reconstructed residual block to generate a reconstructed block of the video data;
determine a variable M×N sample pattern based on a block size of the current block, wherein M and N are each integer values being equal to or larger than 1;
estimate a local luma level for samples of the reconstructed block using the variable M×N sample pattern, wherein, to estimate the estimated local luma level, the one or more processors are configured to calculate a weighted average for samples of the reconstructed block using the variable M×N sample pattern;
apply, based on the estimated local luma level, a deblocking filter to the samples of the reconstructed block to generate filtered samples; and
generate final samples of the video data based on the filtered samples.