Coding method, decoding method, bitstream, coder, decoder, and storage medium

CA3326760A1Pending Publication Date: 2026-11-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CA3326760
Authority / Receiving Office
CA · CA
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2026-11-18

AI Technical Summary

Technical Problem

In multifunctional video coding, the filtering effect of the cross-component adaptive loop filter (CCALF) has limitations, resulting in unsatisfactory coding efficiency and compression performance.

Method used

The filter coefficients of the color components are determined at the decoding and encoding ends respectively, new filter information is introduced as input, and filtering processing is performed in combination with the filter coefficients corresponding to the filter information, including reconstruction information, residual information, prediction information, etc. of the brightness component.

Benefits of technology

Improved encoding and decoding efficiency and enhanced video compression performance.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

TThe present application discloses a coding method and a decoding method. At a decoding end, the decoding method comprises: decoding a bitstream, and determining first syntax element identification information (101); when it is determined on the basis of the first syntax element identification information that a first color component is filtered using filtering information, determining a first filtering coefficient corresponding to the first color component, wherein the first filtering coefficient at least comprises a filtering coefficient corresponding to the filtering information, and the filtering information comprises at least one of the following: reconstruction information of a luminance component, residual information of the luminance component, prediction information of the luminance component, reconstruction information of a color component, residual information of the color component, and prediction information of the color component (102); and determining a reconstructed block of a current block in a current image on the basis of the first filtering coefficient (103).
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, code stream, encoder, decoder and storage medium TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of image processing, and particularly relate to a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. BACKGROUND

[0002] In the loop filter of the Versatile Video Coding (VVC), there are an Adaptive Loop Filter (ALF) and a Cross Component Adaptive Loop Filter (CCALF). The ALF is a filter designed to minimize the mean square error between the reconstructed image and the original image, and the CCALF is a filter designed to minimize the mean square error between the chroma reconstructed image and the original image by using the luminance information.

[0003] In the implementation process of the CCALF filter, the reconstructed luminance and the residual information are mainly used as the input information of the CCALF, which leads to certain limitations of the finally obtained filter result, and the filtering effect is not ideal, which reduces the coding efficiency and compression performance.

[0004] SUMMARY

[0005] Embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can obtain a more reasonable filtering effect, effectively improve the coding and decoding efficiency, and improve the compression performance.

[0006] The technical scheme of the embodiments of the present application can be implemented as follows:

[0007] In a first aspect, the embodiments of the present application provide a decoding method applied to a decoder, and the method comprises:

[0008] decoding a code stream to determine first syntax element identification information;

[0009] In a case where the first color component uses the filter information for filtering based on the first syntax element identification information, a first filter coefficient corresponding to the first color component is determined; wherein the first filter coefficient at least includes a filter coefficient corresponding to the filter information, and the filter information includes at least one of the following: reconstructed information of a luminance component, residual information of the luminance component, prediction information of the luminance component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component;

[0010] determine a reconstructed block of a current block in the current picture according to the first filter coefficient.

[0011] In a second aspect, an embodiment of the present application provides an encoding method applied to an encoder, the method comprising:

[0012] determining a first filter coefficient corresponding to a first color component; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information, and the filter information comprises at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, prediction information of the color component;

[0013] determining a reconstructed block of a current block in the current picture according to the first filter coefficient.

[0014] in a case where it is determined to filter the first color component using the filter information based on the reconstructed block of the current block in the current picture, setting first syntax element identification information, and writing the first syntax element identification information into a bitstream.

[0015] In a third aspect, an embodiment of the present application provides a bitstream, the bitstream being generated by bit encoding to-be-encoded information; wherein the to-be-encoded information comprises at least: first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, and fifth syntax element identification information.

[0016] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit; wherein

[0017] the first determining unit is configured to determine a first filter coefficient corresponding to a first color component; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information, and the filter information comprises at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, prediction information of the color component; determine a reconstructed block of a current block in the current picture according to the first filter coefficient; in a case where it is determined to filter the first color component using the filter information based on the reconstructed block of the current block in the current picture, set first syntax element identification information, and write the first syntax element identification information into a bitstream.

[0018] In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein

[0019] the first memory is configured to store a computer program capable of running on the first processor.

[0020] The first processor is configured to execute the encoding method as described above when the computer program is run.

[0021] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second determining unit, wherein

[0022] The second determining unit is configured to decode a code stream, determine first syntax element identification information, determine first filter coefficients corresponding to a first color component in a case that it is determined that the first color component uses filter information for filtering based on the first syntax element identification information, wherein the first filter coefficients at least comprise filter coefficients corresponding to the filter information, and the filter information comprises at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component; and determine a reconstructed block of a current block in a current picture according to the first filter coefficients.

[0023] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor, wherein

[0024] The second memory is configured to store a computer program capable of being run on the second processor.

[0025] The second processor is configured to execute the decoding method as described above when the computer program is run.

[0026] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed to implement the decoding method as described in the first aspect, or to implement the encoding method as described in the second aspect.

[0027] The embodiment of the present application provides a coding method, a code stream, an encoder, a decoder and a storage medium. At a decoding end, a code stream is decoded, and first syntax element identification information is determined. In a case where it is determined based on the first syntax element identification information that a first color component uses filter information for filtering, first filter coefficients corresponding to the first color component are determined. The first filter coefficients at least include filter coefficients corresponding to the filter information, and the filter information includes at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component. A reconstructed block of a current block in a current image is determined according to the first filter coefficients. At an encoding end, first filter coefficients corresponding to a first color component are determined. The first filter coefficients at least include filter coefficients corresponding to filter information. A reconstructed block of a current block in a current image is determined according to the first filter coefficients. In a case where it is determined based on the reconstructed block of the current block in the current image that the first color component uses the filter information for filtering, first syntax element identification information is set, and the first syntax element identification information is written into a code stream. That is, in the embodiment of the present application, new input information can be introduced in the process of filtering the first color component, that is, the filter information is taken as new input information, and the filter information is combined with the filter coefficients corresponding to the filter information to realize the filtering processing of the first color component, so that a more reasonable filtering effect can be obtained, and the coding efficiency and compression performance are improved. BRIEF DESCRIPTION OF DRAWINGS

[0028] FIG. 1 is an application schematic diagram of an encoding framework provided by the related art;

[0029] FIG. 2 is an application schematic diagram of a loop filter module provided by the related art;

[0030] FIG. 3 is a schematic diagram of a filter template;

[0031] FIG. 4 is an application schematic diagram of a filter template;

[0032] FIG. 5 is a schematic diagram of an implementation process of loop filtering;

[0033] FIG. 6 is a constituent block diagram schematic diagram of a video encoding system provided by the embodiment of the present application;

[0034] FIG. 7 is a constituent block diagram schematic diagram of a video decoding system provided by the embodiment of the present application;

[0035] FIG. 8 is a schematic diagram of a decoding method provided by the embodiment of the present application;

[0036] FIG. 9 is a schematic diagram one of a filter template provided by the embodiment of the present application;

[0037] FIG. 10 is a schematic diagram two of a filter template provided by the embodiment of the present application;

[0038] Fig. 11 is a schematic diagram of a filter template according to an embodiment of the present application;

[0039] Fig. 12 is a schematic diagram of an encoding method according to an embodiment of the present application;

[0040] Fig. 13 is a schematic diagram of an implementation process of loop filtering according to an embodiment of the present application;

[0041] Fig. 14 is a schematic diagram of an implementation process of loop filtering according to an embodiment of the present application;

[0042] Fig. 15 is a schematic diagram of a filter template according to an embodiment of the present application;

[0043] Fig. 16 is a schematic diagram of an application of a filter template according to an embodiment of the present application;

[0044] Fig. 17 is a schematic diagram of a filter template according to an embodiment of the present application;

[0045] Fig. 18 is a schematic diagram of a composition structure of an encoder according to an embodiment of the present application;

[0046] Fig. 19 is a schematic diagram of a specific hardware structure of an encoder according to an embodiment of the present application;

[0047] Fig. 20 is a schematic diagram of a composition structure of a decoder according to an embodiment of the present application;

[0048] Fig. 21 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;

[0049] Fig. 22 is a schematic diagram of a composition structure of a codec system according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for convenience of description.

[0051] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict. It should be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0052] Digital video compression technology is mainly to compress the huge digital video data, so as to facilitate transmission and storage, etc. With the surge of Internet video and people's demand for video clarity is getting higher and higher, although the existing digital video compression standard can save a lot of video data, but at present still need to pursue better digital video compression technology, in order to reduce the bandwidth and traffic pressure of digital video transmission.

[0053] In the process of digital video encoding, the encoder reads different pixel of the original video sequence of different color format, including luminance component and chrominance component, that is, the encoder reads a black and white or color image. Then it is divided into blocks, and the block data is handed over to the encoder for encoding.

[0054] The general video coding standard is based on the block-based hybrid coding framework. Each frame of video image is divided into square maximum coding units (LCU) or coding tree units (CTU) of the same size (such as 128x128, 64x64, etc.), each maximum coding unit or coding tree unit can also be divided into rectangular coding units (CU) according to the rules; and the coding unit may also be divided into smaller prediction units (PU), transform units (TU), etc.

[0055] FIG. 1 is a schematic diagram of an application of a coding framework provided by the related art. As shown in FIG. 1, the hybrid coding framework can include a prediction module 11, a transform and quantization module 12, an entropy coding module 13, an inverse quantization and inverse transform module 14, a loop filtering module 15, and a decoded picture buffer module 16. The prediction module 11 can include an intra prediction module 11a and an inter prediction module 11b, and the inter prediction module 11b can include a motion estimation module and a motion compensation module. Because there is a strong correlation between adjacent pixels in a frame of a video image, using an intra prediction mode in a video coding technology can eliminate spatial redundancy between adjacent pixels. However, because there is also a strong similarity between adjacent frames in a video image, using an inter prediction mode in a video coding technology can eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. The basic process of a video codec is as follows: at the encoding end, a frame of an image is divided into blocks, an intra prediction or inter prediction is used for a current block to generate a prediction block of the current block, a residual block is obtained by subtracting the prediction block from the original block of the current block, a transform and quantization are performed on the residual block to obtain a quantized coefficient matrix, and the quantized coefficient matrix is entropy coded and output to a bitstream. At the decoding end, an intra prediction or inter prediction is used for a current block to generate a prediction block of the current block, and on the other hand, a quantized coefficient matrix is obtained by decoding the bitstream, the quantized coefficient matrix is inverse quantized and inverse transformed to obtain a residual block, and the prediction block and the residual block are added to obtain a reconstructed block. The reconstructed block constitutes a reconstructed image, and a decoded image is obtained by performing loop filtering on the reconstructed image on a block basis or on an image basis. The encoding end also needs to perform similar operations as the decoding end to obtain a decoded image. The decoded image can be used as a reference frame for inter prediction of subsequent frames. If necessary, block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information determined by the encoding end need to be output to the bitstream. The decoding end analyzes and determines the same block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information as the encoding end, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end. The decoded image obtained by the encoding end is usually also called a reconstructed image. When predicting, the current block can be divided into prediction units, and when transforming, the current block can be divided into transform units. The division of the prediction units and the transform units can be different. The above is the basic process of a video codec under a hybrid coding framework based on blocks. With the development of technology, some modules or steps of the framework or process can be optimized. Embodiments of the present application are applicable to the basic process of a video codec under the hybrid coding framework based on blocks, but are not limited to the framework and process.

[0056] It can be understood that, intra prediction only refers to information of the same frame image, predicts pixel information in the current partition block, and is used to eliminate spatial redundancy; inter prediction can refer to image information of different frames, uses motion estimation to search for motion vector information that best matches the current partition block, and is used to eliminate temporal redundancy; transformation converts the predicted image block to a frequency domain, energy is redistributed, and information that is not sensitive to human eyes can be removed in combination with quantization, which is used to eliminate visual redundancy; entropy coding can eliminate character redundancy according to a current context model and probability information of a binary code stream; and loop filtering mainly processes pixels after inverse transformation and inverse quantization, makes up for distortion information, and provides better reference for subsequent coding pixels.

[0057] FIG. 2 is an application diagram of a loop filtering module provided by the related art, as shown in FIG. 2, in a loop filtering module of a versatile video coding (VVC) and a latest JVET traditional video coding exploration platform reference software test model (ECM), mainly includes filter tools such as luma mapping with chroma scaling (LMCS), a de-blocking filter (DBF), sample adaptive offset (SAO), an adaptive loop filter (ALF), and a cross component adaptive loop filter (CCALF).

[0058] The adaptive loop filter (ALF) includes a luma ALF and a chroma ALF. The luma ALF is designed by using luma information to minimize the mean square error between a luma reconstructed image and an original image, and the chroma ALF is designed by using chroma information to minimize the mean square error between a chroma reconstructed image and the original image.

[0059] The cross component adaptive loop filter (CCALF) is a filter designed by using luma information to minimize the mean square error between a chroma reconstructed image and an original image.

[0060] The ALF and the CCALF are based on the Wiener filtering principle, and a series of filter coefficients with minimum mean square error are solved by establishing a Wiener-Hopf equation through original image information and reconstructed image information, so as to reduce decoding errors and effectively improve coding performance.

[0061] In the latest JVET conventional video coding exploration model (ECM), CCALF processes the chroma components Cb and Cr separately, each component has its own filter. Each component is allowed to use up to 16 filters, corresponding to 16 categories respectively.

[0062] CCALF classifies each coding tree unit (CTU) into a category, which is decided by a rate-distortion optimization (RDO) function. Each pixel in the CTU belongs to the same category. Specifically, when the cost of using a filter of a certain category for the CTU is the lowest, the category of the CTU is the category of the filter. If the cost of not using a filter is lower than the cost of using a filter, the CTU is not filtered, and the CTU has no category. Whether the CTU is filtered and the corresponding category information are both written into the bitstream and transmitted to the decoding end.

[0063] After the category of each CTU is determined, the covariance matrix and error vector of all pixels in the same category are accumulated respectively, and then the Wiener-Hopf equation is constructed to calculate the filter coefficients of the category by solving the equation. After the filter coefficients are determined, the pixels that need to be filtered are filtered and written into the reconstructed image. For pixels that do not need to be filtered, they are directly written into the reconstructed image. When filtering is needed, the specific filtering process is shown in the following formula:

[0064] where recC' is the filtered reconstructed pixel value, recC is the reconstructed pixel value of the pixel to be filtered, represents the filter coefficient, recY(*) represents the luminance reconstructed pixel, resY(*) represents the luminance residual pixel, x corresponds to the position of x in the filter shape, i is the pixel at the non-x position, a1-a2 represents the coefficient of the filter template with the luminance reconstructed information as the input, b1-b2 represents the coefficient of the filter template with the luminance residual information as the input, and scale is the scale factor.

[0065] In addition, related syntax elements need to be written into the bitstream. For example, the CCALF switch of the current image, whether each CTU is filtered and the corresponding category information, etc. If a new filter is needed, the number of filters and the coefficients of each filter need to be written into the APS. Finally, the APS ID used by the image is written into the slice header or the picture header.

[0066] After receiving the bitstream at the VVC decoding end, the CCALF switch of the current image, whether each CTU is filtered, and the corresponding category information are determined. In addition, the APS ID is parsed, and the corresponding APS is selected to determine the coefficients of the filter. The pixels that need to be filtered are filtered, and they are written into the reconstructed image. For pixels that do not need to be filtered, they are directly written into the reconstructed image.

[0067] In the current ECM, the CCALF filter contains two filter templates. As shown in FIG. 3, the two filter templates are a 9x9 template using the luminance reconstructed information as input, and a 3x3 template using the luminance residual information as input.

[0068] As shown in FIG. 4, taking the 9x9 filter template using the luminance reconstructed information as input as an example, the black circles and white circles in the left drawing of FIG. 4 represent the luminance pixels, the cross circle represents the current chroma pixel to be filtered, and the luminance pixels in the black circles are the input information of the filter. It can be seen that there are 25 luminance pixels in the black circles, and according to their positions in the filter, they correspond to 23 filter coefficients (the coefficients at 0 and 12 are shared by two pixels). It should be noted that the coefficient at x is generally not calculated and is set to 0 by default.

[0069] As for the 5x5 template using the luminance residual information as input, it contains 22, 23, 24, 25, and 26 filter coefficient indices. Therefore, the CCALF filter in the current ECM has a total of 28 coefficients.

[0070] As shown in FIG. 5, the specific position of CCALF in the loop filtering is shown in FIG. 5. As described above, CCALF needs to use the luminance reconstructed information and the residual information (l0) as input, so CCALF uses the luminance reconstructed information and the luminance residual information output by SAO as input, calculates the filter coefficients, and performs filtering to obtain the filtering result (Y’). or In addition, the chroma ALF itself filters the chroma reconstructed information output by SAO to obtain the corresponding filtering result. Finally, the filtering result of CCALF (Y’) and the filtering result of chroma ALF are added to obtain the final chroma filtering result. or

[0071] That is, in the current CCALF, the luminance reconstructed and residual information is mainly used as the input information of CCALF, and the final filtering result has certain limitations, and the filtering effect is not ideal.​

[0072] To solve the above problems, an embodiment of the present application provides a coding method, a code stream, an encoder, a decoder and a storage medium. At the decoding end, the code stream is decoded, and first syntax element identification information is determined. In a case where it is determined based on the first syntax element identification information that the first color component uses filter information for filtering, first filter coefficients corresponding to the first color component are determined. The first filter coefficients at least include filter coefficients corresponding to the filter information. The filter information includes at least one of the following: reconstructed information of a luminance component, residual information of the luminance component, prediction information of the luminance component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component. A reconstructed block of a current block in a current picture is determined according to the first filter coefficients. At the encoding end, first filter coefficients corresponding to the first color component are determined. The first filter coefficients at least include filter coefficients corresponding to the filter information. A reconstructed block of a current block in a current picture is determined according to the first filter coefficients. In a case where it is determined based on the reconstructed block of the current block in the current picture that the first color component uses filter information for filtering, first syntax element identification information is set, and the first syntax element identification information is written into the code stream. That is, in the embodiment of the present application, new input information can be introduced in the process of filtering the first color component, that is, the filter information is taken as new input information, and the filter information is combined with the filter coefficients corresponding to the filter information to implement the filtering process of the first color component, so that a more reasonable filtering effect can be obtained, and the coding efficiency and compression performance are improved.

[0073] Referring to FIG. 6, an example of a system composition block diagram of an encoder provided by an embodiment of the present application is shown. As shown in FIG. 6, the encoder 10 can include a partition unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, a dequantization unit 110, an inverse transform unit 111, a second adder 112, a filter unit 113, a decoded picture buffer (DPB) unit 114 and an entropy encoding unit 115. Here, the input of the encoder 10 can be a video composed of a series of pictures or a still picture, and the output of the encoder 10 can be a bit stream (also referred to as a “code stream”) used to represent the compressed version of the input video.

[0074] The partition unit 101 partitions a picture in an input video into one or more Coding Tree Units (CTUs). The partition unit 101 partitions the picture into a plurality of tiles (or tiles), and can further partition a tile into one or more bricks, where a tile or a brick can include one or more complete and / or partial CTUs. In addition, the partition unit 101 can form one or more slices, where a slice can include one or more tiles arranged in raster order in the picture, or cover one or more tiles of a rectangular region in the picture. The partition unit 101 can also form one or more sub-pictures, where a sub-picture can include one or more slices, tiles, or bricks.

[0075] During the encoding process of the encoder 10, the partition unit 101 delivers a CTU to the prediction unit 102. Generally, the prediction unit 102 can be composed of a block partition unit 103, a Motion Estimation (ME) unit 104, a Motion Compensation (MC) unit 105, and an intra-prediction unit 106. Specifically, the block partition unit 103 iteratively partitions an input CTU into smaller Coding Units (CUs) using quad-tree partitioning, binary-tree partitioning, and ternary-tree partitioning. The prediction unit 102 can obtain an inter-predicted block for a CU using the ME unit 104 and the MC unit 105. The intra-prediction unit 106 can obtain an intra-predicted block for a CU using various intra-prediction modes including MIP mode. In an example, rate-distortion optimized motion estimation approaches can be invoked by the ME unit 104 and the MC unit 105 to obtain the inter-predicted block, and rate-distortion optimized mode determination approaches can be invoked by the intra-prediction unit 106 to obtain the intra-predicted block.

