Video processing method and apparatus

CN117596414BActive Publication Date: 2026-09-18PEKING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311663855.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2026-09-18
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

[0006]在块划分、预测、变换、量化和熵编码的编码过程中,由于量化的存在,解码重构视频中会存在块效应、振铃效应等压缩失真,同时,帧间预测模式中,重构视频中的压缩失真会影响后续图像的编码质量

Benefits of technology

[0033] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117596414B_ABST
    Figure CN117596414B_ABST
Patent Text Reader

Abstract

A video processing method and apparatus are disclosed. The video processing method includes determining a target cross-component ALF filter for a chroma component of a current block from a plurality of cross-component ALF filters; determining target cross-component ALF filter coefficients for the chroma component of the current block according to an ALFed chroma component of the current block and an un-ALFed luma component of the current block; filtering the ALFed chroma component of the current block according to the target cross-component ALF filter and the target cross-component ALF filter coefficients; determining a filtered chroma component of the current block according to the ALFed chroma component after the target cross-component ALF filter coefficients filtering and the ALFed chroma component of the current block, wherein the target cross-component ALF filter adopts a 3x4 diamond shape; and encoding the filtered chroma component of the current block, and encoding a total number of the plurality of cross-component ALF filters, an index of the target cross-component ALF filter, and the target cross-component ALF filter coefficients for the chroma component of the current block as syntax elements.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of PCT patent application No. 201980051177.5 entitled "Method and Apparatus for Loop Filtering", which was filed with the International Bureau on December 31, 2019 and entered the Chinese national phase on February 1, 2021.

[0002] Copyright Statement

[0003] This patent document discloses material protected by copyright. The copyright belongs to the copyright holder. The copyright holder does not object to anyone copying this patent document or the patent disclosure as it exists in the official records and archives of the Patent and Trademark Office. Technical Field

[0004] This invention relates to the field of digital video coding technology, and more specifically, to a video processing method and apparatus. Background Technology

[0005] Currently, to reduce the bandwidth consumed by video storage and transmission, video data needs to be encoded and compressed. Commonly used encoding techniques involve video encoding and compression processes including block partitioning, prediction, transform, quantization, and entropy coding, forming a hybrid video coding framework. Based on this hybrid framework, and after decades of development, video codec technology standards have gradually emerged. Currently, some mainstream video codec standards include: international video coding standards H.264 / MPEG-AVC and H.265 / MPEG-HEVC; the domestic audio and video coding standard AVS2; and the international standard H.266 / VVC and the domestic standard AVS3, which are currently under development.

[0006] During the encoding process of block partitioning, prediction, transform, quantization, and entropy coding, the presence of quantization leads to compression distortions such as block artifacts and ringing artifacts in the decoded and reconstructed video. Furthermore, in inter-frame prediction mode, compression distortion in the reconstructed video affects the coding quality of subsequent images. Therefore, to reduce compression distortion, an in-loop filter technique is introduced into the encoding / decoding framework to improve the quality of the current decoded image and provide a high-quality reference image for subsequent encoded images, thereby improving compression efficiency.

[0007] In the currently developing Versatile Video Coding (VVC) standard and some High Efficiency Video Coding (HEVC) standards, loop filters include deblocking filters (DBF), Sample Adaptive Offset (SAO), and Adaptive Loop Filters (ALF). However, there is still room for improvement in the filtering process. Summary of the Invention

[0008] This invention provides a method and apparatus for loop filtering, which, compared with the prior art, can reduce the complexity of loop filtering and improve the filtering effect.

[0009] Firstly, a loop filtering method is provided, including:

[0010] Determine the target filter for the chromaticity component of the current block from multiple cross-component adaptive loop filtering (ALF) filters;

[0011] The target filtering coefficients for the chrominance components of the current block are determined based on the ALF-processed chrominance components and the ALF-unprocessed luminance components of the current block.

[0012] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0013] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0014] The current block is encoded based on its filtered chroma components, and the total number of the multiple cross-component ALF filters is encoded as a syntax element, wherein the bitstream of a frame contains only one syntax element indicating the total number of the multiple cross-component ALF filters.

[0015] Secondly, a loop filtering method is provided, including:

[0016] The total number of cross-component ALF filters and the index of the target filter are decoded from the bitstream, wherein the target filter is the ALF filter used by the chroma component of the current block; wherein, the bitstream of a frame contains only one syntax element for indicating the total number of cross-component ALF filters.

[0017] The target filtering coefficients for the chrominance components of the current block are determined based on the ALF-processed chrominance components and the ALF-unprocessed luminance components of the current block.

[0018] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0019] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0020] Thirdly, a loop filtering device is provided, comprising: a memory for storing code;

[0021] A processor is configured to execute code stored in the memory to perform the following operations:

[0022] Determine the target filter for the chromaticity component of the current block from multiple cross-component adaptive loop filtering (ALF) filters;

[0023] The target filtering coefficients for the chrominance components of the current block are determined based on the ALF-processed chrominance components and the ALF-unprocessed luminance components of the current block.

[0024] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0025] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0026] The current block is encoded based on its filtered chroma components, and the total number of the multiple cross-component ALF filters is encoded as a syntax element, wherein the bitstream of a frame contains only one syntax element indicating the total number of the multiple cross-component ALF filters.

[0027] Fourthly, a loop filtering device is provided, comprising:

[0028] Memory, used to store code;

[0029] A processor is configured to execute code stored in the memory to perform the following operations:

[0030] The total number of cross-component ALF filters and the index of the target filter are decoded from the bitstream, wherein the target filter is the ALF filter used by the chroma component of the current block; wherein, the bitstream of a frame contains only one syntax element for indicating the total number of cross-component ALF filters.

[0031] The target filtering coefficients for the chrominance components of the current block are determined based on the ALF-processed chrominance components and the ALF-unprocessed luminance components of the current block.

[0032] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0033] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0034] The technical method of this application improves encoding and decoding performance by optimizing the encoding method in the encoding and decoding loop filtering process. Attached Figure Description

[0035] Figure 1 This is an architecture diagram of the technical solution applied in the embodiments of this application.

[0036] Figure 2 This is a schematic diagram of a video encoding framework according to an embodiment of this application.

[0037] Figure 3 This is a schematic diagram of a video decoding framework according to an embodiment of this application.

[0038] Figure 4 This is a schematic diagram of a Wiener filter according to an embodiment of this application.

[0039] Figure 5a This is a schematic diagram of an ALF filter according to an embodiment of this application.

[0040] Figure 5b This is a schematic diagram of another ALF filter according to an embodiment of this application.

