Loop filtering method, video decoding method, video encoding method, loop filtering device, video decoding device, video encoding device, electronic device and computer program

By increasing block classification categories and optimizing filter selection in CC-ALF based on luma component classification, the method addresses low classification accuracy in CC-ALF, enhancing encoding and decoding efficiency.

JP7717267B2Active Publication Date: 2025-08-01TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024516715
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-01-07
Filing Date
2022-12-09
Publication Date
2025-08-01
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

Current Cross-Component Adaptive Loop Filtering (CC-ALF) designs in video encoding and decoding suffer from low classification accuracy, leading to inferior performance due to limited categories and rough adaptation selection at the CTU level, affecting the adaptability and filtering efficiency.

Method used

The proposed method increases the number of categories for block classification in CC-ALF by leveraging the classification results of the luma component to determine the classification of the chroma component, optimizing filter selection and merging processes to improve accuracy and adaptability, and enhancing the filtering performance.

Benefits of technology

This approach improves the accuracy of content classification and adaptability of CC-ALF, leading to enhanced encoding and decoding efficiency by optimizing filter selection and merging processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007717267000011
    Figure 0007717267000011
  • Figure 0007717267000012
    Figure 0007717267000012
  • Figure 0007717267000013
    Figure 0007717267000013
Patent Text Reader

Abstract

The embodiments of the present application provide a loop filtering method, a video encoding / decoding method, an apparatus, a medium, and an electronic device, which includes the steps of: acquiring block classification information when performing adaptive loop filtering on a luma component in a video image frame (S710); determining block classification information when performing cross-component adaptive loop filtering on a chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component (S720); and selecting corresponding filter coefficients based on the block classification information when performing cross-component adaptive loop filtering on the chroma components, and performing cross-component adaptive loop filtering on the chroma components (S730).
Need to check novelty before this filing date? Find Prior Art

Description

Related Applications

[0001] This application claims priority based on a Chinese patent application filed with the China National Intellectual Property Administration on January 7, 2022, with an application number of 2022100178140 and an application title of "Loop Filtering Method, Video Encoding / Decoding Method, Apparatus, Medium, and Electronic Device", and incorporates all of its content herein by reference.

Technical Field

[0002] This application relates to the technical fields of computers and communications. Specifically, it relates to a loop filtering method, video Decoding method, video encoding Encoding method method, Loop filtering device, video decoding apparatus, Video encoding device electronic device and computer program related thereto.

Background Art

[0003] Cross-Component Adaptive Loop Filtering (abbreviated as CC-ALF) is a type of Wiener filter that can adaptively generate and use different filter coefficients according to the characteristics of video content (such as game videos, online meeting videos, etc.).

[0004] In the current CC-ALF design, it is necessary to adaptively select filter coefficients by classification, but there is often a problem of low classification accuracy, resulting in inferior performance during cross-component adaptive loop filtering.

Summary of the Invention

Problems to be Solved by the Invention

[0005] According to various embodiments of the present application, a loop filtering method, video Decoding method, video encoding Encoding method method, Loop filtering device, video decoding apparatus, Video encoding device electronic device and computer program are provided.

Means for Solving the Problems

[0006] According to one aspect of the embodiments of the present application, there is provided a loop filtering method executed by a video encoding device or a video decoding device, the method including: obtaining block classification information when performing adaptive loop filtering on a luma component in a video image frame; determining, based on the block classification information when performing adaptive loop filtering on the luma component, block classification information when performing cross-component adaptive loop filtering on a chroma component in the video image frame; and selecting a corresponding filter coefficient based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, and performing a cross-component adaptive loop filtering process on the chroma component.

[0007] According to one aspect of the embodiments of the present application, there is provided a video decoding method executed by a video decoding device, the method including: obtaining block classification information when performing adaptive loop filtering on a luma component in a video image frame; determining, based on the block classification information when performing adaptive loop filtering on the luma component, block classification information when performing cross-component adaptive loop filtering on a chroma component in the video image frame; selecting a corresponding filter coefficient based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, and performing a cross-component adaptive loop filtering process on the chroma component; and decoding a video bitstream based on the adaptive loop filtering process result of the luma component and the cross-component adaptive loop filtering process result of the chroma component.

[0008] According to one aspect of the embodiments of the present application, a video encoding method executed by a video encoding device includes: obtaining block classification information when performing adaptive loop filtering on a luma component in a video image frame; determining block classification information for performing cross-component adaptive loop filtering on a chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; selecting a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component, and performing cross-component adaptive loop filtering processing on the chroma component; and based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component, The above encoding the video image frame to obtain a video bitstream. A video encoding method including the above steps is provided.

[0009] According to one aspect of the embodiments of the present application, a loop filtering apparatus is provided, which includes: an obtaining unit configured to obtain block classification information when performing adaptive loop filtering on a luma component in a video image frame; a determining unit configured to determine block classification information for performing cross-component adaptive loop filtering on a chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; and a filtering unit configured to select a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component, and perform cross-component adaptive loop filtering processing on the chroma component.

[0010] According to one aspect of the embodiments of the present application, an acquisition unit configured to acquire block classification information when performing adaptive loop filtering on a luma component in a video image frame, and based on the block classification information when performing adaptive loop filtering on the luma component, a determination unit configured to determine block classification information when performing cross-component adaptive loop filtering on a chroma component in the video image frame, and based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, a filtering unit configured to select a corresponding filter coefficient and perform cross-component adaptive loop filtering processing on the chroma component, and a first processing unit configured to decode a video bit stream based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component, are provided in a video decoding apparatus.

[0011] According to one aspect of the embodiments of the present application, an acquisition unit configured to acquire block classification information when performing adaptive loop filtering on a luma component in a video image frame, and based on the block classification information when performing adaptive loop filtering on the luma component, a determination unit configured to determine block classification information when performing cross-component adaptive loop filtering on a chroma component in the video image frame, and based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, a filtering unit configured to select a corresponding filter coefficient and perform cross-component adaptive loop filtering processing on the chroma component, and based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component The above A video encoding apparatus is provided, which includes a second processing unit configured to encode a video image frame to obtain a video bit stream.

[0012] According to one aspect of the embodiments of the present application, there is provided an electronic device including a memory storing computer-readable instructions and a processor that, when executing the computer-readable instructions, implements the methods provided in the various alternative embodiments described above.

[0013] According to one aspect of the embodiments of the present application, there is provided a computer storage medium storing computer-readable instructions that, when executed by a processor, implement the methods provided in the various alternative embodiments described above.

[0014] According to one aspect of the embodiments of the present application, there is provided a computer program including computer-readable instructions that, when executed by a processor, implement the methods provided in the various alternative embodiments described above. The mu is is provided.

[0015] Details of one or more embodiments of the present application are shown in the following drawings and description. Other features, objects, and advantages of the present application will become apparent from the specification, drawings, and claims.

Brief Description of the Drawings

[0016] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following briefly introduces the drawings that need to be used in the description of the technical solutions in the embodiments or in the prior art. The drawings described below are only the embodiments of the present application. Naturally, those skilled in the art can obtain other drawings based on the disclosed drawings without any creative effort.

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Embodiments for Carrying Out the Invention

[0017] Hereinafter, with reference to the drawings of the embodiments of the present application, the technical solutions of the embodiments of the present application will be clearly and completely described. Naturally, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without inventive labor should belong to the protection scope of the present application.

[0018] Moreover, the features, structures, or characteristics described in this application can be incorporated into one or more embodiments in any suitable form. In the following description, many specific details are provided to fully understand the embodiments of this application. However, those skilled in the art will recognize that when implementing the technical solution of this application, not all detailed features in the embodiments are necessarily required, and one or more specific details can be omitted, or other methods, elements, devices, steps, etc. can be adopted.

[0019] The block diagrams shown in the drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be realized in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0020] The flowcharts shown in the drawings are merely illustrative and do not necessarily need to include all contents and operations / steps, nor do they have to be executed in the described order. For example, some of these operations / steps can be decomposed, while others can be merged or partially merged, so the actual execution order may vary depending on the situation.

[0021] It should be understood that the "plurality" referred to in this specification means two or more. "And / or" describes the association of related objects and indicates that three relationships are possible. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0022] Figure 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of this application can be applied.

[0023] As shown in FIG. 1, the system architecture 100 includes a plurality of terminal devices that can communicate with each other, for example, via a network 150. By way of example, the system architecture 100 may include a first terminal device 110 and a second terminal device 120 interconnected via the network 150. In the embodiment of FIG. 1, the first terminal device 110 and the second terminal device 120 perform unidirectional data transmission.

[0024] By way of example, the first terminal device 110 can encode video data (e.g., a video picture stream collected by the first terminal device 110) and transmit it to the second terminal device 120 via the network 150. The encoded video data is transmitted in the form of one or more encoded video bitstreams, and the second terminal device 120 receives the encoded video data from the network 150, decodes the encoded video data to restore the video data, and can display a video picture based on the restored video data.

[0025] In one embodiment of the present application, the system architecture 100 may include a third terminal device 130 and a fourth terminal device 140 that perform bidirectional transmission of encoded video data. This bidirectional transmission may be performed, for example, during a video conference. In the case of bidirectional data transmission, each of the third terminal device 130 and the fourth terminal device 140 can encode video data (e.g., a video picture stream collected by the terminal device) and transmit it via the network 150 to the other terminal device among the third terminal device 130 and the fourth terminal device 140. Each of the third terminal device 130 and the fourth terminal device 140 can also receive the encoded video data transmitted by the other terminal device among the third terminal device 130 and the fourth terminal device 140, decode the encoded video data to restore the video data, and can display a video picture on an accessible display device based on the restored video data.

[0026] In the embodiment of FIG. 1, the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140 can be a server or a terminal. The server may be an independent physical server, or may be a server cluster or a distributed system composed of multiple physical servers. Furthermore, it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal may be a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, smart home appliances, an in-vehicle terminal, an aircraft, etc., but is not limited thereto.

[0027] Network 150 represents any number of networks that transmit encoded video data among the first terminal device 110, the second terminal device 120, the third terminal device 130, and the fourth terminal device 140, and includes, for example, wired and / or wireless communication networks. 。Ne The network 150 can exchange data through a circuit-switched and / or packet-switched channel. This network may include a telecommunications network, a local area network, a wide area network, and / or the Internet. For the purposes of this application, the architecture and topology of network 150 may not be important for the operations disclosed in this application, unless otherwise described below.

[0028] In one embodiment of the present application, FIG. 2 shows an arrangement form of a video encoding device and a video decoding device in a streaming environment. The subject matter disclosed in the present application is equally applicable to other video-related applications, including, for example, video conferencing, digital TV (television), storage of compressed video on digital media such as CDs, DVDs, and memory sticks.

[0029] The streaming system may include a collection subsystem 213 that can include a video source 201 such as a digital camera that creates an uncompressed video picture stream 202. In an embodiment, the video picture stream 202 includes samples taken by a digital camera. The video picture stream 202 is depicted as a thick line to emphasize the high-data-volume video picture stream as compared to the encoded video data 204 (or encoded video bitstream 204), and the video picture stream 202 can be processed by an electronic device 220 that includes a video encoding device 203 coupled to the video source 201. The video encoding device 203 can include hardware, software, or a combination of software and hardware to implement or carry out each aspect of the disclosed subject matter described in more detail below. As compared to the video picture stream 202, the encoded video data 204 (or encoded video bitstream 204) is depicted as a thin line to emphasize the low-data-volume encoded video data 204 (or encoded video bitstream 204), and the encoded video data 204 (or encoded video bitstream 204) can be stored in a streaming server 205 for future use. One or more streaming client subsystems, such as client subsystem 206 and client subsystem 208 in FIG. 2 for example, can access the streaming server 205 to retrieve copies 207 and 209 of the encoded video data 204. The client subsystem 206 may include, for example, a video decoding device 210 in an electronic device 230. The video decoding device 210 decodes an incoming copy 207 of the encoded video data and generates an output video picture stream 211 that can be displayed on a display 212 (e.g., a display screen) or other display device. In some streaming systems, the encoded video data 204, Copy 207 (Video data) , and Copy 209 (Video data)(For example, a video bitstream) may be encoded according to some video encoding / compression standard.

[0030] Note that the electronic device 220 and the electronic device 230 may include other components not shown in the figure. For example, the electronic device 220 may include a video decoding device, and the electronic device 230 may further include a video encoding device.