[0076] The prediction unit 102 outputs the prediction block of the CU, the first adder 107 calculates the difference between the CU in the output of the partition unit 101 and the prediction block of the CU, i.e. the residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs quantized coefficients (i.e. levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in the transform unit 108 and outputs reconstructed residuals. The second adder 112 calculates the reconstructed CU by adding the reconstructed residuals and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 to be used as an intra prediction reference. After all CUs in a picture or sub-picture are reconstructed, the filter unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filter unit 113 contains one or more filters, such as a deblocking filter, a Sample Adaptive Offset (SAO) filter, an Adaptive Loop Filter (ALF), a Luma Mapping with Chroma Scaling (LMCS) filter, and a neural network based filter, etc. Alternatively, when the filter unit 113 determines that a CU is not used as a reference for encoding of other CUs, the filter unit 113 performs loop filtering on one or more target pixels in the CU.

[0077] The output of the filter unit 113 is the decoded picture or sub-picture, which is buffered to the DPB unit 114. The DPB unit 114 outputs the decoded picture or sub-picture according to the timing and control information. Here, the pictures stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter prediction or intra prediction. Finally, the entropy encoding unit 115 converts the parameters necessary for decoding the picture from the encoder 10 (such as control parameters and supplemental information, etc.) into binary form, and writes such binary form into the bitstream according to the syntax structure of each data unit, i.e. the encoder 10 finally outputs the bitstream.

[0078] Further, the encoder 10 can be a computing device having a first processor and a first memory recording a computer program. When the first processor reads and runs the computer program, the encoder 10 reads the input video and generates the corresponding bitstream. In addition, the encoder 10 can also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 9.

[0079] Referring to FIG. 7, an example of a system composition diagram of a decoder is shown. As shown in FIG. 7, the decoder 20 can include a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filter unit 208, and a decoded picture buffer unit 209. Here, the input of the decoder 20 is a bitstream representing a compressed version of a video or a still picture, and the output of the decoder 20 can be a decoded video consisting of a series of pictures or a decoded still picture.

[0080] The input bitstream of the decoder 20 can be the bitstream generated by the encoder 10. The parsing unit 201 parses the input bitstream and obtains values of syntax elements from the input bitstream. The parsing unit 201 converts the binary representation of the syntax elements into numeric values and sends the numeric values to the units in the decoder 20 to obtain one or more decoded pictures. The parsing unit 201 can also parse one or more syntax elements from the input bitstream to display the decoded pictures.

[0081] During the decoding process of the decoder 20, the parsing unit 201 sends the values of the syntax elements and one or more variables used to obtain one or more decoded pictures that are set or determined according to the values of the syntax elements to the units in the decoder 20.

[0082] The prediction unit 202 determines a prediction block of a current decoded block (e.g., a CU). Here, the prediction unit 202 can include a motion compensation unit 203 and an intra prediction unit 204. Specifically, when an inter-decoding mode is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain an inter-prediction block; when an intra-prediction mode (including the MIP mode indicated based on the MIP mode index value) is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain an intra-prediction block.

[0083] The inverse quantization unit 205 has the same function as the inverse quantization unit 110 in the encoder 10. The inverse quantization unit 205 performs a scaling operation on the quantized coefficients (i.e., levels) from the parsing unit 201 to obtain reconstructed coefficients.

[0084] The inverse transform unit 206 has the same function as the inverse transform unit 111 in the encoder 10. The inverse transform unit 206 performs one or more transform operations (i.e., the inverse of the one or more transform operations performed by the inverse transform unit 111 in the encoder 10) to obtain a reconstructed residual.

[0085] The adder 207 performs an addition operation on its inputs (the prediction block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain a reconstructed block of the current decoded block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks coded in the intra prediction mode.

[0086] After all CUs in a picture or sub-picture are reconstructed, the filter unit 208 performs loop filtering on the reconstructed picture or sub-picture. The filter unit 208 includes one or more filters, such as a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, a luma mapping and chroma scaling filter, and a neural network based filter, etc. Alternatively, when the filter unit 208 determines that a reconstructed block is not used as a reference for decoding other blocks, the filter unit 208 performs loop filtering on one or more target pixels in the reconstructed block. Here, the output of the filter unit 208 is a decoded picture or sub-picture, which is buffered to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture according to the timing and control information. The pictures stored in the DPB unit 209 can also be used as a reference for performing inter prediction or intra prediction by the prediction unit 202.

[0087] Further, the decoder 20 can be a computing device with a second processor and a second memory recording a computer program. When the first processor reads and runs the computer program, the decoder 20 reads the input bitstream and generates the corresponding decoded video. In addition, the decoder 20 can also be a computing device with one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 7.

[0088] It also needs to be explained that when the embodiments of the present application are applied to the encoder 10, the “current block” specifically refers to a current block to be encoded (which can also be simply referred to as “encoding block”) in a video image; when the embodiments of the present application are applied to the decoder 20, the “current block” specifically refers to a current block to be decoded (which can also be simply referred to as “decoding block”) in a video image.

[0089] Based on FIG. 6, the encoding method in the embodiments of the present application is mainly applied to the “filter unit 113” part in the encoder 10.

[0090] Based on FIG. 7, the decoding method in the embodiments of the present application is mainly applied to the “filter unit 208” part in the decoder 20.

[0091] That is, the encoding and decoding method in the embodiments of the present application can be applied to a video encoding system (referred to as “encoder” for short), a video decoding system (referred to as “decoder” for short), or even both a video encoding system and a video decoding system, but here is not limited in any way.

[0092] The technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application.

[0093] An embodiment of the present application provides a decoding method, which is applied to a decoder and used in a scenario of performing filtering processing by CCALF. FIG. 8 is a schematic diagram of the decoding method according to an embodiment of the present application. As shown in FIG. 8, the method of performing decoding processing by the decoder can include the following steps.

[0094] In step 101, a bitstream is decoded to determine first syntax element identification information.

[0095] In the embodiments of the present application, the bitstream is decoded to determine the first syntax element identification information. The first syntax element identification information can be used to determine whether the first color component is filtered by using filter information.

[0096] It should be noted that in the embodiments of the present application, in a video image, a coding block (CB) is generally represented by a first image component, a second image component and a third image component. The three image components are respectively a luminance component, a blue color component and a red color component. Specifically, the luminance component is usually represented by a symbol Y, the blue color component is usually represented by a symbol Cb or U, and the red color component is usually represented by a symbol Cr or V. In this way, the video image can be represented in YCbCr format or YUV format.

[0097] It can be understood that in the embodiments of the present application, the image component of the current image can include a current luminance component or a current color component. The current color component of the current image can be a first color component or a second color component. For example, the first color component can be understood as a blue color component of the current image, and the second color component can be understood as a red color component of the current image. The first color component can be a U component, and the second color component can be a V component. The first color component can also be understood as a red color component of the current image, and the second color component can be understood as a blue color component of the current image. That is, the first color component can be a V component or a U component. The present application does not make specific limitations.

[0098] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether the first color component is filtered by using filter information. In the implementation process of filtering by using filter information, the filter information can be used as input information of CCALF. The filter information can include information related to the current image, in any form, type and quantity, which is not limited in the present application.

[0099] Further, in embodiments of the present application, the first syntax element identification information can be a flag, wherein the first syntax element identification information can be an image-level flag or a filter-level flag. The present application does not make specific limitations.

[0100] Correspondingly, in embodiments of the present application, if the first syntax element identification information is an image-level flag, the representation form of the first syntax element identification information can be a scalar form; if the first syntax element identification information is a filter-level flag, the representation form of the first syntax element identification information can be an array form.

[0101] That is to say, in embodiments of the present application, the representation form of the first syntax element identification information is not limited, for example, the representation form of the first syntax element identification information can include a first representation form and a second representation form. The first representation form can be a scalar form, and the second representation form can be an array form.

[0102] Further, in embodiments of the present application, in the case where the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information can be considered as an image-level flag, and thus whether the first color component of the current image is filtered using the filtering information can be determined according to the first syntax element identification information.

[0103] Further, in embodiments of the present application, in the case where the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information can be considered as a filter-level flag, and thus whether the current filter of the first color component of the current image is filtered using the filtering information can be determined according to the first syntax element identification information.

[0104] It can be understood that in the embodiments of the present application, the first color component of the current image can correspond to a division into a plurality of CTUs, and for each CTU (current block), one group of filter coefficients can be selected from the 16 groups of filter coefficients as the filter coefficients thereof. When the first syntax element identification information is a scalar, i.e., when the first syntax element identification information is an image-level flag, it can be determined according to the first syntax element identification information whether the 16 filters corresponding to the current block are all filtered using the filter information, i.e., it can be determined according to the first syntax element identification information whether all the 16 groups of filter coefficients include the filter coefficients (filtering coefficients) corresponding to the filter information. When the first syntax element identification information is an array, i.e., when the first syntax element identification information is a filter-level flag, it can be determined according to the first syntax element identification information whether the current filter corresponding to the current block is filtered using the filter information, i.e., it can be determined according to the first syntax element identification information whether the filter coefficients of the current filter include the filter coefficients (filtering coefficients) corresponding to the filter information.

[0105] Further, in the embodiments of the present application, it can be determined whether the filter information is used for filtering the first color component according to the value of the first syntax element identification information.

[0106] Exemplarily, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that the filter information is used for filtering the first color component. When the value of the first syntax element identification information is a second value, it is determined that the filter information is not used for filtering the first color component.

[0107] It should be noted that in the embodiments of the present application, the first syntax element identification information can be used to indicate whether the filter information is used for filtering the first color component. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the first syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the first syntax element identification information can also be a flag, which is not limited herein.

[0108] It should be further noted that if the first syntax element identification information is an image-level flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; and in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. The first value and the second value of the embodiments of the present application are not limited in any way.

[0109] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the value of the first syntax element identification information is 1, it can be determined that the first color component uses the filter information for filtering. Otherwise, if the value of the first syntax element identification information is 0, it can be determined that the first color component does not use the filter information for filtering.

[0110] Exemplarily, in some embodiments, if the first color component of the current image is a chroma C b component, the first syntax element identification information can be represented by the syntax element alf_cc_cb_extra_taps_enable_flag, i.e., alf_cc_cb_extra_taps_enable_flag indicates whether the filter information is used for filtering the first color component of the current image. If the value of alf_cc_cb_extra_taps_enable_flag is 0, it is determined that the filter information is not used for filtering the first color component of the current image, and if the value of alf_cc_cb_extra_taps_enable_flag is 1, it is determined that the filter information is used for filtering the first color component of the current image.

[0111] Of course, the value of alf_cc_cb_extra_taps_enable_flag is not limited to 0 and 1, and the present application does not make specific limitations.

[0112] Further, in the embodiments of the present application, the code stream can be decoded first to determine the second syntax element identification information; in the case of determining that the first color component of the current image uses CCALF for filtering based on the second syntax element identification information, the determination process of the first syntax element identification information is performed, i.e., the parsing process of the first syntax element identification information of step 101 is performed.

[0113] That is, in the embodiments of the present application, it can be determined whether to perform CCALF filtering on the first color component of the current picture according to the second syntax element identification information in the bitstream, and if CCALF filtering is used, it can be further determined whether to use the filtering parameter to perform CCALF filtering.

[0114] It can be understood that in the embodiments of the present application, the second syntax element identification information can be used to determine whether to use CCALF filtering, that is, the second syntax element identification information can be used to indicate whether to use CCALF.

[0115] For example, in some embodiments, when the second syntax element identification information has a first value, it is determined not to use CCALF filtering on the first color component of the current picture.

[0116] For example, in some embodiments, when the second syntax element identification information has a second value, it is determined to use CCALF filtering on the first color component of the current picture.

[0117] It should be noted that in the embodiments of the present application, the second syntax element identification information can be used to indicate whether to use CCALF filtering on the first color component of the current picture. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the second syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the second syntax element identification information can also be a flag, which is not limited herein.

[0118] It should also be noted that if the second syntax element identification information is a flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; or in another specific example, the first value can also be set to 0 and the second value can also be set to 1; or the first value can also be set to false and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited.

[0119] Taking the first value as 1 and the second value as 0 as an example, in the embodiment of the present application, if the value of the second syntax element identification information is 1, it can be determined that the first color component of the current image is not filtered using CCALF. Otherwise, if the value of the second syntax element identification information is 0, the first color component of the current image can be filtered using CCALF.

[0120] In step 102, in a case that the first color component is determined to be filtered using the filter information based on the first syntax element identification information, a first filter coefficient corresponding to the first color component is determined; wherein the first filter coefficient at least includes a filter coefficient corresponding to the filter information, and the filter information includes at least one of the following: the reconstructed information of the luma component, the residual information of the luma component, the prediction information of the luma component, the reconstructed information of the color component, the residual information of the color component, and the prediction information of the color component.

[0121] In the embodiment of the present application, after the first syntax element identification information is determined, if it is determined that the first color component is filtered using the filter information based on the first syntax element identification information, a first filter coefficient corresponding to the first color component can be further determined. The first filter coefficient at least includes a filter coefficient corresponding to the filter information.

[0122] It should be noted that, in the embodiment of the present application, the filter information can include information of any form, type and quantity related to the current image.

[0123] Exemplarily, in some embodiments, the filter information can include at least one of the following: the reconstructed information of the luma component, the residual information of the luma component, the prediction information of the luma component, the reconstructed information of the color component, the residual information of the color component, and the prediction information of the color component.

[0124] Exemplarily, in some embodiments, the filter information can further include at least one of the following: the frame type information of the luma component, the quantization parameter information of the luma component, the reconstructed information before deblocking filtering of the luma component, the deblocking filtering boundary strength information of the luma component, the frame type information of the color component, the quantization parameter information of the color component, the reconstructed information before deblocking filtering of the color component, and the deblocking filtering boundary strength information of the color component.

[0125] It can be understood that, in the embodiment of the present application, the related information of the color component can include information of any one or both of the two color components. For example, the reconstructed information of the color component can include the reconstructed information of the first color component and / or the reconstructed information of the second color component.

[0126] That is, in the embodiments of the present application, if it is determined that the first color component uses the filter information for filtering based on the first syntax element identification information, it can be considered that the input information of the CCALF can be increased when the CCALF filtering is performed on the first color component, that is, the filter information is added as the new input information of the CCALF.

[0127] It can be understood that in the embodiments of the present application, if the filter information is added as the input information of the CCALF, at this time, a corresponding filter template needs to be newly added to implement the CCALF filtering, and accordingly, the number of filter templates and corresponding filter coefficients (filter coefficients) of the CCALF may change, that is, compared with the conventional technology, the first filter coefficients corresponding to the first color component may no longer be 28.

[0128] Further, in the embodiments of the present application, in the case where it is determined that the first color component uses the filter information for filtering based on the first syntax element identification information, third syntax element identification information can be determined; and then the number of first filter coefficients can be determined according to the third syntax element identification information.

[0129] Further, in the embodiments of the present application, in the case where it is determined that the first color component uses the filter information for filtering based on the first syntax element identification information, third syntax element identification information is determined; and then the number of first filter coefficients corresponding to the first color component can be determined according to the third syntax element identification information.

[0130] That is, in the embodiments of the present application, the number of first filter coefficients can be determined through the third syntax element identification information transmitted in the code stream. Among them, it can be selected to directly use the third syntax element identification information to indicate the number of first filter coefficients, or it can be selected to use the third syntax element identification information to indicate the number of added filter coefficients, that is, to indicate the increment of filter coefficients corresponding to the first color component when the filter information is selected as the input information of the CCALF compared with the case where the filter information is not used as the input information of the CCALF.

[0131] Exemplarily, in some embodiments of the present application, the third syntax element identification information can be represented by a syntax element alf_cc_num_coeffs, for example, if alf_cc_num_coeffs is used to represent the number of CCALF filter coefficients (first filter coefficients), when the value of alf_cc_num_coeffs is 32, it can be determined that the number of first filter coefficients is 32.

[0132] It can be understood that, in the embodiments of the present application, in the case that new filtering information is added as the input information of the CCALF, the change of the filtering coefficients corresponding to the first color component can be determined by the filter template corresponding to the new filtering information, i.e., the specific number of the first filtering coefficients can be determined by the filter template corresponding to the new filtering information.

[0133] Further, in the embodiments of the present application, since the filtering information can include at least one of the following: the reconstruction information of the luma component, the residual information of the luma component, the prediction information of the luma component, the reconstruction information of the color component, the residual information of the color component, the prediction information of the color component, the frame type information of the luma component, the quantization parameter information of the luma component, the reconstruction information before the deblocking filtering of the luma component, the deblocking filtering boundary strength information of the luma component, the frame type information of the color component, the quantization parameter information of the color component, the reconstruction information before the deblocking filtering of the color component, the deblocking filtering boundary strength information of the color component. Therefore, the number of the newly added filter templates corresponding to the filtering information can also be one or more.

[0134] That is to say, in the embodiments of the present application, the number of the newly added filter templates can be determined by the number of the filtering information. For example, if the filtering information is the reconstruction information of the color component, the number of the corresponding newly added filter templates is 1; if the filtering information is the reconstruction information of the color component and the residual information of the luma component, the number of the corresponding newly added filter templates is 2.

[0135] It should be noted that, in the embodiments of the present application, the size and shape of the newly added filter templates corresponding to different filtering information can be the same or different, which is not limited in the present application.

[0136] Further, in the embodiments of the present application, for at least one filtering information, the size of the filter template corresponding to each filtering information is N x M; wherein N and M are both integers greater than 0.

[0137] Further, in the embodiments of the present application, for at least one filtering information, the shape of the filter template corresponding to each filtering information at least includes one of the following: diamond, cross, rectangle, square.

[0138] That is to say, in the embodiments of the present application, for any newly added filter template, the size and shape of the filter template are not limited.

[0139] Exemplarily, in some embodiments, FIG. 9 is a schematic diagram of a filter template according to the embodiments of the present application, as shown in FIG. 9, if the filtering information is the prediction information of the luma component, one filter template is newly added, the shape of the filter template is cross, and the size of the filter template is 3 x 3.

[0140] Exemplarily, in some embodiments, FIG. 10 is a schematic diagram II of the filter template according to an embodiment of the present application. As shown in FIG. 10, if the filtering information is two of the prediction information of the luma component and the prediction information of the first color component, two filter templates are newly added, and the shapes of the two filter templates are a rhombus and a cross, respectively, and the sizes of the two filter templates are both 5x5.

[0141] Exemplarily, in some embodiments, FIG. 11 is a schematic diagram III of the filter template according to an embodiment of the present application. As shown in FIG. 11, if the filtering information is two of the residual information of the luma component and the residual information of the first color component, two filter templates are newly added, and the shapes of the two filter templates are both a cross, and the sizes of the two filter templates are 5x5 and 3x3, respectively.

[0142] Further, in the embodiment of the present application, when determining the filtering information, the code stream can be decoded to determine the fourth syntax element identification information, and then the filtering information is determined according to the fourth syntax element identification information.

[0143] It can be understood that, in the embodiment of the present application, since the filtering information can include at least one kind of information, which one or more kinds of information is used as the filtering information can be determined by analyzing the fourth syntax element identification information transmitted in the code stream. The fourth syntax element identification information can determine the filtering information.

[0144] It should be noted that, in the embodiment of the present application, after the fourth syntax element identification information is determined, the filtering information can be further determined according to the value of the fourth syntax element identification information.

[0145] Exemplarily, in some embodiments, Table 1 is a mapping relationship between the value of the fourth syntax element and the filtering information. As shown in the table, for different values, the filtering information indicated by the fourth syntax element identification information is different. For example, in the case that the value of the fourth syntax element identification information is 0, it can be determined that the filtering information indicated thereby is the prediction information of the luma component; in the case that the value of the fourth syntax element identification information is 9, it can be determined that the filtering information indicated thereby is the residual information of the luma component and the residual information of the color component.

[0146] Table 1

[0147] The present application does not make a specific limitation on the representation form of the value of the fourth syntax element identification information.

[0148] Further, in the embodiment of the present application, when determining the filtering information, the filtering information can be determined according to the preset information.

[0149] It should be noted that in the embodiments of the present application, the preset information can also be determined as the filtering information, that is, the information capable of being input as the CCALF can be preset, and in the case of determining to filter the first color component of the current image using the filtering information, the preset information can be further determined as the filtering information.

[0150] Therefore, in the embodiments of the present application, the determination manner of the filtering information can include multiple manners, for example, the fourth syntax element identification information transmitted in the code stream can be used for determination, the preset information can be used for determination, and other manners can also be used for determination, and the present application does not make specific limitation.

[0151] Further, in the embodiments of the present application, the first filtering coefficient corresponding to the first color component can be determined by decoding the code stream.

[0152] Step 103, determining the reconstruction block of the current block in the current image according to the first filtering coefficient.

[0153] In the embodiments of the present application, if it is determined based on the first syntax element identification information that the first color component is filtered using the filtering information, after determining the first filtering coefficient corresponding to the first color component, the CCALF filtering can be further performed according to the first filtering coefficient, so as to determine the reconstruction block of the current block in the current image. The reconstruction block of the current block can be understood as the reconstruction block of the first color component of the current block.

[0154] It can be understood that in the embodiments of the present application, in addition to the filtering coefficient corresponding to the newly added filtering information, the first filtering coefficient can also include the filtering coefficient corresponding to the input information of the CCALF in the conventional scheme, for example, the filtering coefficient corresponding to the luminance reconstruction pixel and the filtering coefficient corresponding to the luminance residual pixel.

[0155] Further, in the embodiments of the present application, when the reconstruction block of the current block in the current image is determined according to the first filtering coefficient, for the current pixel in the current block, the filtered reconstruction value of the first color component of the current pixel is determined according to the luminance reconstruction pixel, the filtering coefficient corresponding to the luminance reconstruction pixel, the luminance residual pixel, the filtering coefficient corresponding to the luminance residual pixel, the filtering information, the filtering coefficient corresponding to the filtering information, and the scale factor; and then the reconstruction block of the current block is determined based on the filtered reconstruction value of the first color component of the current pixel.

[0156] Further, in embodiments of the present application, it is assumed that the filter information is the reconstructed information of the color components, wherein the reconstructed information of the color components can include the reconstructed pixels of the first color component and / or the reconstructed pixels of the second color component, i.e., the first filter coefficients can include the filter coefficients corresponding to the reconstructed pixels of the first color component and / or the filter coefficients corresponding to the reconstructed pixels of the second color component, and can further include the filter coefficients corresponding to the luma reconstructed pixels and the filter coefficients corresponding to the luma residual pixels.

[0157] Correspondingly, in embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the first filter coefficients, for a current pixel in the current block, the filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the reconstructed information of the color components, the filter coefficient corresponding to the reconstructed information of the color components, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0158] Further, in embodiments of the present application, it is assumed that the filter information is the residual information of the color components, wherein the residual information of the color components can include the residual pixels of the first color component and / or the residual pixels of the second color component, i.e., the first filter coefficients can include the filter coefficients corresponding to the residual pixels of the first color component and / or the filter coefficients corresponding to the residual pixels of the second color component, and can further include the filter coefficients corresponding to the luma reconstructed pixels and the filter coefficients corresponding to the luma residual pixels.

[0159] Correspondingly, in embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the first filter coefficients, for a current pixel in the current block, the filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the residual information of the color components, the filter coefficient corresponding to the residual information of the color components, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0160] Exemplarily, in some embodiments, it is assumed that the filter information is the reconstructed information of the color components, wherein the reconstructed information of the color components can be the color reconstructed pixels output by SAO, such as the color reconstructed pixels (the reconstructed pixels of the first color component) of C b and / or the color reconstructed pixels (the reconstructed pixels of the second color component) of C r . Then, the filtering process can be performed using the following formula:

[0161] wherein recC' is the filtered reconstructed pixel value, recC is the reconstructed pixel value of the pixel to be filtered, wherein f represents the filter coefficient, recY(*) represents the luminance reconstructed pixel, resY(*) represents the luminance residual pixel, SAOrecC(*) represents the SAO output chrominance reconstructed pixel, x corresponds to the position of x in the filter shape, i is the pixel at the non-x position, a1-a2 represent the coefficients of the filter template with the luminance reconstructed information as the input, b1-b2 represent the coefficients of the filter template with the luminance residual information as the input, c1-c2 represent the coefficients of the filter template with the SAO output chrominance reconstructed pixel as the input, and scale is the scale factor.

[0162] Further, in the embodiments of the present application, after decoding the code stream and determining the first syntax element identification information, i.e., after step 101, the method of the decoder for decoding processing can further include the following steps:

[0163] Step 104, in the case that it is determined based on the first syntax element identification information that the first color component does not use the filter information for filtering, determining the second filter coefficient corresponding to the first color component; wherein the second filter coefficient includes the filter coefficient corresponding to the luminance reconstructed pixel and the filter coefficient corresponding to the luminance residual pixel.

[0164] In the embodiments of the present application, after determining the first syntax element identification information, if it is determined based on the first syntax element identification information that the first color component does not use the filter information for filtering, then the second filter coefficient corresponding to the first color component can be further determined. Wherein the second filter coefficient includes the filter coefficient corresponding to the luminance reconstructed pixel and the filter coefficient corresponding to the luminance residual pixel.

[0165] That is to say, in the embodiments of the present application, if it is determined based on the first syntax element identification information that the first color component does not use the filter information for filtering, then it can be considered that when the CCALF filtering is performed on the first color component, the input information of the CCALF does not need to be increased, but the conventional input information, such as the luminance reconstructed pixel and the luminance residual pixel, can be directly selected for the CCALF filtering.

[0166] It can be understood that in the embodiments of the present application, in the case that the first color component does not use the filter information for filtering, the input information of the CCALF can include the luminance reconstructed pixel and / or the luminance residual pixel, and can also include the related information of other luminance components or color components, which is not specifically limited in the present application.

[0167] It should be noted that in the embodiments of the present application, the first filter coefficient is the filter coefficient corresponding to the case that the first color component is filtered using the newly added filter information, and the second filter coefficient is the filter coefficient corresponding to the case that the first color component is not filtered using the newly added filter information, therefore, the first filter coefficient can include the second filter coefficient. For example, the first filter coefficient can include the second filter coefficient and the filter coefficient corresponding to the filter information.

[0168] Step 105, determining the reconstructed block of the current block in the current picture according to the second filter coefficient.

[0169] In the embodiments of the present application, if it is determined based on the first syntax element identification information that the first color component is not filtered using the filter information, after determining the second filter coefficient corresponding to the first color component, CCALF filtering can be further performed according to the second filter coefficient, so as to determine the reconstructed block of the current block in the current picture. Wherein, the reconstructed block of the current block can be understood as the reconstructed block of the first color component of the current block.

[0170] It can be understood that in the embodiments of the present application, the second filter coefficient can include the filter coefficient corresponding to the input information of CCALF in the conventional scheme, for example, the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.

[0171] Further, in the embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the second filter coefficient, for the current pixel in the current block, the filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0172] For example, in some embodiments, the above formula (1) can be used for filtering processing.

[0173] Further, in the embodiments of the present application, the code stream can be decoded to determine the fifth syntax element identification information; in the case that the fifth syntax element identification information indicates that the filter coefficient of the first color component of the current picture is skipped, the skip position of the filter coefficient and the skip value of the filter coefficient corresponding to the first color component are determined; the first filter coefficient is determined according to the skip position of the filter coefficient and the skip value of the filter coefficient; and the reconstructed block of the current block in the current picture is determined according to the first filter coefficient.

[0174] That is to say, in the embodiments of the present application, whether the first filter coefficient is skipped can be determined through the fifth syntax element identification information transmitted in the code stream.

[0175] Exemplarily, in some embodiments, if the fifth syntax element identifying information has a first value, it is determined that the first filter coefficient is subjected to the skip processing. If the fifth syntax element identifying information has a second value, it is determined that the first filter coefficient is not subjected to the skip processing.

[0176] It should be noted that in the embodiments of the present application, the fifth syntax element identifying information can be used to indicate whether the first filter coefficient needs to be subjected to the skip processing. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the fifth syntax element identifying information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the fifth syntax element identifying information can also be a flag, which is not limited herein.

[0177] It should be further noted that if the fifth syntax element identifying information is a picture-level flag, in one specific example, the first value can be set as 1, and the second value can be set as 0; in another specific example, the first value can also be set as true, and the second value can also be set as false; or in yet another specific example, the first value can also be set as 0, and the second value can also be set as 1; or the first value can also be set as false, and the second value can also be set as true. The first value and the second value in the embodiments of the present application are not limited.

[0178] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the fifth syntax element identifying information has a value of 1, it is determined that the first filter coefficient is subjected to the skip processing. Otherwise, if the fifth syntax element identifying information has a value of 0, it is determined that the first filter coefficient is not subjected to the skip processing.

[0179] Exemplarily, in some embodiments of the present application, if the first color component of the current picture is a chroma C b component, the fifth syntax element identifying information can be represented by a syntax element alf_cc_cb_skip_signal_flag, that is, the alf_cc_cb_skip_signal_flag indicates whether the first filter coefficient is subjected to the skip processing. If the alf_cc_cb_skip_signal_flag has a value of 0, it is determined that the first filter coefficient is not subjected to the skip processing. If the alf_cc_cb_skip_signal_flag has a value of 1, it is determined that the first filter coefficient is subjected to the skip processing.

[0180] Of course, the value of alf_cc_cb_skip_signal_flag is not limited to 0 and 1, and the present application does not make specific limitations.

[0181] Exemplarily, in some embodiments, at the decoding end, after decoding the bitstream and determining the fifth syntax element identification information, whether to perform corresponding skip processing based on the skip position and the skip value of the filter coefficient corresponding to the first color component can be further determined according to the fifth syntax element identification information. Wherein, if the first color component of the current image is the chroma C b component, when alf_cc_cb_skip_signal_flag is 1, the skip processing can be performed, that is, the coding and decoding of the first filter coefficient in the skip part is selected. When alf_cc_cb_skip_signal_flag is 0, the skip processing can not be performed, and the first filter coefficient is normally coded and decoded at this time.

[0182] In summary, by the decoding method proposed in the above steps 101 to 105, for CCALF, new input information such as filter information is introduced, and corresponding filter coefficients (filter templates) are newly added, which realizes the optimization of CCALF, and further optimizes the coding performance of CCALF without increasing the coding complexity.

[0183] Exemplarily, in some embodiments, for CCALF, the following is the change in the syntax semantic level:

[0184] Wherein, alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28. When the method proposed in the embodiments of the present application is introduced, alf_cc_num_coeffs will change, and the specific value will be determined according to the shape of the newly added filter template, for example, after adding the filter information, alf_cc_num_coeffs = 32.

[0185] alf_cc_cb_extra_taps_enable_flag represents whether the method proposed in the embodiments of the present application is used for the chroma C b component. When alf_cc_cb_extra_taps_enable_flag = 1, it represents that the method proposed in the embodiments of the present application is used for the chroma C b component; when alf_cc_cb_extra_taps_enable_flag = 0, it represents that the method proposed in the embodiments of the present application is not used for the chroma C b component.

[0186] alf_cc_cb_skip_signal_flag, indicating whether the chroma C b component skips the encoding of the partial filter coefficients; when alf_cc_cb_skip_signal_flag = 0, it indicates that the chroma C b component skips the encoding of the partial filter coefficients; when alf_cc_cb_skip_signal_flag = 0, it indicates that the chroma C b component does not skip the encoding of the partial filter coefficients.

[0187] alf_cc_cr_extra_taps_enable_flag, indicating whether the chroma C r component uses the method proposed in the embodiments of the present application; when alf_cc_cr_extra_taps_enable_flag = 1, it indicates that the chroma C r component uses the method proposed in the embodiments of the present application; when alf_cc_cr_extra_taps_enable_flag = 0, it indicates that the chroma C r component does not use the method proposed in the embodiments of the present application.

[0188] alf_cc_cr_skip_signal_flag, indicating whether the chroma C r component skips the encoding of the partial filter coefficients; when alf_cc_cr_skip_signal_flag = 1, it indicates that the chroma C r component skips the encoding of the partial filter coefficients; when alf_cc_cr_skip_signal_flag = 0, it indicates that the chroma C r component does not skip the encoding of the partial filter coefficients.

[0189] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and the general sequence specified by JVET is tested under the general test condition AI, RA, and LD configuration. The performance of part of the sequences is tested compared with the anchor ECM-12.0, and the results are shown in the table.

[0190] Table 2

[0191] Table 3

[0192] Table 4

[0193] It can be seen that the method proposed in the embodiments of the present application effectively improves the encoding performance.

[0194] The embodiment of the present application provides a decoding method. In the process of filtering the first color component, new input information can be introduced, that is, filtering information is taken as new input information, and filtering processing of the first color component is implemented in combination with the filtering coefficient corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, and the coding and decoding efficiency and compression performance are improved.

[0195] Still another embodiment of the present application provides an encoding method applied to an encoder and used in a filtering processing scenario of CCALF. FIG. 12 is a schematic diagram of the encoding method according to the embodiment of the present application. As shown in FIG. 12, the method of the encoding processing of the encoder can include the following steps.

[0196] In step 201, a first filtering coefficient corresponding to the first color component is determined. The first filtering coefficient at least includes a filtering coefficient corresponding to filtering information. The filtering information includes at least one of the following: reconstructed information of the luminance component, residual information of the luminance component, prediction information of the luminance component, reconstructed information of the color component, residual information of the color component, and prediction information of the color component.

[0197] In the embodiment of the present application, the first filtering coefficient corresponding to the first color component can be determined first. The first filtering coefficient at least includes a filtering coefficient corresponding to the filtering information.

[0198] It should be noted that in the embodiment of the present application, in a video image, a first image component, a second image component and a third image component are generally used to represent a coding block CB. The three image components are respectively a luminance component, a blue color component and a red color component. Specifically, the luminance component is usually represented by a symbol Y, the blue color component is usually represented by a symbol Cb or U, and the red color component is usually represented by a symbol Cr or V. In this way, the video image can be represented in YCbCr format or YUV format.

[0199] It can be understood that in the embodiment of the present application, the image component of the current image can include a current luminance component or a current color component. The current color component of the current image can be the first color component or the second color component. For example, the first color component can be understood as a blue color component of the current image, and the second color component can be understood as a red color component of the current image. The first color component can be a U component, and the second color component can be a V component. The first color component can also be understood as a red color component of the current image, and the second color component can be understood as a blue color component of the current image. That is, the first color component can be a V component or a U component. The present application does not make specific limitation.

[0200] It should be noted that in the embodiments of the present application, the filtering information can include information of any form, type and quantity related to the current image.

[0201] Exemplarily, in some embodiments, the filtering information can include at least one of the following: the reconstruction information of the luma component, the residual information of the luma component, the prediction information of the luma component, the reconstruction information of the color component, the residual information of the color component, the prediction information of the color component.

[0202] Exemplarily, in some embodiments, the filtering information can further include at least one of the following: the frame type information of the luma component, the quantization parameter information of the luma component, the reconstruction information before the deblocking filtering of the luma component, the deblocking filtering boundary strength information of the luma component, the frame type information of the color component, the quantization parameter information of the color component, the reconstruction information before the deblocking filtering of the color component, the deblocking filtering boundary strength information of the color component.

[0203] It can be understood that in the embodiments of the present application, the related information of the color component can include information of any one or both of the two color components. For example, the reconstruction information of the color component can include the reconstruction information of the first color component and / or the reconstruction information of the second color component.

[0204] It should be noted that in the embodiments of the present application, when the CCALF filtering is performed on the first color component, the input information of the CCALF can be increased, for example, the filtering information is added as the new input information of the CCALF.