[0041] Figure 6 This is a schematic flowchart of a loop filtering method according to an embodiment of this application.

[0042] Figure 7 This is a schematic diagram of the shape of a CC-ALF filter according to an embodiment of this application.

[0043] Figure 8 This is a schematic flowchart of a loop filtering method according to another embodiment of this application.

[0044] Figure 9 This is a schematic flowchart of a loop filtering method according to another embodiment of this application.

[0045] Figure 10 This is a schematic flowchart of a loop filtering apparatus according to another embodiment of this application.

[0046] Figure 11 This is a schematic flowchart of a loop filtering apparatus according to another embodiment of this application. Detailed Implementation

[0047] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0048] The embodiments of this application can be applied to standard or non-standard image or video encoders. For example, encoders based on the VVC standard.

[0049] It should be understood that the specific examples in this document are only intended to help those skilled in the art better understand the embodiments of this application, and are not intended to limit the scope of the embodiments of this application.

[0050] It should also be understood that the formulas in the embodiments of this application are merely examples and are not intended to limit the scope of the embodiments of this application. The formulas can be modified, and these modifications should also fall within the scope of protection of this application.

[0051] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0052] It should also be understood that the various implementation methods described in this specification can be implemented individually or in combination, and the embodiments of this application are not limited in this respect.

[0053] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this application includes any and all combinations of one or more of the associated listed items.

[0054] Figure 1 This is an architecture diagram of the technical solution applied in the embodiments of this application.

[0055] like Figure 1As shown, system 100 can receive data to be processed 102, process the data to be processed 102, and generate processed data 108. For example, system 100 can receive data to be encoded, encode the data to be encoded to generate encoded data, or system 100 can receive data to be decoded, decode the data to be decoded to generate decoded data. In some embodiments, the components in system 100 can be implemented by one or more processors, which can be processors in computing devices or processors in mobile devices (e.g., drones). The processor can be any type of processor, and this embodiment of the invention does not limit this. In some possible designs, the processor can include an encoder, a decoder, or a codec, etc. System 100 may also include one or more memories. The memories can be used to store instructions and data, such as computer-executable instructions for implementing the technical solutions of this embodiment of the invention, data to be processed 102, processed data 108, etc. The memories can be any type of memory, and this embodiment of the invention does not limit this.

[0056] The data to be encoded can include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded. In some cases, the data to be encoded can include sensing data from sensors, such as vision sensors (e.g., cameras, infrared sensors), microphones, near-field sensors (e.g., ultrasonic sensors, radar), position sensors, temperature sensors, touch sensors, etc. In some cases, the data to be encoded can include information from the user, such as biometric information, which can include facial features, fingerprint scans, retinal scans, voice recordings, DNA samples, etc.

[0057] Figure 2 This is a schematic diagram of a video encoding framework 2 according to an embodiment of this application. For example... Figure 2 As shown, after receiving the video to be encoded, each frame in the video is encoded sequentially, starting from the first frame. The current encoded frame mainly undergoes prediction, transformation, quantization, and entropy coding, ultimately outputting the bitstream of the current encoded frame. Correspondingly, the decoding process typically involves decoding the received bitstream in reverse order to recover the video frame information before decoding.

[0058] Specifically, such as Figure 2 As shown, the video encoding framework 2 includes an encoding control module 201, used for decision-making and control actions during the encoding process, as well as parameter selection. For example, as Figure 2As shown, the encoding control module 201 controls the parameters used in the transformation, quantization, inverse quantization, and inverse transformation, controls the selection of intra-frame or inter-frame modes, and controls the parameters for motion estimation and filtering. The control parameters of the encoding control module 201 are also input to the entropy encoding module to be encoded into a part of the encoded bitstream.

[0059] When encoding a frame to be encoded begins, the frame is divided into segments (202). Specifically, it is first sliced, and then divided into blocks. Optionally, in one example, the frame to be encoded is divided into multiple non-overlapping largest coding tree units (CTUs). Each CTU can be iteratively divided into a series of smaller coding units (CUs) using a quadtree, binary tree, or ternary tree approach. In some examples, a CU may also contain associated prediction units (PUs) and transform units (TUs), where the PU is the basic unit for prediction, and the TU is the basic unit for transformation and quantization. In some examples, the PU and TU are obtained by dividing a CU into one or more blocks, where one PU contains multiple prediction blocks (PBs) and related syntax elements. In some examples, the PU and TU can be the same, or they can be obtained from the CU using different segmentation methods. In some examples, at least two of the CU, PU, ​​and TU are the same; for example, CU, PU, ​​and TU are not distinguished, and prediction, quantization, and transformation are all performed at the CU level. For ease of description, CTU, CU, or other data units will be referred to as coded blocks in the following text.

[0060] It should be understood that, in the embodiments of this application, the data unit targeted by video encoding can be a frame, stripe, coding tree unit, coding unit, coding block, or any group thereof. The size of the data unit can vary in different embodiments.

[0061] Specifically, such as Figure 2 As shown, after the frame to be encoded is divided into multiple coding blocks, a prediction process is performed to remove spatial and temporal redundancy information of the current frame to be encoded. Currently, commonly used predictive coding methods include intra-frame prediction and inter-frame prediction. Intra-frame prediction uses only the reconstructed information in the current frame to predict the current coding block, while inter-frame prediction uses information from other previously reconstructed frames (also called reference frames) to predict the current coding block. Specifically, in this embodiment, the coding control module 201 is used to decide whether to perform intra-frame prediction or inter-frame prediction.

[0062] When the intra-prediction mode is selected, the intra-prediction process 203 includes obtaining the reconstructed blocks of the coded neighboring blocks around the current coded block as reference blocks. Based on the pixel values ​​of the reference blocks, the prediction mode method is used to calculate the prediction values ​​to generate a prediction block. The corresponding pixel values ​​of the current coded block and the prediction block are subtracted to obtain the residual of the current coded block. The residual of the current coded block is transformed 204, quantized 205, and entropy encoded 210 to form the bitstream of the current coded block. Furthermore, all coded blocks of the current frame to be encoded are processed through the above encoding process to form a part of the coded bitstream of the frame to be encoded. In addition, the control and reference data generated in the intra-prediction 203 are also encoded through entropy encoded 210 to form a part of the coded bitstream.

[0063] Specifically, Transform 204 is used to remove the correlation of the residuals of image blocks in order to improve coding efficiency. The transformation of the residual data of the current coding block usually adopts two-dimensional discrete cosine transform (DCT) and two-dimensional discrete sine transform (DST). For example, at the encoding end, the residual information of the block to be encoded is multiplied by an N×M transformation matrix and its transpose matrix, respectively. The transformation coefficients of the current coding block are obtained after multiplication.