[0031] In one embodiment of the present application, taking the international video encoding standards HEVC (High Efficiency Video Coding), VVC (Versatile Video Coding), and the Chinese national video encoding standard AVS as examples, when one video frame image is input, the video frame image is divided into a plurality of non-overlapping processing units according to one block size, and similar compression operations are performed on each processing unit. This processing unit is called a CTU or an LCU (Largest Coding Unit). The CTU can be further divided into one or more basic coding units CU (Coding Unit), and the CU is the most basic element in the process of encoding.

[0032] Some concepts when encoding the CU will be described below.

[0033] Predictive Coding: Predictive coding includes methods such as intra-frame prediction and inter-frame prediction. After predicting the original video signal with the selected reconstructed video signal, a residual video signal is obtained. The encoding side needs to determine which predictive coding mode to select for the current CU and notify the decoding side. Here, intra-frame prediction means that the predicted signal is from the encoded and reconstructed area within the same image. Inter-frame prediction means that the predicted signal is from another encoded image (referred to as a reference image) different from the current image.

[0034] Transform & Quantization: After performing transformation operations such as DFT (Discrete Fourier Transform) and DCT (Discrete Cosine Transform) on the residual video signal, the signal is transformed into the transform domain and is called the transform coefficient. Since the transform coefficient further undergoes an irreversible quantization operation and certain information is lost, the quantized signal becomes advantageous for compression representation. In some video coding standards, there may be multiple selectable transformation methods, so the encoding side needs to select one of them for the current CU and notify the decoding side. The fineness of quantization is usually determined by the quantization parameter (abbreviated as QP). The larger the possible value of QP, the larger the range of possible values of the coefficients that are quantized to the same output, indicating that usually, it results in greater distortion and a lower bit rate. Conversely, the smaller the possible value of QP, the smaller the range of possible values of the coefficients that are quantized to the same output, indicating that usually, it results in smaller distortion while corresponding to a higher bit rate.

[0035] Entropy Coding or Statistical Coding: The quantized transform domain signal is statistically compressed and encoded according to the frequency of occurrence of each value, and finally, a compressed bit stream binarized (0 or 1) is output. At the same time, other information such as the selected coding mode and motion vector data is generated by the coding, and entropy coding is required to reduce the bit rate. Statistical coding is a reversible coding method that can effectively reduce the bit rate required to represent the same signal. Common statistical coding methods include variable length coding (abbreviated as VLC) or context adaptive binary arithmetic coding (abbreviated as CABAC).

[0036] The context-adaptive binary arithmetic coding (CABAC) process mainly includes three steps: binarization, context modeling, and binary arithmetic coding. After binarizing the input syntax element, the binary data can be coded in the conventional coding mode and the bypass coding mode. In the bypass coding mode, it is not necessary to assign a specific probability model to each binary bit, and by directly coding the bin value of the input binary bit with a simple bypass encoder, the overall coding and decoding speed can be improved. Generally, different syntax elements are not completely independent of each other, and the same syntax element itself also has a certain memory property. Therefore, according to the conditional entropy theory, performing conditional coding using other coded syntax elements can further improve the coding performance compared with independent coding or memoryless coding. These coded symbol information used as conditions are called contexts. In the conventional coding mode, the binary bits of the syntax element are sequentially input into the context modeler, and the encoder assigns an appropriate probability model to each input binary bit according to the value of the previously coded syntax element or binary bit. This process is context modeling. The context model corresponding to the syntax element can be found through ctxIdxInc (context index increment) and ctxIdxStart (context index start). After sending the bin value into the binary arithmetic encoder for coding together with the assigned probability model, it is necessary to update the context model according to the bin value, which is the adaptation process in coding.

[0037] Loop Filtering: For the transformed and quantized signals, inverse quantization, inverse transformation, and prediction compensation operations are performed to obtain a reconstructed image. Compared with the original image, due to the influence of quantization, some information in the reconstructed image is different from the original image, that is, distortion occurs in the reconstructed image. Therefore, a filtering operation can be performed on the reconstructed image to effectively reduce the degree of distortion caused by quantization. These filtered reconstructed images are used as references for later image coding for the prediction of future image signals. Therefore, the above filtering operation is also called loop filtering, which is a filtering operation within the coding loop.

[0038]

Number

[0039] In the above encoding procedure, loop filtering is one of the core modules of video encoding and can effectively remove various encoding distortions. The latest generation of international video encoding standard, VVC, supports four different types of loop filters: Deblocking filter (abbreviated as DF), Sample Adaptive Offset (abbreviated as SAO), Adaptive Loop Filter (abbreviated as ALF), and Cross-Component Adaptive Loop Filter (CC-ALF).

[0040] Optionally, the overall structure of VVC and the loop filtering process are shown in FIG. 4, and the overall procedure may be the same as the encoder procedure shown in FIG. 3. In loop filtering, ALF and CC-ALF are a type of Wiener filter, and since the filter coefficients can be adaptively determined according to the content of different video components, the mean square error (abbreviated as MSE) between the reconstructed component and the original component can be reduced. Here, the input of ALF is the reconstructed pixel value after DF and SAO filtering, and the output is the enhanced reconstructed luma image and the reconstructed chroma image. On the other hand, the input of CC-ALF is the luma component after DF and SAO filtering and before ALF processing, and the output is the correction value of the corresponding chroma component. That is, CC-ALF acts only on the chroma component. Specifically, by utilizing the correlation between the luma component and the chroma component, a correction value of the chroma component is obtained through linear filtering of the luma component, and the sum of this correction value and the chroma component after ALF filtering is used as the final reconstructed chroma component. As a type of adaptive filter, the Wiener filter can generate different filtering coefficients for video contents with different characteristics. Therefore, for ALF and CC-ALF, it is necessary to classify the video contents and use the corresponding filters for the video contents of each category. In the current VVC design, ALF for the luma component supports 25 different categories of filters, ALF for each chroma component supports up to 8 different categories of filters, and CC-ALF for each chroma component supports up to 4 different categories of filters.

[0041]

Number

[0042]

Number

[0043] In the above formula, R(k, l) represents the reconstructed pixel value before ALF filtering at the (k, l) position, R(k - 1, l) represents the reconstructed pixel value before ALF filtering at the (k - 1, l) position, R(k + 1, l) represents the reconstructed pixel value before ALF filtering at the (k + 1, l) position, R(k, l - 1) represents the reconstructed pixel value before ALF filtering at the (k, l - 1) position, R(k, l + 1) represents the reconstructed pixel value before ALF filtering at the (k, l + 1) position, R(k - 1, l - 1) represents the reconstructed pixel value before ALF filtering at the (k - 1, l - 1) position, R(k + 1, l + 1) represents the reconstructed pixel value before ALF filtering at the (k + 1, l + 1) position, R(k - 1, l + 1) represents the reconstructed pixel value before ALF filtering at the (k - 1, l + 1) position, and R(k + 1, l - 1) represents the reconstructed pixel value before ALF filtering at the (k + 1, l - 1) position.

[0044]

Number

[0045] Here, i and j represent the pixel coordinates of the upper left corner of the 4×4 pixel block.

[0046]

Number

[0047]

Number

[0048] The directional feature D is derived by comparing the maximum and minimum values of the gradient values in four directions obtained from formulas (8) and (9), and specifically, it is performed as follows.

[0049]

Number

[0050] Here, t1 and t2 are set constants.

[0051]

Number

[0052] Also, before filtering each 4×4 luma component pixel block, according to the rules shown in Table 1 below, depending on the gradient value of the current block, geometric transformations including No transformation, Diagonal, Vertical flip, and Rotation are performed on the filter coefficients and the corresponding clipping values. Here, applying a geometric transformation to the filter coefficients is equivalent to applying the geometric transformation to the pixel values without changing the coefficients and then performing filtering. The purpose of the geometric transformation is to reduce the number of classifications required for ALF by aligning the directions of the contents of different blocks as much as possible and to make different pixels share the same filter coefficients. Using geometric transformation can increase the actual classification from 25 categories to 100 categories without increasing the number of ALF filters, improving its adaptability.

[0053]

Table 1

[0054] Above, the classification and geometric transformation process of the luma component pixel block by ALF have been described. Next, the filtering and classification process by CC-ALF will be described.

[0055] CC-ALF generates corresponding correction values for each chroma component by linearly filtering the luma component, and its procedure and relationship with ALF are shown in FIG. 5. The SAO-filtered luma component R YInput it into the ALF filter, perform filtering processing on the luma component, and output the value Y of the luma component. At the same time, the value R after the luma component is SAO filtered Y Input it into the CC-ALF filter, perform filtering processing on the two chroma components Cb and Cr respectively, and obtain the correction values ΔR Cb and ΔR Cr of the two chroma components. Input the values of the two chroma components after SAO filtering into the ALF filter, perform filtering on the chroma components, and then superimpose the correction values ΔR Cb and ΔR Cr on the filtering results of the two chroma components by the ALF filter respectively, and finally output the values Cb and Cr of the chroma components.

[0056] Specifically, the filtering process by CC-ALF can be shown by the following formula (11).

[0057]

Equation

[0058] Here, ΔR i (x,y) represents the correction value (i.e., offset value) of chroma component i at sample position (x,y). S i represents the filtering region supported by the CC-ALF filter with the luma component. c i (x0,y0) represents the filter coefficient corresponding to chroma component i. R Y represents the luma component. (x c ,y C ) represents the position of the luma component obtained from the chroma component. (x0,y0) represents the offset position corresponding to the luma component, and the offset position corresponding to the luma component is obtained by converting the coordinates of the chroma component according to the scaling relationship between the luma and chroma corresponding to the video sequence.

[0059] CC-ALF supports the 3×4 diamond filter shown in FIG. 6. Compared with ALF, since the filter coefficients of CC-ALF have no symmetry restriction, it can flexibly adapt to the relative relationships between multiple types of luma components and chroma components. Also, in order to reduce the filter coefficients that need to be transmitted, in the current VVC design, CC-ALF sets the following two restrictions on its filter coefficients. That is, 1. Since the sum of all the coefficients of CC-ALF is restricted to 0, for the 3×4 diamond filter, only 7 filter coefficients need to be calculated and transmitted, and the filter coefficient at the central position can be automatically estimated on the decoding side according to this condition. 2. The absolute value of each filter coefficient that needs to be transmitted must be a power of 2 and can be represented by a maximum of 6 bits. Therefore, the absolute value of the filter coefficient of CC-ALF takes values in {0, 2, 4, 8, 16, 32, 64}. In this design, shift operations can be used instead of multiplication operations to reduce the number of multiplication operations.

[0060] Unlike ALF for luma components that supports classification and adaptive selection at the sub-block level, CC-ALF only supports classification and adaptive selection at the CTU level. For each chroma component, all chroma pixels within one CTU belong to the same category and use the same filter.

[0061] In addition, one APS (Adaptation Parameter Set) can include up to 25 sets of luma filter coefficients and corresponding clipping value indexes, up to 8 sets of chroma filter coefficients and corresponding clipping value indexes for two chroma components, and up to 4 sets of CC-ALF filter coefficients for each chroma component. In order to save the code rate, in the case of the ALF filter of the luma component, since filter coefficients of different categories can be merged, multiple categories share one set of filter coefficients. The encoding side determines which category of coefficients can be merged by rate-distortion optimization (abbreviated as RDO), and at the same time marks the index of the APS used for the current slice in the slice header. CC-ALF supports adaptation at the CTU level. When there are multiple filters, it adaptively selects whether to use CC-ALF and the index of the filter to be used for each chroma component at the CTU level.

[0062] In the current CC-ALF design, only up to 4 filters are supported for each chroma component, that is, only up to 4 different categories are supported. The upper limit of the categories causes poor distinguishability between different categories, and the rough adaptation selection at the CTU level causes poor distinguishability between different contents. All of these reduce the accuracy of content classification in CC-ALF, reduce the adaptation ability of CC-ALF, and moreover, affect the performance of CC-ALF.

[0063] Based on this, in the technical solution of the embodiment of the present application, the number of categories of block classification when performing CC-ALF for the chroma component can be increased, the accuracy of content classification in CC-ALF can be improved, and moreover, the adaptation ability and filtering performance of CC-ALF can be improved, and a new technical solution that is beneficial to improving the encoding and decoding efficiency is proposed.

[0064] Details of the realization of the technical solution of the embodiment of the present application will be described in detail below.

