Selective application of sample padding in adaptive loop filtering
An example method of video processing includes making a first determination, for a conversion between a current block of a video and a bitstream representation of the video, about whether a sample in a neighboring block of the current block is in a same video region as the current block and using the first determination to make a second determination about applicability of a coding tool that uses samples outside the current block to the conversion of the current block. The coding tool comprises an adaptive loop filter (ALF) tool that comprises an ALF classification process and/or an ALF filtering process. The method also includes performing the conversion according to the first determination and the second determination.
1. A method of processing video data, comprising:
making a first determination, for a conversion between a current block of a video and a bitstream of the video, about whether a sample in a neighboring block of the current block is in a same video region as the current block, wherein the neighboring block is located (1) above-left of the current block, (2) above-right of the current block, (3) below-left of the current block, or (4) below-right of the current block;
making a second determination about whether the sample in the neighboring block is available for a coding tool that uses samples outside the current block to the conversion of the current block, based on the first determination, wherein the coding tool comprises an adaptive loop filter tool that comprises an adaptive loop filter classification process and/or an adaptive loop filtering process;
performing the conversion according to the first determination and the second determination; and
wherein the sample in the neighboring block is considered to be unavailable for the coding tool in case (1) the neighboring block and the current block are in different video regions, and (2) accessing samples across different video regions of the video is disabled for the coding tool,
wherein in a case that (1) the sample in the neighboring block is located above-left of the current block (2) the above-left neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipTopLeftFlag is set equal to true and the sample in the above-left neighboring block is considered to be unavailable based on a value of the variable flag clipTopLeftFlag is true.
2. The method of claim 1 , wherein a video region comprises a slice.
3. The method of claim 1 , wherein in a case that (1) the sample in the neighboring block is located below-right of the current block, (2) the below-right neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipBottomRightFlag is set equal to true and the sample in the below-right neighboring block is considered to be unavailable based on a value of the variable flag clipBottomRightFlag is true.
4. The method of claim 1 , wherein a syntax element is included in the bitstream to indicate whether accessing samples across different video regions is disabled.
5. The method of claim 4 , wherein a video region is a slice, the syntax element in a picture parameter set specifies whether in-loop filtering operations are allowed to be performed across slice boundaries in pictures.
6. The method of claim 4 , further comprising applying a padding process in response to the sample in the neighboring block being unavailable for the coding tool.
7. The method of claim 1 , wherein the conversion includes encoding the video into the bitstream.
8. The method of claim 1 , the conversion includes decoding the video from the bitstream.
9. An apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to:
make a first determination, for a conversion between a current block of a video and a bitstream of the video, about whether a sample in a neighboring block of the current block is in a same video region as the current block, wherein the neighboring block is located (1) above-left of the current block, (2) above-right of the current block, (3) below-left of the current block, or (4) below-right of the current block;
make a second determination about whether the sample in the neighboring block is available for a coding tool that uses samples outside the current block to the conversion of the current block, based on the first determination, wherein the coding tool comprises an adaptive loop filter tool that comprises an adaptive loop filter classification process and/or an adaptive loop filtering process;
perform the conversion according to the first determination and the second determination; and
wherein the sample in the neighboring block is considered to be unavailable for the coding tool in case (1) the neighboring block and the current block are in different video regions, and (2) accessing samples across different video regions of the video is disabled for the coding tool,
wherein in a case that (1) the sample in the neighboring block is located above-left of the current block, (2) the above-left neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipTopLeftFlag is set equal to true and the sample in the above-left neighboring block is considered to be unavailable based on a value of the variable flag clipTopLeftFlag is true.
10. The apparatus of claim 9 , wherein a video region comprises a slice.
11. The apparatus of claim 10 ,
wherein in a case that (1) the sample in the neighboring block is located below-right of the current block, (2) the below-right neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipBottomRightFlag is set equal to true and the sample in the below-right neighboring block is considered to be unavailable based on a value of the variable flag clipBottomRightFlag is true.
12. The apparatus of claim 10 , wherein a syntax element is included in the bitstream to indicate whether accessing samples across different video regions is disabled;
wherein the video region is a slice, the syntax element in a picture parameter set specifies whether in-loop filtering operations are allowed to be performed across slice boundaries in pictures; and
wherein the processor is further caused to apply a padding process in response to the sample in the neighboring block being unavailable for the coding tool.
13. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
make a first determination, for a conversion between a current block of a video and a bitstream of the video, about whether a sample in a neighboring block of the current block is in a same video region as the current block, wherein the neighboring block is located (1) above-left of the current block, (2) above-right of the current block, (3) below-left of the current block, or (4) below-right of the current block;
make a second determination about whether the sample in the neighboring block is available for a coding tool that uses samples outside the current block to the conversion of the current block, based on the first determination, wherein the coding tool comprises an adaptive loop filter tool that comprises an adaptive loop filter classification process and/or an adaptive loop filtering process;
perform the conversion according to the first determination and the second determination- and
wherein the sample in the neighboring block is considered to be unavailable for the coding tool in case (1) the neighboring block and the current block are in different video regions, and (2) accessing samples across different video regions of the video is disabled for the coding tool,
wherein in a case that (1) the sample in the neighboring block is located above-left of the current block, (2) the above-left neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipTopLeftFlag is set equal to true and the sample in the above-left neighboring block is considered to be unavailable based on a value of the variable flag clipTopLeftFlag is true.
14. The non-transitory computer-readable storage medium of claim 13 , wherein a video region comprises a slice;
wherein in a case that (1) the sample in the neighboring block is located below-right of the current block, (2) the below-right neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipBottomRightFlag is set equal to true and the sample in the below-right neighboring block is considered to be unavailable based on a value of the variable flag clipBottomRightFlag is true.
15. The non-transitory computer-readable storage medium of claim 14 , wherein a syntax element is included in the bitstream to indicate whether accessing samples across different video regions is disabled;
wherein the video region is a slice, the syntax element in a picture parameter set specifies whether in-loop filtering operations are allowed to be performed across slice boundaries in pictures; and
wherein the processor is further caused to apply a padding process in response to the sample in the neighboring block being unavailable for the coding tool.
16. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by a video processing apparatus, wherein the method comprises:
making a first determination, for a current block of the video, about whether a sample in a neighboring block of the current block is in a same video region as the current block, wherein the neighboring block is located (1) above-left of the current block, (2) above-right of the current block, (3) below-left of the current block, or (4) below-right of the current block;
making a second determination about whether the sample in the neighboring block is available for a coding tool that uses samples outside the current block for generating the bitstream for the current block, based on the first determination, wherein the coding tool comprises an adaptive loop filter tool that comprises an adaptive loop filter classification process and/or an adaptive loop filtering process;
generating the bitstream according to the first determination and the second determination; and
wherein the sample in the neighboring block is considered to be unavailable for the coding tool in case (1) the neighboring block and the current block are in different video regions, and (2) accessing samples across different video regions of the video is disabled for the coding tool,
wherein in a case that (1) the sample in the neighboring block is located above-left of the current block, (2) the above-left neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipTopLeftFlag is set equal to true and the sample in the above-left neighboring block is considered to be unavailable based on a value of the variable flag clipTopLeftFlag is true.
17. The non-transitory computer-readable recording medium of claim 16 ,
wherein in a case that (1) the sample in the neighboring block is located below-right of the current block, (2) the below-right neighboring block and the current block are in different video regions, and (3) accessing samples across different video regions of the video is disabled for the coding tool, a variable flag clipBottomRightFlag is set equal to true and the sample in the below-right neighboring block is considered to be unavailable based on a value of the variable flag clipBottomRightFlag is true.
18. The non-transitory computer-readable recording medium of claim 17 , wherein a syntax element is included in the bitstream to indicate whether accessing samples across different video regions is disabled;
wherein a video region is a slice, the syntax element in a picture parameter set specifies whether in-loop filtering operations are allowed to be performed across slice boundaries in pictures; and
wherein the method further comprises applying a padding process in response to the sample in the neighboring block being unavailable for the coding tool.