[0205] It can be understood that in the embodiments of the present application, if the filtering information is added as the input information of the CCALF, at this time, a corresponding filter template needs to be added to implement the CCALF filtering, and accordingly, the number of the filter templates and the corresponding filter coefficients (filtering coefficients) of the CCALF can change, that is, compared with the conventional technology, the first filtering coefficients corresponding to the first color component can no longer be 28.

[0206] Further, in the embodiments of the present application, in the case where it is determined that the first color component uses the filtering information for filtering based on the first syntax element identification information, the third syntax element identification information can be determined; and then the number of the first filtering coefficients can be determined according to the third syntax element identification information.

[0207] Further, in the embodiments of the present application, in the case where it is determined that the first color component uses the filtering information for filtering based on the first syntax element identification information, the third syntax element identification information is determined; and then the number of the added filtering coefficients corresponding to the first color component can be determined according to the third syntax element identification information.

[0208] That is, in the embodiments of the present application, the number of the first filter coefficients can be determined by the third syntax element identification information transmitted in the bitstream. Wherein, the third syntax element identification information can be selected to directly indicate the number of the first filter coefficients, or the third syntax element identification information can be selected to indicate the number of the added filter coefficients, that is, to indicate the increment of the filter coefficients corresponding to the first color component when the filter information is selected as the input information of the CCALF compared with the case that the filter information is not selected as the input information of the CCALF.

[0209] Exemplarily, in some embodiments of the present application, the third syntax element identification information can be represented by the syntax element alf_cc_num_coeffs, for example, if the number of the CCALF filter coefficients (the first filter coefficients) is represented by alf_cc_num_coeffs, when the value of alf_cc_num_coeffs is 32, it can be determined that the number of the first filter coefficients is 32.

[0210] It can be understood that, in the embodiments of the present application, in the case that the filter information is added as the input information of the CCALF, the change of the filter coefficients corresponding to the first color component can be determined by the filter template corresponding to the added filter information, that is, the specific number of the first filter coefficients can be determined by the filter template corresponding to the added filter information.

[0211] Further, in the embodiments of the present application, since the filter information can include at least one of the following: the reconstructed information of the luma component, the residual information of the luma component, the prediction information of the luma component, the reconstructed information of the color component, the residual information of the color component, the prediction information of the color component, the frame type information of the luma component, the quantization parameter information of the luma component, the reconstructed information before the deblocking filtering of the luma component, the deblocking filtering boundary strength information of the luma component, the frame type information of the color component, the quantization parameter information of the color component, the reconstructed information before the deblocking filtering of the color component, the deblocking filtering boundary strength information of the color component. Therefore, the number of the added filter templates corresponding to the filter information can also be one or more.

[0212] That is, in the embodiments of the present application, the number of the added filter templates can be determined by the number of the filter information. For example, if the filter information is the reconstructed information of the color component, the number of the corresponding added filter templates is 1; if the filter information is the reconstructed information of the color component and the residual information of the luma component, the number of the corresponding added filter templates is 2.

[0213] It should be noted that, in the embodiments of the present application, the size and shape of the added filter templates corresponding to different filter information can be the same or different, which is not specifically limited in the present application.

[0214] Further, in embodiments of the present application, for at least one filter information, the size of the filter template corresponding to each filter information is N x M; wherein N and M are both integers greater than 0.

[0215] Further, in embodiments of the present application, for at least one filter information, the shape of the filter template corresponding to each filter information at least includes one of the following: diamond, cross, rectangle, square.

[0216] That is, in embodiments of the present application, for any newly added filter template, the size and shape of the filter template are not limited.

[0217] For example, in some embodiments, as shown in FIG. 9, if the filter information is the prediction information of the luminance component, one filter template is newly added, the shape of the filter template is diamond, and the size is 5x5.

[0218] For example, in some embodiments, as shown in FIG. 10, if the filter information is the prediction information of the luminance component and the prediction information of the first color component, two filter templates are newly added, the shapes of the two filter templates are diamond and cross respectively, and the size is 5x5.

[0219] For example, in some embodiments, as shown in FIG. 11, if the filter information is the residual information of the luminance component and the residual information of the first color component, two filter templates are newly added, the shapes of the two filter templates are both cross, and the size is 5x5 and 3x3 respectively.

[0220] Further, in embodiments of the present application, the filter information can be determined; then the fourth syntax element identification information is set according to the filter information, and the fourth syntax element identification information is written into the code stream.

[0221] It can be understood that, in embodiments of the present application, since the filter information can include at least one kind of information, the fourth syntax element identification information transmitted in the code stream can be used to indicate which kind or kinds of information are used as the filter information. The fourth syntax element identification information can determine the filter information.

[0222] It should be noted that, in embodiments of the present application, after the filter information is determined, the value of the fourth syntax element identification information can be further determined according to the filter information.

[0223] Exemplarily, in some embodiments, Table 5 is a mapping relationship between the value of the fourth syntax element and the filtering information. As shown in the table, for different filtering information, the value of the determined fourth syntax element identification information is different. For example, in the case of determining that the filtering information is the residual information of the luminance component, the value of the fourth syntax element identification information can be set as 2.

[0224] Table 5

[0225] It should be noted that the representation form of the value of the fourth syntax element identification information is not specifically limited in the present application.

[0226] Further, in the embodiments of the present application, when determining the filtering information, the filtering information can be determined according to preset information.

[0227] It should be noted that in the embodiments of the present application, the preset information can be determined as the filtering information, that is, the information that can be used as the input of the CCALF can be pre-set, and then the preset information can be further determined as the filtering information.

[0228] Further, in the embodiments of the present application, when determining the first filter coefficient of the first color component, the covariance matrix and the error vector of the same category of pixels can be respectively accumulated, and then the Wiener-Hopf equation is constructed, and the filter coefficient of the category is calculated by solving the equation.

[0229] Exemplarily, in some embodiments, assuming that the number of the first filter coefficients is 29, for each pixel, the covariance matrix A thereof is a 29x29 square matrix. Denote each element of the matrix A as a i,j , where i, j ∈ [0, 1, 2, …, 25, 26, 27, 28]. For the error vector B, it is a 29x1 vector. Denote each element of the vector B as b i , where i ∈ [0, 1, 2, …, 25, 26, 27, 28]. After obtaining the covariance matrix A and the error vector B of each pixel, the covariance matrix and the error vector of the same category of pixels in a frame of image are respectively summed. The Wiener-Hopf equation Ac = B is constructed, where A is the sum of the covariance matrices of the same category of pixels, and B is the sum of the error vectors of the same category of pixels. The coefficient c of the category needs to be solved, where c is a 29x1 vector.

[0230] It should be noted that the filter coefficients solved by the equation are all floating point types. Since the value range of the floating point type is almost not limited, a lot of bits are needed to encode the coefficients. In order to solve this problem, the VVC encoder performs integerization on the filter coefficients. First, the filter coefficients are scaled. Wherein, c i is the filter coefficient solved by the Wiener-Hopf equation, and c'i is the scaled value. After obtaining c' i , c' is looked up in a table, and the closest number in {-64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64} is selected as the quantized coefficient c. i i , i.e., the corresponding first filter coefficient is obtained.

[0231] Step 202, determining the reconstructed block of the current block in the current image according to the first filter coefficient.

[0232] In the embodiments of the present application, after determining the first filter coefficient corresponding to the first color component, CCALF filtering can be further performed according to the first filter coefficient, so that the reconstructed block of the current block in the current image can be determined. The reconstructed block of the current block can be understood as the reconstructed block of the first color component of the current block.

[0233] It can be understood that, in the embodiments of the present application, in addition to the filter coefficient corresponding to the newly added filter information, the first filter coefficient can also include the filter coefficient corresponding to the input information of CCALF in the conventional scheme, for example, the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.

[0234] Further, in the embodiments of the present application, when determining the reconstructed block of the current block in the current image according to the first filter coefficient, for a current pixel in the current block, the filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the filter information, the filter coefficient corresponding to the filter information, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0235] Further, in the embodiments of the present application, it is assumed that the filter information is the reconstructed information of the color component, wherein the reconstructed information of the color component can include the reconstructed pixel of the first color component and / or the reconstructed pixel of the second color component, i.e., the first filter coefficient can include the filter coefficient corresponding to the reconstructed pixel of the first color component and / or the filter coefficient corresponding to the reconstructed pixel of the second color component, and can also include the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.

[0236] ​​Accordingly, in the embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the first filter coefficient, for a current pixel in the current block, a filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the color component residual information, the filter coefficient corresponding to the color component residual information, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0237] Further, in the embodiments of the present application, it is assumed that the filter information is the color component residual information, wherein the color component residual information can include the first color component residual pixel and / or the second color component residual pixel, that is, the first filter coefficient can include the filter coefficient corresponding to the first color component residual pixel and / or the filter coefficient corresponding to the second color component residual pixel, and can further include the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.

[0238] Accordingly, in the embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the first filter coefficient, for a current pixel in the current block, a filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the color component residual information, the filter coefficient corresponding to the color component residual information, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0239] Exemplarily, in some embodiments, it is assumed that the filter information is the color component reconstructed information, wherein the color component reconstructed information can be the color reconstructed pixel output by SAO, for example, the color reconstructed pixel (the reconstructed pixel of the first color component) of C b and / or the color reconstructed pixel (the reconstructed pixel of the second color component) of C r . Then, the filtering processing can be performed using the above formula (2).

[0240] In step 203, when it is determined that the filter information is used for filtering the first color component based on the reconstructed block of the current block in the current picture, a first syntax element identification information is set, and the first syntax element identification information is written into the code stream.

[0241] In the embodiments of the present application, after the reconstructed block of the current block in the current picture is determined according to the first filter coefficient, it can be further determined whether to filter the first color component of the current picture using the filter information adaptively according to the reconstructed block of the current block. If it is determined to filter the first color component using the filter information based on the reconstructed block of the current block in the current picture, the first syntax element identification information can be further set and written into the code stream.

[0242] Further, in the embodiments of the present application, the method for encoding processing performed by the encoder can further include the following steps:

[0243] Step 204, determining the second filter coefficient corresponding to the first color component of the current picture; wherein the second filter coefficient includes the filter coefficient corresponding to the luminance reconstructed pixel and the filter coefficient corresponding to the luminance residual pixel.

[0244] In the embodiments of the present application, the second filter coefficient corresponding to the first color component can also be determined. Wherein the second filter coefficient includes the filter coefficient corresponding to the luminance reconstructed pixel and the filter coefficient corresponding to the luminance residual pixel.

[0245] It should be noted that in the embodiments of the present application, when the first color component performs the CCALF filtering, the conventional input information such as the luminance reconstructed pixel and the luminance residual pixel can be selected to perform the CCALF filtering.

[0246] It can be understood that in the embodiments of the present application, the input information of the CCALF can include the luminance reconstructed pixel and / or the luminance residual pixel, and can also include the related information of other luminance components or color components, which is not limited in the present application.

[0247] It should be noted that in the embodiments of the present application, the first filter coefficient is the filter coefficient corresponding to the case that the first color component uses the newly added filter information for filtering, and the second filter coefficient is the filter coefficient corresponding to the case that the first color component does not use the newly added filter information for filtering. Therefore, the first filter coefficient can include the second filter coefficient. For example, the first filter coefficient can include the second filter coefficient and the filter coefficient corresponding to the filter information.

[0248] Step 205, determining the reconstructed block of the current block in the current picture according to the second filter coefficient.

[0249] In the embodiments of the present application, after the second filter coefficient corresponding to the first color component is determined, the CCALF filtering can be further performed according to the second filter coefficient, so as to determine the reconstructed block of the current block in the current picture. Wherein the reconstructed block of the current block can be understood as the reconstructed block of the first color component of the current block.

[0250] It can be understood that, in the embodiments of the present application, the second filter coefficient can include the filter coefficient corresponding to the input information of the CCALF in the conventional scheme, for example, the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.

[0251] Further, in the embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the second filter coefficient, for a current pixel in the current block, the filtered reconstructed value of the first color component of the current pixel is determined according to the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

[0252] Exemplarily, in some embodiments, the filtering process can be performed using the above formula (1).

[0253] Further, in the embodiments of the present application, when adaptively determining whether to use the filter information to filter the first color component of the current picture according to the reconstructed block of the current block, the first generation value can be determined according to the reconstructed block corresponding to the first filter coefficient, and the second generation value can be determined according to the reconstructed block corresponding to the second filter coefficient; in the case that the first generation value is less than or equal to the second generation value, it is determined that the first color component uses the filter information for filtering; in the case that the first generation value is greater than the second generation value, it is determined that the first color component does not use the filter information for filtering.

[0254] It should be noted that, in the embodiments of the present application, it can be adaptively determined whether to use the newly added input information for CCALF, that is, whether to use the filter information for CCALF. If the first generation value obtained when using the filter information as the newly added input information is less than or equal to the second generation value obtained when not adding the input information, it can be determined that the first color component uses the filter information for filtering.

[0255] Further, in the embodiments of the present application, after adaptively determining whether the first color component uses the filter information for CCALF filtering, the first syntax element identification information can be further set, and then the first syntax element identification information is written into the code stream.

[0256] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether to use the filter information to filter the first color component.

[0257] Further, in embodiments of the present application, the first syntax element identification information can be a flag, wherein the first syntax element identification information can be an image-level flag or a filter-level flag. The present application does not make specific limitations.

[0258] Correspondingly, in embodiments of the present application, if the first syntax element identification information is an image-level flag, the representation form of the first syntax element identification information can be a scalar form; if the first syntax element identification information is a filter-level flag, the representation form of the first syntax element identification information can be an array form.

[0259] That is to say, in embodiments of the present application, the representation form of the first syntax element identification information is not limited, for example, the representation form of the first syntax element identification information can include a first representation form and a second representation form. The first representation form can be a scalar form, and the second representation form can be an array form.

[0260] Further, in embodiments of the present application, in the case where the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information can be considered as an image-level flag, and thus the first syntax element identification information can be used to determine whether the first color component of the current image is filtered using the filtering information.

[0261] Further, in embodiments of the present application, in the case where the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information can be considered as a filter-level flag, and thus the first syntax element identification information can be used to determine whether the current filter of the first color component of the current image is filtered using the filtering information.