[0065] FIG. 7 shows a flowchart of a loop filtering method according to an embodiment of the present application, and this loop filtering method can be executed by a video encoding device or a video decoding device. As shown in FIG. 7, this loop filtering method includes at least steps S710 to S730, which will be described in detail below.

[0066] In step S710, block classification information for performing adaptive loop filtering on the luma component in a video image frame is obtained.

[0067] Here, the block classification information is information indicating the classification result at the subblock level, and the block classification information may be identification information corresponding to the classification category. Specifically, for example, it may be a classification index.

[0068] Optionally, for the block classification process when performing ALF on the luma component, specific classification indexes can be calculated with reference to the aforementioned formulas (1) to (10), and further, the block classification information for performing ALF on the luma component can be determined.

[0069] In step S720, based on the block classification information for performing adaptive loop filtering on the luma component, block classification information for performing cross-component adaptive loop filtering on the chroma component in the video image frame is determined.

[0070] In one embodiment of the present application, the classification result of the sub-block when performing ALF on the luma component can be used as the classification result of the block of the same size when performing CC-ALF on the chroma component. For example, assuming that the classification result when performing ALF on the luma component of a certain sub-block indicates that the sub-block belongs to the third category, then when performing CC-ALF on the chroma component of the sub-block, it also belongs to the third category. That is, the category when performing ALF on the luma component of the sub-block can be common with the category when performing CC-ALF.

[0071] Since there are many classification categories when performing ALF on the luma component, by using the classification result of the sub-block when performing ALF on the luma component as the classification result of the block of the same size when performing CC-ALF on the chroma component, the category of block classification when performing CC-ALF on the chroma component can be increased, the accuracy of content classification in CC-ALF can be improved, and moreover, the adaptability and filtering performance of CC-ALF can be improved, which is beneficial to the improvement of encoding / decoding efficiency.

[0072] In one embodiment of the present application, the classification result and the corresponding geometric transformation type of the sub-block when performing ALF on the luma component can be used as the classification result and the geometric transformation type of the block of the same size when performing CC-ALF on the chroma component. In the technical solution of this embodiment, similarly, the category of block classification when performing CC-ALF on the chroma component can be increased, the accuracy of content classification in CC-ALF can be improved, and moreover, the adaptability and filtering performance of CC-ALF can be improved, which is beneficial to the improvement of encoding / decoding efficiency.

[0073] In step S730, based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, the corresponding filter coefficient is selected, and cross-component adaptive loop filtering processing is performed on the chroma component.

[0074] Optionally, for each category of block classification when performing CC-ALF on the chroma component, the corresponding filter coefficients can be determined respectively. Further, based on the block classification information when performing CC-ALF on the chroma component, the corresponding filter coefficients can be selected, and CC-ALF processing can be performed on the chroma component.

[0075] In one embodiment of the present application, based on the merging results of various filters when performing ALF on the luma component, the merging results of various filters when performing CC-ALF on the chroma component can also be determined. For example, the merging results of various filters when performing ALF on the luma component are used as the merging results of various filters when performing CC-ALF on the chroma component. In the specific implementation process, merging various filters when performing ALF can be performed by traversing each possible merging method, merging at least two ALF filters, calculating the corresponding rate-distortion cost, and obtaining the merging result according to the merging method with the minimum rate-distortion cost, so as to obtain the merging results of various filters when performing ALF. By merging filters, the filter coefficients to be transmitted can be minimized as much as possible, and the code rate can be saved.

[0076] In one embodiment of the present application, based on the rate-distortion cost of merging filters during ALF of the luma component and the rate-distortion cost of merging filters during CC-ALF of the chroma component, when performing ALF on the luma component and when performing CC-ALF on the chroma component, the merging results of various filters can also be determined. In the technical solution of this embodiment, the ALF of the luma component and the CC-ALF of the chroma component can be jointly optimized to simultaneously determine the merging results of various filters by the ALF of the luma component and the CC-ALF of the chroma component.

[0077] In one embodiment of the present application, based on the number of filters determined when performing ALF on the luma component, the number of available filters when performing CC-ALF on the chroma component can be determined. For example, the number of filters determined when performing ALF on the luma component can be used as the number of available filters when performing CC-ALF on the chroma component.

[0078] Note that the loop filtering method of the embodiment shown in FIG. 7 can be applied to the encoding process on the video encoding side and can also be applied to the decoding process on the video decoding side.

[0079] FIG. 8 shows a flowchart of a video encoding method according to an embodiment of the present application, and this video encoding method can be executed by a video encoding device. As shown in FIG. 8, this video encoding method includes at least steps S810 to S840, which will be described in detail below.

[0080] In step S810, block classification information when performing ALF on the luma component in a video image frame is obtained.

[0081] In step S820, based on the block classification information when performing ALF on the luma component, block classification information when performing CC-ALF on the chroma component in the video image frame is determined.

[0082] In step S830, based on the block classification information when performing CC-ALF on the chroma component, corresponding filter coefficients are selected, and CC-ALF processing is performed on the chroma component.

[0083] For the description and implementation forms regarding steps S810 to S830, reference can be made to the above-described embodiments.

[0084] In step S840, based on the ALF processing result of the luma component and the CC-ALF processing result of the chroma component, a video image frame is encoded to obtain a video bitstream. Specifically, based on the block classification information when performing ALF on the luma component, the corresponding filter coefficients are determined, and based on the filter coefficients, ALF processing is performed on the luma component to obtain the ALF processing result. Thereby, based on the ALF processing result and the CC-ALF processing result, a video image frame can be encoded to obtain a video bitstream.

[0085] In the video encoding method shown in FIG. 8, the category of block classification when performing CC-ALF on the chroma component can be increased, the accuracy of content classification in CC-ALF can be improved, and furthermore, the adaptation ability and filtering performance of CC-ALF can be improved, which is advantageous for improving the encoding efficiency.

[0086] In the embodiment of the present application, the block classification policy in the video encoding method shown in FIG. 8 (that is, determining the block classification information when performing CC-ALF on the chroma component based on the block classification information when performing ALF on the luma component) can be used alone or in combination with other classification policies (for example, the classification policy in the related art). The following describes the two cases respectively.

[0087] Regarding the case of using the block classification policy shown in FIG. 8 alone

[0088] In one embodiment of the present application, when using the block classification policy shown in FIG. 8 alone, the encoding side can encode a first flag bit corresponding to the current slice of the video image frame in the video bitstream. The value of this first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of the target block in the current slice (that is, the CC-ALF processing method adopting the block classification policy in FIG. 8). In this embodiment, since the block classification policy shown in FIG. 8 is used alone, the first flag bit corresponding to the current slice can directly indicate whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of the target block in the current slice.

[0089] Optionally, if the value of the first flag bit is a first value (for example, 1), it indicates to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of some target blocks in the current slice, or to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of all target blocks in the current slice.

[0090] If the value of the first flag bit is a second value (for example, 0), it indicates not to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of all target blocks in the current slice.

[0091] In one embodiment of the present application, the first flag bit is a slice-level flag bit. When the value of the first flag bit indicates that the CC-ALF processing method proposed in the embodiment of the present application is adopted for the chroma components of all target blocks in the current slice, or indicates that the CC-ALF processing method proposed in the embodiment of the present application is not adopted for the chroma components of all target blocks in the current slice, there is no need to encode the block-level flag bit. On the other hand, when the value of the first flag bit indicates that the CC-ALF processing method proposed in the embodiment of the present application is adopted for the chroma components of some target blocks in the current slice, the encoding side can obtain by encoding the second flag bits corresponding to each target block included in the current slice in the video bitstream, and the value of this second flag bit indicates whether the CC-ALF processing method proposed in the embodiment of the present application is adopted for the chroma component of the corresponding target block. That is, in this embodiment, in addition to the slice-level flag bit, which target block's chroma component needs to adopt the CC-ALF processing method proposed in the embodiment of the present application can be indicated by the block-level flag bit (i.e., the second flag bit).

[0092] Optionally, since there are two chroma components (Cr and Cb), for one target block, one second flag bit can be set for each of the two chroma components of the target block, and the value of each second flag bit indicates whether the CC-ALF processing method proposed in the embodiment of the present application is adopted for the corresponding chroma component in the target block.

[0093] As an optional processing form, the two chroma components (Cr and Cb) of the target block may correspond to the same second flag bit, and the value of this same second flag bit indicates whether the CC-ALF processing method proposed in the embodiment of the present application is adopted for the two chroma components in the target block.

[0094] Similarly, for the current slice, one first flag bit can be set for each of the two chroma components of the current slice, and the value of each first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the corresponding chroma component in the current slice.

[0095] As an optional processing mode, the two chroma components of the current slice may correspond to the same first flag bit, and the value of this same first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the two chroma components in the current slice.

[0096] It should be noted that when one first flag bit is set for each of the two chroma components at the slice level, one second flag bit can also be set for each of the two chroma components at the block level. When one second flag bit is set for each of the two chroma components at the block level, it is only necessary to set one first flag bit for each of the two chroma components at the slice level.

[0097] In one embodiment of the present application, the encoding side can determine whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma components of each target block by means of the rate distortion optimization method. Specifically, the encoding side calculates the first rate distortion cost when adopting the CC-ALF processing proposed in the embodiment of the present application for the chroma components of each target block, and also calculates the second rate distortion cost when not performing the CC-ALF processing for the chroma components of each target block. Then, based on the first rate distortion cost and the second rate distortion cost, it can be determined whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma components of each target block. For example, if the first rate distortion cost corresponding to the chroma component of a certain target block is smaller than the second rate distortion cost, it implies that the CC-ALF processing method proposed in the embodiment of the present application is adopted for the chroma component of this target block. Also, if the first rate distortion cost corresponding to the chroma component of a certain target block is larger than the second rate distortion cost, it implies that the CC-ALF processing method proposed in the embodiment of the present application is not adopted for the chroma component of this target block. By calculating the rate distortion cost and determining whether to adopt the CC-ALF processing method proposed in the embodiment of the present application, it is possible to save the rate distortion cost as much as possible while guaranteeing the encoding efficiency.

[0098] Note that when determining whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma components of each target block, it can be determined separately for the two chroma components of each target block (that is, calculate the corresponding rate distortion costs separately), or it can also be determined simultaneously for the two chroma components of each target block (that is, add the rate distortion costs).

[0099] Regarding the case of using the block classification policy shown in FIG. 8 and other classification policies simultaneously

[0100] In one embodiment of the present application, when using the block classification policy shown in FIG. 8 and other classification policies simultaneously, when performing encoding, it is necessary to encode a third flag bit corresponding to the current slice in the video bitstream, and the value of this third flag bit indicates whether to perform CC-ALF processing on the chroma component of the target block in the current slice. If it is necessary to perform CC-ALF processing on the chroma component of the target block in the current slice, the index of the corresponding adaptive parameter set is encoded in the video bitstream. Next, in the adaptive parameter set corresponding to the index of the adaptive parameter set, a fourth flag bit corresponding to the chroma component of the current slice is encoded, and the value of this fourth flag bit indicates the classification policy to be adopted when performing CC-ALF processing on the chroma component of the current slice. This classification policy includes the block classification policy shown in FIG. 8 (that is, determining the block classification information for performing CC-ALF on the chroma component based on the block classification information for performing ALF on the luma component) or other classification policies.

[0101] In other words, when using the block classification policy shown in FIG. 8 and other classification policies simultaneously, it is necessary to indicate whether to perform CC-ALF processing (which may be the CC-ALF processing method proposed in the embodiment of the present application or other CC-ALF processing methods) on the chroma component of the target block in the current slice by a slice-level flag bit (that is, the third flag bit). When performing CC-ALF processing, it is necessary to encode the flag bit of the classification policy (that is, the fourth flag bit) in the corresponding adaptive parameter set (referenced by the index of the adaptive parameter set) to explicitly indicate whether to adopt the block classification policy shown in FIG. 8 or other classification policies. For example, if the value of the fourth flag bit is 1, it implies that it is necessary to adopt the block classification policy shown in FIG. 8. Also, if the value of the fourth flag bit is 0, it implies that it is necessary to adopt other classification policies.

[0102] For the current slice, if the current slice refers to the APS of an already encoded frame, since the corresponding fourth flag bit has already been encoded in the previous APS, there is no need to encode it again. If the APS referred to by the current slice has not been encoded yet (for example, the APS of the current frame), it is necessary to encode the fourth flag bit in the APS.

