Loop filtering methods, electronic device, storage medium, and program product

By performing multi-level classification and filter combination superposition on the reconstructed image, the problem that the loop filtering module in the existing technology cannot fully utilize the image content features is solved, and better filtering effect and coding performance are achieved.

WO2025241611A1PCT designated stage Publication Date: 2025-11-27ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/076668
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-20
Filing Date
2025-02-10
Publication Date
2025-11-27

AI Technical Summary

Technical Problem

In existing technologies, during video coding based on a hybrid coding framework, the loop filtering module struggles to fully utilize image content features, resulting in poor filtering performance and an inability to achieve optimal coding performance.

Method used

Multi-level classification is used to classify pixel blocks in the reconstructed image. The target classification strategy and filtering parameters are determined based on the filter coefficients of each classification level. Filtering is performed by combining and superimposing multiple classifiers to generate the corresponding bitstream.

Benefits of technology

By using multi-level classification and filter combination, the image content features are utilized more fully, improving the filtering effect and coding performance of video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025076668_27112025_PF_FP_ABST
    Figure CN2025076668_27112025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present application are loop filtering methods, an electronic device, a storage medium, and a program product. A loop filtering method comprises: performing multiple levels of classification operations on a reconstructed image, and determining a filter coefficient corresponding to each level of classification operation; then, on the basis of the filter coefficient corresponding to each level, determining which level of classification is to be used, and a specific classification method, and generating filter parameter information corresponding to the determined classification method; and filtering a target component by means of the filter parameter information to obtain a corresponding bit stream, and writing the filter parameter into the bit stream. The technical solution uses the mode of combining and superposing a plurality of classifiers for grouping, selects an optimal grouping scheme on the basis of corresponding filter coefficients, and performs filtering on the basis of the corresponding filter coefficients, so as to obtain a final reconstructed image.
Need to check novelty before this filing date? Find Prior Art

Description

Loop filtering method, electronic device, storage medium and program product

[0001] Cross-reference to related applications

[0002] The present application is based on the Chinese patent application No. 202410627805.2, filed on May 20, 2024, and claims priority to the Chinese patent application No. 202410627805.2, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0003] Embodiments of the present application relate to the field of video transmission, in particular to a loop filtering method, an electronic device, a storage medium and a program product. BACKGROUND

[0004] In the exploration of the new generation of video coding technology based on the hybrid coding framework, the pixel classification method of the loop filtering module is further expanded. The basic processing unit is refined from the 4*4 pixel block in the H.266 / VVC (Versatile Video Coding, multi-functional video coding) era to the 2*2 pixel block. On the basis of the original classification method based on the Laplacian gradient, the classification method based on the sideband and the classification method based on the prediction residual are also added.

[0005] In related technologies, in the adaptive loop filtering (ALF) process of the luminance component, a classification method most suitable for the current reconstructed image needs to be selected according to the rate-distortion optimization algorithm. However, the reconstructed image often contains rich information, and the above-mentioned method is difficult to meet the content characteristics of the entire image, and cannot achieve the optimal filtering effect. How to improve the filtering effect is a problem that needs to be discussed and solved at present. SUMMARY

[0006] Embodiments of the present application provide a loop filtering method, an electronic device, a storage medium and a program product, which aims to improve the filtering effect and improve the coding performance.

[0007] In a first aspect, the embodiments of the present application provide a loop filtering method, which comprises: acquiring a reconstructed image; performing an n-level classification operation based on a pixel block of a target component in the reconstructed image, and determining filter coefficients corresponding to categories obtained by each level of classification operation, wherein n is an integer greater than or equal to 2; determining a target classification strategy and filter parameter information corresponding to the target classification strategy according to the filter coefficients corresponding to the categories obtained by each level of classification operation; filtering the target component according to the filter parameter information to obtain a bitstream; and writing the filter parameter information into the bitstream.

[0008] In a second aspect, an embodiment of the present application provides a loop filtering method, which comprises: receiving a code stream, and decoding the code stream to obtain a reconstructed image and filtering parameter information; performing one-level or multi-level classification operation on a pixel block of the reconstructed image according to the filtering parameter information, to determine a category corresponding to each pixel block; obtaining filter coefficients of multiple categories according to the filtering parameter information; and filtering the pixel block of the reconstructed image according to the category corresponding to the pixel block and the filter coefficients corresponding to the category, to obtain a target reconstructed image.

[0009] In a third aspect, an embodiment of the present application provides an electronic device, which comprises: at least one processor; at least one memory configured to store at least one program; and a loop filtering method as described in the first aspect or the second aspect, when the at least one program is executed by the at least one processor.

[0010] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which is configured to store computer executable instructions, and the computer executable instructions are configured to execute a loop filtering method as described in the first aspect or the second aspect.

[0011] In a fifth aspect, an embodiment of the present application provides a machine program product, which comprises a computer program or computer instructions, and the computer program or the computer instructions are stored in a computer readable storage medium, and a processor of a computer device reads the computer program or the computer instructions from the computer readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device executes a loop filtering method as described in the first aspect or the second aspect.

[0012] In the embodiments of the present application, multi-level classification operation is performed on the reconstructed image, and filter coefficients corresponding to each level of classification operation are determined. Then, the level of classification of each level is determined based on the filter coefficients corresponding to each level, and the specific classification manner is determined, and filter parameter information corresponding to the determined classification manner is generated. The target component is filtered based on the filter parameter information to obtain corresponding code stream, and the filter parameter is written into the code stream. The above scheme adopts the grouping manner of multiple classifier combination superposition, and selects the best grouping scheme according to the corresponding filter coefficients, and filters according to the corresponding filter coefficients to obtain the final reconstructed image. The classifier combination superposition manner refers to multiple dimensions of information for classification, which can more fully utilize the content features in the image to achieve better filtering effect and effectively improve the coding performance. BRIEF DESCRIPTION OF DRAWINGS

[0013] FIG. 1 is a schematic diagram of a system architecture of a video transmission scenario according to an embodiment of the present application;

[0014] FIG. 2 is a schematic diagram of a video encoder framework according to an example of the present application;

[0015] FIG. 3 is a flowchart of a loop filtering method according to an embodiment of the present application;

[0016] FIG. 4 is a schematic diagram of multi-level classification according to an example of the present application;

[0017] FIG. 5 is a schematic diagram of multi-level classification based on category fusion according to an example of the present application;

[0018] FIG. 6 is a schematic diagram of multi-level classification based on ranking according to an example of the present application;

[0019] FIG. 7 is a flowchart of adaptive loop filtering using multi-level classification according to an example of the present application;

[0020] FIG. 8 is a flowchart of loop filtering based on multi-classifier category fusion according to another example of the present application;

[0021] FIG. 9 is a flowchart of a loop filtering method according to another embodiment of the present application;

[0022] FIG. 10 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.

[0024] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0025] In the description of the embodiments of the present application, unless otherwise explicitly limited, the words such as setting, installing, connecting, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meaning of the above words in the embodiments of the present application in combination with the specific content of the technical solutions.

[0026] In the embodiments of the present application, the words "further", "exemplarily" or "optionally" are used to represent as an example, illustration or description, and should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. The use of the words "further", "exemplarily" or "optionally" is intended to present the related concept in a specific manner.

[0027] In the related art, for the international video coding standard HEVC (High Efficiency Video Coding), VVC (Versatile Video Coding), and the Audio Video coding Standard (AVS) and other block-based hybrid coding frameworks, distortion effects such as blockiness, ringing, color bias, and image blur still exist in compressed videos. The signals that have been changed and quantized are obtained by inverse quantization, inverse transformation, and prediction compensation operations to obtain reconstructed images. Compared with the original images, the reconstructed images are different due to the influence of quantization, that is, the reconstructed images will produce distortion. In order to reduce the influence of such distortion on the video quality, the in-loop filtering technology is usually used in the hybrid coding framework to effectively reduce the distortion degree caused by quantization. Since these filtered reconstructed images will be used as references for subsequent coding images to predict future image signals, the above filtering operation is also called in-loop filtering, that is, the filtering operation within the coding loop.

[0028] Taking the H.266 / VVC video coding standard technology as an example, the in-loop filtering technology includes luma mapping with chroma scaling (LMCS), deblocking filter (DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF). LMCS improves compression efficiency by reallocating code words for information in the dynamic range; DBF is used to reduce blockiness; SAO is used to improve ringing; and ALF can reduce decoding errors.

[0029] Wherein the ALF filtering includes luma ALF, chroma ALF and inter-component ALF. The ALF is based on the Wiener filtering principle, a series of filter coefficients with minimum mean square error are solved by establishing a Wiener-Hoff equation based on original image information and reconstructed image information, so as to reduce decoding error and effectively improve the peak signal-to-noise ratio (PSNR). The Wiener filter coefficients are related to the content of the reconstructed image, and different pixels have different characteristics. Taking the luma ALF in H.266 / VVC as an example, in the decoding process, a subset of filter coefficients needs to be determined for each coding tree unit (CTU), and then the CTU is divided into 4*4 pixel blocks, which are classified according to their content characteristics, and a coefficient corresponding to a filter class is selected for filtering. The above classification process is based on the Laplacian gradient calculation, and since the texture feature information of the luma component is used, the pixel block classification method based on the Laplacian gradient is also called the texture-based classification method. For chroma ALF and inter-component ALF, a simpler classification method is usually used, that is, the pixel blocks are divided according to the region, and then the corresponding filter class is selected.

