Two-part signaling of adaptive loop filters in video coding
Methods, systems and devices for signaling the usage of adaptive loop filtering in image and video coding are described. An example method of video processing includes determining, for a conversion between a current region of a video and a bitstream representation of the video, whether a luma adaptive loop filter is used during the conversion and whether luma adaptive loop filter coefficients are included in the bitstream representation, wherein a single syntax element in the bitstream representation is indicative of use of the luma adaptive loop filter and signaling of the luma adaptive loop filter coefficients, and performing, based on the determining, the conversion.
1. A method of processing video data, comprising:
performing a conversion between a current block of a current region of a video and a bitstream of the video, wherein the conversion comprises using an adaptive loop filter for the current block, and wherein the bitstream is configured to indicate the adaptive loop filter using multiple syntax elements including:
a first syntax element of the multiple syntax elements, the first syntax element being alf_use_aps_flag, and the first syntax element indicating whether a fixed filter set or a filter set from an adaptation parameter set (APS) is applied to the current block,
a second syntax element of the multiple syntax elements, the second syntax element being alf_luma_prev_filter_idx, and the second syntax element indicative of an index of the filter set from the APS, and
a third syntax element of the multiple syntax elements, the third syntax element being alf_luma_fixed_filter_idx, and the third syntax element indicative of an index of the fixed filter set,
wherein the bitstream comprises a fourth syntax element in a slice header, the fourth syntax element being num_alf_aps_ids_luma, and the fourth syntax element indicating a number of adaptive loop filter APSs used for the current region,
wherein the first syntax element is included in the bitstream when a value of the fourth syntax element in the slice header is greater than one and the first syntax element is included in the bitstream when the value of the fourth syntax element in the slice header is equal to one,
wherein the second syntax element indicative of the index of the filter set from the APS is included in the bitstream when a value of the first syntax element is equal to one and the value of the fourth syntax element in the slice header is greater than one, and
wherein the third syntax element is included in the bitstream when the value of the first syntax element is equal to zero.
2. The method of claim 1 , wherein the first syntax element being zero indicating that the fixed filter set is applied to the current block.
3. The method of claim 1 , wherein the first syntax element being one indicating that the filter set from the APS is applied to the current block.
4. The method of claim 1 , wherein the bitstream excludes the first syntax element in response to the value of the fourth syntax element in the slice header being equal to zero, and wherein the first syntax element is inferred to indicate that the fixed filter set is applied to the current block.
5. The method of claim 1 , wherein the second syntax element indicative of the index of the filter set from the APS is excluded from the bitstream in response to the value of the fourth syntax element in the slice header being equal to 1.
6. The method of claim 1 , wherein the current region is a slice.
7. The method of claim 1 , wherein the second syntax element indicative of the index of the filter set from the APS is coded with a truncated binary method.
8. The method of claim 1 , wherein a maximum value of the second syntax element indicative of the index of the filter set from the APS is set to a number of allowed ALF APSs for the current region minus K, and wherein K=1.
9. The method of claim 1 , wherein all bins of a binarized bin string of the second syntax element indicative of the index of the filter set from the APS are bypass coded.
10. The method of claim 1 , wherein the conversion includes encoding the video into the bitstream.
11. The method of claim 1 , wherein the conversion includes decoding the video from the bitstream.
12. 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:
perform a conversion between a current block of a current region of a video and a bitstream of the video, wherein the conversion comprises using an adaptive loop filter for the current block, and wherein the bitstream is configured to indicate the adaptive loop filter using multiple syntax elements including:
a first syntax element of the multiple syntax element, the first syntax element being alf_use_aps_flag, and the first syntax element indicating whether a fixed filter set or a filter set from an adaptation parameter set (APS) is applied to the current block,
a second syntax element of the multiple syntax element, the second syntax element being alf_luma_prev_filter_idx, and the second syntax element indicative of an index of the filter set from the APS, and
a third syntax element of the multiple syntax elements, the third syntax element being alf_luma_fixed_filter_idx, and the third syntax element indicative of an index of the fixed filter set,
wherein the bitstream comprises a fourth syntax element in a slice header, the fourth syntax element being num_alf_aps_ids_luma, and the fourth syntax element indicating a number of adaptive loop filter APSs used for the current region,
wherein the first syntax element is included in the bitstream when a value of the fourth syntax element in the slice header is greater than one and the first syntax element is included in the bitstream when the value of the fourth syntax element in the slice header is equal to one,
wherein the second syntax element indicative of the index of the filter set from the APS is included in the bitstream when a value of the first syntax element is equal to one and a value of the fourth syntax element in the slice header is greater than one, and
wherein the third syntax element is included in the bitstream when the value of the first syntax element is equal to zero.
13. The apparatus of claim 12 , wherein the first syntax element being zero indicating that the fixed filter set is applied to the current block;
wherein the first syntax element being one indicating that the filter set from the APS is applied to the current block;
wherein the bitstream excludes the first syntax element in response to the value of the fourth syntax element in the slice header being equal to zero, and wherein the first syntax element is inferred to indicate that the fixed filter set is applied to the current block; and
wherein the second syntax element indicative of the index of the filter set from the APS is excluded from the bitstream in response to the value of the fourth syntax element in the slice header being equal to 1.
14. The apparatus of claim 12 , wherein the current region is a slice;
wherein the second syntax element indicative of the index of the filter set from the APS is coded with a truncated binary method;
wherein a maximum value of the index of the filter set from the APS is set to a number of allowed ALF APSs for the current region minus K, and wherein K=1; and
wherein all bins of a binarized bin string of the second syntax element indicative of the index of the filter set from the APS are bypass coded.
15. A non-transitory computer-readable storage medium storing instructions that cause a processor to:
perform a conversion between a current block of a current region of a video and a bitstream of the video, wherein the conversion comprises using an adaptive loop filter for the current block, and wherein the bitstream is configured to indicate the adaptive loop filter using a multiple syntax elements including:
a first syntax element of the multiple syntax elements, the first syntax element being alf_use_aps_flag, and the first syntax element indicating whether a fixed filter set or a filter set from an adaptation parameter set (APS) is applied to the current block,
a second syntax element of the multiple syntax elements, the second syntax element being alf_luma_prev_filter_idx, and the second syntax element indicative of an index of the fixed filter set or the filter set from the APS, and
a third syntax element of the multiple syntax elements, the third syntax element being alf_luma_fixed_filter_idx, and the third syntax element indicative of an index of the fixed filter set,
wherein the bitstream comprises a fourth syntax element in a slice header, the fourth syntax element being num_alf_aps_ids_luma, and the fourth syntax element indicating a number of adaptive loop filter APSs used for the current region,
wherein the first syntax element is included in the bitstream when a value of the fourth syntax element in the slice header is greater than one and the first syntax element is included in the bitstream when the value of the fourth syntax element in the slice header is equal to one,
wherein the second syntax element indicative of the index of the filter set from the APS is included in the bitstream when a value of the first syntax element is equal to one and the value of the fourth syntax element in the slice header is greater than one, and
wherein the third syntax element is included in the bitstream when the value of the first syntax element is equal to zero.
16. The non-transitory computer-readable storage medium of claim 15 , wherein the first syntax element being zero indicating that the fixed filter set is applied to the current block;
wherein the first syntax element being one indicating that the filter set from the APS is applied to the current block;
wherein the bitstream excludes the first syntax element in response to the value of the fourth syntax element in the slice header being equal to zero, and wherein the first syntax element is inferred to indicate that the fixed filter set is applied to the current block;
wherein the second syntax element indicative of the index of the filter set from the APS is excluded from the bitstream in response to the value of the fourth syntax element in the slice header being equal to 1;
wherein the current region is a slice;
wherein the second syntax element indicative of the index of the filter set from the APS is coded with a truncated binary method;
wherein a maximum value of the second syntax element indicative of the index of the filter set from the APS is set to a number of allowed ALF APSs for the current region minus K, and wherein K=1; and
wherein all bins of a binarized bin string of the second syntax element indicative of the index of the filter set from the APS are bypass coded.
17. 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:
generating the bitstream for a current block of a current region of the video, wherein the generating comprises using an adaptive loop filter for the current block, and wherein the bitstream is configured to indicate the adaptive loop filter using multiple syntax elements including:
a first syntax element of the multiple syntax elements, the first syntax element being alf_use_aps_flag, and the first syntax element indicating whether a fixed filter set or a filter set from an adaptation parameter set (APS) is applied to the current block,
a second syntax element of the multiple syntax elements, the second syntax element being alf_luma_prev_filter_idx, and the second syntax element indicative of an index of the filter set from the APS, and
a third syntax element of the multiple syntax elements, the third syntax element being alf_luma_fixed_filter_idx, and the third syntax element indicative of an index of the fixed filter set,
wherein the bitstream comprises a fourth syntax element in a slice header, the fourth syntax element being num_alf_aps_ids_luma, and the fourth syntax element indicating a number of adaptive loop filter APSs used for the current region,
wherein the first syntax element is included in the bitstream when a value of the fourth syntax element in the slice header is greater than one and the first syntax element is included in the bitstream when the value of the fourth syntax element in the slice header is equal to one,
wherein the second syntax element indicative of the index of the filter set from the APS is included in the bitstream when a value of the first syntax element is equal to one and the value of the fourth syntax element in the slice header is greater than one, and
wherein the third syntax element is included in the bitstream when the value of the first syntax element is equal to zero.
18. The non-transitory computer-readable recording medium of claim 17 , wherein the first syntax element being zero indicating that the fixed filter set is applied to the current block;
wherein the first syntax element being one indicating that the filter set from the APS is applied to the current block;
wherein the bitstream excludes the first syntax element in response to the value of the fourth syntax element in the slice header being equal to zero, and wherein the first syntax element is inferred to indicate that the fixed filter set is applied to the current block;
wherein the second syntax element indicative of the index of the filter set from the APS is excluded from the bitstream in response to the value of the fourth syntax element in the slice header being equal to 1;
wherein the current region is a slice;
wherein the second syntax element indicative of the index of the filter set from the APS is coded with a truncated binary method;
wherein a maximum value of the second syntax element indicative of the index of the filter set from the APS is set to a number of allowed ALF APSs for the current region minus K, and wherein K=1; and
wherein all bins of a binarized bin string of the second syntax element indicative of the index of the filter set from the APS are bypass coded.