[0064] After generating the transform coefficients, quantization 205 is used to further improve the compression efficiency. The transform coefficients can be quantized to obtain quantized coefficients. Then, the quantized coefficients are entropy encoded 210 to obtain the residual bitstream of the current coding block. The entropy encoding method includes, but is not limited to, Context Adaptive Binary Arithmetic Coding (CABAC) entropy encoding.

[0065] Specifically, the encoded neighboring blocks in the intra-frame prediction 203 process are: neighboring blocks that were encoded before the current coded block was encoded. The reconstructed block is obtained by adding the residual generated during the encoding process of these neighboring blocks to the predicted block of these neighboring blocks after transform 204, quantization 205, inverse quantization 206, and inverse transform 207. Correspondingly, inverse quantization 206 and inverse transform 207 are the inverse processes of quantization 206 and transform 204, used to recover the residual data before quantization and transform.

[0066] like Figure 2As shown, when the inter-frame prediction mode is selected, the inter-frame prediction process includes motion estimation 208 and motion compensation 209. Specifically, motion estimation 208 is performed based on reference frame images in the reconstructed video frame. In one or more reference frame images, the image block most similar to the current coding block is searched according to a certain matching criterion as the matching block. The relative displacement between this matching block and the current coding block is the motion vector (MV) of the current block to be encoded. After motion estimation of all coding blocks in the frame to be encoded, motion compensation 209 is performed on the current frame to be encoded based on the motion vector and the reference frame to obtain the predicted value of the current frame to be encoded. The original value of the pixel of the frame to be encoded is subtracted from the corresponding predicted value to obtain the residual of the frame to be encoded. The residual of the current frame to be encoded is transformed 204, quantized 205, and entropy encoded 210 to form a part of the encoded bitstream of the frame to be encoded. In addition, the control and reference data generated in motion compensation 209 are also encoded by entropy encoded 210 to form a part of the encoded bitstream.

[0067] Among them, such as Figure 2 As shown, the reconstructed video frame is obtained after filtering 211. Filtering 211 is used to reduce compression distortions such as blocking and ringing effects generated during the encoding process. During encoding, the reconstructed video frame is used to provide a reference frame for inter-frame prediction; during decoding, the reconstructed video frame is output as the final decoded video after post-processing. In the embodiments of this application, filtering 211 includes at least one of the following filtering techniques: deblocking (DB) filtering, adaptive sample offset (SAO) filtering, adaptive loop filtering (ALF), and cross-component ALF (CC-ALF). In one example, ALF is set after DB and / or SAO. In one example, the luminance component before ALF is used to filter the chrominance component after ALF. The filtering parameters in the filtering 211 process are also transmitted to entropy coding for encoding, forming a part of the encoded bitstream.

[0068] Figure 3 This is a schematic diagram of the video decoding framework 3 according to an embodiment of this application. Figure 3As shown, video decoding performs the operation steps corresponding to video encoding. First, entropy decoding 301 is used to obtain one or more data information from the encoded bitstream, including residual data, prediction syntax, intra-frame prediction syntax, motion compensation syntax, and filtering syntax. The residual data undergoes inverse quantization 302 and inverse transform 303 to obtain the original residual data information. Furthermore, based on the prediction syntax, it is determined whether the current decoding block uses intra-frame prediction or inter-frame prediction. If it is intra-frame prediction 304, prediction information is constructed using the reconstructed image blocks in the current frame according to the intra-frame prediction syntax obtained from decoding. If it is inter-frame prediction, a reference block is determined in the reconstructed image according to the motion compensation syntax obtained from decoding to obtain prediction information. Next, the prediction information and residual information are superimposed, and after filtering 311, a reconstructed video frame is obtained. The reconstructed video frame undergoes post-processing 306 to obtain the decoded video.

[0069] Specifically, in the embodiments of this application, the filter 311 can be combined with... Figure 2 The filter 211 is the same as that in the above, including at least one of the following: deblocking DB filter, adaptive sample compensation offset SAO filter, adaptive loop filter ALF, and cross-component ALF (CC-ALF). Among them, the filter parameters and control parameters in filter 311 can be obtained by entropy decoding of the encoded bitstream, and filtering is performed based on the obtained filter parameters and control parameters respectively.

[0070] In one example, DB filtering is used to process pixels at the boundary between the prediction unit (PU) and the transform unit (TU). It utilizes a trained low-pass filter to non-linearly weight boundary pixels, thereby reducing block artifacts. In another example, SAO filtering uses coded blocks in the frame image as units to classify pixel values ​​within a block and adds a compensation value to each class. Different coded blocks use different filtering methods, and the compensation values ​​for different classes of pixels within different blocks vary, making the reconstructed frame image closer to the original frame image and avoiding ringing artifacts. In yet another example, ALF filtering is a Wiener filtering process. Based on the principles of Wiener filtering, filter coefficients are calculated and applied. It primarily minimizes the mean-square error (MSE) between the reconstructed frame image and the original frame image, thereby further improving the image quality of the reconstructed frame, increasing the accuracy of motion estimation and motion compensation, and effectively improving the coding efficiency of the entire coding system. However, ALF filtering is complex and computationally expensive, presenting certain drawbacks in practical applications.

[0071] To make it easier to understand, the following will be combined with Figure 4 , Figure 5a and Figure 5bAn example of the ALF filtering process is described.

[0072] ALF filter coefficient calculation principle

[0073] First, based on the Wiener filtering principle, explain the method for calculating the ALF filter coefficients, such as... Figure 4 As shown, a pixel signal in the original encoded frame is X. After encoding, DB filtering, and SAO filtering, the reconstructed pixel signal is Y. During this process, the noise or distortion introduced by Y is e. After the reconstructed pixel signal is filtered by the filtering coefficient f in the Wiener filter, the ALF reconstructed signal is formed. This makes the ALF reconstructed signal The ALF filter coefficients are obtained by minimizing the mean square error between the original pixel signal and the filter. Specifically, the formula for calculating f is as follows:

[0074]

[0075] Alternatively, in one possible implementation, a filter composed of a set of ALF filter coefficients is as follows: Figure 5a and Figure 5b As shown, there are 13 filter coefficients symmetrically distributed from C0 to C12, with a filter length L of 7; or 7 filter coefficients symmetrically distributed from C0 to C6, with a filter length L of 5. Optionally, Figure 5a The filter shown is also called a 7x7 filter and is suitable for encoding the luminance component of a frame. Figure 5b The filter shown is also called a 5x5 filter and is suitable for encoding the chroma component of a frame.