[0103] Optionally, when the value of the third flag bit indicates that CC-ALF processing needs to be performed on the chroma components of some target blocks in the current slice, in order to distinguish which target blocks need CC-ALF processing, in the video bitstream, a fifth flag bit corresponding to each target block included in the current slice can be encoded, and the value of this fifth flag bit indicates whether CC-ALF processing needs to be performed on the chroma components of the corresponding target block. For example, if the value of the fifth flag bit corresponding to a certain target block is 1, it implies that CC-ALF processing needs to be performed on the chroma components of this target block. Also, if the value of the fifth flag bit corresponding to a certain target block is 0, it implies that CC-ALF processing is not required for the chroma components of this target block.

[0104] Note that if the slice-level flag bit (i.e., the third flag bit) indicates that CC-ALF processing is not required for the chroma components of all target blocks in the current slice, or indicates that CC-ALF processing is required for the chroma components of all target blocks, there is no need to introduce the block-level flag bit (i.e., the fifth flag bit).

[0105] As an example, for instance, if the value of the slice-level flag bit (i.e., the third flag bit) indicates that CC-ALF processing is required for some target blocks in the slice, and the flag bit of the classification policy (i.e., the fourth flag bit) is encoded to indicate that the block classification policy shown in FIG. 8 is adopted, then when the block-level flag bit of a certain target block (i.e., the fifth flag bit) indicates that CC-ALF processing is required, for that target block, the block classification policy shown in FIG. 8 will be adopted to perform CC-ALF processing.

[0106] Optionally, since there are two chroma components (Cr and Cb), for one slice, a technical solution similar to the foregoing embodiment can be adopted, that is, one third flag bit can be set for each of the two chroma components of the current slice, or the same third flag bit can be set for the two chroma components of the current slice. Similarly, for the target block, one fifth flag bit can be set for each of the two chroma components of the target block, or the same fifth flag bit can be set for the two chroma components of the target block. Similarly, one fourth flag bit can be set for each of the two chroma components in the APS, or the same fourth flag bit can be set for the two chroma components in the APS. For specific descriptions, reference can be made to the technical solutions of the foregoing embodiment, and detailed descriptions are omitted.

[0107] In one embodiment of the present application, when performing CC-ALF processing on the chroma component of the current slice, the encoding side can determine whether to adopt the block classification policy shown in FIG. 8 or other classification policies according to the rate-distortion optimization method. Specifically, the encoding side calculates the third rate-distortion cost when performing CC-ALF processing by adopting the block classification policy shown in FIG. 8 for the chroma components of all target blocks in the current slice, and also calculates the fourth rate-distortion cost when performing CC-ALF processing by adopting other classification policies for the chroma components of all target blocks in the current slice. Then, based on the third rate-distortion cost and the fourth rate-distortion cost, the classification policy to be adopted when performing CC-ALF processing on the chroma component of the current slice can be determined. For example, if the third rate-distortion cost corresponding to a certain slice is smaller than the fourth rate-distortion cost, it is suggested that the block classification policy shown in FIG. 8 be adopted when performing CC-ALF processing on the chroma component of this slice. Also, if the third rate-distortion cost corresponding to a certain slice is larger than the fourth rate-distortion cost, it is suggested that other classification policies be adopted when performing CC-ALF processing on the chroma component of this slice.

[0108] In one embodiment of the present application, the size information of the target block in the foregoing embodiment may be preset on the encoding side and the decoding side, or may be determined by the encoding side. After the size information of the target block is determined, the size information of the target block is encoded in the sequence parameter set, picture parameter set, picture header, or slice header of the video bitstream. For example, the target block may be a CTU or a block smaller than a CTU.

[0109] FIG. 9 shows a flowchart of a video decoding method according to an embodiment of the present application. This video decoding method can be executed by a video decoding device. As shown in FIG. 9, this video decoding method includes at least steps S910 to S940, which will be described in detail below.

[0110] In step S910, block classification information for performing ALF on the luma component in a video image frame is obtained.

[0111] In step S920, based on the block classification information for performing ALF on the luma component, block classification information for performing CC-ALF on the chroma component in the video image frame is determined.

[0112] In step S930, based on the block classification information for performing CC-ALF on the chroma component, corresponding filter coefficients are selected, and CC-ALF processing is performed on the chroma component.

[0113] For the description and implementation forms regarding steps S910 to S930, the above-described embodiments can be referred to.

[0114] In step S940, based on the ALF processing result of the luma component and the CC-ALF processing result of the chroma component, the video bitstream is decoded.

[0115] Specifically, based on the block classification information for performing ALF on the luma component, corresponding filter coefficients can be determined, and based on the filter coefficients, ALF processing is performed on the luma component to obtain an ALF processing result. Thus, based on the ALF processing result and the CC-ALF processing result, the video bitstream can be decoded.

[0116] In the video decoding method shown in FIG. 9, the category of block classification when performing CC-ALF on the chroma component can be increased, the accuracy of content classification in CC-ALF can be improved, and furthermore, the adaptability and filtering performance of CC-ALF can be improved, which is advantageous for improving the encoding / decoding efficiency.

[0117] In an embodiment of the present application, the block classification policy in the video decoding method shown in FIG. 9 (that is, determining the block classification information when performing CC-ALF on the chroma component based on the block classification information when performing ALF on the luma component) can be used alone or in combination with other classification policies (for example, the classification policy in the related art). The following will explain the two cases respectively.

[0118] Regarding the case of using the block classification policy shown in FIG. 9 alone

[0119] In an embodiment of the present application, when using the block classification policy shown in FIG. 9 alone (the block classification policy shown in FIG. 9 is the same as the block classification policy shown in FIG. 8), the decoding side can decode and obtain the first flag bit corresponding to the current slice from the video bitstream. The value of this first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of the target block in the current slice (that is, the CC-ALF processing method adopting the block classification policy in FIG. 9). In this embodiment, since the block classification policy shown in FIG. 9 is used alone, the first flag bit corresponding to the current slice can directly indicate whether to adopt the CC-ALF processing method proposed in the embodiment of the present application for the chroma component of the target block in the current slice.

[0120] Optionally, if the value of the first flag bit is the first value (e.g., 1), it can indicate to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of some target blocks in the current slice, or to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of all target blocks in the current slice.

[0121] If the value of the first flag bit is the second value (e.g., 0), it indicates not to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of all target blocks in the current slice.

[0122] In one embodiment of the present application, the first flag bit is a slice-level flag bit. When the value of the first flag bit indicates to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of all target blocks in the current slice, or indicates not to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of all target blocks in the current slice, there is no need to decode the block-level flag bit (the encoding side also does not need to encode the block-level flag bit). On the other hand, when the value of the first flag bit indicates to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of some target blocks in the current slice, the decoding side needs to decode the second flag bit corresponding to each target block included in the current slice in the video bitstream, and the value of this second flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the chroma components of the corresponding target block. That is, in this embodiment, in addition to the slice-level flag bit, the decoded block-level flag bit (i.e., the second flag bit) can indicate which target block's chroma components need to adopt the CC-ALF processing method proposed in the embodiments of the present application.

[0123] Optionally, since there are two chroma components (Cr and Cb), for one target block, one second flag bit can be set for each of the two chroma components of the target block, and the value of each second flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the corresponding chroma component in the target block.

[0124] As an optional processing form, the two chroma components (Cr and Cb) of the target block may correspond to the same second flag bit, and the value of this same second flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the two chroma components in the target block.

[0125] Similarly, for the current slice, one first flag bit can be set for each of the two chroma components of the current slice, and the value of each first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the corresponding chroma component in the current slice.

[0126] As an optional processing form, the two chroma components of the current slice may correspond to the same first flag bit, and the value of this same first flag bit indicates whether to adopt the CC-ALF processing method proposed in the embodiments of the present application for the two chroma components in the current slice.

[0127] Note that when one first flag bit is set for each of the two chroma components at the slice level, one second flag bit can also be set for each of the two chroma components at the block level. When one second flag bit is set for each of the two chroma components at the block level, it is only necessary to set one first flag bit for each of the two chroma components at the slice level.

[0128] In one embodiment of the present application, during decoding, the decoding side also needs to obtain an adaptive parameter set including CC-ALF filter coefficients from the video bitstream. In this case, when the value of the first flag bit indicates that the CC-ALF processing proposed in the embodiment of the present application is to be adopted for the chroma component of at least one target block in the current slice, the index of the adaptive parameter set corresponding to the current slice can be obtained by decoding from the video bitstream. Then, the corresponding filter coefficients can be selected from the adaptive parameter set corresponding to the index of the adaptive parameter set, and the chroma component of the corresponding target block can be filtered under the current conditions.

[0129] Regarding the case of using the block classification policy shown in FIG. 9 and other classification policies simultaneously

[0130] In one embodiment of the present application, when using the block classification policy shown in FIG. 9 and other classification policies simultaneously, during decoding, it is necessary to obtain an adaptive parameter set and a third flag bit corresponding to the current slice from the video bitstream. The value of this third flag bit indicates whether to perform CC-ALF processing on the chroma component of the target block in the current slice. If it is necessary to perform CC-ALF processing on the chroma component of the target block in the current slice, the index of the adaptive parameter set corresponding to the current slice is obtained by decoding from the video bitstream. Next, the fourth flag bit corresponding to the chroma component of the current slice is obtained from the adaptive parameter set corresponding to the index of the adaptive parameter set, and the value of this fourth flag bit indicates the classification policy to be adopted when performing CC-ALF processing on the chroma component of the current slice. This classification policy includes the block classification policy shown in FIG. 9 (that is, determining the block classification information for performing CC-ALF on the chroma component based on the block classification information for performing ALF on the luma component) or other classification policies.

[0131] In other words, when using the block classification policy shown in FIG. 9 and other classification policies simultaneously, it is necessary to indicate whether to perform CC-ALF processing (which may be the CC-ALF processing method proposed in the embodiments of the present application or another CC-ALF processing method) on the chroma components of the target blocks in the current slice by a slice-level flag bit (i.e., the third flag bit). When performing CC-ALF processing, it is necessary to obtain by decoding the flag bit of the classification policy (i.e., the fourth flag bit) with the corresponding adaptive parameter set (referenced by the index of the adaptive parameter set), and explicitly indicate whether to adopt the block classification policy shown in FIG. 9 or another classification policy.

[0132] Specifically, for example, if the value of the fourth flag bit corresponding to the chroma components of the current slice is the first value (e.g., 1), it implies that the classification policy adopted when performing CC-ALF processing on the chroma components of the current slice is the classification policy shown in FIG. 9. Also, if the value of the fourth flag bit corresponding to the chroma components of the current slice is the second value (e.g., 0), it implies that the classification policy adopted when performing CC-ALF processing on the chroma components of the current slice is another classification policy.

[0133] Optionally, when the value of the third flag bit indicates that CC-ALF processing needs to be performed on the chroma components of some target blocks in the current slice, in order to distinguish which target blocks need to undergo CC-ALF processing, the fifth flag bit corresponding to each target block included in the current slice can be decoded from the video bitstream, and the value of this fifth flag bit indicates whether CC-ALF processing needs to be performed on the chroma component of the corresponding target block. For example, if the value of the fifth flag bit corresponding to a certain target block is 1, it implies that CC-ALF processing needs to be performed on the chroma component of this target block. Also, if the value of the fifth flag bit corresponding to a certain target block is 0, it implies that CC-ALF processing is not required for the chroma component of this target block.

[0134] Note that when the slice-level flag bit (i.e., the third flag bit) indicates that CC-ALF processing is not required for the chroma components of all target blocks in the current slice, or indicates that CC-ALF processing is required for the chroma components of all target blocks, there is no need to introduce the block-level flag bit (i.e., the fifth flag bit).

[0135] As an example, for instance, assume that the value of the slice-level flag bit (i.e., the third flag bit) indicates that CC-ALF processing needs to be performed on some target blocks in the slice, and the classification policy flag bit (i.e., the fourth flag bit) is encoded to indicate that the block classification policy shown in FIG. 9 is adopted. Then, when the block-level flag bit (i.e., the fifth flag bit) of a certain target block indicates that CC-ALF processing needs to be performed, for that target block, the block classification policy shown in FIG. 9 will be adopted to perform CC-ALF processing.