[0030] On the basis of VVC, the loop filtering module of the further enhanced compression model (ECM) has carried out a large number of extensions and optimizations for the ALF technology, among which, for the pixel block classification method, several pixel block classification schemes in different dimensions are proposed, and certain gains are achieved.

[0031] In the related art, the following schemes are proposed for classifying pixels.

[0032] Scheme one: a pixel block classification method (i.e. a classifier) based on sample residual, on the basis of the original two classifiers (texture-based classifier and edge-based classifier) in ECM-7.0, a third classifier based on sample residual is added, and the index of the classifier is identified in each subset in the adaptation parameter set (APS) through syntax and transmitted to the decoder.

[0033] Scheme two: the boundary strength (DBF-BS) calculated in the deblocking filter (DBF) is introduced into the edge-based and texture-based classifiers, when classifying the pixel blocks, each classification unit is divided into two levels (boundary and non-boundary) according to the DBF-BS information, and then further classified according to the existing classifier.

[0034] Scheme three: a variance-based classifier, which divides each pixel block into two texture intensity levels according to the variance and boundary position of each pixel block, and then further combines the texture intensity levels with the existing classifier to output the final classification result.

[0035] Scheme four: a classification method based on coding mode and boundary information, which divides each pixel block into two noise levels by jointly using the prediction mode and partition information, and then further combines the noise levels with the existing classifier to output the final classification result, wherein the maximum number of categories of the existing classifier is reduced from 25 to 12, i.e. a total of 12x 2 = 24 categories are generated.

[0036] The above schemes respectively classify the reconstructed pixels from the boundary strength, prediction mode, sample residual, texture feature and other dimensions, and the purpose is to divide the pixels containing the same content characteristics into a group as much as possible to share the filter coefficients. However, due to the rich content in the video picture, especially the brightness information contains more detail features, the current ALF filtering process only supports selecting one of the multiple classifiers to apply and identify, which cannot reflect the content features of multiple dimensions, resulting in difficulty in achieving the optimal filtering effect.

[0037] To solve the above problems, the embodiments of the present application provide a loop filtering method, an electronic device, a storage medium and a program product. In the process of video encoding, a multi-level classification operation is performed on a pixel block of a target component in a reconstructed image, and filter coefficients corresponding to each level of classification operation are determined. Then, the level of classification and the specific classification method (i.e. the target classification strategy) are determined based on the filter coefficients corresponding to each level, and filter parameter information corresponding to the determined classification method is generated. The target component is filtered by the filter parameter information to obtain a corresponding code stream, and the filter parameter is written into the code stream.

[0038] In the process of video decoding, the embodiments of the present application obtain a reconstructed image and filter parameter information in the encoding process of the code stream by decoding the received code stream. The multi-level classification method and the corresponding classifier type used in the classification of the pixel block in the corresponding encoding process are determined through the filter parameter information, so as to classify the pixel block of the reconstructed image. And the filter corresponding to multiple categories is obtained through the filter parameter information, and the pixel block of the corresponding category is filtered to obtain a target reconstructed image.

[0039] It can be seen that in the pixel block classification process of the ALF filtering in the embodiments of the present application, the grouping is performed in a manner of combination and superposition of multiple classifiers (multi-level classification operation), and the optimal grouping scheme is selected according to the corresponding filter coefficients. The filter coefficients corresponding to the optimal grouping scheme are obtained, and filtering is performed to obtain the final reconstructed image. Through the combination and superposition of the classifiers, the information in multiple dimensions is referred to for classification, the content features in the image can be more fully utilized, and better filtering effect can be achieved to effectively improve the coding performance.

[0040] The technical solutions of the embodiments of the present application can be applied to the H.266 / VVC standard, the Audio Video coding Standard (AVS), such as AVS3, or the next generation video coding standard, and the present application is not limited thereto.

[0041] The embodiments of the present application will be further described below with reference to the accompanying drawings.

[0042] FIG. 1 is a schematic diagram of a system architecture of a video transmission scene according to an embodiment of the present application. As shown in FIG. 1, in the scene, a terminal 110 and a server 120 are included. The terminal 110 or the server 120 can perform video encoding through an encoder or video decoding through a decoder. The terminal 110 or the server 120 can also perform video encoding through a processor running a video encoding program or video decoding through a processor running a video decoding program. After the server 120 receives the encoded data sent by the terminal 110 through an input interface, the encoded data can be directly transmitted to a processor for decoding or stored in a database for subsequent decoding. After the server 120 encodes the original video frame through a processor to obtain encoded data, the encoded data can be directly sent to the terminal 110 through an output interface or stored in a database for subsequent transmission.

[0043] The loop filtering method can be completed in the terminal 110 or the server 120. The terminal 110 can adopt the loop filtering method in the process of encoding the input video frame, and send the encoded data to the server 120 after encoding, or receive the encoded data from the server 120 to generate the decoded video frame after decoding. The server 120 can encode the video frame, and the loop filtering method is completed in the server 120 at this time. If the server 120 needs to decode the encoded data, the loop filtering method is completed in the server 120. Of course, the server 120 can send the encoded data to the corresponding receiving terminal after receiving the encoded data sent by the terminal 110, and the receiving terminal decodes. It can be understood that the encoding end and the decoding end can be the same end or different ends. The above computer device, such as the terminal or the server, can be the encoding end or the decoding end. The terminal 110 and the server 120 are connected through a network. The terminal 110 of the embodiment of the application can be a device related to image and video playing, such as a mobile phone, a tablet computer, a computer, a notebook computer, a wearable device, a vehicle-mounted device, a liquid crystal display, a cathode ray tube display, a holographic imaging display, or a projection and other terminal devices. The embodiment of the application is not limited. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers.

[0044] FIG. 2 is a schematic diagram of a video encoder framework provided by an example of the application. As shown in FIG. 2, the video encoder framework includes modules such as intra prediction, inter prediction, motion compensation, motion estimation, transformation, quantization, inverse transformation, inverse quantization, loop filtering, decoded image buffer, and entropy coding. The video encoder framework can be applied in the server 120 and the terminal 110 as shown in FIG. 1, but is not limited thereto. The loop filtering method of the application is applied in the loop filtering module of the video encoder shown in FIG. 2.

[0045] In FIG. 2, the video encoder receives a video image, and divides the input video into CTUs. Each CTU is processed by the transformation and quantization module, and then processed by the inverse transformation and inverse quantization module to obtain a reconstructed image.

[0046] The loop filtering module receives the reconstructed image, wherein the reconstructed image includes a plurality of N*N pixel blocks, and each pixel block corresponds to a CTU, that is, a basic filtering processing unit. The loop filtering module performs a multi-level classification operation on the pixel blocks of the luminance component in the reconstructed image. In this example, it is assumed that a two-level classification operation is performed. First, a first-level classification is performed: the pixel blocks are divided into M classes according to a first preset classification method, such as a Laplacian gradient classification method, and filter coefficients corresponding to each class are calculated, that is, M filter coefficients are calculated. The M classes are filtered according to the M filter coefficients, and a cost corresponding to the first-level classification is calculated.

[0047] Then, second-level classification is performed: for part or all of the categories in the first-level classification, for each pixel block in each category, the pixel block is classified according to a second preset classification method, such as a sample residual classification method, to obtain a total of N categories. Filter coefficients corresponding to each category are calculated, that is, N filter coefficients are calculated. The N categories are filtered according to the N filter coefficients, respectively, and a cost corresponding to the second-level classification is calculated.

[0048] The costs of the first-level classification and the second-level classification are compared, and it is assumed that the cost of the second-level classification is smaller, so that the second-level classification mode is used as a target classification strategy. The pixel blocks are classified according to the second-level classification mode, and filtering is performed through the corresponding filter coefficients to obtain the component reconstruction value of the luminance component. The filter parameter information corresponding to the target classification strategy is written into the video code stream.

[0049] In another example, the framework of the video decoder is similar to that shown in FIG. 2, and the decoding side is still described by taking FIG. 2 as an example. The video decoder receives the video code stream encoded by the video encoder described above, parses the video code stream to obtain a reconstructed image and filter parameter information. In the loop filtering module of the video decoder, the loop filtering module can obtain the target classification strategy adopted in the encoding stage and the filter coefficients corresponding to each category according to the filter parameter information. The loop filtering module determines that two-level classification operations and corresponding classification modes are adopted according to the target classification strategy, so as to perform multi-level classification operations on the pixel blocks in the reconstructed image through the corresponding classification modes, and determine the categories corresponding to each pixel block. Filtering is performed according to the categories corresponding to each pixel block and the filter coefficients corresponding to the categories to obtain a target reconstructed image.

[0050] In the above examples of video encoding and decoding, the pixel block classification process in the ALF filtering is performed by using the combination and superposition (multi-level classification operation) of multiple classifiers to group, and the best grouping scheme is selected according to the corresponding filter coefficients. Then, the filter coefficients corresponding to the best grouping scheme are obtained to perform filtering, and the final reconstructed image is obtained. By using the combination and superposition of the classifiers to refer to the classification of information in multiple dimensions, the content features in the image can be more fully utilized to achieve better filtering effect and effectively improve the encoding performance.