[0076] It should be understood that, in the embodiments of this application, the filter composed of the ALF filter coefficients can also be other forms of filter, such as filters with symmetrical distribution and a filter length of 9, etc., and the embodiments of this application do not limit this.

[0077] Optionally, in a linear ALF filtering process, for the pixel to be filtered in the reconstructed image frame, the weighted average of the surrounding pixels is used to obtain the filtered result of the current point, i.e., the corresponding pixel in the ALF reconstructed image frame. Specifically, pixel I(x,y) in the reconstructed image frame is the current pixel to be filtered, (x,y) is the position coordinate of the current pixel to be filtered in the encoded frame, the filter coefficient at the center of the filter corresponds to it, and the other filter coefficients in the filter correspond one-to-one with the pixels surrounding I(x,y). The filter coefficient values ​​in the filter are the weights. The filter coefficient values ​​in the filter are multiplied by the corresponding pixel values, summed, and then averaged to obtain the filtered pixel value O(x,y) of the current pixel to be filtered I(x,y). The specific calculation formula is as follows:

[0078]

[0079] Where w(i,j) represents any filter coefficient in the filter, (i,j) represents the relative position of the filter coefficient from the center point, and i and j are both integers less than L / 2 and greater than -L / 2, where L is the length of the filter. For example, as Figure 5a As shown in the filter diagram, the filter coefficient C12 at the center of the filter is represented as w(0,0), the filter coefficient C6 above C12 is represented as w(0,1), and the filter coefficient C11 to the right of C12 is represented as w(1,0).

[0080] Following this method, each pixel in the reconstructed image frame is filtered sequentially to obtain the filtered ALF reconstructed image frame.

[0081] Alternatively, in one possible implementation, the filter coefficients w(i,j) of the filter are integers between [-1,1).

[0082] Optionally, in one possible implementation, the filter coefficients w(i,j) are amplified by a factor of 128 and then rounded to obtain w'(i,j), where w'(i,j) is an integer between -128 and 128. Specifically, encoding and transmitting the amplified w'(i,j) is easily implemented using hardware encoding and decoding, and the calculation formula for obtaining O(x,y) by filtering with the amplified w'(i,j) is as follows:

[0083]

[0084] Alternatively, in another nonlinear ALF filtering process, instead of directly using the filter as the weight and averaging multiple pixels to obtain the filtered result, a nonlinear parameter factor is introduced to optimize the filtering effect. Specifically, the formula for calculating O'(x,y) by filtering I(x,y) using nonlinear ALF filtering is as follows:

[0085]

[0086] The filter coefficients w(i,j) are integers between -1 and 1. K(d,b) is a clipping operation. .

[0087] Specifically, in the K(d,b) clip operation, k(i,j) represents the ALF correction clip parameter of the loop filter, hereinafter referred to as the correction parameter or clip parameter. Each filter coefficient w(i,j) corresponds to a clip parameter. For the luminance component of the encoded frame, the clip parameter is selected from {1024, 181, 32, 6}, and for the chrominance component of the encoded frame, the clip parameter is selected from {1024, 161, 25, 4}. The index corresponding to each clip parameter, i.e., the correction (clip) index parameter, needs to be written into the bitstream. If the clip parameter is 1024, the clip index parameter 0 should be written into the bitstream; similarly, if it is 181, 1 should be written into the bitstream. Therefore, it can be seen that the clip index parameters for both the luminance and chrominance classification of the encoded frame are integers between 0 and 3.

[0088] Pixel classification

[0089] Secondly, calculating a set of corresponding ALF filter coefficients for a single pixel is computationally complex and time-consuming. Furthermore, writing the ALF coefficients of every pixel into the bitstream would incur significant overhead. Therefore, it is necessary to classify the pixels in the reconstructed image and use the same set of ALF filter coefficients (one type of filter) for each class of pixels. This can reduce computational complexity and improve coding efficiency.

[0090] Alternatively, there can be many ways to classify pixels. For example, only the luminance (Y) component of a pixel can be classified, while the chrominance (UV) components are not classified. For example, the luminance (Y) component can be divided into 25 categories, while the chrominance (UV) components are not classified and have only one category. In other words, for a single frame of an image, the encoded frames for the luminance (Y) component can correspond to a maximum of 25 sets of filters, while the encoded frames for the chrominance (UV) components correspond to one set of filters.

[0091] It should be understood that in the embodiments of this application, the pixel category can be a category corresponding to the luminance Y component, but the embodiments of this application are not limited to this, and the pixel category can also be a category corresponding to other components or all components. For ease of description, the following description takes the classification and ALF filtering of the encoded frame of the luminance Y component as an example.

[0092] Optionally, in one possible implementation, the reconstructed image frame after DB filtering and SAO filtering is divided into multiple 4*4 pixel blocks. These multiple 4*4 blocks are then classified.

[0093] For example, each 4x4 block can be classified according to the Laplace direction:

[0094]

[0095] C represents the category of the pixel block. D represents the Laplacian direction. This is the result of fine-grained classification after performing direction (D) classification. There are multiple ways to obtain the data; this only represents the results of the fine classification.

[0096] The direction D is calculated as follows: First, calculate the Laplace gradient of the current 4x4 block in different directions. The calculation formula is:

[0097]

[0098]

[0099]

[0100]

[0101] Where i and j are the coordinates of the top left pixel of the current 4*4 block.

[0102] R(k,l) represents the reconstructed pixel value located at position (k,l) in the 4*4 block. This represents the vertical Laplacian gradient of the pixel located at coordinate (k,l) in a 4x4 block. This represents the horizontal Laplacian gradient of the pixel located at coordinate (k,l) in a 4x4 block. This represents the Laplacian gradient of the pixel located at coordinate (k,l) in the 4x4 block at a 135-degree angle. This represents the Laplacian gradient of a pixel located at coordinates (k,l) in a 4x4 block at 45 degrees.

[0103] Correspondingly, the calculated This represents the Laplace gradient of the current 4x4 block in the vertical direction. This represents the Laplace gradient of the current 4x4 block in the horizontal direction. This represents the Laplace gradient of the current 4x4 block at 135 degrees. This represents the Laplace gradient of the current 4x4 block at a 45-degree angle.

[0104] Then, based on the ratio of the extreme values ​​of the Laplace gradients in the four directions, direction D is determined. The specific calculation formula is as follows:

[0105] ,

[0106] ,

[0107]

[0108]

[0109] in, This represents the maximum value of the Laplace gradient in the horizontal and vertical directions. This represents the minimum value of the Laplace gradient in the horizontal and vertical directions. This represents the maximum value of the Laplace gradient in the 45° and 135° directions. This represents the minimum value of the Laplace gradient in the 45° and 135° directions. This represents the ratio of the horizontal to the vertical Laplace gradient. This represents the ratio of the Laplace gradients in the 45° and 135° directions.