[0136] Optionally, since there are two chroma components (Cr and Cb), for one slice, a technical solution similar to the foregoing embodiment can be adopted, that is, one third flag bit can be set for each of the two chroma components of the current slice, or the same third flag bit can be set for the two chroma components of the current slice. Similarly, for the target block, one fifth flag bit can be set for each of the two chroma components of the target block, or the same fifth flag bit can be set for the two chroma components of the target block. For specific descriptions, reference can be made to the technical solutions of the foregoing embodiments, and detailed descriptions are omitted.

[0137] In one embodiment of the present application, the size information of the target block in the foregoing embodiment may be preset on the encoding side and the decoding side, or may be determined by the encoding side. After the size information of the target block is determined, in order to encode the size information of the target block in the sequence parameter set, picture parameter set, picture header, or slice header of the video bitstream, the decoding side needs to decode the corresponding size information from the bitstream. For example, the target block may be a CTU or a block smaller than a CTU.

[0138] As described above, the technical solutions of the embodiments of the present application have been described from the encoding side and the decoding side respectively. In order to describe the details of the implementation of the present application more specifically, the details of the realization of the technical solutions of the embodiments of the present application will be described in more detail below.

[0139] In the embodiment of the present application, it is proposed to determine the classification result of the CC-ALF of the chroma component at the same sub-block level according to the classification situation of the ALF of the luma component at the sub-block level, and a method of adaptively selecting filters at different levels based on the classification result is proposed, which will be described in detail below.

[0140] In one aspect, in an embodiment of the present application, while setting the number of CC-ALF filters that can be supported for each chroma component to the number of ALF filters that can be supported for the luma component, it is proposed to determine the CC-ALF classification status of the chroma component according to the ALF classification process of the luma component. The technical solution proposed in the embodiment of the present application can be used alone or in combination.

[0141] Specifically, the classification result of the CC-ALF of the chroma component can be determined according to the classification status at the subblock level of the ALF of the luma component.

[0142] For example, the classification result at the subblock level of the ALF of the luma component can be used as the classification result in a block of the same size of the CC-ALF. Here, the classification process at the subblock level of the ALF of the luma component is as described in the aforementioned formulas (1) to (10).

[0143] Optionally, the classification result and the corresponding geometric transformation type at the subblock level of the ALF of the luma component may be used as the classification result and the geometric transformation type in a block of the same size of the CC-ALF of the chroma component. Here, the classification process at the subblock level of the ALF of the luma component is as described in the aforementioned formulas (1) to (10).

[0144] In an embodiment of the present application, based on the merge process of various filters by the ALF of the luma component, the merge process of various filters by the CC-ALF of the chroma component can be determined. For example, the merge result of various filters by the ALF of the luma component can be used as the merge result of various filters by the CC-ALF of the chroma component. Or, the ALF of the luma component and the CC-ALF of the two chroma components can be jointly optimized to simultaneously determine the merge results of various filters by the ALF of the luma component and the CC-ALF of the chroma component.

[0145] In one embodiment of the present application, based on the number of the final filters of the ALF of the luma component, the number of available filters for the CC-ALF of each chroma component can be determined.

[0146] In another aspect, in an embodiment of the present application, a technical solution is proposed in which the filter category is adaptively selected at different levels and the filter-related parameters are transmitted based on the above-mentioned classification method of the CC-ALF of the chroma component. Specifically, it can be divided into an embodiment in which the classification method proposed in the embodiment of the present application is used alone, and an embodiment in which the classification method proposed in the embodiment of the present application and the existing classification method in the CC-ALF technology related to it are used simultaneously.

[0147] Regarding the case where the classification method proposed in the embodiment of the present application is used alone and the selection determination of CC-ALF is performed for each of the two chroma components

[0148] In one embodiment of the present application, when only the classification method proposed in the embodiment of the present application is used for the CC-ALF of the chroma component, the selection determination and parameter transmission of CC-ALF can be performed for each of the two chroma components Cb and Cr.

[0149] Specifically, for each chroma component, the CC-ALF-related parameters that need to be transmitted on the encoding side are as follows.

[0150] 1. A flag bit indicating whether to use CC-ALF (On / Off) at the CTU level. For example, if this flag bit is 1, it indicates that the samples of the corresponding chroma component in the current CTU are filtered using CC-ALF (since the classification method proposed in the embodiment of the present application is used alone, when it indicates filtering using CC-ALF, the classification method proposed in the embodiment of the present application is adopted when filtering using CC-ALF). If this flag bit is 0, it indicates that the corresponding chroma component in the current CTU is filtered without using CC-ALF.

[0151] 2. A flag bit indicating whether to use CC-ALF at the slice level. For example, if this flag bit is 1, it indicates that for the chroma components corresponding to at least one CTU in the current slice, it is selected to use CC-ALF (when using the classification method proposed in the embodiments of this application alone, when indicating filtering using CC-ALF, the classification method proposed in the embodiments of this application is adopted when filtering using CC-ALF). If this flag bit is 0, it indicates not to use CC-ALF for the chroma components corresponding to all CTUs in the current slice.

[0152] Optionally, if the flag bit indicating whether to use CC-ALF at the slice level is 1, it can also indicate to use CC-ALF for the chroma components corresponding to all CTUs in the current slice.

[0153] Note that if the flag bit indicating whether to use CC-ALF at the slice level indicates not to use CC-ALF for the chroma components corresponding to all CTUs in the current slice, or indicates to use CC-ALF for the chroma components corresponding to all CTUs in the current slice, the encoding side does not need to encode the flag bit indicating whether to use CC-ALF at the CTU level, and the decoding side also does not need to decode it.

[0154] 3. Related parameters in APS: If the CC-ALF flag bit at the slice level is 1, it is necessary to transmit the coefficients of each filter in the CC-ALF filter group corresponding to the related chroma components. On the other hand, other CC-ALF related control parameters, such as the number of filters included in the filter group and the filter merge index, do not need to be additionally transmitted and can be estimated from the parameters corresponding to the ALF of the luma component.

[0155] For each chroma component, the process of determining whether to use CC-ALF for the chroma component corresponding to the CTU level on the encoding side (since only the classification method proposed in the embodiment of the present application is used alone, when filtering using CC-ALF, the classification method proposed in the embodiment of the present application is adopted when filtering using CC-ALF) is as follows.

[0156] A) Calculate the rate-distortion cost (RDCost) when filtering the samples of the corresponding chroma component in the current CTU without using CC-ALF.

[0157] B) For each sample of the corresponding chroma component in the current CTU, select and filter the CC-ALF filter according to the category to which the sample of the corresponding luma component belongs, and calculate the rate-distortion cost. Here, the category to which the sample of the luma component belongs does not need to be explicitly transmitted and can be estimated in the process of processing the samples of the luma component by the decoding side.

[0158] C) Compare the rate-distortion costs calculated in the two cases. If the cost without using the CC-ALF filter is smaller, it is determined not to use CC-ALF for the chroma component corresponding to the CTU level, and the flag bit of CC-ALF at the CTU level can be set to 0; otherwise, it is set to 1.

[0159] Regarding the case of using only the classification method proposed in the embodiment of the present application alone and jointly making the selection decision of CC-ALF for two chroma components

[0160] In one embodiment of the present application, when only the classification method proposed in the embodiment of the present application is used for CC-ALF of the chroma component, the selection decision and parameter transmission of CC-ALF can be jointly performed for the two chroma components Cb and Cr.

[0161] Specifically, for two chroma components, the CC-ALF related parameters that need to be transmitted on the encoding side are as follows.

[0162] 1. A flag bit indicating whether to use CC-ALF for the CTU level (On / Off). For example, if this flag bit is 1, it indicates that the samples of the two chroma components in the current CTU are filtered using CC-ALF (when using the classification method proposed in the embodiments of this application alone, when indicating filtering using CC-ALF, the classification method proposed in the embodiments of this application is adopted when filtering using CC-ALF). If this flag bit is 0, it indicates that the two chroma components in the current CTU are filtered without using CC-ALF.

[0163] 2. A flag bit indicating whether to use CC-ALF for the Slice level. For example, if this flag bit is 1, it indicates that for the two chroma components of at least one CTU in the current slice, the use of CC-ALF is selected (when using the classification method proposed in the embodiments of this application alone, when indicating filtering using CC-ALF, the classification method proposed in the embodiments of this application is adopted when filtering using CC-ALF). If this flag bit is 0, it indicates that CC-ALF is not used for the two chroma components of all CTUs in the current slice.

[0164] Optionally, if the flag bit indicating whether to use CC-ALF for the Slice level is 1, it can also indicate that CC-ALF is used for the two chroma components of all CTUs in the current slice.

[0165] Note that when the flag bit indicating whether to use CC-ALF at the Slice level indicates not to use CC-ALF for the two chroma components of all CTUs in the current slice, or indicates to use CC-ALF for the two chroma components of all CTUs in the current slice, the encoding side does not need to encode the flag bit indicating whether to use CC-ALF at the CTU level, and the decoding side does not need to decode it either.

[0166] 3. Related parameters in APS: If the CC-ALF flag bit at the Slice level is 1, it is necessary to transmit the coefficients of each filter in the CC-ALF filter bank corresponding to the two chroma components. On the other hand, other CC-ALF related control parameters such as the number of filters included in the filter bank and the filter merge index do not need to be additionally transmitted and can be estimated from the parameters corresponding to the ALF of the luma component.

[0167] For the two chroma components, the process of determining whether the encoding side uses CC-ALF for the two chroma components at the CTU level (when using the classification method proposed in the embodiments of the present application alone, indicating filtering using CC-ALF, the classification method proposed in the embodiments of the present application is adopted when filtering using CC-ALF) is as follows.

[0168] A) Calculate the rate-distortion cost (RDCost) when filtering the samples of the two chroma components in the current CTU without using CC-ALF.

[0169] B) For each sample of the two chroma components in the current CTU, select the CC-ALF filter according to the category to which the corresponding luma component sample belongs and perform filtering, and calculate the total rate-distortion cost of the two chroma components. Here, it is not necessary to explicitly transmit the category to which the luma component sample belongs, and it can be estimated in the process of processing the luma component sample by the decoding side.

[0170] C) Compare the rate distortion costs calculated in the two cases, and if the cost without using the CC-ALF filter is smaller, it can be determined not to use CC-ALF for the two chroma components at the CTU level, and the flag bit of CC-ALF at the CTU level can be set to 0; otherwise, set it to 1.

[0171] Regarding the case of simultaneously using the classification method proposed in the embodiment of the present application and the existing classification method in the CC-ALF technology related thereto, and specifying the classification method for each of the two chroma components

[0172] In one embodiment of the present application, in the CC-ALF of the chroma component, when simultaneously using the classification method proposed in the embodiment of the present application and the existing classification method in the CC-ALF technology related thereto, the classification method can be specified for each of the two chroma components Cb and Cr, and the corresponding classification method can be used for all samples of the corresponding chroma component in the current frame, and the selection determination of CC-ALF and the transmission of related parameters can be performed respectively.

[0173] Specifically, for each chroma component, the CC-ALF related parameters that need to be transmitted on the encoding side are as follows.

[0174] 1. The flag bit indicating whether to use CC-ALF (On / Off) at the CTU level. For example, if this flag bit is 1, it indicates that the samples of the corresponding chroma component in the current CTU are filtered using CC-ALF (the specific classification method adopted during filtering may be the classification method proposed in the embodiment of the present application or the existing classification method in the related CC-ALF technology, and specifically which one is adopted needs to be further indicated by the flag bit in the APS). If this flag bit is 0, it indicates not to use CC-ALF filtering for the corresponding chroma component in the current CTU.

[0175] 2. A flag bit indicating whether to use CC-ALF at the slice level. For example, if this flag bit is 1, it indicates that for the chroma components corresponding to at least one CTU in the current slice, it is selected to use CC-ALF (similarly, the classification method specifically used during filtering may be the classification method proposed in the embodiments of the present application or an existing classification method in related CC-ALF technologies. Specifically, which one is adopted needs to be further indicated by the flag bit in the APS). If this flag bit is 0, it indicates not to use CC-ALF for the chroma components corresponding to all CTUs in the current slice.

[0176] Optionally, if the flag bit indicating whether to use CC-ALF at the slice level is 1, it can also indicate to use CC-ALF for the chroma components corresponding to all CTUs in the current slice.

