On adaptive loop filtering for video coding
Devices, systems and methods for adaptive loop filtering are described. In an exemplary aspect, a method for video processing includes performing, for a current video block of a video, a filtering process that uses filter coefficients and comprises two or more operations with at least one intermediate result, applying a clipping operation to the at least one intermediate result, and performing, based on the at least one intermediate result, a conversion between the current video block and a bitstream representation of the video, wherein the at least one intermediate result is based on a weighted sum of the filter coefficients and differences between a current sample of the current video block and neighboring samples of the current sample.
1 . A method of processing video data, comprising:
determining, for a conversion between a first video region of a video and a bitstream of the video, a first syntax element corresponding to the first video region is present in the bitstream, wherein the first syntax element indicates an index of a first adaptation parameter set referred to by the first video region; and
performing the conversion based on the determining,
wherein in response to the determining, a value of a second syntax element included in the first adaptation parameter set is 1, and wherein the second syntax element indicates whether to include a luma filter set in the first adaptation parameter set,
wherein for a sample of the first video region, a filter index is derived based on multiple sample differences in different directions, and a specific luma filter is selected, based on the filter index, from the luma filter set in the first adaption parameter set and fixed luma filters which are not included in the luma filter set,
wherein a maximum value of the filter index is indicated by N, and a number of luma filters in the luma filter set is smaller than or equal to N+1, and
wherein when the number of luma filters in the luma filter set is smaller than N+1, at least two luma filters with different filter indices have a same filter coefficient.
2 . The method of claim 1 , wherein the first video region is a video picture, and the first syntax element is present in a picture header syntax element set.
3 . The method of claim 1 , wherein the first video region is a video slice, and the first syntax element is present in a slice header syntax element set.
4 . The method of claim 1 , wherein the first video region includes multiple video coding tree blocks, and the video coding tree block is split into multiple M*M video block, where M is equal to 2 or 4, and
wherein a same filter index is applied for samples in a same M*M video block.
5 . The method of claim 4 , wherein the multiple sample differences in different directions are derived for every M*M video region based on 1:2 subsampling rate.
6 . The method of claim 1 , wherein the first adaptation parameter set includes an adaptive loop filtering adaptation parameter set.
7 . The method of claim 1 , wherein the conversion includes encoding a current video block into the bitstream.
8 . The method of claim 1 , wherein the conversion includes decoding a current video block 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:
determine, for a conversion between a first video region of a video and a bitstream of the video, a first syntax element corresponding to the first video region is present in the bitstream, wherein the first syntax element indicates an index of a first adaptation parameter set referred to by the first video region; and
perform the conversion based on the determining;
wherein in response to the determining, a value of a second syntax element included in the first adaptation parameter set is 1, and wherein the second syntax element indicates whether to include a luma filter set in the first adaptation parameter set,
wherein for a sample of the first video region, a filter index is derived based on multiple sample differences in different directions, and a specific luma filter is selected, based on the filter index, from the luma filter set in the first adaption parameter set and fixed filters which are not included in the luma filter set,
wherein a maximum value of the filter index is indicated by N, and a number of luma filters in the luma filter set is smaller than or equal to N+1, and
wherein when the number of luma filters in the luma filter set is smaller than N+1, at least two luma filters with different filter indices have a same filter coefficient.
10 . The apparatus of claim 9 , wherein the first video region is a video picture, and the first syntax element is present in a picture header syntax element set.
11 . The apparatus of claim 9 , wherein the first video region is a video slice, and the first syntax element is present in a slice header syntax element set.
12 . The apparatus of claim 9 , wherein the first video region includes multiple video coding tree blocks, and the video coding tree block is split into multiple M*M video block, where M is equal to 2 or 4, and
wherein a same filter index is applied for samples in a same M*M video block.
13 . The apparatus of claim 9 , wherein the first adaptation parameter set includes an adaptive loop filtering adaptation parameter set.
14 . A non-transitory computer-readable storage medium storing instructions that cause a processor to:
determine, for a conversion between a first video region of a video and a bitstream of the video, a first syntax element corresponding to the first video region is present in the bitstream, wherein the first syntax element indicates an index of a first adaptation parameter set referred to by the first video region; and
perform the conversion based on the determining;
wherein in response to the determining, a value of a second syntax element included in the first adaptation parameter set is 1, and wherein the second syntax element indicates whether to include a luma filter set in the first adaptation parameter set,
wherein for a sample of the first video region, a filter index is derived based on multiple sample differences in different directions, and a specific luma filter is selected, based on the filter index, from the luma filter set in the first adaption parameter set and fixed filters which are not included in the luma filter set,
wherein a maximum value of the filter index is indicated by N, and a number of luma filters in the luma filter set is smaller than or equal to N+1, and
wherein when the number of luma filters in the luma filter set is smaller than N+1, at least two luma filters with different filter indices have a same filter coefficient.
15 . A method for storing a bitstream of a video comprising:
determining, for a first video region of the video, a first syntax element corresponding to the first video region is present in the bitstream, wherein the first syntax element indicates an index of a first adaptation parameter set referred to by the first video region;
generating the bitstream based on the determining; and
storing the bitstream in a non-transitory computer-readable recording medium,
wherein in response to the determining, a value of a second syntax element included in the first adaptation parameter set is 1, and wherein the second syntax element indicates whether to include a luma filter set in the first adaptation parameter set,
wherein for a sample of the first video region, a filter index is derived based on multiple sample differences in different directions, and a specific luma filter is selected, based on the filter index, from the luma filter set in the first adaption parameter set and fixed filters which are not included in the luma filter set,
wherein a maximum value of the filter index is indicated by N, and a number of luma filters in the luma filter set is smaller than or equal to N+1, and
wherein when the number of luma filters in the luma filter set is smaller than N+1, at least two luma filters with different filter indices have a same filter coefficient.
16 . The medium of claim 14 , wherein first video region is a video picture, and the first syntax element is present in a picture header syntax element set;
wherein the first video region is a video slice, and the first syntax element is present in a slice header syntax element set; and
wherein the first adaptation parameter set includes an adaptive loop filtering adaptation parameter set.