[0110] if and D is set to 0.

[0111] if and D is set to 1.

[0112] if and D is set to 2.

[0113] if and D is set to 3.

[0114] if and D is set to 4.

[0115] t1 and t2 represent pre-set thresholds.

[0116] Alternatively, in one possible implementation, The calculation method is as follows:

[0117]

[0118] Quantize A to obtain integers between 0 and 4. .

[0119] Therefore, considering the values ​​of D and A, the value of C is an integer between 0 and 24. In this embodiment, a maximum of 4*4 blocks in a frame image can be divided into 25 categories.

[0120] Optionally, in one possible implementation, the coded frame has N types of 4*4 blocks, each type of 4*4 block has a set of ALF filter coefficients, where N is an integer between 1 and 25.

[0121] It should be understood that, in the embodiments of this application, in addition to dividing the entire frame image into multiple 4*4 blocks, it can also be divided into blocks of other pixel sizes, such as multiple 8*8 or 16*16 blocks. The embodiments of this application do not limit this.

[0122] It should also be understood that, in the embodiments of this application, in addition to the classification based on the Laplace direction as described above, other classification methods can also be used to classify blocks, and the embodiments of this application do not limit this.

[0123] It should also be understood that, in the embodiments of this application, the number of classifications can be any number other than 25, and the embodiments of this application do not limit this.

[0124] Block-based ALF filtering

[0125] ALF filtering can be categorized into frame-based ALF, block-based ALF, and quadtree-based ALF. Frame-based ALF uses a set of filtering coefficients to filter the entire frame. Block-based ALF divides the coded frame into equal-sized image blocks and determines whether to apply ALF filtering to each block. Quadtree-based ALF divides the coded frame into image blocks of varying sizes using a quadtree partitioning method and then determines whether to apply ALF filtering. Frame-based ALF is computationally simple but has poor filtering performance, while quadtree-based ALF has high computational complexity. Therefore, some standards or technologies, such as the recently developed VVC standard, use block-based ALF in its reference software VTM.

[0126] The block-based ALF in VTM is used as an example for illustration. In VTM, the encoded frame has a frame-level ALF filtering flag and a block-level ALF filtering flag. Optionally, the block level can be a CTU, CU, or other image block partitioning method. This application embodiment does not limit this; for ease of description, the CTU-level ALF filtering flag is used as an example below.

[0127] Specifically, when the frame-level ALF filtering flag indicates that ALF filtering is not performed, the CTU-level ALF filtering flag in the encoded frame is not marked. When the frame-level ALF filtering flag indicates that ALF filtering is performed, the CTU-level ALF filtering flag in the encoded frame is marked to indicate whether ALF filtering is performed at the current CTU.

[0128] Optionally, the encoded frame includes Z CTUs. The method for calculating the N sets of ALF filter coefficients in the encoded frame is as follows: The Z CTUs in the encoded frame are combined, considering whether or not ALF filtering is performed. For each combination, the N sets of ALF filter coefficients and the rate-distortion cost (RD Cost) of the encoded frame are calculated. Specifically, the calculation method for the i-th ALF coefficient in each set of ALF filter coefficients is as follows: Under the current CTU combination method, the i-th type of pixels in the CTUs that undergo ALF filtering are calculated using the parameter f, while the i-th type of pixels in other CTUs that do not undergo ALF filtering are not calculated using f. This yields the i-th ALF coefficient under the current combination method. It should be understood that the calculated N sets of ALF filter coefficients may differ under different combination methods.

[0129] The RD Cost is compared across multiple combinations, and the combination with the lowest RD Cost is determined as the final combination. Furthermore, the N sets of ALF filter coefficients calculated under this combination are the ALF filter coefficients with optimal adaptability.

[0130] When the minimum RD Cost combination is achieved by performing ALF filtering on at least one of the Z CTUs, the frame-level ALF flag of the encoded frame indicates that ALF filtering is performed. The CTU-level ALF flags sequentially indicate whether ALF filtering is performed in the CTU data. For example, a flag value of 0 indicates that ALF filtering is not performed, and a flag value of 1 indicates that ALF filtering is performed.

[0131] Specifically, when the minimum RD Cost combination is such that none of the Z CTUs perform ALF filtering, the encoded frame does not undergo ALF filtering, and the frame-level ALF flag of the encoded frame is marked as not performing ALF filtering. In this case, the CTU-level ALF flag is not marked.

[0132] It should be understood that the ALF in the embodiments of this application is not only applicable to the VVC standard, but also applicable to other block-based ALF technology solutions or standards.

[0133] Cross-Component ALF (CC-ALF)