[0177] Note that when the flag bit indicating whether to use CC-ALF at the slice level indicates not to use CC-ALF for the chroma components corresponding to all CTUs in the current slice or indicates to use CC-ALF for the chroma components corresponding to all CTUs in the current slice, the encoding side does not need to encode the flag bit indicating whether to use CC-ALF at the CTU level, and the decoding side does not need to decode it either.

[0178] 3. When it is necessary to use CC-ALF, it is necessary to indicate an index of one APS, and in the APS corresponding to this index, it is necessary to indicate the classification method to be used for the corresponding chroma component with one classification method flag bit. For example, if this classification method flag bit is 0, it indicates to use the existing classification method in related CC-ALF technologies, and if this classification method flag bit is 1, it indicates to use the classification method proposed in the embodiments of the present application.

[0179] 4. If the classification method flag bit in APS is 0, it implies that it is necessary to use the existing classification method in the related CC-ALF technology. Furthermore, the relevant parameters at each level can be transmitted according to the existing design in the related CC-ALF technology.

[0180] 5. If the classification method flag bit in APS is 1, it implies that it is necessary to adopt the classification method proposed in the embodiments of the present application. Furthermore, the relevant parameters at each level can be transmitted according to the method in the aforementioned embodiments.

[0181] For each chroma component, the process by which the encoding side selects and determines the CC-ALF classification method is as follows.

[0182] A) According to the existing classification method in the related CC-ALF technology, perform CC-ALF determination for all CTUs in the current slice, and obtain the optimal rate-distortion cost of CC-ALF for the current slice.

[0183] B) According to the classification method proposed in the embodiments of the present application, perform CC-ALF determination for all CTUs in the current slice, and obtain the optimal rate-distortion cost of the current slice under this classification method.

[0184] C) Compare the rate-distortion costs at the two slice levels, and set the classification method flag bit in APS to indicate the classification method with the smaller rate-distortion cost.

[0185] Regarding the case where the classification method proposed in the embodiments of the present application and the existing classification method in the related CC-ALF technology are used simultaneously, and the classification method is jointly specified for the two chroma components

[0186] In one embodiment of the present application, in the CC-ALF of chroma components, when simultaneously using the classification method proposed in the embodiment of the present application and the existing classification method in the CC-ALF technology related thereto, the two chroma components Cb and Cr can share the classification method flag bit in one APS. Thereby, the same classification method can be used for all samples of the two chroma components in the current frame, and the selection determination of CC-ALF and the transmission of related parameters can be performed for the two chroma components Cb and Cr.

[0187] Specifically, for the two chroma components, the CC-ALF related parameters that need to be transmitted on the encoding side are as follows.

[0188] 1. A flag bit indicating whether to use CC-ALF at the CTU level (On / Off). For example, if this flag bit is 1, it indicates that the two chroma components in the current CTU are filtered using CC-ALF (the specific classification method adopted during filtering may be the classification method proposed in the embodiment of the present application or the existing classification method in the related CC-ALF technology. Specifically, which one is adopted needs to be further indicated by the flag bit in the APS). If this flag bit is 0, it indicates that CC-ALF filtering is not used for the two chroma components in the current CTU.

[0189] 2. A flag bit indicating whether to use CC-ALF at the Slice level. For example, if this flag bit is 1, it indicates that CC-ALF is used for the two chroma components of at least one CTU in the current slice (similarly, the specific classification method adopted during filtering may be the classification method proposed in the embodiment of the present application or the existing classification method in the related CC-ALF technology. Specifically, which one is adopted needs to be further indicated by the flag bit in the APS). If this flag bit is 0, it indicates that CC-ALF is not used for the two chroma components of all CTUs in the current slice.

[0190] Optionally, if the flag bit indicating whether to use CC-ALF for the Slice level is 1, it can also indicate that CC-ALF is used for the two chroma components of all CTUs in the current slice.

[0191] Note that if the flag bit indicating whether to use CC-ALF for the Slice level indicates not to use CC-ALF for the two chroma components of all CTUs in the current slice, or indicates to use CC-ALF for the two chroma components of all CTUs in the current slice, the encoding side does not need to encode the flag bit indicating whether to use CC-ALF for the CTU level, and the decoding side also does not need to decode it.

[0192] 3. If it is necessary to use CC-ALF, it is necessary to indicate the index of one APS, and in the APS corresponding to this index, it is necessary to indicate the classification method of the two chroma components with one classification method flag bit. For example, if this classification method flag bit is 1, it indicates that the classification method proposed in the embodiments of the present application is used for all samples of the two chroma components. If this classification method flag bit is 0, it indicates that the existing classification method in the related CC-ALF technology is used for all samples of the two chroma components.

[0193] 4. If the classification method flag bit in the APS is 0, it implies that the existing classification method in the related CC-ALF technology is used for all samples of the two chroma components, and furthermore, the related parameters at each level can be transmitted according to the existing design in the related CC-ALF technology.

[0194] 5. If the classification method flag bit in the APS is 1, it implies that the classification method proposed in the embodiments of the present application is used for all samples of the two chroma components, and furthermore, the related parameters at each level can be transmitted according to the method described in the foregoing embodiments.

[0195] For the two chroma components, the process by which the encoding side selects and determines the CC-ALF classification method is as follows.

[0196] A) For the two chroma components Cb and Cr, according to the existing classification methods in the related CC-ALF technology respectively, perform the determination of CC-ALF for all CTUs in the current Slice, and obtain the optimal rate-distortion cost of the total CC-ALF of the two chroma components in the current Slice.

[0197] B) For the two chroma components Cb and Cr, according to the classification method proposed in the embodiment of the present application respectively, perform the determination of CC-ALF for all CTUs in the current Slice, and obtain the optimal rate-distortion cost of the total CC-ALF of the two chroma components in the current Slice under the current classification method.

[0198] C) Compare the total rate-distortion costs of the two chroma components at the two Slice levels, and set the classification flag bit in the APS to indicate the classification method with the smaller rate-distortion cost.

[0199] Note that in the above two embodiments, the flag bits indicating whether to use CC-ALF at the CTU level, the flag bits indicating whether to use CC-ALF at the Slice level, and the classification method flag bits in the APS may each set one flag bit for each chroma component (that is, two flag bits at the CTU level, two flag bits at the Slice level, and two flag bits at the APS level exist corresponding to the two chroma components respectively), or may set only one flag bit for the two chroma components (that is, one flag bit at the CTU level, one flag bit at the Slice level, and one flag bit at the APS level exist corresponding to these two chroma components).

[0200] In other embodiments of the present application, one flag bit at the APS level is set corresponding to two chroma components, and two flag bits at the Slice level and two flag bits at the CTU level may be set respectively, that is, two flag bits at the CTU level and two flag bits at the Slice level exist corresponding to two chroma components respectively.

[0201] Of course, one flag bit at the APS level is set corresponding to two chroma components, one flag bit at the Slice level is set corresponding to two chroma components, and two flag bits at the CTU level may be set, that is, two flag bits at the CTU level exist corresponding to two chroma components respectively.

[0202] In the above embodiments of the present application, the CTU-level block is taken as an example for description. However, in other embodiments of the present application, for example, in addition to the CTU-level block with a size of 128×128, blocks of other sizes such as 64×64 or other smaller-sized blocks can also be used to process other blocks.

[0203] Optionally, the size of the block-level unit that performs the selection of block-level CC-ALF filtering can be specified simultaneously on the encoding side and the decoding side. Thereby, it is not necessary to transmit the size information of the block-level unit. At this time, in order to indicate whether to use CC-ALF for the corresponding block unit, it is necessary to transmit one flag bit for each block-level unit.

[0204] Optionally, the encoding side makes a selection as to whether to use block-level CC-ALF filtering, writes the size of the corresponding block-level unit to the bitstream, and the decoding side can also obtain it by analyzing the size information of the corresponding block-level unit. This size information can be written into the SPS (Sequence Parameter Set), PPS (Picture Parameter Set), Picture Header, or Slice Header. Further, in order to indicate whether to use CC-ALF for the corresponding block unit, it is necessary to transmit one flag bit for each block-level unit.

[0205] Although each step in the flowchart of each of the above-described embodiments is sequentially shown as indicated by the arrows, it will be understood that these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified in this specification, there is no strict order restriction for the execution of these steps, and these steps may be executed in other orders. And at least some of the steps in the flowchart of each of the above-described embodiments may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages do not necessarily need to be executed at the same time, and may be executed at different times. The execution order of these sub-steps or stages does not necessarily need to be sequentially executed, and may be executed alternately or alternatively with at least some of other steps or sub-steps or stages of other steps.

[0206] Hereinafter, embodiments of the apparatus of the present application that can be used to execute the method in the above-described embodiments of the present application will be described. For details not disclosed in the embodiments of the apparatus of the present application, reference may be made to the embodiments of the method of the present application described above.

[0207] FIG. 10 shows a block diagram of a loop filtering apparatus according to an embodiment of the present application, and this loop filtering apparatus can be provided in a video encoding device or a video decoding device.

[0208] As shown in FIG. 10, a loop filtering apparatus 1000 according to an embodiment of the present application includes an acquisition unit 1002, a determination unit 1004, and a filtering unit 1006.

[0209] Here, the acquisition unit 1002 is configured to acquire block classification information when performing adaptive loop filtering (ALF) on the luma component in a video image frame. The determination unit 1004 is configured to determine block classification information when performing cross-component adaptive loop filtering (CC-ALF) on the chroma component in the video image frame based on the block classification information when performing ALF on the luma component. The filtering unit 1006 is configured to select a corresponding filter coefficient based on the block classification information when performing CC-ALF on the chroma component and perform CC-ALF processing on the chroma component.

[0210] In some embodiments of the present application, based on the foregoing manner, the determination unit 1004 is configured to use the classification result of the sub-block when performing ALF on the luma component as the classification result of the block of the same size when performing CC-ALF on the chroma component, or use the classification result of the sub-block and the corresponding geometric transformation type when performing ALF on the luma component as the classification result and geometric transformation type of the block of the same size when performing CC-ALF on the chroma component.

[0211] In some embodiments of the present application, based on the foregoing manner, the determination unit 1004 is further configured to determine the merging result of various filters when performing CC-ALF on the chroma component based on the merging result of various filters when performing ALF on the luma component.

[0212] In some embodiments of the present application, based on the foregoing aspects, the determination unit 1004 is further configured to determine various filter merge results when performing ALF on the luma component and when performing CC-ALF on the chroma component, based on the rate distortion cost of performing filter merge in the ALF of the luma component and the rate distortion cost of performing filter merge in the CC-ALF of the chroma component.

[0213] In some embodiments of the present application, based on the foregoing aspects, the determination unit 1004 is further configured to determine the number of available filters when performing CC-ALF on the chroma component, based on the number of filters determined when performing ALF on the luma component.

[0214] FIG. 11 shows a block diagram of a video decoding device according to an embodiment of the present application, and this video decoding device may be provided within a video decoding device.

[0215] As shown in FIG. 11, a video decoding device 1100 according to an embodiment of the present application includes an acquisition unit 1102, a determination unit 1104, a filtering unit 1106, and a first processing unit 1108.

[0216] Here, the acquisition unit 1102 is configured to acquire block classification information when performing adaptive loop filtering (ALF) on the luma component in the video image frame. The determination unit 1104 is configured to determine block classification information when performing cross-component adaptive loop filtering (CC-ALF) on the chroma component in the video image frame based on the block classification information when performing ALF on the luma component. The filtering unit 1106 is configured to select corresponding filter coefficients based on the block classification information when performing CC-ALF on the chroma component and perform CC-ALF processing on the chroma component. The first processing unit 1108 is configured to decode the video bitstream based on the ALF processing result of the luma component and the CC-ALF processing result of the chroma component.

[0217] In some embodiments of the present application, based on the foregoing manner, the video decoding apparatus 1100 further includes a first decoding unit configured to decode a first flag bit corresponding to the current slice from the video bitstream before determining the block classification information when performing CC-ALF on the chroma component in the video image frame based on the block classification information when performing ALF on the luma component, where the value of the first flag bit indicates whether to employ the CC-ALF processing for the chroma component of the target block in the current slice.

[0218] In some embodiments of the present application, based on the foregoing manner, if the value of the first flag bit is a first value, it indicates that the CC-ALF processing is employed for the chroma components of some target blocks in the current slice or for the chroma components of all target blocks in the current slice; if the value of the first flag bit is a second value, it indicates that the CC-ALF processing is not employed for the chroma components of all target blocks in the current slice.