[0262] It can be understood that in the embodiments of the present application, the first color component of the current image can correspond to a division into a plurality of CTUs, and for each CTU (current block), one group of filter coefficients can be selected from the 16 groups of filter coefficients as the filter coefficients thereof. When the first syntax element identification information is a scalar, i.e., when the first syntax element identification information is an image-level flag, it can be determined according to the first syntax element identification information whether the 16 filters corresponding to the current block are all filtered using the filter information, i.e., it can be determined according to the first syntax element identification information whether all the 16 groups of filter coefficients include the filter coefficients (filtering coefficients) corresponding to the filter information. When the first syntax element identification information is an array, i.e., when the first syntax element identification information is a filter-level flag, it can be determined according to the first syntax element identification information whether the current filter corresponding to the current block is filtered using the filter information, i.e., it can be determined according to the first syntax element identification information whether the filter coefficients of the current filter include the filter coefficients (filtering coefficients) corresponding to the filter information.

[0263] Further, in the embodiments of the present application, after it is determined whether the filter information is used to filter the first color component, the value of the first syntax element identification information can be further set.

[0264] Exemplarily, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that the filter information is used to filter the first color component. When the value of the first syntax element identification information is a second value, it is determined that the filter information is not used to filter the first color component.

[0265] It should be noted that in the embodiments of the present application, the first syntax element identification information can be used to indicate whether the filter information is used to filter the first color component. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the first syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the first syntax element identification information can also be a flag, which is not limited here.

[0266] It should be further noted that if the first syntax element identification information is an image-level flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; and in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. The first value and the second value of the embodiments of the present application are not limited in any way.

[0267] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if it is determined that the first color component is filtered using the filter information, the value of the first syntax element identification information can be set to 1. Otherwise, if it is determined that the first color component is not filtered using the filter information, the value of the first syntax element identification information can be set to 0.

[0268] Exemplarily, in some embodiments, if the first color component of the current image is a chroma C b component, the first syntax element identification information can be represented by a syntax element alf_cc_cb_extra_taps_enable_flag, i.e., alf_cc_cb_extra_taps_enable_flag indicates whether the filter information is used to filter the first color component of the current image. If the value of alf_cc_cb_extra_taps_enable_flag is 0, it is determined that the filter information is not used to filter the first color component of the current image, and if the value of alf_cc_cb_extra_taps_enable_flag is 1, it is determined that the filter information is used to filter the first color component of the current image.

[0269] Of course, the value of alf_cc_cb_extra_taps_enable_flag is not limited to 0 and 1, and the present application does not make any specific limitation.

[0270] Further, in the embodiments of the present application, in the case of adaptively determining that the first color component of the current image is filtered using CCALF, the determination process of the first syntax element identification information is performed, and the second syntax element identification information is set and written into the bitstream.

[0271] It should be noted that in the embodiments of the present application, the penalty value corresponding to the case that the first color component of the current image is not filtered using the CCALF can be determined. The penalty value corresponding to the case that the first color component of the current image is filtered using the CCALF can also be determined. Then, the second syntax element identification information can be determined according to the penalty value when the CCALF is used and the penalty value when the CCALF is not used.

[0272] It should be noted that in the embodiments of the present application, when it is determined that the first color component of the current image is filtered using the CCALF, the determination process of the first filter coefficient can be performed, i.e., the determination process of the first filter coefficient in step 201 is performed.

[0273] That is to say, in the embodiments of the present application, it can be determined first whether the first color component of the current image is filtered using the CCALF. If the CCALF is used, it can be further determined whether the filter parameter is used for the CCALF filtering.

[0274] It can be understood that in the embodiments of the present application, the second syntax element identification information can be used to determine whether the CCALF is used for filtering, i.e., the second syntax element identification information can be used to indicate whether the CCALF is used.

[0275] Exemplarily, in some embodiments, when it is determined that the first color component of the current image is not filtered using the CCALF, the value of the second syntax element identification information is set as a first value. When it is determined that the first color component of the current image is filtered using the CCALF, the value of the second syntax element identification information is set as a second value.

[0276] It should be noted that in the embodiments of the present application, the second syntax element identification information can be used to indicate whether the first color component of the current image is filtered using the CCALF. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the second syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the second syntax element identification information can also be a flag, which is not limited herein.

[0277] It should be further noted that if the second syntax element identification information is a flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; and in still another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited in any way.

[0278] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the value of the second syntax element identification information is 1, it can be determined that the first color component of the current image is not filtered using CCALF. Otherwise, if the value of the second syntax element identification information is 0, the first color component of the current image can be filtered using CCALF.

[0279] It can be understood that in the embodiments of the present application, if the filter information is added as the input information of CCALF, at this time, a corresponding filter template needs to be added to implement the CCALF filtering, and accordingly, the number of filter templates and corresponding filter coefficients (filter coefficients) of CCALF can change, that is, compared with the conventional technology, the first filter coefficients corresponding to the first color component can no longer be 28.

[0280] Further, in the embodiments of the present application, in the case where it is determined that the first color component is filtered using the filter information, the number of first filter coefficients is determined; then the third syntax element identification information is set according to the number of first filter coefficients; and the third syntax element identification information is written into the bitstream.

[0281] Further, in the embodiments of the present application, in the case where it is determined that the first color component is filtered using the filter information, the number of first filter coefficients is determined; then the number of added filter coefficients corresponding to the first color component is determined according to the number of first filter coefficients; the third syntax element identification information is set according to the number of added filter coefficients corresponding to the first color component; and the third syntax element identification information is written into the bitstream.

[0282] That is, in the embodiments of the present application, the number of first filter coefficients can be determined through the third syntax element identification information transmitted in the bitstream. Among them, it can be selected to directly use the third syntax element identification information to indicate the number of first filter coefficients, or it can be selected to use the third syntax element identification information to indicate the number of added filter coefficients, that is, to indicate the increment of filter coefficients corresponding to the first color component when the filter information is selected as the input information of CCALF compared with the case where the filter information is not used as the input information of CCALF.

[0283] Exemplarily, in some embodiments of the present application, the third syntax element identification information can be represented by a syntax element alf_cc_num_coeffs, for example, if alf_cc_num_coeffs is used to represent the number of CCALF filter coefficients (first filter coefficients), when the number of first filter coefficients is 32, the value of alf_cc_num_coeffs can be set to 32.

[0284] It can be understood that, in the embodiments of the present application, in the case of adding new filter information as the input information of CCALF, the change of the filter coefficients corresponding to the first color component can be determined by the filter template corresponding to the new filter information, that is, the specific number of first filter coefficients can be determined by the filter template corresponding to the new filter information.

[0285] Further, in the embodiments of the present application, since the filter information can include at least one of the following: the reconstruction information of the luminance component, the residual information of the luminance component, the prediction information of the luminance component, the reconstruction information of the color component, the residual information of the color component, the prediction information of the color component, the frame type information of the luminance component, the quantization parameter information of the luminance component, the reconstruction information before deblocking filtering of the luminance component, the deblocking filtering boundary strength information of the luminance component, the frame type information of the color component, the quantization parameter information of the color component, the reconstruction information before deblocking filtering of the color component, the deblocking filtering boundary strength information of the color component. Therefore, the number of new filter templates corresponding to the filter information can also be one or more.

[0286] That is, in the embodiments of the present application, the number of new filter templates can be determined by the number of filter information. For example, if the filter information is the reconstruction information of the color component, the number of corresponding new filter templates is 1; if the filter information is the reconstruction information of the color component and the residual information of the luminance component, the number of corresponding new filter templates is 2.

[0287] It should be noted that, in the embodiments of the present application, the size and shape of the new filter template corresponding to different filter information can be the same or different, which is not specifically limited in the present application.

[0288] Further, in the embodiments of the present application, in the case of determining to skip the filter coefficients of the first color component of the current image, the skip position and the skip value of the filter coefficients corresponding to the first color component are determined, and a fifth syntax element identification information is set and written into the code stream; the first filter coefficients are determined according to the skip position and the skip value of the filter coefficients; and the reconstruction block of the current block in the current image is determined according to the first filter coefficients.

[0289] That is, in the embodiments of the present application, whether the first filter coefficient is skipped can be determined by the fifth syntax element identification information transmitted in the bitstream.

[0290] Exemplarily, in some embodiments, when the fifth syntax element identification information takes the first value, it is determined that the first filter coefficient is processed by skipping. When the fifth syntax element identification information takes the second value, it is determined that the first filter coefficient is not processed by skipping.

[0291] It should be noted that in the embodiments of the present application, the fifth syntax element identification information can be used to indicate whether the first filter coefficient needs to be processed by skipping. In addition, the first value and the second value are different, and the first value and the second value can be in the form of a parameter or in the form of a number. In general, the fifth syntax element identification information can be a parameter written in a picture parameter set (PPS) or a parameter written in a sequence parameter set (SPS), and the fifth syntax element identification information can also be a flag, which is not limited herein.

[0292] It should be further noted that if the fifth syntax element identification information is a picture-level flag, in one specific example, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; or in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or the first value can also be set to false and the second value can also be set to true. The first value and the second value in the embodiments of the present application are not limited.

[0293] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if it is determined that the first filter coefficient is processed by skipping, the value of the fifth syntax element identification information can be set to 1. Otherwise, if it is determined that the first filter coefficient is not processed by skipping, the value of the fifth syntax element identification information can be set to 0.

[0294] Exemplarily, in some embodiments of the present application, if the first color component of the current picture is chroma C bThe fifth syntax element identification information can be indicated by a syntax element alf_cc_cb_skip_signal_flag, i.e., alf_cc_cb_skip_signal_flag indicates whether the first filter coefficient is processed by skip processing. If the value of alf_cc_cb_skip_signal_flag is 0, it is determined that the first filter coefficient is not processed by skip processing, and if the value of alf_cc_cb_skip_signal_flag is 1, it is determined that the first filter coefficient is processed by skip processing.

[0295] Of course, the value of alf_cc_cb_skip_signal_flag is not limited to 0 and 1, and the present application does not make specific limitations.

[0296] Exemplarily, in some embodiments, at the encoding end, if the first color component of the current image is the chrominance C b component, the filter coefficient (the first filter coefficient) characteristics of the current CCALF can be analyzed. When there are a large number of 0 values (skip values of filter coefficients) in part of the filter coefficients, alf_cc_cb_skip_signal_flag is set to 1, indicating that the chrominance Cb component skips the encoding of 0 value filter coefficients; otherwise, alf_cc_cb_skip_signal_flag is set to 0, indicating that the filter coefficients are normally encoded at this time.

[0297] In summary, by the decoding method proposed by the above steps 201 to 205, for CCALF, new input information such as filter information is introduced, and the corresponding filter coefficient (filter template) is newly added, which realizes the optimization of CCALF, and further optimizes the coding performance of CCALF without increasing the coding and decoding complexity.

[0298] Exemplarily, in some embodiments, for CCALF, the following is the change in the syntax semantic level:

[0299] Among them, alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28. When the method proposed in the present application is introduced, alf_cc_num_coeffs will change, and the specific value will be determined according to the shape of the newly added filter template, for example, after the new filter information is added, alf_cc_num_coeffs = 32.

[0300] alf_cc_cb_extra_taps_enable_flag indicates whether the chrominance C balf_cc_cb_extra_taps_enable_flag, indicating whether the chroma C b component uses the method proposed in the embodiments of the present application; when alf_cc_cb_extra_taps_enable_flag = 0, it indicates that the chroma C b component does not use the method proposed in the embodiments of the present application.

[0301] alf_cc_cb_skip_signal_flag, indicating whether the chroma C b component skips the encoding of the partial filter coefficient. When alf_cc_cb_skip_signal_flag = 1, it indicates that the chroma C b component skips the encoding of the partial filter coefficient; when alf_cc_cb_skip_signal_flag = 0, it indicates that the chroma C b component does not skip the encoding of the partial filter coefficient.

[0302] alf_cc_cr_extra_taps_enable_flag, indicating whether the chroma C r component uses the method proposed in the embodiments of the present application; when alf_cc_cr_extra_taps_enable_flag = 1, it indicates that the chroma C r component uses the method proposed in the embodiments of the present application; when alf_cc_cr_extra_taps_enable_flag = 0, it indicates that the chroma C r component does not use the method proposed in the embodiments of the present application.

[0303] alf_cc_cr_skip_signal_flag, indicating whether the chroma C r component skips the encoding of the partial filter coefficient. When alf_cc_cr_skip_signal_flag = 1, it indicates that the chroma C r component skips the encoding of the partial filter coefficient; when alf_cc_cr_skip_signal_flag = 0, it indicates that the chroma C r component does not skip the encoding of the partial filter coefficient.

[0304] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and the general sequence specified by JVET is tested under the general test condition AI, RA, LD configuration. Compared with the anchor ECM-12.0, the performance of part of the sequences is tested, and the results are shown in Tables 2, 3 and 4. It can be seen that the method proposed in the embodiments of the present application effectively improves the coding performance.

[0305] The embodiment of the present application provides a coding method, wherein new input information can be introduced in the process of filtering the first color component, that is, the filtering information is taken as the new input information, and the filtering processing of the first color component is realized in combination with the filtering coefficient corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, and the coding and decoding efficiency is effectively improved, and the compression performance is improved.

[0306] Still another embodiment of the present application provides a coding and decoding method, which is applied to a coder and is used in the scene of performing filtering processing through CCALF. For the CCALF, a new filter template is proposed by introducing new input information, so as to further optimize the coding performance of the CCALF. One example of the new filter template is shown in Fig. 9.

[0307] Fig. 13 is a schematic diagram of the implementation process of the loop filtering according to the embodiment of the present application. As shown in Fig. 13, the new input information introduced by the embodiment of the present application is l3 and l4, which can be the chroma information output by the SAO. Since the chroma information includes C b and C r , the embodiment of the present application does not make specific limitation on which of the two chroma information is input into the CCALF filter.

[0308] That is, the C b output by the SAO can be input into the C b filter of the CCALF, and can also be input into the C r filter of the CCALF; the C r output by the SAO can be input into the C r filter of the CCALF, and can also be input into the C b filter of the CCALF.