[0134] In one example, CC-ALF is used to adjust the chromaticity component using the values ​​of the luminance component, thereby improving the quality of the chromaticity component. For easier understanding, the following example demonstrates this. Figure 6 An example of CC-ALF and ALF procedures is described. The current block includes a luminance component and a chrominance component, where the chrominance component includes a first chrominance component (e.g., Figure 6 Cb in the second chromaticity component (e.g., Cb) and the second chromaticity component (e.g., Cb) Figure 6(Cr in)

[0135] The luminance component is filtered sequentially through SAO and ALF. The first chrominance component is filtered sequentially through SAO and ALF. The second chrominance component is filtered sequentially through SAO and ALF. Additionally, a CC-ALF filter is used to apply CC-ALF to the chrominance components.

[0136] In one example, the shape of the CC-ALF filter can be as follows: Figure 7 As shown in the diagram, this CC-ALF filter uses a 3x4 rhombus shape with a total of 8 coefficients. The pixel marked 2 in the diagram represents the current first or second chromaticity component. The result of filtering the pixel at the position marked 2 is obtained by using a weighted average of the surrounding 7 points.

[0137] There can be multiple sets of filters in a single frame of an image. The first chroma component and the second chroma component can be filtered by selecting the same or different target filters from the same set of CC-ALF filters, or they can each select target filters from different sets of CC-ALF filters.

[0138] The total number of CC-ALF filters used in the current image needs to be written into the bitstream. This total number of CC-ALF filters may include the total number of CC-ALF filters for the first chroma component and / or the total number of CC-ALF filters for the second chroma component. If the total number of CC-ALF filters for the first chroma component is the same as the total number of CC-ALF filters for the second chroma component, or if the first and second chroma components can select target filters from the same set of CC-ALF filters, then only the total number of CC-ALF filters needs to be used to indicate this.

[0139] For the current block, the index of the target filter selected by the current block is also encoded into the bitstream. If the indexes of the target filters selected by the first chroma component and the second chroma component are the same or different, the indexes of the target filters for both chroma components can be encoded into the bitstream separately. Alternatively, if the indexes of the target filters selected by the first chroma component and the second chroma component are the same, only one index can be encoded into the bitstream; this index indicates the target filter for both chroma components.

[0140] The following is combined with Figure 6 Provide a detailed explanation.

[0141] Specifically, for the first chroma component: A target filter for the first chroma component of the current block is determined from multiple CC-ALF filters; target filtering coefficients for the first chroma component are determined based on the luminance component without ALF (e.g., after SAO and without ALF) and the first chroma component of the current block after ALF. The first chroma component is then filtered based on the target filter and target filtering coefficients. Finally, the filtering result for the first chroma component is determined based on the first chroma component filtered by the target filter and target filtering coefficients, and the first chroma component after ALF (e.g., after SAO and ALF sequentially).

[0142] For the second chroma component: The target filter for the second chroma component of the current block is determined from multiple CC-ALF filters; the target filter coefficients for the second chroma component are determined based on the luminance component without ALF (e.g., after SAO and without ALF) and the second chroma component of the current block after ALF. The second chroma component is filtered according to the target filter and target filter coefficients. Then, the filtering result of the second chroma component is determined based on the second chroma component filtered by the target filter and target filter coefficients, and the second chroma component after ALF (e.g., after SAO and ALF sequentially).

[0143] When encoding the current block, the total number of filters in multiple CC-ALFs is encoded into the bitstream as a syntax element, and the indexes of the target filters selected by the first chroma component and the second chroma component of the current block are encoded into the bitstream as syntax elements.

[0144] In one example, the bitstream of a single frame contains only one syntax element indicating the total number of CC-ALF filters. In another example, the syntax element indicating the total number of CC-ALF filters is located in the image's adaptation parameter set syntax. In yet another example, the syntax element indicating the total number of the multiple cross-component ALF filters is not present in the image header and / or slice header.

[0145] In one example, truncated binary codes can be used to encode the syntax element indicating the total number of filters in multiple CC-ALFs. In another example, truncated binary codes can be used to encode the index of the target filter.

[0146] For the current block, the target filter coefficients of the first chromaticity component and the target filter coefficients of the second chromaticity component of the current block are also encoded into the bitstream.

[0147] After receiving the bitstream, the decoder extracts the index of the target filter selected for the chroma component of the current block and the total number of CC-ALF filters. Based on this index and total number, it determines the CC-ALF filter for the chroma component of the current block. The decoder also decodes the target filtering coefficients for the chroma component of the current block from the bitstream, and then filters the ALF-filtered chroma component of the current block according to these target filters and target filtering coefficients.

[0148] The technical solutions of the embodiments of this application can be applied to both the encoding and decoding ends. The technical solutions of the embodiments of this application are described below from the perspectives of the encoding and decoding ends, respectively.

[0149] Figure 8 A schematic flowchart of a loop filtering method 200 according to an embodiment of this application is shown. The method 200 can be executed by the encoding end. For example, it can be performed by... Figure 1 The system 100 shown is executed during encoding operations.

[0150] S210: Determine the target filter for the chromaticity component of the current block from multiple cross-component adaptive loop filter (ALF) filters.

[0151] S220: Determine the target filtering coefficients for the chroma components of the current block based on the ALF-processed chroma components and the ALF-unprocessed luminance components of the current block.

[0152] S230: Filter the ALF-filtered chromaticity components of the current block according to the target filter and the target filter coefficients.

[0153] S240: Determine the filtered chroma components of the current block based on the chroma components filtered by the target filtering coefficients and the chroma components of the current block after ALF.

[0154] S250: Encode the filtered chroma components of the current block and encode the total number of the plurality of cross-component ALF filters as a syntax element, wherein the bitstream of a frame contains only one syntax element indicating the total number of the plurality of cross-component ALF filters.

[0155] Optionally, the syntax element indicating the total number of the plurality of cross-component ALF filters is located in the Adaptation parameter set syntax of the image.

[0156] Optionally, the syntax element indicating the total number of the plurality of cross-component ALF filters is not present in the image header and / or the slice header.

[0157] Optionally, the ALF-processed chromaticity components of the current block are specifically the chromaticity components of the current block after sequentially undergoing adaptive sample compensation filtering (SAO) and ALF.

[0158] Optionally, the luminance component of the current block that has not undergone ALF is specifically the luminance component of the current block that has undergone SAO and has not undergone ALF.

[0159] Optionally, encoding the total number of the plurality of cross-component ALF filters as a syntax element includes: encoding the total number of the plurality of cross-component ALF filters using truncated binary codes.

[0160] Optionally, the method further includes encoding the index of the target filter as a syntax element.

[0161] Optionally, encoding the index of the target filter as a syntax element includes: encoding the index of the target filter using truncated binary codes.

[0162] Optionally, the method further includes: encoding the target filtering coefficients of the chroma components of the current block into the bitstream.

[0163] Figure 9 A schematic flowchart of a loop filtering method 300 according to an embodiment of this application is shown. This method 300 can be executed by a decoding end. For example, it can be performed by... Figure 1 The system 100 shown is executed during the decoding operation.

[0164] S310: Decode the total number of cross-component ALF filters and the index of the target filter from the bitstream, wherein the target filter is the ALF filter used by the chroma component of the current block; wherein, the bitstream of a frame contains only one syntax element for indicating the total number of cross-component ALF filters.

[0165] S320: Decode the target filter coefficients of the chroma component of the current block from the bitstream, wherein the target filter coefficients are the coefficients in the target filter.

[0166] S330: Perform cross-component filtering on the ALF-filtered chromaticity components of the current block according to the target filter and the target filter coefficients.

[0167] S340: Determine the filtered chroma components of the current block based on the chroma components filtered by the target filtering coefficients and the chroma components of the current block after ALF.

[0168] Optionally, the syntax element indicating the total number of cross-component ALF filters is located in the Adaptation parameter set syntax of the image.

[0169] Optionally, the syntax element indicating the total number of cross-component ALF filters is not present in the image header and / or slice header.

[0170] Optionally, the ALF-processed chromaticity components of the current block are specifically the chromaticity components of the current block after sequentially undergoing adaptive sample compensation filtering (SAO) and ALF.

[0171] Optionally, the luminance component of the current block that has not undergone ALF is specifically the luminance component of the current block that has undergone SAO and has not undergone ALF.

[0172] Optionally, decoding the total number of cross-component ALF filters and the index of the target filter from the bitstream includes: decoding the total number of cross-component ALF filters and / or the index of the target filter using truncated binary codes.

[0173] Figure 10 According to a schematic block diagram of another encoding end loop filtering device 30 according to an embodiment of this application, the loop filtering device 30 is a loop filtering device in a video encoding end. Optionally, the loop filtering device 20 may correspond to the loop filtering method 100.

[0174] like Figure 10 The loop filtering device 30 includes a processor 31 and a memory 32.

[0175] The memory 32 can be used to store programs, and the processor 31 can be used to execute the programs stored in the memory to perform the following operations:

[0176] Determine the target filter for the chromaticity component of the current block from multiple cross-component adaptive loop filtering (ALF) filters;

[0177] The target filtering coefficients for the chrominance components of the current block are determined based on the ALF-processed chrominance components and the ALF-unprocessed luminance components of the current block.

[0178] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0179] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0180] The current block is encoded based on its filtered chroma components, and the total number of the multiple cross-component ALF filters is encoded as a syntax element, wherein the bitstream of a frame contains only one syntax element indicating the total number of the multiple cross-component ALF filters.