[0051] The embodiments of the present application can be applied to various application scenarios, such as video conferencing, video monitoring, video live broadcast and other scenarios involving video coding. In the related art, only one application is selected and identified from multiple classifiers in the filtering process, and the content features in multiple dimensions cannot be reflected, which makes it difficult to achieve the optimal filtering effect. Some embodiments of the present application provide a loop filtering method, an electronic device, a storage medium and a product, which can improve the filtering effect and improve the encoding performance.

[0052] The loop filtering method is a method of filtering a reconstructed image through multi-level classification and using corresponding filter coefficients to obtain target image data in the process of video encoding and video decoding.

[0053] The loop filtering method of the embodiments of the present application can be executed on a server or a terminal.

[0054] FIG. 3 is a flowchart of a loop filtering method according to an embodiment of the present application. The loop filtering method is applied in a video encoding process. As shown in FIG. 3, the loop filtering method includes at least but is not limited to steps 310 to 350.

[0055] Step 310, obtaining a reconstructed image;

[0056] Step 320, performing n-level classification operation based on a pixel block of a target component in the reconstructed image, and determining filter coefficients corresponding to a class obtained by each level of classification operation, wherein n is an integer greater than or equal to 2;

[0057] Step 330, determining a target classification strategy and filter parameter information corresponding to the target classification strategy according to the filter coefficients corresponding to the class obtained by each level of classification operation;

[0058] Step 340, filtering the target component according to the filter parameter information to obtain a bitstream;

[0059] Step 350, writing the filter parameter information into the bitstream.

[0060] In step 310, the reconstructed image refers to an image obtained by performing operations such as transformation, quantization, inverse transformation, inverse quantization, and prediction compensation on an original image.

[0061] In step 320, the target component refers to a component type to be filtered in the reconstructed image. For example, the target component includes one of the following: a luminance component, a chrominance component, or a luminance component for cross-component adaptive loop filtering.

[0062] The pixel block refers to a basic filtering processing unit divided according to video content, or a CTU. For example, in the embodiments of the present application, a 2*2 pixel block can be used, or a 4*4 pixel block can be divided, which is not limited herein.

[0063] The n-level classification operation refers to n kinds of multi-level classification operations. For example, when n is 2, there are two kinds of classification operations, i.e., a first-level classification operation and a second-level classification operation. The object of the first-level classification operation is all pixel blocks of the target component, and the object of the second-level classification operation is all or partial classifications obtained based on the first-level classification operation. Corresponding to the classifications obtained by the classification operations, each classification corresponds to a filter class, and each filter class corresponds to a filter coefficient.

[0064] In step 330, the target classification strategy refers to the i-th level classification operation (i ∈ {1,..., n}) determined from the n-level classification operation, and the corresponding classification mode adopted. The filter parameter information refers to information for indicating whether to adopt multi-level classification, the classification strategy adopted, the classification object, the filter class, the filter coefficient, and the like.

[0065] The steps 310 to 350 described above are used in the pixel block classification process of the ALF filtering. The multi-level classification operation is used to combine and superimpose a plurality of classifiers to perform grouping, and the best grouping scheme is selected according to the corresponding filter coefficient. The filter coefficient corresponding to the best grouping scheme is obtained to perform filtering, and the final reconstructed image is obtained. By using the combination and superimposition of the classifiers, the information in multiple dimensions is referred to for classification, and the content features in the image can be more fully utilized to achieve better filtering effect and effectively improve the coding performance.

[0066] The above is a general description of the steps 310 to 350, and the specific implementation process of the steps 310 to 350 is described in detail below.

[0067] In step 320, the n-level classification operation is performed based on the pixel blocks of the target component in the reconstructed image, and the filter coefficient corresponding to the classification obtained by each level classification operation is determined, wherein n is an integer greater than or equal to 2.

[0068] In an embodiment, the first-level classification operation in the n-level classification operation of step 320 includes: using a first-level classifier to classify all pixel blocks in the reconstructed image to obtain M_1 classifications. The first-level classifier can be a pre-set classifier or a classifier obtained according to rate-distortion optimization decision.

[0069] In an embodiment, the i+1-th level classification operation in the n-level classification operation of step 320 includes:

[0070] M_i classes obtained by the i-th level classification operation, and performing i+1-th level classification on the pixel blocks of at least one class in the M_i classes by using an i+1-th level classifier to obtain M_(i+1) classes, where i is any integer in 1 to n-1. In the embodiments of the present application, the current level classification is based on part or all of the classes obtained by the previous level classification operation. First, the classes obtained by the previous level classification operation are determined to determine the to-be-classified classes that need to be classified in more detail, and then the to-be-classified classes are classified according to the classification mode corresponding to the current level classification.

[0071] For example, FIG. 4 is a schematic diagram of multi-level classification provided by an example of the present application. As shown in FIG. 4, it is assumed that two-level classification is currently performed, the first level classification uses a C1 classifier, and the second level classification uses a C2 classifier. Correspondingly, the first level classification operation divides the pixel blocks of the target component in the reconstructed image into classes 1 to M1 by using the C1 classifier.

[0072] It is assumed that it is determined that classes 1 and 3 in the M1 groups need to be classified in more detail, and then the second level classification operation classifies classes 1 and 3 by using the C2 classifier. The pixel blocks in class 1 are divided into classes 1-1 to 1-N. The pixel blocks in class 2 are divided into classes 3-1 to 3-K.

[0073] The classes after the second level classification include classes 1-1 to 1-N, class 2, classes 3-1 to 3-K, and classes 4 to M1.

[0074] The above embodiments classify part or all of the classes obtained by the previous level classification operation in more detail according to requirements, refer to information in multiple dimensions for classification by using the combination and superposition of classifiers, can more fully utilize the content features in the image, and achieve better filtering effect and effectively improve the coding performance.

[0075] In an embodiment, the i+1-th level classifier is used to perform i+1-th level classification on the pixel blocks of at least one class in the M_i classes to obtain M_(i+1) classes, including:

[0076] For each target class in the M_i classes, the i+1-th level classifier is used to perform i+1-th level classification on the pixel blocks in the target class to obtain M_(i+1) classes; the M_(i+1) classes include other classes in the M_i classes except the target class and the classes obtained by performing i+1-th level classification on the pixel blocks in the target class.

[0077] The target class refers to a class that needs to be further classified based on the classes obtained by the previous level classification operation.

[0078] Exemplarily, taking FIG. 4 as an example, as shown in the figure, the target categories at this time are category 1 and category 3 in the category 1 to category M1 obtained through the first-level classification operation. The C2 classifier is used to classify the category 1 and the category 3, and category 1-1 to category 1-N and category 3-1 to category 3-K are obtained respectively. At this time, the second-level classification operation corresponds to M2 categories, and the total number of categories is M1-2+N+K. The M2 categories include the category 2, the category 4 to the category M1 obtained through the first-level classification, and the category 1-1 to the category 1-N and the category 3-1 to the category 3-K.

[0079] In the above embodiments, the classifier refers to a processing unit or a module provided with a classification method, such as a classification method based on Laplacian gradient, a classification method based on sample residual, a classification method based on sideband information, a region division classification method, etc. In actual encoding process, a specific classifier can be selected according to the filtering effect and performance gain of the video encoder after classification, which is not limited here.

[0080] Exemplarily, the classification method based on Laplacian gradient includes the following steps:

[0081] Step a, calculating Laplacian gradient: for each 2x2 luminance block, the one-dimensional Laplacian operator gradient g h ,g v ,g d1 ,g d2 of each pixel in the 4x4 pixel block centered on the block in the horizontal 0°, vertical 90°, 135° and 45° directions is calculated.

[0082] Step b, calculating directionality factor The ratio r1 of the maximum and minimum values of the horizontal and vertical gradients, and the ratio r h,v of the maximum and minimum values of the diagonal gradients are calculated. d1,d2 Then, the horizontal / vertical edge strength E HV and the diagonal edge strength E D are calculated by comparing the two ratios with a set of pre-set threshold values Th=[1.25, 1.5, 2, 3, 4.5, 8], and finally the value of the directionality factor is obtained by table lookup.

[0083] Step c, calculating activity factor The activity factor is obtained by table lookup according to the Laplacian gradient.

[0084] Step d, calculating classification result

[0085] Wherein M D represents the directionality factor the total number of the samples.

[0086] For example, the classification method based on sample residual includes: for each 2x2 luminance block, calculating the sum of absolute values of residual samples in the 8x8 window centered on the block, and then the classification result classIdx is: classIdx=sum>>(bit_depth-4)

[0087] where bit_depth is the sample bit depth, and the above result contains a maximum of 25 classifications. In actual encoding / decoding process, the calculation method can be adjusted, and the number of classifications can be combined or increased.

[0088] For example, the classification method based on sideband information includes:

[0089] For each 2x2 luminance block, calculating the sum of all pixel values in the block, and the classification result classIdx is: classIdx=(sum*25)>(bit_depth+2)

[0090] where bit_depth is the sample bit depth, and the above result contains a maximum of 25 classifications. In actual encoding / decoding process, the calculation method can be adjusted, and the number of classifications can be combined or increased.

[0091] For example, the region division classification method includes: dividing the entire frame image or slice into multiple regions, each of which contains a continuous integer number of CTUs. The number of CTUs in each part is kept consistent. The regions of the reconstructed image luminance component are classified, for example, into 8 categories, and the number of CTUs in each category is as equal as possible.