[0309] Fig. 14 is a schematic diagram of the implementation process of the loop filtering according to the embodiment of the present application. As shown in Fig. 14, the new input information introduced by the embodiment of the present application is l3 and l4, which can be the chroma information output by the SAO, and can also be extended to other information, for example, the prediction information of the luminance component, the frame type information, the quantization parameter information, the reconstructed information before the luminance deblocking filtering, the deblocking filtering boundary strength information, etc.; the prediction information of the chroma component, the residual information, the reconstructed information after the chroma ALF processing, the frame type information, the quantization parameter information, the reconstructed information before the chroma deblocking filtering, the deblocking filtering boundary strength information, etc.

[0310] Correspondingly, in order to use the newly added input information, the embodiment of the present application proposes a new filter template. Fig. 15 is a schematic diagram of a filter template according to the embodiment of the present application. As shown in Fig. 15, the filter coefficient index of CCALF in the current ECM is 0 to 26. Therefore, the filter coefficient index is further increased (for example, 27, 28, x, 29, 30) in this embodiment. The x corresponds to the pixel value of the chroma information output by the SAO at the current position. The coefficient at the x is generally not calculated and is set to 0 by default. The 27, 28, 29, and 30 represent the pixel value of the chroma information (filter information) output by the SAO at the periphery (in turn, the upper, left, right, and lower) of the current position.

[0311] Fig. 16 is a schematic diagram of the application of the filter template according to the embodiment of the present application. As shown in Fig. 16, the 3x3 filter template taking the chroma Cb information output by the SAO as the input is taken as an example. The left drawing represents the whole frame image of the chroma Cb information output by the SAO. The gray circle and the white circle represent the chroma Cb pixel, and the x represents the current pixel. If the 3x3 filter template of the right drawing is taken as an example, the pixel of the gray circle is the input information of the filter, which corresponds to 27, 28, 29, and 30, respectively, in the filter coefficient index. The coefficient at the x is generally not calculated and is set to 0 by default.

[0312] It should be noted that the filter template shown in Fig. 15 is only an example, and the size of the filter template is not limited in the present application. The filter template can also be 5x5, 7x7, or other sizes.

[0313] Fig. 17 is a schematic diagram of a filter template according to the embodiment of the present application. As shown in Fig. 17, the filter coefficient index can also be in a symmetrical design form. It should be noted that when the filter template is changed, the corresponding coefficient index will also be changed.

[0314] Further, in the embodiment of the present application, after the new input information is added, the CCALF filtering process can be finally realized by the above formula (2).

[0315] Exemplarily, in some embodiments, at the encoding end, when the encoding end enters the CCALF module, the current chroma component is processed (taking the Cb component as an example, and the processing process of the Cr component is similar):

[0316] a) using the newly added input information, calculate the filter coefficients of CCALF, and filter the current chroma component to obtain the rate-distortion cost Cost1; using the input information of the existing scheme, calculate the filter coefficients of CCALF, and filter the current chroma component to obtain the rate-distortion cost Cost2. Compare the two costs, if Cost1<Cost2, then alf_cc_cb_extra_taps_enable_flag is 1, indicating that the chroma Cb component uses the scheme in this paper; otherwise alf_cc_cb_extra_taps_enable_flag is 0, indicating that the chroma Cb component does not use the scheme in this paper. Skip to b);

[0317] b) analyze the filter coefficient characteristics of the current CCALF, when there are a large number of 0 values in part of the filter coefficients, alf_cc_cb_skip_signal_flag is 1, indicating that the chroma Cb component skips the encoding of 0 value filter coefficients; otherwise alf_cc_cb_skip_signal_flag is 0, indicating that the filter coefficients are normally encoded at this time, skip to c);

[0318] c) if the current chroma component Cb has been processed, load Cr for processing. If all the current chroma components have been processed, end.

[0319] Exemplarily, in some embodiments, at the decoding end, the decoding end is specifically implemented as follows:

[0320] When the decoding end enters the loop filter CCALF module, the current chroma component is processed (taking the Cb component as an example, the processing process of the Cr component is similar):

[0321] a) parse alf_cc_cb_extra_taps_enable_flag and alf_cc_cb_skip_signal_flag, and according to the value of alf_cc_cb_skip_signal_flag, parse the filter coefficients. When alf_cc_cb_extra_taps_enable_flag is 1, using the newly added input information, according to the parsed CCALF filter coefficients, filter the current chroma component; when alf_cc_cb_extra_taps_enable_flag is 0, using the input information of the existing scheme, according to the parsed CCALF filter coefficients, filter the current chroma component. Skip to b);

[0322] b) if the current chroma component Cb has been processed, load Cr for processing. If all the current chroma components have been processed, end.

[0323] Further, in the embodiments of the present application, taking the syntax semantic level in the ECM as an example, the following semantics are defined:

[0324] alf_cc_num_coeffs represents the number of CCALF filter coefficients, for example, according to the conventional filter scheme, alf_cc_num_coeffs = 28. When the method proposed in the embodiments of the present application is introduced, alf_cc_num_coeffs will change, and the specific value will be determined according to the shape of the newly added filter template, for example, after the new filter information is added, alf_cc_num_coeffs = 32.

[0325] alf_cc_cb_extra_taps_enable_flag represents whether the chrominance C b component uses the method proposed in the embodiments of the present application. When alf_cc_cb_extra_taps_enable_flag = 1, it represents that the chrominance C b component uses the method proposed in the embodiments of the present application; when alf_cc_cb_extra_taps_enable_flag = 0, it represents that the chrominance C b component does not use the method proposed in the embodiments of the present application.

[0326] alf_cc_cb_skip_signal_flag represents whether the chrominance C b component skips the encoding of part of the filter coefficients. When alf_cc_cb_skip_signal_flag = 1, it represents that the chrominance C b component skips the encoding of part of the filter coefficients; when alf_cc_cb_skip_signal_flag = 0, it represents that the chrominance C b component does not skip the encoding of part of the filter coefficients.

[0327] alf_cc_cr_extra_taps_enable_flag represents whether the chrominance C r component uses the method proposed in the embodiments of the present application. When alf_cc_cr_extra_taps_enable_flag = 1, it represents that the chrominance C r component uses the method proposed in the embodiments of the present application; when alf_cc_cr_extra_taps_enable_flag = 0, it represents that the chrominance C r component does not use the method proposed in the embodiments of the present application.

[0328] alf_cc_cr_skip_signal_flag represents whether the chrominance C rwhether the component skips the encoding of the partial filter coefficients. When alf_cc_cr_skip_signal_flag = 1, it indicates that the chroma C r whether the component skips the encoding of the partial filter coefficients. When alf_cc_cr_skip_signal_flag = 0, it indicates that the chroma C r whether the component skips the encoding of the partial filter coefficients. When alf_cc_cr_skip_signal_flag = 0, it indicates that the chroma C

[0329] Further, in the embodiments of the present application, the adaptive loop filter data syntax is defined as follows:

[0330] Exemplarily, in some embodiments, the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, and is tested on the general sequences specified by JVET under the general test conditions AI, RA, and LD configuration. Compared with the anchor ECM-12.0, the performance of part of the sequences is tested, and the results are shown in Tables 2, 3, and 4. It can be seen that the method proposed in the embodiments of the present application effectively improves the coding performance.

[0331] In summary, the coding and decoding method proposed in the embodiments of the present application proposes a new filter template, optimizes the CCALF technology by introducing new input information, and further improves the coding performance without increasing the coding and decoding complexity.

[0332] The embodiments of the present application provide a coding and decoding method. In the process of filtering the first color component, new input information can be introduced, that is, the filtering information is taken as new input information, and the filtering information corresponding to the filtering coefficient is combined to realize the filtering processing of the first color component, so that a more reasonable filtering effect can be obtained, the coding and decoding efficiency is effectively improved, and the compression performance is improved.

[0333] In another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 18, a composition structure schematic diagram of an encoder 100 proposed in the embodiments of the present application is shown. As shown in FIG. 18, the encoder 100 can include a first determining unit 1001; wherein,

[0334] The first determining unit 1001 is configured to determine a first filter coefficient corresponding to a first color component; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information, and the filter information comprises at least one of the following: reconstruction information of a luma component, residual information of the luma component, prediction information of the luma component, reconstruction information of a color component, residual information of the color component, and prediction information of the color component; determine a reconstructed block of a current block in a current image according to the first filter coefficient; in a case where it is determined to filter the first color component using the filter information, set a first syntax element identification information, and write the first syntax element identification information into a bitstream.

[0335] It should be noted that in the embodiments of the present application, the encoder 100 can also be regarded as a data processing mode (or "entropy encoder") for encoding the values of the to-be-encoded syntax elements.

[0336] It can be understood that in the embodiments of the present application, the "unit" can be a part of circuit, a part of processor, a part of program or software, and of course can also be a module, and can also be non-modular. Moreover, the components in the embodiments can be integrated in a processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.

[0337] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the embodiments. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0338] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the encoder 100, and the computer readable storage medium stores a computer program, and the computer program is executed by a first processor to implement the encoding method in any one of the foregoing embodiments.

[0339] Based on the components of the encoder 100 and the computer readable storage medium, referring to FIG. 19, a specific hardware structure diagram of the encoder 100 is shown. As shown in FIG. 19, the encoder 100 can include a first communication interface 1002, a first memory 1003 and a first processor 1004; each component is coupled together through a first bus system 1005. It can be understood that the first bus system 1005 is used to realize the connection communication between the components. The first bus system 1005 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, various buses are marked as the first bus system 1005 in the figure. Among them,

[0340] The first communication interface 1002 is used for receiving and sending signals in the process of transmitting information with other external network elements;

[0341] The first memory 1003 is used for storing a computer program capable of running on the first processor 1004;

[0342] The first processor 1004 is used for, when running the computer program, performing: determining a first filter coefficient corresponding to a first color component; wherein the first filter coefficient at least includes a filter coefficient corresponding to filter information, and the filter information includes at least one of the following: reconstruction information of a luma component, residual information of the luma component, prediction information of the luma component, reconstruction information of a color component, residual information of the color component, prediction information of the color component; determining a reconstruction block of a current block in a current image according to the first filter coefficient; in a case of determining that the filter information is used for filtering the first color component based on the reconstruction block of the current block in the current image, setting a first syntax element identification information, and writing the first syntax element identification information into a bitstream.

[0343] It is to be understood that the first memory 1003 in embodiments of this application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. In one embodiment, a non-volatile memory can be a Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically EPROM (EEPROM), or flash memory. A volatile memory can be a Random Access Memory (RAM), used as external cache memory. By way of example, and not limitation, many forms of RAM are available, for example, Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 1003 of the system and method described herein are intended to include, without being limited to, these and any other suitable types of memory.

[0344] The first processor 1004 can be a chip that has a processing capability of signals. In implementation, each step of the above method can be completed by integrated logic circuit of hardware in the first processor 1004 or instructions in the form of software. The first processor 1004 described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the first memory 1003, and the first processor 1004 reads the information in the first memory 1003 and combines the hardware to complete the steps of the above method.

[0345] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0346] Optionally, as another embodiment, the first processor 1004 is further configured to, when running the computer program, perform the encoding method in any one of the preceding embodiments.

[0347] The embodiment provides an encoder, in the process of filtering a first color component, new input information can be introduced, that is, filtering information is taken as new input information, and filtering processing of the first color component is implemented in combination with a filtering coefficient corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, and coding efficiency and compression performance are effectively improved.

[0348] In still another embodiment of the present application, based on the same inventive concept as in the preceding embodiments, referring to FIG. 20, a constituent structure schematic diagram of a decoder 200 proposed in the embodiment of the present application is shown. As shown in FIG. 20, the decoder 200 can include: a second determining unit 2001; wherein,

[0349] The second determining unit 2001 is configured to decode a code stream, determine first syntax element identification information, in a case where it is determined based on the first syntax element identification information that a first color component uses filtering information for filtering, determine a first filtering coefficient corresponding to the first color component; wherein the first filtering coefficient at least includes a filtering coefficient corresponding to the filtering information, and the filtering information includes at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component; and determine a reconstructed block of a current block in a current image according to the first filtering coefficient.

[0350] It should be noted that in the embodiment of the present application, the decoder 200 can also be regarded as a data processing mode (or an "entropy decoder") for decoding processing of a value of a to-be-decoded syntax element.

[0351] It can be understood that in the embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, and the like, and of course can be a module, and can also be non-modular. Moreover, the constituent parts in the embodiment can be integrated in one processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.

[0352] The integrated unit, if implemented in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the embodiment provides a computer readable storage medium applied to the decoder 200, and the computer readable storage medium stores a computer program. The computer program is executed by the second processor to implement the method in any one of the preceding embodiments.

[0353] Based on the composition of the decoder 200 and the computer readable storage medium, referring to FIG. 21, a specific hardware structure schematic diagram of the decoder 200 provided by the embodiment of the application is shown. As shown in FIG. 21, the decoder 200 can include a second communication interface 2002, a second memory 2003 and a second processor 2004; and the various components are coupled together through a second bus system 2005. It can be understood that the second bus system 2005 is used to realize the connection communication between the components. The second bus system 2005 includes a data bus, a power supply bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the second bus system 2005 in the figure. Among them,

[0354] The second communication interface 2002 is configured to receive and send signals in the process of transceiving information with other external network elements;

[0355] The second memory 2003 is configured to store a computer program capable of running on the second processor 2004;

[0356] The second processor 2004 is configured to, when running the computer program, perform: decoding a code stream, determining first syntax element identification information; determining a first filter coefficient corresponding to a first color component in a case that the first color component is determined to use filter information for filtering based on the first syntax element identification information; wherein the first filter coefficient at least includes a filter coefficient corresponding to the filter information, and the filter information includes at least one of the following: reconstruction information of a luma component, residual information of the luma component, prediction information of the luma component, reconstruction information of a color component, residual information of the color component, prediction information of the color component; and determining a reconstruction block of a current block in a current image according to the first filter coefficient.

[0357] Optionally, as another embodiment, the second processor 2004 is further configured to, when running the computer program, perform the method in any one of the preceding embodiments.

[0358] It can be understood that the hardware function of the second memory 2003 is similar to that of the first memory 1003, and the hardware function of the second processor 2004 is similar to that of the first processor 1004; and details are not described here.