[0181] The syntax element used to indicate the total number of the plurality of cross-component ALF filters is located in the Adaptation parameter set syntax of the image.

[0182] Optionally, the syntax element indicating the total number of the plurality of cross-component ALF filters is not present in the image header and / or the slice header.

[0183] Optionally, the ALF-processed chromaticity components of the current block are specifically the chromaticity components of the current block after sequentially undergoing adaptive sample compensation filtering (SAO) and ALF.

[0184] Optionally, the luminance component of the current block that has not undergone ALF is specifically the luminance component of the current block that has undergone SAO and has not undergone ALF.

[0185] Optionally, encoding the total number of the plurality of cross-component ALF filters as a syntax element includes:

[0186] The total number of the multiple cross-component ALF filters is encoded using truncated binary codes.

[0187] Optionally, the processor is further configured to:

[0188] The index of the target filter is encoded as a syntax element.

[0189] Optionally, encoding the index of the target filter as a syntax element includes:

[0190] The index of the target filter is encoded using truncated binary codes.

[0191] It should be understood that the device embodiments and method embodiments correspond to each other, and similar descriptions can be referred to the method embodiments.

[0192] Figure 11 This is a schematic block diagram of a loop filtering apparatus 40 at the decoding end according to an embodiment of this application. Optionally, the loop filtering apparatus 40 may correspond to the loop filtering method 200.

[0193] like Figure 11 The loop filtering device 40 includes a processor 41 and a memory 42.

[0194] The memory 42 can be used to store programs, and the processor 41 can be used to execute the programs stored in the memory to perform the following operations:

[0195] The total number of cross-component ALF filters and the index of the target filter are decoded from the bitstream, wherein the target filter is the ALF filter used by the chroma component of the current block; wherein, the bitstream of a frame contains only one syntax element for indicating the total number of cross-component ALF filters.

[0196] Decode the target filter coefficients of the chroma component of the current block from the bitstream, wherein the target filter coefficients are the coefficients in the target filter;

[0197] The ALF-filtered chromaticity components of the current block are filtered according to the target filter and the target filter coefficients;

[0198] The filtered chromaticity components of the current block are determined based on the chromaticity components filtered by the target filtering coefficients and the chromaticity components of the current block after ALF.

[0199] Optionally, the syntax element indicating the total number of cross-component ALF filters is located in the Adaptation parameter set syntax of the image.

[0200] Optionally, the syntax element indicating the total number of cross-component ALF filters is not present in the image header and / or slice header.

[0201] Optionally, the ALF-processed chromaticity components of the current block are specifically the chromaticity components of the current block after sequentially undergoing adaptive sample compensation filtering (SAO) and ALF.

[0202] Optionally, the luminance component of the current block that has not undergone ALF is specifically the luminance component of the current block that has undergone SAO and has not undergone ALF.

[0203] Optionally, decoding the total number of cross-component ALF filters and the index of the target filter from the bitstream includes:

[0204] The total number of the cross-component ALF filters and / or the index of the target filter are decoded using truncated binary codes.

[0205] This application also provides an electronic device that may include the loop filtering apparatus described in the various embodiments of this application.

[0206] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processors mentioned above include, but are not limited to, the following: general-purpose processors, central processing units (CPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. They can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0207] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0208] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figures 6 to 9 The method of the illustrated embodiment.

[0209] This application also provides a computer program comprising instructions that, when executed by a computer, enable the computer to perform... Figures 6 to 9 The method of the illustrated embodiment.

[0210] This application also provides a chip, which includes an input / output interface, at least one processor, at least one memory, and a bus. The at least one memory is used to store instructions, and the at least one processor is used to call the instructions in the at least one memory to execute them. Figures 6 to 9 The method of the illustrated embodiment.

[0211] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0212] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0213] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0214] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0215] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0216] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0217] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A video processing method, characterized in that, include: Determine the target cross-component ALF filter for the chrominance component of the current block from multiple cross-component adaptive loop filtering ALF filters; The target cross-component ALF filtering coefficient of the chrominance component of the current block is determined based on the ALF-processed chrominance component of the current block and the ALF-unprocessed luminance component of the current block. Specifically, the ALF-processed chrominance component of the current block is the chrominance component of the current block after sequentially passing through the adaptive sample compensation filter (SAO) and the ALF filter. The ALF-filtered chroma components of the current block are filtered according to the target cross-component ALF filter and the target cross-component ALF filter coefficients. Based on the chroma component filtered by the target cross-component ALF filter coefficients and the ALF-filtered chroma component of the current block, the filtered chroma component of the current block is determined. The target cross-component ALF filter adopts a 3x4 rhombus shape. The result of the pixel filtering of the chroma component of the current block is obtained by weighted averaging of the seven pixels surrounding the pixel of the chroma component of the current block. The seven surrounding pixels include one upper neighbor pixel, one left neighbor pixel, one right neighbor pixel, one lower left neighbor pixel, one lower right neighbor pixel, and two lower neighbor pixels of the pixel of the chroma component of the current block. The filtered chroma components of the current block are encoded by encoding the total number of the multiple cross-component ALF filters, the index of the target cross-component ALF filter, and the target cross-component ALF filter coefficients of the chroma components of the current block as syntax elements.

2. The method according to claim 1, characterized in that, The syntax element used to indicate the total number of the multiple cross-component ALF filters is located in the Adaptation parameter set syntax of the image, and not in the image header and / or slice header.

3. The method according to claim 1, characterized in that, The luminance component of the current block that has not undergone ALF is specifically the luminance component of the current block that has undergone SAO but has not undergone ALF.