[0092] In an embodiment, the target category includes one or more of the M_i categories. The target category refers to the category in the M_i categories that needs to be classified in more detail. The target category can be directly one of the M_i categories, or can be a fusion of several categories in the M_i categories.

[0093] In an embodiment, the target category is obtained by one of the following:

[0094] The category in the M_i categories that satisfies the first preset condition is taken as the target category;

[0095] Or,

[0096] The multiple categories in the M_i categories that satisfy the second preset condition are fused to obtain the target category;

[0097] Or,

[0098] The M_i categories are sorted according to a preset rule, and categories that meet a third preset condition among the sorted M_i categories are fused to obtain a target category.

[0099] The preset condition can be a set category identifier, and the category indicated by the category identifier is the category that meets the preset condition. For example, in FIG. 4, according to the preset category identifier, it is determined that category 1 and category 2 in the M1 categories of the first-level classification are both target categories.

[0100] The preset condition can also be a rate-distortion optimization decision selection. According to the rate-distortion optimization decision, categories that need to be reclassified or need to be fused and reclassified among the M_i categories are determined, and the categories are the categories that meet the preset condition. For example, FIG. 5 is a schematic diagram of multi-level classification based on category fusion provided by an example of the present application. As shown in FIG. 5, it is assumed that according to the rate-distortion optimization decision, categories 3, 4, and 5 in the M1 categories of the first-level classification need to be fused and reclassified. Categories 3, 4, and 5 are fused to obtain a target category.

[0101] The preset condition can also be a threshold requirement. Categories that meet the threshold requirement are the categories that meet the preset condition. For example, FIG. 6 is a schematic diagram of multi-level classification based on sorting provided by an example of the present application. As shown in FIG. 6, the M1 categories based on the first-level classification (i = 1) are sorted. The M1 categories after reordering are divided according to the threshold of the preset value. It is assumed that according to the threshold division, the last category in the sequence is category 9, category 6, and category 4. Categories 9, 6, and 4 are fused to obtain a target category.

[0102] In the above embodiments, by merging the number of classifications of part of the levels, the overall calculation amount of the classification process is reduced, and the complexity is reduced.

[0103] In an embodiment, there are multiple target categories, and the (i+1)th-level classifier corresponding to each target category is different. For the target categories determined in the results of different levels of classification, the (i+1)th-level classifier corresponding to each target category is different. For example, there are currently a first target category selected from the M1 categories of the first-level classification and a second target category selected from the M2 categories of the second-level classification, and the second-level classifier corresponding to the first target category and the third-level classifier corresponding to the second target category are different.

[0104] In another embodiment, for multiple target categories determined in the results of the same level of classification, the (i+1)th-level classifier corresponding to each target category can be the same or different. For example, there are currently two target categories selected from the M1 categories of the first-level classification, and the second-level classifier corresponding to each of the two target categories can be the same or different.

[0105] In an embodiment, the i+1th classifier is a preset classifier, or the i+1th classifier is obtained through rate-distortion optimization decision. Exemplarily, the classifier can include, but is not limited to, a Laplacian gradient-based classifier, a sample residual-based classifier, a sideband information-based classifier, and a region division classifier.

[0106] Through rate-distortion optimization decision, the most suitable classifier for the current content to be classified can be determined according to actual encoding performance needs.

[0107] In step 330, a target classification strategy and filter parameter information corresponding to the target classification strategy are determined according to the filter coefficients corresponding to the categories obtained through each classification operation.

[0108] In an embodiment, the target classification strategy at least includes the following information: which level of classification is finally adopted, which categories corresponding to each classification operation are to be subdivided, whether the categories to be subdivided need to be fused before subdivision, what the subdivided categories are, and what the filter coefficients of each category obtained through final classification are. Correspondingly, the filter parameter information is used to indicate whether multi-level classification filtering is adopted and the specific classification operation details of the above target classification strategy.

[0109] The filter parameter information includes at least one of the following: adaptive loop filtering multi-level classification filtering switch information in a sequence parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is adopted for the current video sequence; adaptive loop filtering multi-level classification filtering switch information in a picture parameter set, used to indicate the operation object of multi-level classification filtering; adaptive loop filtering multi-level classification filtering switch information in a picture header or a slice header, used to indicate whether adaptive loop filtering multi-level classification filtering is adopted for the current picture or the current slice; multi-level classification filtering switch information in an adaptive parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is adopted when using adaptive loop filtering data in the current adaptive parameter set; adaptive loop filtering multi-level classification information in an adaptive parameter set.

[0110] The adaptive loop filtering multi-level classification filtering refers to filtering based on the loop filtering method provided in the above embodiments of the present application.

[0111] In an embodiment, the adaptive loop filtering multi-level classification information in the adaptive parameter set includes at least one of the following: a classifier index of each classification level; a category index after each classification; a number of categories to be subdivided in the previous classification level; a category index to be subdivided in the previous classification level; a number of categories to be fused in the previous classification level; a category index to be fused in the previous classification level or an identifier indicating whether each category is fused; a number of categories obtained through reclassification after category fusion; and a filter coefficient corresponding to each category.

[0112] In the embodiment, based on the setting of the adaptive loop filter multi-level classification information in the adaptive parameter set, the video decoding side parses the adaptive loop filter multi-level classification information carried in the video code stream, so that the video decoding side can clearly know the specific situation of the multi-level classification operation when the loop filter is performed in the encoding process, and the filter coefficients of each category corresponding to the classification.

[0113] In an embodiment, step 330 comprises:

[0114] Based on the principle of minimum mean square error (MSE) between the original image pixels and the reconstructed image pixels, the filter coefficients corresponding to each category obtained by each classification operation are determined, and the cost parameters corresponding to each classification operation are determined according to the filter coefficients;

[0115] According to the cost parameters corresponding to each classification operation, the target classification level with the minimum cost parameter is determined;

[0116] The target classification strategy is determined according to the target classification level.

[0117] Each classification operation will obtain a corresponding number of categories, for example, the first classification operation will obtain M1 categories, and each category will correspond to a filter. For each category, the pixel blocks in the category are taken as a whole, and the filter coefficients corresponding to the category are calculated based on the principle of minimum mean square error (MSE) between the original image pixels and the reconstructed image pixels using the Wiener-Hoff equation.

[0118] For example, assume that there are three levels of classification, i.e., first-level classification, second-level classification, and third-level classification. The process of loop filtering is as follows:

[0119] 1) Obtain the reconstructed value of the current reconstructed image, take a 2*2 pixel block as the basic filter processing unit, use the first classifier C1 to perform first-level classification on each pixel block of the luminance component of the reconstructed image, and obtain M1 categories;

[0120] 2) For the pixel block categories obtained in step 1), calculate the filter coefficients corresponding to each category and perform the filtering operation to calculate the cost parameter corresponding to the first-level classification;

[0121] 3) Based on the first-level classification, for each category, use the second classifier C2 to perform subdivision to obtain M2 categories; recalculate the filter coefficients corresponding to each category and perform the filtering operation to calculate the cost parameter corresponding to the second-level classification;

[0122] 4) On the basis of the second-level classification, for each category, a third classifier C3 is used for subdivision, obtaining M3 categories; the filter coefficients corresponding to each category are recalculated, and a filtering operation is performed to calculate the cost parameters corresponding to the third-level classification;

[0123] 5) From the cost parameters corresponding to the three different classification levels, the classification level corresponding to the minimum cost is selected. The classification operation of this classification level is taken as the optimal classification method, i.e., the target classification strategy. A filtering operation is performed to obtain the video coding code stream corresponding to the reconstructed image;

[0124] 6) The ALF filtering parameter information of the multi-level classification is written into the video coding code stream.

[0125] In the embodiment, the filter coefficients corresponding to each classification operation are used to calculate the corresponding cost parameters, and the optimal multi-level classification method is selected based on the cost while classifying the information in multiple dimensions, so as to better improve the loop filtering performance and improve the filtering effect.

[0126] In another embodiment, the n-level classification operation has multiple rounds, and the first-level classifier used in each round of n-level classification operation is different. Step 330 includes:

[0127] For the n-level classification operation of the current round, the filter coefficients corresponding to the categories obtained by each classification operation are determined based on the minimum mean square error (MSE) principle between the original image pixels and the reconstructed image pixels, and the cost parameters corresponding to each classification operation are determined according to the filter coefficients. The target classification level with the minimum cost parameter is determined according to the cost parameters corresponding to each classification operation, the candidate classification strategy is obtained according to the target classification level, and the cost parameter corresponding to the candidate classification strategy is determined.

[0128] From the candidate classification strategies obtained by each round of n-level classification operation, the candidate classification strategy with the minimum cost parameter is selected as the target classification strategy.

[0129] Among them, the multiple rounds of n-level classification operation means that different first-level classifiers are used for first-level classification, and subsequent levels of classification are performed according to the preset classifier. The number of different first-level classifiers corresponds to the number of rounds of n-level classification operation.

[0130] Exemplarily, it is assumed that there are a first classifier C1, a second classifier C2, and a third classifier C3. The process of loop filtering is as follows:

[0131] 1) Obtain the current reconstructed image, and use 2*2 pixel blocks as the basic filtering processing unit. The first classifier C1, the second classifier C2, and the third classifier C3 are used to perform first-level classification on each pixel block of the luminance component of the reconstructed image, respectively. M 1-1 categories, M1-2 M 1-3 categories.

[0132] 2) Based on M 1-1 M 1-2 M 1-3 categories, second-level and third-level classification is performed according to a preset classifier order; that is, three rounds of 3-level classification operations are performed in total;

[0133] 3) Filter coefficients corresponding to each round of 3-level classification operation are calculated, and a filtering operation is performed to calculate a corresponding cost parameter;

[0134] 4) The costs of filtering performed by each round of 3-level classification operation are compared, and a classification mode corresponding to a round of 3-level classification operation with the minimum cost is selected, a filtering operation is performed, and a video coding bitstream corresponding to a reconstructed image is obtained;

[0135] 5) ALF filtering parameter information of multi-level classification is written into the video coding bitstream.

[0136] In another example, it is also assumed that there are a first classifier C1, a second classifier C2, and a third classifier C3. The process of performing loop filtering is as follows:

[0137] 1) A reconstructed image is obtained, and a 2*2 pixel block is used as a basic filtering processing unit. The first classifier C1, the second classifier C2, and the third classifier C3 are respectively used to perform first-level classification on each pixel block of the luminance component of the reconstructed image; M 1-1 M 1-2 M 1-3 categories are obtained. That is, in this example, three rounds of n-level classification operations are required. It is assumed that the first round corresponds to first-level classification performed by using the first classifier C1, the second round corresponds to first-level classification performed by using the second classifier C2, and the third round corresponds to first-level classification performed by using the third classifier C3.

[0138] 2) For each round of multi-level classification operation, the following steps are used to determine a candidate classification strategy corresponding to the round of multi-level classification operation. Taking the first round as an example:

[0139] a. For the M 1-1 categories obtained in step 1), filter coefficients corresponding to each category are calculated, a filtering operation is performed, and a cost parameter corresponding to the first-level classification is calculated;

[0140] b. On the basis of the first-level classification, for each category, a preset classifier is used to perform second-level subdivision to obtain M 2- 1 category; filter coefficients corresponding to each category are recalculated, a filtering operation is performed, and a cost parameter corresponding to the second-level classification is calculated;

[0141] c. On the basis of the second classification, for each category, a preset classifier is used for third-level subdivision, and M 3- 1 category; the filter coefficients corresponding to each category are recalculated, and the filtering operation is performed to calculate the cost parameters corresponding to the third-level classification;

[0142] d. From the cost parameters corresponding to the three different classification levels, the classification level corresponding to the minimum cost is selected, and the classification strategy corresponding to the classification level is taken as the candidate classification strategy.

[0143] It should be noted that the operations of the second round and the third round are the same, and will not be repeated here.

[0144] 3) Compare the costs of filtering the three candidate classification strategies obtained from step 2), select the classification mode corresponding to the candidate classification strategy with the minimum cost, perform the filtering operation, and obtain the video coding bitstream corresponding to the reconstructed image;

[0145] 5) Write the ALF filtering parameter information of the multi-level classification into the video coding bitstream.

[0146] The loop filtering method of the present application will be specifically described in the following two examples. It can be understood that the following examples are only for better illustrating the loop filtering method of the present application on the video coding side, and are not limited.

[0147] Example 1:

[0148] The present example provides a multi-level classification adaptive loop filtering method applied in the video coding process. At the encoding end, the reconstructed image to be filtered includes a plurality of N*N pixel blocks, and each pixel block is a basic filtering processing unit. First, the pixel blocks are coarsely classified according to a first classification principle, the filter coefficients are calculated, then part or all of the categories are refined using a second classification principle, and a second group of filter coefficients are calculated. According to the rate-distortion optimization algorithm, it is determined which classification mode to use, and the classification mode is identified in the video bitstream.

[0149] FIG. 7 is a flowchart of the adaptive loop filtering method using multi-level classification provided by an example of the present application. As shown in FIG. 7, the specific process is as follows:

[0150] The reconstructed value of the current image is obtained, and for the luminance component, a 2*2 pixel block is taken as a basic filtering unit. A first classifier C1 is used to perform first-level classification on each pixel block of the luminance component of the reconstructed image to obtain M1 categories. It should be noted that the 2*2 pixel block is only an example for illustration, and in the actual encoding process, other sizes can be flexibly adjusted according to the video content. The first classifier C1 can support multiple classification methods, which can include but are not limited to: a classification method based on Laplacian gradient, a classification method based on sample residual, a classification method based on sideband information, and a region division classification method.

[0151] For the M1 categories obtained by the first-level classification, there are M1 filter categories. For each filter category, all 2*2 pixel blocks using the filter category are taken as a whole, and the Wiener-Hoff equation is used to obtain the coefficients of the filter category, so that the minimum mean square error (MSE) between the output value of the ALF filtering of the luminance component and the original pixel value is minimized, and M1 groups of filter coefficients are obtained.

[0152] For all or part of the M1 categories obtained by the first-level classification, for the corresponding 2*2 pixel blocks in each category, a second classifier C2 is used for second-level classification, and a total of M2 categories are obtained. Referring to FIG. 4, in this example, the second classifier C2 is used for second-level classification on category 1 and category 3 in the M1 categories. The first classifier C1 and the second classifier C2 are not the same. The second classifier C2 also supports multiple classification methods, including but not limited to the four classification methods described above. The actual encoding process can be selected according to the filtering effect and performance gain after classification of the encoder.

[0153] For the M2 categories obtained by the second-level classification, there are M2 filter categories. For each filter category, all 2*2 pixel blocks using the filter category are taken as a whole, and the Wiener-Hoff equation is used to obtain the coefficients of the filter category, so that the minimum mean square error (MSE) between the output value of the ALF filtering of the luminance component and the original pixel value is minimized, and M2 groups of filter coefficients are obtained.

[0154] The cost of the filtering scheme corresponding to the M1 groups of filter coefficients and the M2 groups of filter coefficients is calculated respectively, the minimum cost scheme is selected as the final filtering scheme, the filtering process is completed according to the related filter coefficients, the component reconstructed value of the luminance component is obtained, and the filtering scheme related parameter information is written into the video encoding bitstream.

[0155] The ALF filtering related parameter information is usually represented in syntax structures such as adaptive parameter set (APS), picture header (PH), slice header (SH), etc. In this example, the video bitstream parameter information at least includes one of the following:

[0156] 1) ALF multi-class filter switch in Sequence Parameter Set (SPS);

[0157] 2) ALF multi-class filter switch in Picture Parameter Set (PPS);

[0158] 3) ALF multi-class filter switch in Picture Header (PH) or Slice Header (SH);

[0159] 4) ALF multi-class filter switch in Adaptation Parameter Set (APS), and ALF multi-class information.

[0160] It should be noted that the above multi-class ALF filtering method applied to the luminance component is only one of the application examples, and the multi-class ALF filtering is also applicable to chrominance ALF filtering and cross-component ALF filtering.

[0161] Example II:

[0162] The present example provides a loop filtering method based on multi-classifier class fusion, which is applied to a video encoding process. First, each pixel block in the reconstructed image is classified according to a first classification principle to obtain M1 classes, and filter coefficients are calculated and filter operation calculation costs are performed. Since the image usually contains rich detail information, the classification scheme obtained by the current classifier cannot guarantee good filtering effect in each class. Therefore, some classes are merged, and a second classification principle is used for second classification, and filter coefficients are calculated and filter operation calculation costs are performed. Finally, according to a rate-distortion optimization algorithm, it is decided which classes need to be fused and reclassified, the best filtering scheme is selected for ALF filtering processing to obtain a reconstructed value, and relevant parameter information is written into a video encoding bitstream.

[0163] FIG. 8 is a flowchart of a loop filtering method based on multi-classifier class fusion according to another example of the present application. As shown in FIG. 8, the specific process is as follows:

[0164] A reconstructed image of a current video is obtained, and for the luminance component, a 2*2 pixel block is used as a basic filtering processing unit, a first classifier C1 is used to perform first classification on each pixel block of the luminance component of the reconstructed image to obtain M1 classes. It should be noted that the 2*2 pixel block is only an example for illustration, and in the actual encoding process, other sizes can be flexibly adjusted according to the video content. The first classifier C1 can support multiple classification methods, which can include but are not limited to: a Laplacian gradient-based classification method, a sample residual-based classification method, an edge information-based classification method, and a region division classification method. In the actual encoding process, the specific selection can be made according to the filtering effect and performance gain after classification by the encoder.

[0165] For the M1 categories obtained by the first-level classification, there are M1 filter classes. For each filter class, all 2*2 pixel blocks using the filter class are taken as a whole, and the coefficients of the filter class are solved by using the Wiener-Hoff equation, so that the minimum mean square error (MSE) between the output values of the luminance component after ALF filtering and the original pixel values is minimized, to obtain M1 groups of filter coefficients.

[0166] For the M1 categories obtained by the first-level classification, the pixel blocks corresponding to the middle categories are fused according to a preset rule. Referring to FIG. 5, in this example, it is assumed that the rate-distortion optimization decision is used as the preset rule, and categories 3, 4, and 5 are selected from the M1 categories for category fusion. The fused whole is classified in a second-level classification. The second classifier C2 also supports multiple classification methods, and the second classifier C2 is different from the first classifier C1.