[0219] In some embodiments of the present application, based on the foregoing aspects, when the value of the first flag bit indicates that the CC-ALF process is adopted for the chroma components of some target blocks in the current slice, the first decoding unit is further configured to decode, from the video bitstream, a second flag bit corresponding to each target block included in the current slice, and the value of the second flag bit indicates whether the CC-ALF process is adopted for the chroma component of the corresponding target block.

[0220] In some embodiments of the present application, based on the foregoing aspects, each of the two chroma components of the target block corresponds to one second flag bit, and the value of each second flag bit indicates whether the CC-ALF process is adopted for the corresponding chroma component in the target block, or the two chroma components of the target block correspond to the same second flag bit, and the value of the same second flag bit indicates whether the CC-ALF process is adopted for the two chroma components in the target block.

[0221] In some embodiments of the present application, based on the foregoing aspects, the first decoding unit is further configured to decode, from the video bitstream, an adaptive parameter set, and when the value of the first flag bit indicates that the CC-ALF process is adopted for the chroma components of at least one target block in the current slice, decode, from the video bitstream, an index of the adaptive parameter set corresponding to the current slice, and further select a corresponding filter coefficient from the adaptive parameter set corresponding to the index of the adaptive parameter set, and is configured to filter the chroma components of the target block.

[0222] In some embodiments of the present application, based on the foregoing aspects, for each of the two chroma components, the current slice corresponds to one first flag bit, and the value of each first flag bit indicates whether to employ the CC-ALF process for the corresponding chroma component in the current slice, or the current slice corresponds to the same first flag bit for the two chroma components, and the value of the same first flag bit indicates whether to employ the CC-ALF process for the two chroma components in the current slice.

[0223] In some embodiments of the present application, based on the foregoing aspects, before determining the block classification information for performing CC-ALF on the chroma components in the video image frame based on the block classification information when performing ALF on the luma component, the video decoder 1100 decodes from the video bitstream an adaptive parameter set and a third flag bit corresponding to the current slice, where the value of the third flag bit indicates whether to perform the CC-ALF process on the chroma component of the target block in the current slice. When the value of the third flag bit indicates that it is necessary to perform the CC-ALF process on the chroma component of the target block in the current slice, the video decoder 1100 further decodes from the video bitstream the index of the adaptive parameter set corresponding to the current slice, and further obtains from the adaptive parameter set corresponding to the index of the adaptive parameter set a fourth flag bit corresponding to the chroma component of the current slice, where the value of the fourth flag bit indicates the classification policy to be employed when performing the CC-ALF process on the chroma component of the current slice. The video decoder 1100 is further provided with a second decoding unit configured to obtain the fourth flag bit. The classification policy includes determining the block classification information for performing CC-ALF on the chroma component based on the block classification information when performing ALF on the luma component, or other classification policies.

[0224] In some embodiments of the present application, based on the foregoing aspects, if the value of the fourth flag bit corresponding to the chroma component of the current slice is the first value, the classification policy adopted when performing CC-ALF processing on the chroma component of the current slice is to determine the block classification information for performing CC-ALF on the chroma component based on the block classification information when performing ALF on the luma component, indicating that, if the value of the fourth flag bit corresponding to the chroma component of the current slice is the second value, the classification policy adopted when performing CC-ALF processing on the chroma component of the current slice is the other classification policy.

[0225] In some embodiments of the present application, based on the foregoing aspects, when the value of the third flag bit indicates that it is necessary to perform CC-ALF processing on the chroma components of some target blocks in the current slice, the second decoding unit is further configured to decode the fifth flag bit corresponding to each target block included in the current slice from the video bitstream, and the value of the fifth flag bit indicates whether to perform CC-ALF processing on the chroma component of the corresponding target block.

[0226] In some embodiments of the present application, based on the foregoing aspects, each of the two chroma components of the current slice corresponds to one fourth flag bit, and the value of each fourth flag bit indicates the classification policy adopted when performing CC-ALF processing on the corresponding chroma component in the current slice, or the two chroma components of the current slice correspond to the same fourth flag bit, and the value of the same fourth flag bit indicates the classification policy adopted when performing CC-ALF processing on the two chroma components of the current slice.

[0227] In some embodiments of the present application, based on the foregoing aspects, the first processing unit 1108 is further configured to determine the size information of the target block according to a preset size, or to decode and obtain the size information of the target block from a sequence parameter set, a picture parameter set, a picture header, or a slice header of a video bitstream.

[0228] In some embodiments of the present application, based on the foregoing aspects, the target block includes a coding tree unit or a block smaller in size than the coding tree unit.

[0229] FIG. 12 shows a block diagram of a video encoding device according to an embodiment of the present application, and this video encoding device may be provided in a video encoding device.

[0230] As shown in FIG. 12, a video encoding device 1200 according to an embodiment of the present application includes an acquisition unit 1202, a determination unit 1204, a filtering unit 1206, and a second processing unit 1208.

[0231] Here, the acquisition unit 1202 is configured to acquire block classification information when performing adaptive loop filtering (ALF) on the luma component in a video image frame. The determination unit 1204 is configured to determine block classification information when performing cross-component adaptive loop filtering (CC-ALF) on the chroma component in the video image frame based on the block classification information when performing ALF on the luma component. The filtering unit 1206 is configured to select corresponding filter coefficients based on the block classification information when performing CC-ALF processing on the chroma component and perform CC-ALF processing on the chroma component. The second processing unit 1208 is configured to encode a video image frame based on the ALF processing result of the luma component and the CC-ALF processing result of the chroma component to obtain a video bitstream.

[0232] In some embodiments of the present application, based on the foregoing aspects, the video encoding device 1200 is a first encoding unit configured to encode a first flag bit corresponding to the current slice of the video image frame in the video bitstream, wherein the value of the first flag bit indicates whether to adopt the CC-ALF process for the chroma component of the target block in the current slice, and further includes a first encoding unit.

[0233] In some embodiments of the present application, based on the foregoing aspects, when the value of the first flag bit indicates that the CC-ALF process is to be adopted for the chroma components of some target blocks in the current slice, the first encoding unit is further configured to obtain, by encoding a second flag bit corresponding to each target block included in the current slice in the video bitstream, and the value of the second flag bit indicates whether to adopt the CC-ALF process for the chroma component of the corresponding target block.

[0234] In some embodiments of the present application, based on the foregoing aspects, before obtaining the second flag bit corresponding to each target block included in the current slice by encoding in the video bitstream, the first encoding unit calculates a first rate-distortion cost when the CC-ALF process is adopted for the chroma components of each target block, and when performing the CC-ALF process on the chroma components of each target block, it is performed by a CC-ALF filter selected based on the block classification information when performing ALF on the luma component. Also, a second rate-distortion cost when the CC-ALF process is not performed on the chroma components of each target block is calculated, and further, based on the first rate-distortion cost and the second rate-distortion cost, it is configured to determine whether to adopt the CC-ALF process for the chroma components of each target block.

[0235] In some embodiments of the present application, based on the foregoing aspects, in the video bitstream, the video encoding device 1200 encodes a third flag bit corresponding to the current slice, where the value indicates whether to perform CC-ALF processing on the chroma component of the target block in the current slice. And when it is necessary to perform CC-ALF processing on the chroma component of the target block in the current slice, in the video bitstream, the index of the corresponding adaptive parameter set is encoded. Further, in the adaptive parameter set corresponding to the index of the adaptive parameter set, a fourth flag bit corresponding to the chroma component of the current slice is encoded, where the value indicates a classification policy adopted when performing CC-ALF processing on the chroma component of the current slice. The video encoding device 1200 further includes a second encoding unit configured to encode the fourth flag bit. The classification policy includes determining the block classification information for performing CC-ALF on the chroma component based on the block classification information for performing ALF on the luma component, or other classification policies.

[0236] In some embodiments of the present application, based on the foregoing aspects, when the value of the third flag bit indicates that it is necessary to perform CC-ALF processing on the chroma components of some target blocks in the current slice, the second encoding unit is further configured to encode, in the video bitstream, a fifth flag bit corresponding to each target block included in the current slice, and the value of the fifth flag bit indicates whether to perform CC-ALF processing on the chroma component of the corresponding target block.

[0237] In some embodiments of the present application, based on the foregoing aspects, before encoding the fourth flag bit corresponding to the chroma component of the current slice in the adaptive parameter set corresponding to the index of the adaptive parameter set, the second encoding unit further performs a target classification policy on the chroma components of all target blocks in the current slice to calculate a third rate-distortion cost when performing CC-ALF processing. The target classification policy is to determine the block classification information for performing CC-ALF on the chroma component based on the block classification information for performing ALF on the luma component. In addition, a fourth rate-distortion cost when performing CC-ALF processing by adopting the other classification policy for the chroma components of all target blocks in the current slice is calculated. Further, based on the third rate-distortion cost and the fourth rate-distortion cost, it is configured to determine the classification policy to be adopted when performing CC-ALF processing on the chroma component of the current slice.

[0238] In some embodiments of the present application, based on the foregoing aspects, the second processing unit 1208 is further configured to determine the size information of the target block according to a preset size, or to encode the size information of the target block in the sequence parameter set, picture parameter set, picture header or slice header of the video bitstream.

[0239] In one embodiment, the present application further provides an electronic device including a memory storing computer-readable instructions and a processor that, when executing the computer-readable instructions, implements the method described in any of the above embodiments.

[0240] FIG. 13 shows a schematic configuration diagram of a computer system suitable for realizing the electronic device according to an embodiment of the present application.

[0241] Note that the computer system 1300 of the electronic device shown in FIG. 13 is only an example and does not limit the functions and application scope of the embodiments of the present application in any way.

[0242] As shown in FIG. 13, the computer system 1300 includes a central processing unit (CPU) 1301 that can execute various appropriate operations and processes, for example, the methods described in the above embodiments, according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage unit 1308 into a random access memory (RAM) 1303. Various programs and data necessary for the operation of the system are also stored in the RAM 1303. The CPU 1301, ROM 1302, and RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.

[0243] Connected to the I / O interface 1305 are an input unit 1306 including a keyboard, a mouse, etc., an output unit 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc., a storage unit 1308 including a hard disk, etc., and a communication unit 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication unit 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. By installing a removable medium 1311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. in the drive 1310 as needed, it becomes easy to install the computer program read therefrom in the storage unit 1308 as needed.

[0244] In particular, according to the embodiments of the present application, the processes described above with reference to the flowchart may be implemented as a computer software program. For example, in another aspect, the present application further provides a computer program product including computer-readable instructions that, when executed by a processor, implement the methods described in any of the above embodiments. In such an embodiment, the computer-readable instructions can be downloaded and installed from a network via the communication unit 1309 and / or installed from the removable media 1311.

[0245] The units described in the embodiments of the present application may be implemented by software, may be implemented by hardware, and the described units may also be arranged within a processor. The names of these units do not limit the unit itself in some cases.

[0246] In another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments or may be a separate entity not incorporated into this electronic device. The above computer-readable medium is loaded with one or more computer-readable instructions that, when executed by an electronic device, cause the electronic device to implement the methods described in any of the above embodiments. It should be noted that in the above detailed description, reference is made to some modules or units of the device for performing operations, but such a division is not essential. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described modules or units can be embodied within one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied in a plurality of modules or units.

[0247] From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software or by a combination of software and the necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, and this software product includes some instructions for causing a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application and can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a portable hard disk, etc.) or on a network.

[0248] Each constituent element of the above-described embodiments can be arbitrarily combined. For the sake of brevity of description, not all possible combinations of the constituent elements in the above-described embodiments have been described. However, as long as there is no contradiction in the combination of these constituent elements, all of them should be regarded as being within the scope described in this specification.

[0249] The above-described embodiments only represent some embodiments of the present application, and their descriptions are more specific and detailed, but it should not be understood that they limit the scope of the claims. It should be noted that those skilled in the art can make some modifications and improvements without departing from the idea of the present application, and all of these belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be based on the appended claims.

Claims