4. The method according to claim 1, characterized in that, The step of encoding the total number of the multiple cross-component ALF filters as a syntax element includes: The total number of the multiple cross-component ALF filters is encoded using truncated binary codes.

5. The method according to claim 1, characterized in that, The step of encoding the index of the target cross-component ALF filter as a syntax element includes: The index of the target cross-component ALF filter is encoded using truncated binary codes.

6. A video processing method, characterized in that, include: Decode the total number of cross-component ALF filters and the index of the target cross-component ALF filter from the bitstream, wherein the target cross-component ALF filter is the cross-component ALF filter used by the chroma component of the current block. The target cross-component ALF filter coefficients of the chrominance component of the current block are decoded from the bitstream. The target cross-component ALF filter coefficients are the coefficients in the target cross-component ALF filter and are determined on the encoding side based on the ALF-processed chrominance component of the current block and the ALF-unprocessed luminance component of the current block. Specifically, the ALF-processed chrominance component of the current block is the chrominance component of the current block after sequentially passing through the adaptive sample compensation filter (SAO) and the ALF filter. The ALF-filtered chroma components of the current block are filtered according to the target cross-component ALF filter and the target cross-component ALF filter coefficients. Based on the chroma component filtered by the target cross-component ALF filter coefficients and the ALF-filtered chroma component of the current block, the filtered chroma component of the current block is determined. The target cross-component ALF filter adopts a 3x4 rhombus shape, and the filtered pixel result of the chroma component of the current block is obtained by weighted averaging of the seven pixels surrounding the pixel location of the chroma component of the current block. The seven surrounding pixels include one upper neighbor pixel, one left neighbor pixel, one right neighbor pixel, one lower left neighbor pixel, one lower right neighbor pixel, and two lower neighbor pixels of the chroma component of the current block.

7. The method according to claim 6, characterized in that, The syntax element used to indicate the total number of multiple cross-component ALF filters is located in the image's adaptation parameter set syntax, and not in the image header and / or slice header.

8. A method for generating a bitstream, characterized in that, include: Determine the target cross-component ALF filter for the chrominance component of the current block from multiple cross-component adaptive loop filtering ALF filters; The target cross-component ALF filtering coefficient of the chrominance component of the current block is determined based on the ALF-processed chrominance component of the current block and the ALF-unprocessed luminance component of the current block. Specifically, the ALF-processed chrominance component of the current block is the chrominance component of the current block after sequentially passing through the adaptive sample compensation filter (SAO) and the ALF filter. The ALF-filtered chroma components of the current block are filtered according to the target cross-component ALF filter and the target cross-component ALF filter coefficients. Based on the chroma component filtered by the target cross-component ALF filter coefficients and the ALF-filtered chroma component of the current block, the filtered chroma component of the current block is determined. The target cross-component ALF filter adopts a 3x4 rhombus shape. The result of the pixel filtering of the chroma component of the current block is obtained by weighted averaging of the seven pixels surrounding the pixel of the chroma component of the current block. The seven surrounding pixels include one upper neighbor pixel, one left neighbor pixel, one right neighbor pixel, one lower left neighbor pixel, one lower right neighbor pixel, and two lower neighbor pixels of the pixel of the chroma component of the current block. The filtered chroma components of the current block are encoded by encoding the total number of the multiple cross-component ALF filters, the index of the target cross-component ALF filter, and the target cross-component ALF filter coefficients of the chroma components of the current block as syntax elements to generate a bitstream.

9. A video processing apparatus, characterized in that, include: Memory, used to store code; A processor is configured to execute code stored in the memory to perform the following operations: Determine the target cross-component ALF filter for the chrominance component of the current block from multiple cross-component adaptive loop filtering ALF filters; The target cross-component ALF filtering coefficient of the chrominance component of the current block is determined based on the ALF-processed chrominance component of the current block and the ALF-unprocessed luminance component of the current block. Specifically, the ALF-processed chrominance component of the current block is the chrominance component of the current block after sequentially passing through the adaptive sample compensation filter (SAO) and the ALF filter. The ALF-filtered chroma components of the current block are filtered according to the target cross-component ALF filter and the target cross-component ALF filter coefficients. Based on the chroma component filtered by the target cross-component ALF filter coefficients and the ALF-filtered chroma component of the current block, the filtered chroma component of the current block is determined. The target cross-component ALF filter adopts a 3x4 rhombus shape. The result of the pixel filtering of the chroma component of the current block is obtained by weighted averaging of the seven pixels surrounding the pixel of the chroma component of the current block. The seven surrounding pixels include one upper neighbor pixel, one left neighbor pixel, one right neighbor pixel, one lower left neighbor pixel, one lower right neighbor pixel, and two lower neighbor pixels of the pixel of the chroma component of the current block. The filtered chroma components of the current block are encoded by encoding the total number of the multiple cross-component ALF filters, the index of the target cross-component ALF filter, and the target cross-component ALF filter coefficients of the chroma components of the current block as syntax elements.

10. A video processing apparatus, characterized in that, include: Memory, used to store code; A processor is configured to execute code stored in the memory to perform the following operations: Obtain the bitstream; Decode the total number of cross-component ALF filters and the index of the target cross-component ALF filter from the bitstream, wherein the target cross-component ALF filter is the cross-component ALF filter used by the chroma component of the current block. The target cross-component ALF filter coefficients of the chrominance component of the current block are decoded from the bitstream. The target cross-component ALF filter coefficients are the coefficients in the target cross-component ALF filter and are determined on the encoding side based on the ALF-processed chrominance component of the current block and the ALF-unprocessed luminance component of the current block. Specifically, the ALF-processed chrominance component of the current block is the chrominance component of the current block after sequentially passing through the adaptive sample compensation filter (SAO) and the ALF filter. The ALF-filtered chroma components of the current block are filtered according to the target cross-component ALF filter and the target cross-component ALF filter coefficients. Based on the chroma component filtered by the target cross-component ALF filter coefficients and the ALF-filtered chroma component of the current block, the filtered chroma component of the current block is determined. The target cross-component ALF filter adopts a 3x4 rhombus shape, and the filtered pixel result of the chroma component of the current block is obtained by weighted averaging of the seven pixels surrounding the pixel location of the chroma component of the current block. The seven surrounding pixels include one upper neighbor pixel, one left neighbor pixel, one right neighbor pixel, one lower left neighbor pixel, one lower right neighbor pixel, and two lower neighbor pixels of the chroma component of the current block.

Citation Information

Patent Citations

  • Adaptive loop filtering for chroma components

    CN103891293A

  • Cross-component filter

    CN109691102A