[0167] The pixel blocks after category fusion are classified again by using the second classifier C2, and a total of M2 categories are obtained. The M2 categories correspond to M2 filter classes. For each filter class, all 2*2 pixel blocks using the filter class are taken as a whole, and the coefficients of the filter class are solved by using the Wiener-Hoff equation, so that the minimum mean square error (MSE) between the output values of the luminance component after ALF filtering and the original pixel values is minimized, to obtain M2 groups of filter coefficients.

[0168] The pixel blocks after category fusion are classified again by using the third classifier C3, and a total of M3 categories are obtained. The M3 categories correspond to M3 filter classes. For each filter class, all 2*2 pixel blocks using the filter class are taken as a whole, and the coefficients of the filter class are solved by using the Wiener-Hoff equation, so that the minimum mean square error (MSE) between the output values of the luminance component after ALF filtering and the original pixel values is minimized, to obtain M3 groups of filter coefficients.

[0169] The costs of the filter schemes corresponding to the M1 groups of filter coefficients, the M2 groups of filter coefficients, and the M2 groups of filter coefficients are calculated respectively, the scheme with the minimum cost is selected as the final filter scheme, the filter processing is completed according to the related filter coefficients, the component reconstruction value of the luminance component is obtained, and the filter scheme related parameter information is written into the video coding bitstream.

[0170] The multi-level classification ALF filtering method applied to the luminance component is only one of the application examples, and the multi-level classification ALF filtering is also applicable to chroma ALF filtering and cross-component ALF filtering.

[0171] In the above examples, in the process of loop filtering, the pixel blocks are grouped by using the combination of multiple classifiers (multi-level classification operation), and the optimal grouping scheme is selected according to the corresponding filter coefficients. The filter coefficients corresponding to the optimal grouping scheme are obtained, and the final reconstructed image is obtained by filtering. By using the combination of multiple classifiers, the information in multiple dimensions is referred to for classification, so that the content features in the image can be more fully utilized, and better filtering effect can be achieved to effectively improve the coding performance.

[0172] FIG. 9 is a flowchart of a loop filtering method according to another embodiment of the present application. The loop filtering method is applied in a video decoding process. As shown in FIG. 9, the loop filtering method includes at least but is not limited to steps 910 to 940.

[0173] In step 910, a bitstream is received, and the bitstream is decoded to obtain a reconstructed image and filter parameter information.

[0174] In step 920, a one-level or multi-level classification operation is performed on the pixel blocks of the reconstructed image according to the filter parameter information, and the category corresponding to each pixel block is determined.

[0175] In step 930, filter coefficients of multiple categories are obtained according to the filter parameter information.

[0176] In step 940, the pixel blocks of the reconstructed image are filtered according to the category corresponding to each pixel block and the filter coefficients corresponding to the category, to obtain a target reconstructed image.

[0177] In step 910, the bitstream refers to a video bitstream obtained by video encoding using the loop filtering method according to any of the embodiments of the present application. The reconstructed image refers to an image obtained after transformation, quantization, inverse transformation and inverse quantization in a decoder. The filter parameter information refers to information such as the multi-level classification manner and the corresponding filter coefficients used in the corresponding encoding stage of the bitstream.

[0178] In step 920, if the classification manner indicated in the filter parameter information is one-level classification, the pixel blocks of the target component of the reconstructed image are classified in one level. If the classification manner indicated in the filter parameter information is multi-level classification, the pixel blocks of the target component of the reconstructed image are classified in multiple levels.

[0179] In step 930, the filter coefficients correspond to the categories obtained by classification in step 920.

[0180] In step 940, the category corresponding to the pixel block classification in the decoding stage should be consistent with the category corresponding to the pixel block in the classification manner finally determined in the encoding stage. The target reconstructed image refers to an image obtained by filtering the reconstructed image obtained by decoding.

[0181] The steps 910 to 940 described above are to obtain the multi-level classification manner and the corresponding filter coefficients finally used in the encoding stage by decoding from the bitstream, and classify and filter the pixel blocks in the reconstructed image obtained by decoding. In the pixel block classification process, the optimal grouping scheme determined in the encoding stage and the corresponding filter coefficients are used for filtering, and the classification is performed by referring to the information in multiple dimensions in a combined and superimposed manner by the classifier, which can more fully utilize the content features in the image to achieve better filtering effect.

[0182] The above is a general description of steps 910 to 940, and the specific implementation process of steps 910 to 940 will be described in detail below.

[0183] In step 910, the bitstream is received and decoded to obtain the reconstructed image and the filtering parameter information.

[0184] In an embodiment, the filtering parameter information includes at least one of the following:

[0185] The adaptive loop filter multi-level classification filter switch information in the sequence parameter set is used to indicate whether the adaptive loop filter multi-level classification filter is used in the current video sequence; the adaptive loop filter multi-level classification filter switch information in the picture parameter set is used to indicate the operation object of the multi-level classification filter; the adaptive loop filter multi-level classification filter switch information in the image header or slice header is used to indicate whether the adaptive loop filter multi-level classification filter is used in the current image or the current slice; the multi-level classification filter switch information in the adaptive parameter set is used to indicate whether the adaptive loop filter multi-level classification filter is used when the adaptive loop filter data in the current adaptive parameter set is used; and the adaptive loop filter multi-level classification information in the adaptive parameter set.

[0186] The adaptive loop filter multi-level classification filter refers to the multi-level classification and filtering of pixel blocks by using the multi-level classification operation and the corresponding filter coefficients. The multi-level classification operation and the corresponding filter coefficients are determined in the encoding process based on the loop filter method provided in the above embodiments of the present application.

[0187] In an embodiment, the adaptive loop filter multi-level classification information in the adaptive parameter set includes at least one of the following: the classifier index of each classification level; the class index after each classification level; the number of classes to be subdivided in the previous classification level; the class index to be subdivided in the previous classification level; the number of classes to be fused in the previous classification level; the class index to be fused in the previous classification level or the identifier indicating whether each class is fused; the number of classes obtained after class fusion; and the filter coefficients corresponding to each target class.

[0188] In the embodiment, the video decoding side parses the adaptive loop filtering multi-level classification information carried in the video code stream from the video code stream. Thus, the video decoding side can clearly know the specific situation of the multi-level classification operation when the loop filtering is performed in the encoding process, and the filter coefficients of each category corresponding to the classification.

[0189] In step 920, a one-level or multi-level classification operation is performed on the pixel blocks of the reconstructed image according to the filtering parameter information, and the category corresponding to each pixel block is determined.

[0190] In an embodiment, the filtering parameter information includes adaptive loop filtering multi-level classification filter switch information and adaptive loop filtering multi-level classification information. Step 920 includes:

[0191] The adaptive loop filtering multi-level classification filter switch information is obtained to determine whether the adaptive loop filtering multi-level classification filter is used for the reconstructed image.

[0192] When it is determined that the adaptive loop filtering multi-level classification filter is used for the reconstructed image, the adaptive loop filtering multi-level classification information is obtained.

[0193] The adaptive loop filtering multi-level classification information is used to determine the classification operation information of each level, wherein the classification operation information of each level includes at least one of the following: a classifier used in the current classification level, a category index after classification in the current classification level, a category index to be subdivided in the previous classification level, and a category index to be fused in the previous classification level.

[0194] The multi-level classification operation is performed according to the classification operation information of each level.

[0195] For example, taking the multi-level classification shown in FIG. 4 as an example. In the encoding stage, the second-level classification mode shown in FIG. 4 is finally used for classification and filtering. Correspondingly, in the decoding stage, after the decoder decodes the filtering parameter information, the adaptive loop filtering multi-level classification filter switch information is obtained, and it is determined that the adaptive loop multi-level classification filter is used for the reconstructed image.

[0196] The decoder can determine, through the obtained adaptive loop filtering multi-level classification information, that the second-level classification operation is used, wherein the C1 classifier is used in the first classification level, the categories in the first classification level are category 1 to category M1, the C2 classifier is used in the second classification level, and the categories to be subdivided in the first classification level are category 1 and category 3.

[0197] After the above classification operation information is determined, the decoder performs the second-level classification operation on the pixel blocks of the reconstructed image, and a total of M2 categories are divided, including category 1-1 to category 1-N, category 2, category 3-1 to category 3-K, category 4 to category M1.

[0198] In the above embodiments, the pixel blocks in the reconstructed image are classified by using the optimal grouping scheme determined in the encoding stage, and the information in multiple dimensions is referenced for classification by means of the classifier combination superposition, so that the content features in the image can be more fully utilized.

[0199] In an embodiment, the multi-stage classification operation is an n-stage classification operation, where n is greater than or equal to 2.

[0200] The first-stage classification operation in the n-stage classification operation includes: classifying all the pixel blocks in the reconstructed image by using a first-stage classifier to obtain M_1 categories.

[0201] The i+1-stage classification operation in the n-stage classification operation includes: obtaining the M_i categories obtained by the i-stage classification operation, performing i+1-stage classification on the pixel blocks in at least one category of the M_i categories by using an i+1-stage classifier to obtain M_(i+1) categories corresponding to the i+1-stage classification operation, where i is any integer in 1 to n-1.

[0202] In an embodiment, performing i+1-stage classification on the pixel blocks in at least one category of the M_i categories by using an i+1-stage classifier includes:

[0203] determining a category to be subdivided in the M_i categories, and classifying the pixel blocks in the category to be subdivided by using the i+1-stage classifier;

[0204] Or,

[0205] determining a category to be merged in the M_i categories, merging the category to be merged to obtain a target category, and classifying the pixel blocks in the target category by using the i+1-stage classifier.

[0206] It should be noted that the specific description and effects of the n-stage classification operation in the above embodiments are the same as the corresponding parts of each embodiment of the loop filtering method applied to the video encoding process, and will not be repeated here.

[0207] The loop filtering method of the present application will be specifically described in the following two examples. It can be understood that the following examples are only used to better illustrate the loop filtering method of the video decoding process of the present application, and are not limited in specific.

[0208] Example 1

[0209] The present example provides an adaptive loop filtering method using multi-stage classification, which is applied to the video decoding process to filter the reconstructed frame in the video. The decoder can identify the classifier type and multi-stage classification scheme used for pixel block classification according to the parsed adaptive loop filtering parameter information, and perform filtering processing. The specific steps are as follows:

[0210] The decoder parses the parameter information in the encoded video bitstream, decodes the encoded video data, and obtains the reconstructed image. Parsing the parameter information in the encoded video bitstream includes identifying APS parameter set information. The APS subset is a subset of filter coefficients generated according to the reconstructed image of the current video using the Wiener filtering principle.

[0211] The decoder determines that the classification manner of the pixel block adopts multi-level classification according to the ALF filtering parameter information in the encoded video bitstream.

[0212] The decoder determines the multi-level classification information of the pixel block according to the ALF filtering parameter information in the encoded video bitstream, including: the type of the classifier used in each classification level, the class index of each classification level, the class index that needs to be subdivided by other classifiers in the upper level, and the filter coefficients corresponding to the pixel block of each final class.

[0213] The ALF filtering parameter information in the video bitstream at least includes one of the following: 1) ALF multi-level classification filtering method switch in the sequence parameter set (SPS): determines whether the current video sequence adopts the ALF multi-level classification filtering method; 2) ALF multi-level classification filtering method switch in the picture parameter set (PPS): determines the operation level of the multi-level classification filtering method, that is, the video unit to which the filter information is applied (which can be applied to a reconstructed image (picture) or to one or more slices of the reconstructed image); 3) ALF multi-level classification filtering method switch in the picture header (PH) or slice header (SH): determines whether the current picture or the current slice adopts the ALF multi-level classification filtering method; 4) ALF multi-level classification filtering method switch in the adaptive parameter set (APS): determines whether the ALF multi-level classification filtering method is used when using the ALF data in the current parameter set; 5) ALF multi-level classification information in the adaptive parameter set (APS): including: the number of pixel block classification levels; the classifier index used in the first level of pixel block classification; the class index of the pixel block classification in the first level; the number of pixel block classes to be subdivided in the upper level; the pixel block class index to be subdivided in the upper level; the classifier index used by the pixel block to be subdivided in the upper level; the filter coefficients corresponding to the final classification manner;

[0214] The decoder classifies the pixel block of the reconstructed image according to the classification manner of the pixel block determined in the above steps. Taking the multi-level classification manner shown in FIG. 4 as an example, referring to FIG. 4: obtaining the reconstructed value of the current image, for the luminance component, taking the 2*2 pixel block as the basic filtering processing unit, using the C1 classifier to perform the first-level classification on each pixel block of the luminance component of the reconstructed image according to the classifier index used in the first level of pixel block classification, and obtaining M1 classes.

[0215] The decoder determines that the categories 1 and 3 in the first-level categories need to be subdivided according to the number of pixel block categories to be subdivided and the category index of the pixel block to be subdivided, and determines the C2 classifier according to the classifier index used by the pixel block to be subdivided, and performs second-level classification on the categories 1 and 3 to be subdivided by using the C2 classifier, and obtains M2 filter categories.

[0216] The decoder performs filtering processing on each type of sample according to the corresponding filter coefficient, to obtain a reconstructed image.

[0217] Example two:

[0218] The present example provides a loop filtering method based on multi-classifier category fusion, which is applied to a video decoding process to perform filtering processing on a reconstructed frame in a video. A decoder can identify a category fusion scheme used by a pixel block after initial classification, and perform filtering processing. The specific steps are as follows:

[0219] The decoder parses the parameter information in the encoded video bitstream, decodes the encoded video data, and obtains a reconstructed image.

[0220] The decoder determines a classification method of category fusion to be used to classify the pixel block according to the ALF filtering parameter information in the encoded video bitstream.

[0221] The decoder determines the pixel block category fusion information according to the ALF filtering parameter information in the encoded video bitstream, including: the classifier type used by the initial classification, the classifier type used by the reclassification after fusion, the category index of the initial classification, the category index to be fused in the initial classification, and the filter coefficient corresponding to the pixel block of each final category.

[0222] The ALF filter parameter information in the video code stream includes at least one of the following: 1) an ALF category fusion classification switch in a sequence parameter set (SPS): determining whether the current video sequence uses the ALF category fusion classification method; 2) an ALF category fusion classification switch in a picture parameter set (PPS): determining the operation level of the ALF category fusion classification method; 3) an ALF category fusion classification switch in a picture header (PH) or a slice header (SH): determining whether the current picture or the current slice uses the ALF category fusion classification method; 4) an ALF category fusion classification switch in an adaptive parameter set (APS): determining whether the ALF category fusion classification method is used when using the ALF data in the current parameter set; 5) ALF category fusion classification information in the adaptive parameter set (APS): including: a classifier index used in initial classification; a classifier index of re-classification after category fusion; a category index of a pixel block after initial classification; a number of categories to be fused in initial classification, and a category index to be fused in initial classification; or an identifier of whether each category in initial classification is fused; a number of categories obtained by re-classification after category fusion; and filter coefficients corresponding to the final classification method.

[0223] The decoder classifies the pixel blocks of the reconstructed image according to the classification method determined in the above steps. Assuming that the classification method is the multi-level classification method based on category fusion shown in FIG. 5, referring to FIG. 5: obtaining the reconstructed value of the current picture, for the luminance component, taking a 2*2 pixel block as a basic filter processing unit, using the C1 classifier to perform first-level classification on each pixel block of the luminance component of the reconstructed image according to the classifier index used in initial classification, and obtaining M1 categories.

[0224] For the M1 filter categories obtained by first-level classification, the decoder identifies the categories to be fused (category 3, category 4, and category 5) according to the number of categories to be fused in initial classification and the category index to be fused in initial classification, and fuses the pixel blocks corresponding to the category 3, the category 4, and the category 5, and re-classifies using the C2 classifier, and a total of M2 filter categories are obtained.

[0225] The decoder completes the filter processing according to the filter coefficients corresponding to the final classification method, and obtains the component reconstructed value of the luminance component.

[0226] In the above examples, in the process of loop filtering at the decoding side, the best grouping scheme obtained in the encoding stage and the corresponding filter coefficients are determined according to the filter parameter information to perform filtering, and the final reconstructed image is obtained. By referring to information in multiple dimensions through the combination and superposition of classifiers, the content features in the image can be more fully utilized to achieve better filtering effect.

[0227] FIG. 10 is a structural schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 10, the electronic device 2000 includes a memory 2100 and a processor 2200. The number of the memory 2100 and the processor 2200 can be one or more, and one memory 2101 and one processor 2201 are taken as an example in FIG. 10. The memory 2101 and the processor 2201 in the network device can be connected through a bus or other means, and connection through a bus is taken as an example in FIG. 10.

[0228] The memory 2101 is a kind of computer readable storage medium, which can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method provided by any embodiment of the present application. The processor 2201 realizes the loop filtering method provided by any embodiment of the present application by running the software programs, instructions and modules stored in the memory 2101.

[0229] The memory 2101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function. In addition, the memory 2101 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device or other non-volatile solid-state storage device. In some examples, the memory 2101 further includes a memory remotely arranged with respect to the processor 2201, and these remote memories can be connected to the device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0230] An embodiment of the present application also provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the loop filtering method provided by any embodiment of the present application.

[0231] An embodiment of the present application also provides a computer program product, which includes a computer program or computer instructions stored in a computer readable storage medium, and a processor of a computer device reads the computer program or computer instructions from the computer readable storage medium. The processor executes the computer program or computer instructions, so that the computer device executes the loop filtering method provided by any embodiment of the present application.

[0232] The system architecture and application scenarios described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It can be known by those skilled in the art that, with the evolution of system architecture and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0233] Those of ordinary skill in the art will understand that all or some of the steps, functions, modules / units in the methods disclosed above and in the systems, devices can be implemented as software, firmware, hardware, or appropriate combinations of them.

[0234] In a hardware implementation, the division of functionality between the functional modules / units referred to in the above description does not necessarily correspond to a division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components acting in cooperation. Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application- specific integrated circuit. Such software can be distributed on computer readable media, which can comprise computer storage media (or non-transitory media), and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, it should be understood by those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.

[0235] As used in this description, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process or thread of execution and a component can be localized, either in whole or in part, in a single computer or distributed among multiple computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components can communicate by way of local or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, distributed system, or across a network such as the Internet with other systems via the signal).

[0236] The above describes some embodiments of the present application with reference to the accompanying drawings, and is not limited to the scope of the present application. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and essence of the present application shall be within the scope of the present application.