Claim 1 A loop filtering method executed by a video encoding device or a video decoding device, comprising: obtaining block classification information when performing adaptive loop filtering on a luma component in a video image frame; determining block classification information for performing cross-component adaptive loop filtering on a chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; selecting a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component, and performing a cross-component adaptive loop filtering process on the chroma component; wherein the step of performing the cross-component adaptive loop filtering process is such that when the value of a first flag bit indicating whether to employ the cross-component adaptive loop filtering process for the chroma component of a target block in the current slice indicates that the cross-component adaptive loop filtering process is employed for the chroma components of some target blocks in the current slice, and when the value of a second flag bit indicating whether to employ the cross-component adaptive loop filtering process for the chroma component of the corresponding target block indicates that the cross-component adaptive loop filtering process is employed, the cross-component adaptive loop filtering process is performed on the chroma component of the corresponding target block; A loop filtering method characterized by the above. Claim 2 The step of determining block classification information for performing cross-component adaptive loop filtering on a chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component includes setting the classification result when performing adaptive loop filtering on the luma component of a sub-block as the classification result of the block when performing cross-component adaptive loop filtering on the chroma component of the sub-block. The loop filtering method according to claim 1, characterized by the above. Claim 3 A step of determining block classification information for performing cross-component adaptive loop filtering on a chroma component in the video image frame based on block classification information when performing adaptive loop filtering on the luma component, including a step of using a classification result and a corresponding geometric transformation type when performing adaptive loop filtering on the luma component of the sub-block as a classification result and a geometric transformation type when performing cross-component adaptive loop filtering on the chroma component of the sub-block, The loop filtering method according to claim 1, characterized in that.

4. The loop filtering method is further including a step of determining a merge result of a cross-component adaptive loop filter when performing cross-component adaptive loop filtering on the chroma component based on a merge result of an adaptive loop filter when performing adaptive loop filtering on the luma component, The loop filtering method according to claim 1 or 3, characterized in that.

5. The loop filtering method is further including a step of determining a merge result of a filter when performing adaptive loop filtering on the luma component and when performing cross-component adaptive loop filtering on the chroma component based on a rate-distortion cost for performing filter merge during adaptive loop filtering of the luma component and a rate-distortion cost for performing filter merge during cross-component adaptive loop filtering of the chroma component, The loop filtering method according to claim 1 or 3, characterized in that.

6. The loop filtering method is further including a step of determining the number of available filters when performing cross-component adaptive loop filtering on the chroma component based on the number of filters determined when performing adaptive loop filtering on the luma component, The loop filtering method according to claim 1 or 3, characterized in that.

7. A video decoding method executed by a video decoding device, including a step of obtaining block classification information when performing adaptive loop filtering on a luma component in a video image frame, A step of decoding a first flag bit corresponding to a current slice from a video bit stream, wherein the value of the first flag bit is for indicating whether to employ cross-component adaptive loop filtering processing for the chroma component of a target block in the current slice. When the value of the first flag bit indicates that the cross-component adaptive loop filtering processing is to be employed for the chroma components of some target blocks in the current slice, a step of decoding a second flag bit corresponding to each target block included in the current slice from the video bit stream, wherein the value of the second flag bit is for indicating whether to employ the cross-component adaptive loop filtering processing for the chroma component of the corresponding target block. A step of determining block classification information for performing cross-component adaptive loop filtering on the chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component. A step of selecting a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component and performing the cross-component adaptive loop filtering processing on the chroma component. A step of decoding the video bit stream based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component. A video decoding method including the above steps.

8. If the value of the first flag bit is a first value, it indicates that the cross-component adaptive loop filtering processing is to be employed for the chroma components of some target blocks in the current slice, or it indicates that the cross-component adaptive loop filtering processing is to be employed for the chroma components of all target blocks in the current slice. If the value of the first flag bit is a second value, it indicates that the cross-component adaptive loop filtering processing is not to be employed for the chroma components of all target blocks in the current slice. The video decoding method according to claim 7, characterized in that...

9. Each of the two chroma components of the target block corresponds to one second flag bit, and the value of each second flag bit indicates whether to employ the cross-component adaptive loop filtering process for the corresponding chroma component in the target block. The video decoding method according to claim 7, characterized in that...

10. The two chroma components of the target block correspond to the same second flag bit, and the value of the same second flag bit indicates whether to employ the cross-component adaptive loop filtering process for the two chroma components in the target block. The video decoding method according to claim 7, characterized in that...

11. The video decoding method is as follows: Decoding an adaptive parameter set from the video bitstream; When the value of the first flag bit indicates that the cross-component adaptive loop filtering process is to be employed for at least one chroma component in the current slice, decoding an index of the adaptive parameter set corresponding to the current slice from the video bitstream; Selecting a corresponding filter coefficient from the adaptive parameter set corresponding to the index of the adaptive parameter set, and filtering the chroma component of the target block. The video decoding method according to claim 7, characterized in that...

12. The current slice corresponds to one first flag bit for each of the two chroma components, and the value of each first flag bit indicates whether to employ the cross-component adaptive loop filtering process for the corresponding chroma component in the current slice. The video decoding method according to any one of claims 7 to 11, characterized in that...

13. The current slice corresponds to the same first flag bit for the two chroma components, and the value of the same first flag bit indicates whether to employ the cross-component adaptive loop filtering process for the two chroma components in the current slice. The video decoding method according to any one of claims 7 to 11, characterized in that...

14. Before the step of determining block classification information for performing cross-component adaptive loop filtering on the chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component, the video decoding method comprises: decoding, from a video bitstream, an adaptive parameter set and a third flag bit corresponding to a current slice, wherein a value of the third flag bit is for indicating whether to perform cross-component adaptive loop filtering processing on a chroma component of a target block in the current slice; when the value of the third flag bit indicates that it is necessary to perform cross-component adaptive loop filtering processing on the chroma component of the target block in the current slice, decoding, from the video bitstream, an index of the adaptive parameter set corresponding to the current slice; obtaining, from the adaptive parameter set corresponding to the index of the adaptive parameter set, a fourth flag bit corresponding to the chroma component of the current slice, wherein a value of the fourth flag bit is for indicating a classification policy to be adopted when performing cross-component adaptive loop filtering processing on the chroma component of the current slice; and the classification policy includes determining block classification information for performing cross-component adaptive loop filtering on the chroma component based on the block classification information for performing adaptive loop filtering on the luma component, or another classification policy. The video decoding method according to claim 7, characterized in that. **Claim 15** If the value of the fourth flag bit corresponding to the chroma component of the current slice is a first value, it indicates that the classification policy to be adopted when performing cross-component adaptive loop filtering processing on the chroma component of the current slice is to determine block classification information for performing cross-component adaptive loop filtering on the chroma component based on the block classification information for performing adaptive loop filtering on the luma component. If the value of the fourth flag bit corresponding to the chroma component of the current slice is the second value, it indicates that the classification policy adopted when performing cross-component adaptive loop filtering processing on the chroma component of the current slice is the other classification policy. The video decoding method according to claim 14, characterized in that.

16. The video decoding method is as follows: When the value of the third flag bit indicates that it is necessary to perform cross-component adaptive loop filtering processing on the chroma components of some target blocks in the current slice, the step of decoding a fifth flag bit corresponding to each target block included in the current slice from the video bitstream, where the value of the fifth flag bit is for indicating whether to perform cross-component adaptive loop filtering processing on the chroma component of the corresponding target block. The method further includes this step. The video decoding method according to claim 14, characterized in that.

17. Each of the two chroma components of the current slice corresponds to one fourth flag bit, and the value of each fourth flag bit indicates the classification policy adopted when performing cross-component adaptive loop filtering processing on the corresponding chroma component in the current slice. The video decoding method according to any one of claims 14 to 16, characterized in that.

18. The two chroma components of the current slice correspond to the same fourth flag bit, and the value of the same fourth flag bit indicates the classification policy adopted when performing cross-component adaptive loop filtering processing on the two chroma components in the current slice. The video decoding method according to any one of claims 14 to 16, characterized in that.

19. A video encoding method executed by a video encoding device, comprising: The step of obtaining block classification information when performing adaptive loop filtering on the luma component in a video image frame; The step of obtaining a first flag bit corresponding to the current slice, where the value of the first flag bit is for indicating whether to adopt cross-component adaptive loop filtering processing on the chroma component of the target block in the current slice. When the value of the first flag bit indicates that the cross-component adaptive loop filtering process is to be employed for the chroma components of some target blocks in the current slice, a step of obtaining a second flag bit corresponding to each target block included in the current slice, where the value of the second flag bit is for indicating whether to employ the cross-component adaptive loop filtering process for the chroma component of the corresponding target block, the step; A step of determining block classification information for performing cross-component adaptive loop filtering on the chroma components in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; A step of selecting a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component and performing the cross-component adaptive loop filtering process on the chroma component; A step of encoding the video image frame based on the adaptive loop filtering process result of the luma component and the cross-component adaptive loop filtering process result of the chroma component to obtain a video bitstream; A video encoding method including the above.

20. An acquisition unit configured to acquire block classification information when performing adaptive loop filtering on the luma component in a video image frame; A determination unit configured to determine block classification information for performing cross-component adaptive loop filtering on the chroma components in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; A filtering unit configured to select a corresponding filter coefficient based on the block classification information for performing cross-component adaptive loop filtering on the chroma component and perform the cross-component adaptive loop filtering process on the chroma component; Comprising; The filtering unit is For the chroma component of the target block in the current slice, when the value of the first flag bit indicating whether to adopt the cross-component adaptive loop filtering process is such that the cross-component adaptive loop filtering process is adopted for the chroma components of some target blocks in the current slice, and when the value of the second flag bit indicating whether to adopt the cross-component adaptive loop filtering process for the chroma component of the corresponding target block is such that the cross-component adaptive loop filtering process is adopted, perform the cross-component adaptive loop filtering process for the chroma component of the corresponding target block. A loop filtering apparatus characterized by the above.

21. An acquisition unit configured to acquire block classification information when performing adaptive loop filtering on the luma component in a video image frame; A unit that decodes a first flag bit corresponding to a current slice from a video bitstream, wherein the value of the first flag bit is for indicating whether to adopt a cross-component adaptive loop filtering process for the chroma component of the target block in the current slice; A unit that, when the value of the first flag bit indicates that the cross-component adaptive loop filtering process is adopted for the chroma components of some target blocks in the current slice, decodes a second flag bit corresponding to each target block included in the current slice from the video bitstream, wherein the value of the second flag bit is for indicating whether to adopt the cross-component adaptive loop filtering process for the chroma component of the corresponding target block; A determination unit configured to determine block classification information for performing cross-component adaptive loop filtering on the chroma component in the video image frame based on the block classification information for performing adaptive loop filtering on the luma component. Based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, a corresponding filter coefficient is selected, and a filtering unit configured to perform the cross-component adaptive loop filtering process on the chroma component; A first processing unit configured to decode a video bitstream based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component; A video decoding apparatus characterized by comprising the above.

22. An acquisition unit configured to acquire block classification information when performing adaptive loop filtering on the luma component in a video image frame; A unit for acquiring a first flag bit corresponding to the current slice, wherein the value of the first flag bit is for indicating whether to adopt cross-component adaptive loop filtering processing for the chroma component of the target block in the current slice; A unit for acquiring a second flag bit corresponding to each target block included in the current slice when the value of the first flag bit indicates that cross-component adaptive loop filtering processing is to be adopted for the chroma components of some target blocks in the current slice, wherein the value of the second flag bit is for indicating whether to adopt cross-component adaptive loop filtering processing for the chroma component of the corresponding target block; A determination unit configured to determine block classification information when performing cross-component adaptive loop filtering on the chroma component in the video image frame based on the block classification information when performing adaptive loop filtering on the luma component; Based on the block classification information when performing cross-component adaptive loop filtering on the chroma component, a corresponding filter coefficient is selected, and a filtering unit configured to perform the cross-component adaptive loop filtering process on the chroma component; A second processing unit configured to encode the video image frame based on the adaptive loop filtering processing result of the luma component and the cross-component adaptive loop filtering processing result of the chroma component to obtain a video bitstream; A video encoding apparatus, characterized by comprising the same.

23. An electronic device comprising: a memory storing computer-readable instructions; and a processor that, when executing the computer-readable instructions, implements the steps of any one of the loop filtering method according to claim 1, the video decoding method according to claim 7, and the video encoding method according to claim 19.

24. A computer program including computer-readable instructions that, when executed by a processor, implement the steps of any one of the loop filtering method according to claim 1, the video decoding method according to claim 7, and the video encoding method according to claim 19.

Citation Information

Patent Citations

  • Block-Based Adaptive Loop Filter (ALF) Design and Signaling

    JP2021525981A

  • Cross-component adaptive loop filter using LUMA differences

    WO2021083258A1