US-12621444-B2 - Loop filtering, video encoding, and video decoding methods and apparatus, storage medium, and electronic device
Abstract
A loop filtering method, a video coding and decoding method and apparatus, a medium, and an electronic device that can obtain block classification information of a luma component in a video image frame in a case that adaptive loop filtering is performed (S 710 ), use the block the block classification information to determine block classification information of a chroma component in the video image frame in a case that cross-component adaptive loop filtering is performed (S 720 ); and select a corresponding filter coefficient to perform cross-component adaptive loop filtering on the chroma component according to the block classification information of the chroma component.
Inventors
- Han Zhang
- Hongbin Zhang
- WEI KUANG
Assignees
- TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Dates
- Publication Date
- 20260505
- Application Date
- 20231031
- Priority Date
- 20220107
Claims (20)
- 1 . A method performed by a video encoding device or a video decoding device, the method comprising: obtaining block classification information of a luma component in a video image frame, the block classification information of the luma component including a subblock level classification result that indicates that two or more subblocks belong to a different classification categories and a merging result that indicates that different classification categories share first filter coefficients for adaptive loop filtering (ALF) performed on the luma component; determining, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; determining, based on the merging result of the luma component, a merging result of the chroma component; and selecting, based on the block classification information of the chroma component and the merging result of the chroma component, second filter coefficients to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component.
- 2 . The method according to claim 1 , wherein the obtaining the block classification information of the luma component is performed when ALF is performed on the luma component, and wherein the determining the block classification information of the chroma component is performed when CC-ALF is performed on the chroma component.
- 3 . The method according to claim 2 , wherein the determining comprises: using a classification result of a subblock when ALF is performed on the luma component as a classification result of a block of a same size when CC-ALF is performed on the chroma component.
- 4 . The method according to claim 2 , wherein the determining comprises: using a classification result and a corresponding geometric transform type of a subblock when ALF is performed on the luma component as a classification result and a geometric transform type of a block of a same size when CC-ALF is performed on the chroma component.
- 5 . The method according to claim 1 , wherein the second filter coefficients correspond to a diamond-shaped filter.
- 6 . The method according to claim 2 , further comprising: determining, based on a rate distortion cost of performing filter merging when an ALF process is performed on the luma component and a rate distortion cost of performing filter merging when a CC-ALF process is performed on the chroma component, one or more merging results when ALF is performed on the luma component and when CC-ALF is performed on the chroma component.
- 7 . The method according to claim 2 , further comprising: determining, based on a quantity of filters determined when ALF is performed on the luma component, a quantity of available filters when CC-ALF is performed on the chroma component.
- 8 . The method according to claim 1 , further comprising: performing decoding processing on a video bitstream according to an ALF processing result of the luma component and a CC-ALF processing result of the chroma component.
- 9 . The method according to claim 8 , the method further comprising: decoding the video bitstream to obtain a first flag bit corresponding to a current slice, a value of the first flag bit being used for indicating whether a chroma component of a target block in the current slice uses the cross-component adaptive loop filtering processing.
- 10 . The method according to claim 9 , wherein: a first value of the first flag bit indicates that chroma components of some target blocks in the current slice use the cross-component adaptive loop filtering processing, or indicates that chroma components of all target blocks in the current slice use the cross-component adaptive loop filtering processing; or a second value of the first flag bit indicates that chroma components of all target blocks in the current slice do not use the cross-component adaptive loop filtering processing.
- 11 . The method according to claim 9 , further comprising: when the value of the first flag bit indicates that chroma components of some target blocks in the current slice use the cross-component adaptive loop filtering processing, determining a second flag bit corresponding to each target block comprised in the current slice, the value of the second flag bit being used for indicating whether a chroma component of a corresponding target block uses the cross-component adaptive loop filtering processing.
- 12 . The method according to claim 1 , further comprising: performing encoding processing on the video image frame according to an ALF processing result of the luma component and a CC-ALF processing result of the chroma component, to obtain a video bitstream.
- 13 . The method according to claim 12 , further comprising: encoding, in the video bitstream, a first flag bit corresponding to a current slice of the video image frame, wherein a value of the first flag bit is used for indicating whether a chroma component of a target block in the current slice uses the CC-ALF processing.
- 14 . An apparatus comprising: at least one memory configured to store computer program code; and at least one processor configured to access the at least one memory and execute the computer program code, the computer program code including: obtaining code configured to cause the at least one processor to obtain block classification information of a luma component in a video image frame, the block classification information of the luma component including a subblock level classification result that indicates that two or more subblocks belong to different classification categories, and a merging result that indicates that different classification categories share first filter coefficients for adaptive loop filtering (ALF) performed on the luma component; first determining code configured to cause the at least one processor to determine, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; second determining code configured to cause the at least one processor to determine, based on the merging result of the luma component, a merging result of the chroma component; and selecting code configured to cause the at least one processor to select, based on the block classification information of the chroma component and the merging result of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component.
- 15 . The apparatus according to claim 14 , wherein: the obtaining code is configured to cause the at least one processor to obtain the block classification information of the luma component when adaptive loop filtering (ALF) is performed on the luma component; and the first determining code is configured to cause the at least one processor to determine the block classification information of the chroma component when CC-ALF is performed on the chroma component.
- 16 . The apparatus according to claim 14 , wherein the first determining code is configured to cause the at least one processor to determine the block classification information of the chroma component by using a classification result of a subblock when ALF is performed on the luma component as a classification result of a block of a same size when CC-ALF is performed on the chroma component.
- 17 . The apparatus according to claim 14 , wherein the first determining code is configured to cause the at least one processor to determine the block classification information of the chroma component by using a classification result and a corresponding geometric transform type of a subblock when ALF is performed on the luma component as a classification result and a geometric transform type of a block of a same size when CC-ALF is performed on the chroma component.
- 18 . The apparatus according to claim 14 , wherein the second filter coefficients correspond to a diamond-shaped filter.
- 19 . The apparatus according to claim 14 , wherein the second determining code is configured to cause the at least one processor determine, based on a rate distortion cost of performing filter merging when an ALF process is performed on the luma component and a rate distortion cost of performing filter merging when a CC-ALF process is performed on the chroma component, one or more merging results when ALF is performed on the luma component and when CC-ALF is performed on the chroma component.
- 20 . A non-transitory computer readable medium storing computer program code, the program code configured to cause at least one processor to: obtain block classification information of a luma component in a video image frame, the block classification information of the luma component including a subblock level classification result that indicates that two or more subblocks belong to a different classification category, and a merging result that indicates that different classification categories share first filter coefficients for adaptive loop filtering (ALF) performed on the luma component; determine, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; determine, based on the merging result of the luma component, a merging result of the chroma component; and select, based on the block classification information of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component.
Description
CROSS REFERENCE TO RELATED APPLICATION This application is a continuation of International Patent Application No. PCT/CN2022/137908 filed on Dec. 9, 2022, which claims priority to Chinese Patent Application No. 202210017814.0, filed with the China National Intellectual Property Administration on Jan. 7, 2022, the disclosures of which are incorporated herein by reference in their entireties. FIELD The disclosure relates to the field of computer and communication technologies, and specifically, to loop filtering, video encoding, and video decoding methods and apparatuses, a storage medium, and an electronic device. BACKGROUND Cross-component adaptive loop filtering (CC-ALF) is a Wiener filter that adaptively generates and uses different filter coefficients according to a characteristic of video content (such as a game video or an online conference video). In a current CC-ALF design, a filter coefficient needs to be adaptively selected by means of classification. However, a problem of low classification accuracy often exists, which causes poor performance in CC-ALF. SUMMARY According to various embodiments of the present disclosure, loop filtering, video encoding, and video decoding methods and apparatuses, a medium, and an electronic device, are provided. According to some embodiments, a loop filtering method may be provided. The method may be performed by a video encoding device or a video decoding device, and may include: obtaining block classification information of a luma component in a video image frame; determining, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; and selecting, based on the block classification information of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component. According to embodiments, the method may further include: performing decoding processing on a video bitstream according to an ALF processing result of the luma component and a CC-ALF processing result of the chroma component. Further, the method may further include: performing encoding processing on the video image frame according to an ALF processing result of the luma component and a CC-ALF processing result of the chroma component, to obtain a video bitstream. According to some embodiments, an apparatus may be provided. The apparatus may comprise at least one memory and at least one processor. The at least one memory may be configured to store computer readable instructions and the at least one processor may be configured to access the at least one memory and execute the computer readable instructions to: obtain block classification information of a luma component in a video image frame; determine, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; and select, based on the block classification information of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component. According to some embodiments, a non-transitory computer readable medium may be provided. The non-transitory computer readable medium may store computer program code, and the program code may be configured to cause at least one processor to: obtain block classification information of a luma component in a video image frame; determine, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; and select, based on the block classification information of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component. According to some embodiments, a video decoding method may be provided. The video decoding method may be performed by a video decoding device, and may include: obtaining block classification information of a luma component in a video image frame; determining, based on the block classification information of the luma component, block classification information of a chroma component in the video image frame; selecting, based on the block classification information of the chroma component, a filter coefficient to perform cross-component adaptive loop filtering (CC-ALF) processing on the chroma component; and performing decoding processing on a video bitstream according to an adaptive loop filtering (ALF) processing result of the luma component and a CC-ALF processing result of the chroma component. According to some embodiments, a video encoding method may be provided. The video encoding method may be performed by a video encoding device, and may include: obtaining block classification information of a luma component in a video image frame; determining, based on the block classification information of the luma component, block classif