[0359] The embodiment provides a decoder, which can introduce new input information in the process of filtering a first color component, that is, filtering information is taken as new input information, and filtering processing of the first color component is implemented in combination with filtering coefficients corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, and coding and decoding efficiency and compression performance are improved.

[0360] In still another embodiment of the present application, referring to FIG. 22, a schematic diagram of a composition structure of a coding and decoding system is shown. As shown in FIG. 22, the coding and decoding system 300 can include an encoder 100 and a decoder 200.

[0361] In the embodiment of the present application, the encoder 100 can be the encoder described in any of the foregoing embodiments, and the decoder 200 can be the decoder described in any of the foregoing embodiments.

[0362] Further, the embodiment of the present application further provides a code stream, wherein the code stream is generated by bit coding of to-be-encoded information; and the to-be-encoded information at least includes first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information and fifth syntax element identification information.

[0363] It should be noted that, in the present application, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or further include elements inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.

[0364] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0365] The methods disclosed in the several method embodiments of the present application can be combined arbitrarily without conflict to obtain new method embodiments.

[0366] The features disclosed in the several product embodiments of the present application can be combined arbitrarily without conflict to obtain new product embodiments.

[0367] The features disclosed in the several method or device embodiments of the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.

[0368] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims. Industrial applicability

[0369] The embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. At a decoding end, a code stream is decoded, and first syntax element identification information is determined. In a case where it is determined that a first color component uses filter information for filtering based on the first syntax element identification information, first filter coefficients corresponding to the first color component are determined. The first filter coefficients at least include filter coefficients corresponding to the filter information. The filter information includes at least one of the following: reconstructed information of a luma component, residual information of the luma component, prediction information of the luma component, reconstructed information of a color component, residual information of the color component, and prediction information of the color component. A reconstructed block of a current block in a current image is determined according to the first filter coefficients. At an encoding end, first filter coefficients corresponding to a first color component are determined. The first filter coefficients at least include filter coefficients corresponding to filter information. A reconstructed block of a current block in a current image is determined according to the first filter coefficients. In a case where it is determined that the first color component uses filter information for filtering based on the reconstructed block of the current block in the current image, first syntax element identification information is set, and the first syntax element identification information is written into a code stream. That is, in the embodiment of the present application, new input information can be introduced in the process of filtering the first color component, that is, the filter information is taken as new input information, and the filter information is combined with filter coefficients corresponding to the filter information to realize filtering processing of the first color component, so that a more reasonable filtering effect can be obtained, and the coding and decoding efficiency and compression performance are improved.

Claims

1. A decoding method, applied to a decoder, comprising: Decoding the code stream to determine first syntax element identification information; determining, when determining based on the first syntax element identification information that the first color component is to be filtered using the filtering information, a first filter coefficient corresponding to the first color component; wherein the first filter coefficient at least includes a filter coefficient corresponding to the filtering information, and the filtering information includes at least one of the following: reconstruction information of a luma component, residual information of the luma component, prediction information of the luma component, reconstruction information of a color component, residual information of the color component, and prediction information of the color component; A reconstructed block of a current block in a current image is determined according to the first filter coefficient.

2. The method according to claim 1, wherein When the representation form of the first syntax element identification information is the first representation form, determining, according to the first syntax element identification information, whether the first color component of the current image is filtered using the filtering information; When the representation form of the first syntax element identification information is the second representation form, it is determined according to the first syntax element identification information whether a current filter of the first color component of the current image uses the filtering information for filtering.

3. The method according to claim 2, wherein: Decoding the code stream and determining second syntax element identification information; In a case where it is determined based on the second syntax element identification information that the first color component of the current image is filtered using a cross-component adaptive loop filter CCALF, a process for determining the first syntax element identification information is performed.

4. The method according to claim 3, wherein: The method further comprises: determining third syntax element identification information when it is determined based on the first syntax element identification information that the first color component is filtered using the filtering information; The number of the first filter coefficients is determined according to the third syntax element identification information.

5. The method according to claim 3, wherein The method further comprises: determining third syntax element identification information when it is determined based on the first syntax element identification information that the first color component is filtered using the filtering information; The increased number of filter coefficients corresponding to the first color component is determined according to the third syntax element identification information.

6. The method according to any one of claims 1 to 5, wherein: The method further comprises: Decoding the code stream to determine identification information of a fourth syntax element; The filtering information is determined according to the fourth syntax element identification information.

7. The method according to any one of claims 1 to 5, wherein: The method further comprises: The filtering information is determined according to preset information.

8. The method according to claim 1, wherein The first filter coefficient further includes a filter coefficient corresponding to a luminance reconstruction pixel and a filter coefficient corresponding to a luminance residual pixel. Determining a reconstructed block of a current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determine, based on the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the filtering information, the filter coefficient corresponding to the filtering information, and a scale factor, a filtered reconstructed value of the first color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

9. The method according to claim 8, wherein The reconstruction information of the color component includes reconstructed pixels of the first color component and / or reconstructed pixels of the second color component, and determining the reconstructed block of the current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determine, based on the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the reconstruction information of the color component, the filter coefficient corresponding to the reconstruction information of the color component, and a scale factor, a filtered reconstructed value of the first color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

10. The method according to claim 8, wherein The residual information of the color component includes residual pixels of the first color component and / or residual pixels of the second color component, and determining a reconstructed block of the current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determining a filtered reconstruction of the first color component of the current pixel based on the luminance reconstruction pixel, the filter coefficient corresponding to the luminance reconstruction pixel, the luminance residual pixel, the filter coefficient corresponding to the luminance residual pixel, the residual information of the color component, the filter coefficient corresponding to the residual information of the color component, and a scale factor. value; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

11. The method according to any one of claims 1 to 5, 9 and 10, wherein: The filtering information also includes at least one of the following: frame type information of the luminance component, quantization parameter information of the luminance component, reconstruction information of the luminance component before deblocking filtering, deblocking filtering boundary strength information of the luminance component, frame type information of the color component, quantization parameter information of the color component, reconstruction information of the color component before deblocking filtering, and deblocking filtering boundary strength information of the color component.

12. The method according to any one of claims 1 to 5, 9 and 10, wherein: The size of the filter template corresponding to each of the filtering information is N×M; wherein N and M are both integers greater than 0; The shape of the filter template corresponding to each of the filtering information includes at least one of the following: diamond, cross, rectangle, and square.

13. The method according to any one of claims 1 to 5, 9 and 10, wherein: The method further comprises: Decoding the code stream and determining identification information of the fifth syntax element; When the fifth syntax element identification information indicates that the filter coefficient of the first color component of the current image is skipped, determining a skip position and a skip value of the filter coefficient corresponding to the first color component; determining the first filter coefficient according to the skip position of the filter coefficient and the skip value of the filter coefficient; A reconstructed block of a current block in the current image is determined according to the first filter coefficient.

14. The method according to claim 1, wherein The method further comprises: Determining, when it is determined based on the first syntax element identification information that the first color component is not filtered using the filtering information, a second filter coefficient corresponding to the first color component; wherein the second filter coefficient includes a filter coefficient corresponding to a luma reconstructed pixel and a filter coefficient corresponding to a luma residual pixel; A reconstructed block of the current block in the current image is determined according to the second filter coefficient.

15. A coding method, applied to an encoder, comprising: Determining a first filter coefficient corresponding to the first color component; wherein the first filter coefficient at least includes a filter coefficient corresponding to filter information, and the filter information includes at least one of the following: reconstruction information of a luminance component, residual information of the luminance component, prediction information of the luminance component, reconstruction information of a color component, residual information of a color component, and prediction information of a color component; determining a reconstructed block of a current block in a current image according to the first filter coefficient; In a case where it is determined based on a reconstructed block of the current block in the current image to filter the first color component using the filtering information, first syntax element identification information is set and the first syntax element identification information is written into a codestream.

16. The method according to claim 15, wherein When the representation form of the first syntax element identification information is the first representation form, the first syntax element identification information is used to determine whether the first color component of the current image is filtered using the filtering information; In a case where the representation form of the first syntax element identification information is the second representation form, the first syntax element identification information is used to determine whether a current filter of the first color component of the current image uses the filtering information for filtering.

17. The method according to claim 16, wherein The method further comprises: Determining a second filter coefficient corresponding to the first color component of the current image; wherein the second filter coefficient includes a filter coefficient corresponding to a luminance reconstruction pixel and a filter coefficient corresponding to a luminance residual pixel; A reconstructed block of the current block in the current image is determined according to the second filter coefficient.

18. The method according to claim 17, wherein The method further comprises: Determine a first generation value based on the reconstructed block corresponding to the first filter coefficient, and determine a second generation value based on the reconstructed block corresponding to the second filter coefficient; When the first generation value is less than or equal to the second generation value, determining that the first color component is filtered using the filtering information; In a case where the first generation value is greater than the second generation value, it is determined that the first color component is not filtered using the filtering information.

19. The method according to any one of claims 15 to 18, wherein: The method further comprises: In the case of adaptively determining to use CCALF to filter the first color component of the current image, executing the first filter coefficient determination process, setting second syntax element identification information, and writing the second syntax element identification information into the code stream.

20. The method according to any one of claims 15 to 18, wherein: The method further comprises: In a case where it is determined that the first color component is filtered using the filtering information, determining the number of the first filtering coefficients; Setting third syntax element identification information according to the number of the first filter coefficients; The third syntax element identification information is written into the bitstream.

21. The method according to any one of claims 15 to 18, wherein: The method further comprises: In a case where it is determined that the first color component is filtered using the filtering information, determining the number of the first filtering coefficients; determining an additional number of filter coefficients corresponding to the first color component according to the number of the first filter coefficients; Setting third syntax element identification information according to the increased number of filter coefficients corresponding to the first color component; The third syntax element identification information is written into the bitstream.

22. The method according to claim 15, wherein The method further comprises: determining the filtering information; Setting fourth syntax element identification information according to the filtering information; The fourth syntax element identification information is written into the bitstream.

23. The method according to claim 15, wherein The method further comprises: The filtering information is determined according to preset information.

24. The method according to claim 15, wherein The first filter coefficient further includes a filter coefficient corresponding to a luminance reconstruction pixel and a filter coefficient corresponding to a luminance residual pixel. Determining a reconstructed block of a current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determine, based on the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the filtering information, the filter coefficient corresponding to the filtering information, and a scale factor, a filtered reconstructed value of the first color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

25. The method according to claim 24, wherein The reconstruction information of the color component includes reconstructed pixels of the first color component and / or reconstructed pixels of the second color component, and determining the reconstructed block of the current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determine, based on the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the reconstruction information of the color component, the filter coefficient corresponding to the reconstruction information of the color component, and a scale factor, a filtered reconstructed value of the first color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

26. The method according to claim 24, wherein The residual information of the color component includes residual pixels of the first color component and / or residual pixels of the second color component, and determining a reconstructed block of the current block in the current image according to the first filter coefficient includes: For a current pixel in the current block, determine, based on the luma reconstructed pixel, the filter coefficient corresponding to the luma reconstructed pixel, the luma residual pixel, the filter coefficient corresponding to the luma residual pixel, the residual information of the color component, the filter coefficient corresponding to the residual information of the color component, and a scale factor, a filtered reconstructed value of the first color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the first color component of the current pixel.

27. The method according to any one of claims 15-18, 22-26, wherein: The filtering information also includes at least one of the following: frame type information of the luminance component, quantization parameter information of the luminance component, reconstruction information of the luminance component before deblocking filtering, deblocking filtering boundary strength information of the luminance component, frame type information of the color component, quantization parameter information of the color component, reconstruction information of the color component before deblocking filtering, and deblocking filtering boundary strength information of the luminance component.

28. The method according to any one of claims 15-18, 22-26, wherein: The size of the filter template corresponding to each of the filtering information is N×M; wherein N and M are both integers greater than 0; The shape of the filter template corresponding to each of the filtering information includes at least one of the following: diamond, cross, rectangle, and square.

29. The method according to any one of claims 15-18, 22-26, wherein: The method further comprises: In a case where it is determined that the filter coefficient of the first color component of the current image is to be skipped, determining a skip position and a skip value of the filter coefficient corresponding to the first color component, setting fifth syntax element identification information, and writing the fifth syntax element identification information into a bitstream; determining the first filter coefficient according to the skip position of the filter coefficient and the skip value of the filter coefficient; A reconstructed block of a current block in the current image is determined according to the first filter coefficient.

30. A code stream, the code stream being generated by bit encoding based on information to be encoded; wherein, The information to be encoded includes at least: first syntax element identification information, second syntax element identification information, third syntax element identification information, fourth syntax element identification information, and fifth syntax element identification information.

31. An encoder, comprising a first determining unit; wherein: The first determination unit is configured to determine a first filter coefficient corresponding to a first color component; wherein the first filter coefficient includes at least a filter coefficient corresponding to filter information, and the filter information includes at least one of the following: reconstruction information of a luminance component, residual information of a luminance component, prediction information of a luminance component, reconstruction information of a color component, residual information of a color component, and prediction information of a color component; determine a reconstructed block of a current block in a current image based on the first filter coefficient; and when it is determined based on the reconstructed block of the current block in the current image that the first color component is filtered using the filter information, set first syntax element identification information, and write the first syntax element identification information into a bitstream.

32. An encoder comprising a first memory and a first processor; wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to perform the method according to any one of claims 15 to 29 when running the computer program.

33. A decoder comprising a second determining unit; wherein: The second determination unit is configured to decode the code stream and determine the first syntax element identification information; when it is determined based on the first syntax element identification information that the first color component is filtered using the filtering information, determine the first filter coefficient corresponding to the first color component; wherein the first filter coefficient at least includes the filter coefficient corresponding to the filtering information, and the filtering information includes at least one of the following: reconstruction information of the luminance component, residual information of the luminance component, prediction information of the luminance component, reconstruction information of the color component, residual information of the color component, and prediction information of the color component; and determine the reconstructed block of the current block in the current image based on the first filter coefficient.

34. A decoder comprising a second memory and a second processor; wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to perform the method according to any one of claims 1 to 14 when running the computer program.

35. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which, when executed, implements the method according to any one of claims 1 to 14 or any one of claims 15 to 29.