Claims

1. A loop filtering method, the method comprising: obtaining a reconstructed image; performing an n-level classification operation based on a pixel block of a target component in the reconstructed image, and determining filter coefficients corresponding to a class obtained in each classification operation, wherein n is an integer greater than or equal to 2; determining a target classification strategy and filter parameter information corresponding to the target classification strategy according to the filter coefficients corresponding to the class obtained in each classification operation; filtering the target component according to the filter parameter information to obtain a bitstream; writing the filter parameter information into the bitstream.

2. The method of claim 1, wherein, The (i+1)th level classification operation in the n-level classification operation includes: obtaining the M obtained from the i-th level classification operation. i The M categories are processed using a (i+1)th level classifier. i Pixel blocks from at least one of the categories are classified at level i+1 to obtain M. i+1 There are n categories, where i is any integer from 1 to n-1.

3. The method of claim 2, wherein, The adopting the i+1th classifier to perform i+1th classification on the pixel block of at least one of the M i categories, to obtain M i+1 categories, comprises: For each target category in the M i categories, the i+1th-level classifier is used to perform i+1th-level classification on the pixel blocks in the target category, to obtain M i+1 categories. The M i+1 The M i The other categories in the M The category obtained after the (i+1)th classification of the pixel block in the target category.

4. The method of claim 3, wherein, The target category includes one or more of the M i categories.

5. The method of claim 4, wherein, The target class is obtained by one of the following: The M i category that meets the first preset condition as the target category; or The M i categories satisfying the second preset condition are fused to obtain the target category. or According to a preset rule, the M i categories are sorted, and categories in the sorted M i categories that meet a third preset condition are fused to obtain the target category.

6. The method of any one of claims 3-5, wherein, The target class has multiple target classes, and each target class corresponds to a different i+1-level classifier.

7. The method of any one of claims 3-5, wherein, The i+1-level classifier is a preset classifier, or the i+1-level classifier is a classifier obtained through rate-distortion optimization decision.

8. The method of claim 1 or 2, wherein, The first-level classification operation in the n-level classification operation includes: classifying all pixel blocks in the reconstructed image using a first-level classifier to obtain M1 classes.

9. The method of claim 1, wherein, The target component includes one of the following: a luma component, a chroma component, or a luma component used for cross-component adaptive loop filtering.

10. The method of claim 1, wherein, The filter parameter information includes at least one of the following: adaptive loop filtering multi-level classification filtering switch information in a sequence parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is used in a current video sequence; adaptive loop filtering multi-level classification filtering switch information in a picture parameter set, used to indicate an operation object of multi-level classification filtering; adaptive loop filtering multi-level classification filtering switch information in a picture header or a slice header, used to indicate whether adaptive loop filtering multi-level classification filtering is used in a current picture or a current slice; multi-level classification filtering switch information in an adaptive parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is used when adaptive loop filtering data in the current adaptive parameter set is used; adaptive loop filtering multi-level classification information in the adaptive parameter set.

11. The method of claim 10, wherein, The adaptive loop filtering multi-level classification information in the adaptive parameter set includes at least one of the following: a classifier index of each classification level; a class index after each classification level; a number of classes to be subdivided in a previous classification level; a class index to be subdivided in the previous classification level; a number of classes to be fused in the previous classification level; a class index to be fused in the previous classification level or an identifier indicating whether each class is fused; a number of classes obtained after reclassification of class fusion; filter coefficients corresponding to each class.

12. The method of claim 1, wherein, Determining the target classification strategy according to the filter coefficients corresponding to the class obtained in each classification operation includes: determining filter coefficients corresponding to the class obtained in each classification operation based on a minimum mean square error (MSE) principle between original image pixels and reconstructed image pixels, and determining a cost parameter corresponding to each classification operation according to the filter coefficients; determining a target classification level with a minimum cost parameter according to the cost parameters corresponding to each classification operation; determining the target classification strategy according to the target classification level.

13. The method of claim 1, wherein, The n-level classification operation has multiple rounds, and the first-level classifier used in each round of the n-level classification operation is different; The target classification strategy is determined according to filter coefficients corresponding to the category obtained by each level of classification operation, and the target classification strategy comprises: For the n-level classification operation of the current round, filter coefficients corresponding to the category obtained by each level of classification operation are determined based on the principle of minimum mean square error (MSE) between the original image pixels and the reconstructed image pixels, and a cost parameter corresponding to each level of classification operation is determined according to the filter coefficients; a target classification level with the minimum cost parameter is determined according to the cost parameters corresponding to the classification operations of all levels; a candidate classification strategy is obtained according to the target classification level, and a cost parameter corresponding to the candidate classification strategy is determined; From the candidate classification strategies obtained by each round of the n-level classification operation, the candidate classification strategy with the minimum cost parameter is selected as the target classification strategy.

14. A loop filtering method, the method comprising: receiving a bitstream and decoding the bitstream to obtain a reconstructed image and filter parameter information; performing one-level or multi-level classification operation on a pixel block of the reconstructed image according to the filter parameter information, to determine a category corresponding to each pixel block; obtaining filter coefficients of multiple categories according to the filter parameter information; filtering the pixel block of the reconstructed image according to the category corresponding to the pixel block and the filter coefficients corresponding to the category, to obtain a target reconstructed image.

15. The method of claim 14, wherein, The filter parameter information comprises at least one of: adaptive loop filtering multi-level classification filter switch information in a sequence parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is used for a current video sequence; adaptive loop filtering multi-level classification filter switch information in a picture parameter set, used to indicate an operation object of multi-level classification filtering; adaptive loop filtering multi-level classification filter switch information in a picture header or a slice header, used to indicate whether adaptive loop filtering multi-level classification filtering is used for a current picture or a current slice; multi-level classification filter switch information in an adaptive parameter set, used to indicate whether adaptive loop filtering multi-level classification filtering is used when adaptive loop filtering data in a current adaptive parameter set is used; adaptive loop filtering multi-level classification information in an adaptive parameter set.

16. The method of claim 15, wherein, The adaptive loop filtering multi-level classification information in the adaptive parameter set comprises at least one of: a classifier index of each level of classification; a category index after each level of classification; a number of categories to be subdivided in a previous classification level; a category index to be subdivided in the previous classification level; a number of categories to be fused in the previous classification level; a category index to be fused in the previous classification level or an identifier indicating whether each category is fused; a number of categories obtained after category fusion; a filter coefficient corresponding to each target category.

17. The method of claim 14, wherein, The filter parameter information comprises adaptive loop filtering multi-level classification filter switch information and adaptive loop filtering multi-level classification information, and the one-level or multi-level classification operation performed on the pixel block of the reconstructed image according to the filter parameter information to determine the category corresponding to each pixel block comprises: obtaining adaptive loop filter multi-level classification filter switch information to determine whether the reconstructed image adopts adaptive loop filter multi-level classification filter; obtaining adaptive loop filter multi-level classification information when it is determined that the reconstructed image adopts adaptive loop filter multi-level classification filter; determining per-level classification operation information according to the adaptive loop filter multi-level classification information, wherein the per-level classification operation information comprises at least one of the following: a classifier used by a current classification level, a class index after classification of the current classification level, a class index to be subdivided in a previous classification level, and a class index to be merged in the previous classification level; performing the multi-level classification operation according to the per-level classification operation information.

18. The method of any one of claims 14-17, wherein, The multi-level classification operation is an n-level classification operation, and n is greater than or equal to 2. The first-level classification operation in the n-level classification operation comprises: performing classification on all pixel blocks in the reconstructed image by using a first-level classifier to obtain M1 classes. The i+1th classification operation in the n-level classification operation includes: obtaining M i categories obtained by the i th classification operation, performing i+1th classification on the pixel block of at least one category in the M i categories by using an i+1th classifier, to obtain M i+1 categories corresponding to the i+1th classification operation, wherein i is any integer in 1 to n-1.

19. The method of claim 18, wherein, performing an i+1-level classification on the pixel block of at least one of the M i categories using an i+1-level classifier, including: determining the M i categories to be subdivided in the M i categories, and classifying the pixel blocks of the categories to be subdivided using an i+1th classifier. Alternatively, determining the M i classes to be fused in the M classes, fusing the classes to be fused to obtain a target class, and classifying pixel blocks of the target class using an (i+1)th classifier.

20. An electronic device, comprising: one or more processors; a memory having one or more programs stored thereon, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement: the loop filtering method according to any one of claims 1-13; or the loop filtering method according to any one of claims 14-19.

21. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements: the loop filtering method according to any one of claims 1-13; or the loop filtering method according to any one of claims 14-19.

22. A computer program product, comprising a computer program, wherein the computer program, when executed by a processor, implements: the loop filtering method according to any one of claims 1-13; or the loop filtering method according to any one of claims 14-19.

Citation Information

Patent Citations

  • Loop filtering method and device

    CN112514401A

  • Loop filtering method, video encoding method, video decoding method, electronic device and medium

    CN115842914A

  • Loop filtering method, video encoding and decoding method and device, medium and electronic equipment

    CN116456086A

  • Adaptive upsampling filter for luma and chroma with reference picture resampling (RPR)

    CN116965024A

  • Method and apparatus for adaptive loop filter with chroma classifiers by transpose indexes for video coding

    WO2024067188A1