Encoding method, decoding method, code stream, encoder, decoder, and storage medium
By introducing the output information of the fixed filter and the residual information of the color component as the filtering input during the video encoding and decoding process, the problem of the influence of brightness information noise in CCALF filtering is solved, and the encoding and decoding efficiency and compression performance are improved.
Patent Information
- Application Number
- PCT/CN2024/087070
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-10-16
AI Technical Summary
In multifunctional video coding, the noise introduced by luminance information during CCALF filtering affects the filtering effect of chrominance components, reducing coding efficiency and compression performance.
At the decoding and encoding ends, the output information of the fixed filter and the residual information of the color component are introduced as the filter input to determine the filter coefficient of the current color component, perform filtering, combine the filter coefficients of the fixed filter and the CCALF filter, and set the syntax element identification information to be written into the bitstream.
It improves the encoding and decoding efficiency, enhances the video compression performance, and achieves a more ideal filtering effect.
Smart Images

Figure CN2024087070_16102025_PF_FP_ABST
Abstract
Description
Coding and decoding method, bitstream, 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 bitstream, 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 luminance information such as the reconstructed and residual information of the luminance is mainly used as the input information of the CCALF. However, the luminance information has certain noise, which introduces noise into the chroma component, affects the filtering effect, and reduces the coding efficiency and compression performance.
[0004] SUMMARY
[0005] Embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium, which can obtain a relatively ideal 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 the following steps:
[0008] decoding a bitstream to determine first syntax element identification information;
[0009] In a case where it is determined based on the first syntax element identification information that a current color component uses filtering information for filtering, a first filtering coefficient corresponding to the current color component is determined; 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component; and the fixed filter comprises one of the following: a fixed filter of a luminance component, a fixed filter of a color component, and a fixed filter in the CCALF;
[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] determine a first filter coefficient corresponding to a current 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: output information of a fixed filter, residual information of a luma component, and residual information of a color component; and the fixed filter comprises one of the following: a fixed filter of a luma component, a fixed filter of a color component, and a fixed filter in CCALF;
[0013] determine 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 that the current color component is filtered 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.
[0015] In a third aspect, an embodiment of the present application provides a bitstream, wherein the bitstream is generated by bit encoding to-be-encoded information; and 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 filter index information.
[0016] In a fourth aspect, an embodiment of the present application provides an encoder, comprising a first determination unit; wherein
[0017] the first determination unit is configured to determine a first filter coefficient corresponding to a current 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: output information of a fixed filter, residual information of a luma component, and residual information of a color component; and the fixed filter comprises one of the following: a fixed filter of a luma component, a fixed filter of a color component, and a fixed filter in CCALF; determine a reconstructed block of a current block in the current picture according to the first filter coefficient; and in a case where it is determined that the current color component is filtered 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, 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 running the computer program.
[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 current color component in a case where it is determined based on the first syntax element identification information that the current color component uses filter information for filtering, and determine a reconstructed block of a current block in the current image according to the first filter coefficients; wherein 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: output information of a fixed filter, residual information of a luma component, and residual information of a color component; and the fixed filter includes one of the following: a fixed filter of a luma component, a fixed filter of a color component, and a fixed filter in CCALF.
[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 running on the second processor.
[0025] The second processor is configured to execute the decoding method as described above when running the computer program.
[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 the decoding end, the code stream is decoded, and first syntax element identification information is determined. In the case that it is determined that the current color component uses filter information for filtering based on the first syntax element identification information, first filter coefficients corresponding to the current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of the luminance component, a fixed filter of the color component, and a fixed filter in CCALF. The reconstruction block of a current block in a current image is determined according to the first filter coefficients. At the encoding end, the first filter coefficients corresponding to the current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of the luminance component, a fixed filter of the color component, and a fixed filter in CCALF. The reconstruction block of a current block in a current image is determined according to the first filter coefficients. In the case that it is determined that the current color component uses filter information for filtering based on the reconstruction block of the current block in the current image, the 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 current color component, that is, the output information of the fixed filter is taken as new filter information, and the filter processing of the current color component is realized in combination with the filter coefficients corresponding to the filter information, so that a more reasonable filter 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 a shape schematic diagram of a common CCALF filter;
[0030] FIG. 3 is a component block diagram schematic diagram of a video encoding system provided by the embodiment of the present application;
[0031] FIG. 4 is a component block diagram schematic diagram of a video decoding system provided by the embodiment of the present application;
[0032] FIG. 5 is a schematic diagram of a decoding method provided by the embodiment of the present application;
[0033] FIG. 6 is a schematic diagram one of a filter template provided by the embodiment of the present application;
[0034] FIG. 7 is a schematic diagram two of a filter template provided by the embodiment of the present application;
[0035] Fig. 8 is a schematic diagram of a filter template according to an embodiment of the present application;
[0036] Fig. 9 is a schematic diagram of experimental results of a method according to an embodiment of the present application;
[0037] Fig. 10 is a schematic diagram of an encoding method according to an 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 a filter template according to an embodiment of the present application;
[0040] Fig. 13 is a schematic diagram of a filter template according to an embodiment of the present application;
[0041] Fig. 14 is a schematic diagram of a structure of an encoder according to an embodiment of the present application;
[0042] Fig. 15 is a schematic diagram of a specific hardware structure of an encoder according to an embodiment of the present application;
[0043] Fig. 16 is a schematic diagram of a structure of a decoder according to an embodiment of the present application;
[0044] Fig. 17 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;
[0045] Fig. 18 is a schematic diagram of a structure of a codec system according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] 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.
[0047] 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.
[0048] Digital video compression technology is mainly to compress the huge digital video data, so as to facilitate transmission and storage, etc. With the proliferation 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.
[0049] In the process of digital video encoding, the encoder reads unequal pixels of the original video sequence of different color formats, 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.
[0050] The general video coding standard is based on the block-based hybrid coding framework. Each frame in the 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.
[0051] 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 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 determines the same block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information by analyzing the existing information, 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. The 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.
[0052] It can be understood that, intra prediction only refers to the information of the same frame image, predicts the pixel information in the current partition block, and is used to eliminate spatial redundancy; inter prediction can refer to the image information of different frames, uses motion estimation to search for a 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 in combination with quantization, information that is not sensitive to the human eye can be removed, and 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 in-loop filtering mainly processes pixels after inverse transformation and inverse quantization, makes up for distortion information, and provides a better reference for subsequent coding pixels.
[0053] In the latest standard VVC and the traditional video coding exploration platform reference software test model (Enhanced Compression Model, ECM) of JVET, the in loop filter mainly includes a bilateral filter, luma mapping with chroma scaling (LMCS), a de-blocking filter (DBF), a sample adaptive offset (SAO), an adaptive loop filter (ALF), and a cross component adaptive loop filter (CCALF).
[0054] The adaptive loop filter (ALF) is a filter designed to minimize the mean square error between the reconstructed image and the original image. The ALF processes the luminance component and the chrominance component separately, and each component has its own filter, namely the luminance ALF and the chrominance ALF. The luminance ALF is designed to minimize the mean square error between the luminance reconstructed image and the original image using luminance information, and the chrominance ALF is designed to minimize the mean square error between the chrominance reconstructed image and the original image using chrominance information.
[0055] The cross component adaptive loop filter (CCALF) is a filter designed to minimize the mean square error between the chrominance reconstructed image and the original image using luminance information.
[0056] The ALF and the CCALF are based on the Wiener filtering principle, and a series of filter coefficients with the smallest mean square error are solved by establishing a Wiener-Hopf equation based on the original image information and the reconstructed image information, so as to reduce the decoding error and effectively improve the coding performance.
[0057] 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.
[0058] CCALF classifies each coding tree unit (CTU) in which all pixels belong to the same category. The covariance matrix and error vector of the pixels in the same category are accumulated respectively, and then the Wiener-Hopf equation is constructed to calculate the filter coefficients of the category. Each CTU selects the filter corresponding to the category to filter, and the filtered result is written into the reconstructed image. In addition, the filter coefficients need to be written into the adaptive parameter set (APS), and the corresponding syntax elements are written into the bitstream through entropy coding.
[0059] In ECM, the shape of the CCALF filter is shown in FIG. 2. In the left figure, x represents the position of the luminance pixel corresponding to the chroma pixel to be filtered, and the numbers represent the neighboring luminance pixels. The right figure is also the position information of the neighboring luminance pixels, the difference is that the left figure inputs the reconstructed information of the luminance pixel, and the right figure inputs the residual information of the luminance pixel. It can be seen that the filter needs to input 28 values, which correspond to 28 filter coefficients according to their positions in the filter, as shown in the right figure. Among them, 0, 1, 2, …, 25, 26, x represent the filter coefficient index, and it needs to be explained that the coefficient at x is generally not calculated and is 0 by default.
[0060] In the ECM encoder, CCALF classifies CTUs, and the classification process uses the rate-distortion optimization function (RDO) to make decisions, and each pixel in the CTU belongs to the same category. Specifically, when the cost calculated by using a filter of a certain category for the CTU is the smallest, the category of the CTU is the category of the filter. Of course, if the cost of not filtering is smaller than the cost of using the filter, the CTU is not filtered, and in this case the CTU has no category. Whether the CTU is filtered and the corresponding category information are written into the bitstream and transmitted to the decoding end.
[0061] After determining the category of each CTU, the covariance matrix and error vector of all pixels in the same category are accumulated respectively. Specifically, for each pixel, its covariance matrix A is a 27x27 matrix. Let each element of matrix A be a i,j , i, j ∈ [0, 1, 2, …, 25, 26], and for a i,j , the value is: a i,j= R(i) x R(j) (1)
[0062] R(i) takes values as:
[0063] where recY(*) represents the reconstructed value of the luminance pixel outputted by the former module, resiY(*) is the residual value of the corresponding luminance pixel. x corresponds to the position of x in the filter shape, and i is the pixel at the non-x position.
[0064] For the error vector B, it is a 27x1 vector. Let each element in vector B be b i , where i ∈ [0, 1, 2, …, 25, 26], and for b i , it takes values as: b i = R(i) x E (3)
[0065] The meaning of R(i) is consistent with the above, and for E, it has: E = orgC-recC (4)
[0066] where recC is the reconstructed pixel value of the pixel to be filtered, and orgC represents the original pixel value of the pixel to be filtered.
[0067] 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 summed up respectively. 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 this category needs to be solved, where c is a 27x1 vector.
[0068] It should be noted that the filter coefficients solved by the equation are all floating point types. Since the value range of floating point type numbers is almost not limited, a lot of bits are needed to encode the coefficients. In order to solve this problem, the ECM encoder performs integerization on the filter coefficients. First, the filter coefficients are scaled: c i = 2 scale x c i (5)
[0069] where c i is the filter coefficient solved by the Wiener-Hopf equation, and scale is a scale factor, which is set to a fixed value 7 in ECM. c i is the scaled value. After obtaining c i , c iA table look-up is performed to select, by comparison, a value from the set {-64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64} that is closest to c' i The closest number is selected as the quantized coefficient
[0070] After obtaining the quantized filter coefficient c f Next, the pixels need to be filtered. The filtering process is as follows:
[0071] where recC' is the filtered coefficient. recC, recY(i), recY(x), scale, etc. have been described above and will not be repeated here. After filtering the pixels that need to be filtered, they are written into the reconstructed image. For pixels that do not need to be filtered, they are directly written into the reconstructed image.
[0072] In addition, related syntax elements need to be written into the bitstream. For example, the current frame CCALF switch, 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 frame is written into the slice header or picture header information.
[0073] At the ECM decoding end, after receiving the bitstream, the current frame CCALF switch, whether each CTU is filtered, and the corresponding category information, etc. are determined. In addition, the APS ID is parsed to select the corresponding APS to determine the filter coefficients. 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
[0074] That is, in the current CCALF, the main input information of CCALF is the luminance information such as the reconstructed and residual information of luminance, and the luminance information has certain noise, which introduces noise into the chrominance component, affecting the filtering effect and reducing the encoding efficiency and compression performance.
[0075] To solve the above problems, the 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 the case that it is determined that the current color component uses filter information for filtering based on the first syntax element identification information, first filter coefficients corresponding to the current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of a luminance component, a fixed filter of a color component, and a fixed filter in CCALF. The reconstruction block of the current block in the current image is determined according to the first filter coefficients. At the encoding end, the first filter coefficients corresponding to the current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of a luminance component, a fixed filter of a color component, and a fixed filter in CCALF. The reconstruction block of the current block in the current image is determined according to the first filter coefficients. In the case that it is determined that the current color component uses filter information for filtering based on the reconstruction block of the current block in the current image, the 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 current color component, that is, the output information of the fixed filter is taken as new filter information, and the filter processing of the current color component is realized in combination with the filter coefficients corresponding to the filter information, so that a more reasonable filter effect can be obtained, and the coding efficiency and compression performance are improved.
[0076] Referring to FIG. 3, an example of a system composition block diagram of an encoder provided by the embodiment of the present application is shown. As shown in FIG. 3, 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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 the figure.
[0082] Referring to FIG. 4, an example of a system composition diagram of a decoder is shown. As shown in FIG. 4, 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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 the figure.
[0091] 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.
[0092] Based on FIG. 3, the encoding method in the embodiments of the present application is mainly applied to the "filter unit 113" part in the encoder 10.
[0093] Based on FIG. 4, the decoding method in the embodiments of the present application is mainly applied to the "filter unit 208" part in the decoder 20.
[0094] 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), and can also be applied to a video decoding system (referred to as "decoder" for short), and can even be applied to a video encoding system and a video decoding system at the same time, but here is not limited in any way.
[0095] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application.
[0096] 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. 5 is a schematic diagram of the decoding method provided by an embodiment of the present application. As shown in FIG. 5, the method of performing decoding processing by the decoder can include the following steps.
[0097] In step 101, a bitstream is decoded to determine first syntax element identification information.
[0098] In an embodiment 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 current color component is filtered by using filter information.
[0099] It should be noted that in an embodiment 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 by YCbCr format or YUV format.
[0100] It can be understood that in an 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 a first color component or a second color component. For example, the current color component can be understood as a blue color component of the current image, that is, the current color component can be a U component. The current color component can also be understood as a red color component of the current image, that is, the current color component can be a V component. The present application does not make specific limitation.
[0101] Further, in an embodiment of the present application, the first syntax element identification information can be used to determine whether the current 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.
[0102] 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.
[0103] 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.
[0104] That is, 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.
[0105] 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 it can be determined according to the first syntax element identification information whether the current color component of the current image is filtered using the filter information.
[0106] 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 it can be determined according to the first syntax element identification information whether the current filter of the current color component of the current image is filtered using the filter information.
[0107] It can be understood that, in the embodiments of the present application, the current 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 a picture-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.
[0108] Further, in the embodiments of the present application, it can be determined whether the filter information is used to filter the current color component according to the value of the first syntax element identification information.
[0109] 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 current 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 current color component.
[0110] 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 current 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.
[0111] 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 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; and 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 in any way.
[0112] 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 current color component uses the filtering information for filtering. Otherwise, if the value of the first syntax element identification information is 0, it can be determined that the current color component does not use the filtering information for filtering.
[0113] Exemplarily, in some embodiments, if the current color component of the current image is a chroma C b component, and the filtering information is the output information of the fixed filter of the color component, the first syntax element identification information can be represented by the syntax element alf_cc_cb_filters_chroma_fixed_filter_tap, that is, alf_cc_cb_filters_chroma_fixed_filter_tap indicates whether the output information of the fixed filter of the color component is used for filtering the current color component of the current image. If the value of alf_cc_cb_filters_chroma_fixed_filter_tap is 0, it is determined that the output information of the fixed filter of the color component is not used for filtering the current color component of the current image, and if the value of alf_cc_cb_filters_chroma_fixed_filter_tap is 1, it is determined that the output information of the fixed filter of the color component is used for filtering the current color component of the current image.
[0114] Of course, the value of alf_cc_cb_filters_chroma_fixed_filter_tap is not limited to 0 and 1, and the present application does not make specific limitations.
[0115] 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 CCALF is used for filtering the current color component of the current image based on the second syntax element identification information, the determination process of the first syntax element identification information is performed, that is, the parsing process of the first syntax element identification information in step 101 is performed.
[0116] That is, in the embodiments of the present application, it can be determined whether to perform CCALF filtering on the current 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 filter parameters to perform CCALF filtering.
[0117] 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.
[0118] Exemplarily, in some embodiments, when the second syntax element identification information has a first value, it is determined not to use CCALF filtering on the current color component of the current picture.
[0119] Exemplarily, in some embodiments, when the second syntax element identification information has a second value, it is determined to use CCALF filtering on the current color component of the current picture.
[0120] 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 current 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.
[0121] 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; 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.
[0122] 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 CCALF is not used for filtering the current color component of the current image. Otherwise, if the value of the second syntax element identification information is 0, the CCALF can be used for filtering the current color component of the current image.
[0123] In step 102, in a case that the current color component is determined to use the filtering information for filtering based on the first syntax element identification information, a first filter coefficient corresponding to the current color component is determined; 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: output information of a fixed filter, residual information of the luma component, and residual information of the color component; and the fixed filter includes one of the following: a fixed filter of the luma component, a fixed filter of the color component, and a fixed filter in the CCALF.
[0124] In the embodiment of the present application, after the first syntax element identification information is determined, if the current color component is determined to use the filtering information for filtering based on the first syntax element identification information, a first filter coefficient corresponding to the current color component can be further determined. The first filter coefficient at least includes a filter coefficient corresponding to the filtering information.
[0125] It should be noted that, in the embodiment of the present application, the filtering information can include information of any form, type and quantity related to the current image.
[0126] Exemplarily, in some embodiments, the filtering information can include at least one of the following: output information of a fixed filter, residual information of the luma component, and residual information of the color component; and the fixed filter includes one of the following: a fixed filter of the luma component, a fixed filter of the color component, and a fixed filter in the CCALF.
[0127] Exemplarily, in some embodiments, the filtering information can further include at least one of the following: prediction information of the luma component, reconstruction information of the luma component, frame type information of the luma component, quantization parameter information of the luma component, reconstruction information before deblocking filtering of the luma component, deblocking filtering boundary strength information of the luma component, prediction information of the color component, reconstruction information of the color component, frame type information of the color component, quantization parameter information of the color component, reconstruction information before deblocking filtering of the color component, and deblocking filtering boundary strength information of the color component.
[0128] 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 reconstruction information of the color component can include reconstruction information of the first color component and / or reconstruction information of the second color component.
[0129] Exemplarily, in some embodiments, if the fixed filter is a fixed filter of a color component, the filtering information can comprise output information of the fixed filter of the current color component, or can comprise output information of the fixed filter of another color component other than the current color component, or can comprise output information of the fixed filter of both color components.
[0130] 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 current color component uses the filtering information for filtering, it can be considered that when the CCALF filtering is performed on the current color component, the input information of the CCALF can be increased, i.e., the filtering information is added as the new input information of the CCALF.
[0131] 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 newly added to implement the CCALF filtering, and accordingly, the number of filter templates and corresponding filter coefficients (filtering coefficients) of the CCALF can change, i.e., compared with the conventional technology, the first filtering coefficients corresponding to the current color component can no longer be 28.
[0132] Further, in the embodiments of the present application, in the case where it is determined based on the first syntax element identification information that the current color component uses the filtering information for filtering, third syntax element identification information can be determined; and then the number of first filtering coefficients can be determined according to the third syntax element identification information.
[0133] Further, in the embodiments of the present application, in the case where it is determined based on the first syntax element identification information that the current color component uses the filtering information for filtering, third syntax element identification information is determined; and then the number of added filtering coefficients corresponding to the current color component can be determined according to the third syntax element identification information.
[0134] That is to say, in the embodiments of the present application, the number of first filtering 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 filtering coefficients, or it can be selected to use the third syntax element identification information to indicate the number of added filtering coefficients, i.e., to indicate the increment of filtering coefficients corresponding to the current color component when the filtering information is selected as the input information of the CCALF compared with the case where the filtering information is not used as the input information of the CCALF.
[0135] 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.
[0136] It can be understood that, in the embodiments of the present application, in the case that the newly added filter information is used as the input information of the CCALF, the change of the filter coefficients corresponding to the current color component can be determined by the filter template corresponding to the newly added filter information, that is, the specific number of first filter coefficients can be determined by the filter template corresponding to the newly added filter information.
[0137] Further, in the embodiments of the present application, since the filter information can include at least one of the following: output information of a fixed filter (fixed filter of a luminance component, fixed filter of a color component, fixed filter in CCALF), 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, prediction information of a color component, frame type information of a luminance component, quantization parameter information of a luminance component, reconstruction information before deblocking filtering of a luminance component, deblocking filtering boundary strength information of a luminance component, frame type information of a color component, quantization parameter information of a color component, reconstruction information before deblocking filtering of a color component, deblocking filtering boundary strength information of a color component. Therefore, the number of newly added filter templates corresponding to the filter information can also be one or more.
[0138] That is, in the embodiments of the present application, the number of newly added filter templates can be determined by the number of filter information. For example, if the filter information is the output information of the fixed filter of the current color component, the number of corresponding newly added filter templates is 1; if the filter information is the output information of the fixed filter of the current color component and the residual information of the luminance component, the number of corresponding newly added filter templates is 2.
[0139] It should be noted that, in the embodiments of the present application, the size and shape of the newly added filter template corresponding to different filter information can be the same or different, which is not specifically limited in the present application.
[0140] Further, in the embodiments of the present application, for at least one filter information, the size of the filter template corresponding to each filter information is N×M; wherein N and M are both integers greater than 0.
[0141] Further, in embodiments of the present application, for at least one filter information, a shape of a filter template corresponding to each filter information at least includes one of the following: a diamond shape, a cross shape, a rectangle shape, and a square shape.
[0142] 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.
[0143] For example, in some embodiments, FIG. 6 is a schematic diagram of a filter template according to embodiments of the present application. As shown in FIG. 6, if the filter information is the output information of the fixed filter of the current color component, one filter template is newly added, the shape of the filter template is a cross shape, and the size of the filter template is 3x3.
[0144] For example, in some embodiments, FIG. 7 is a schematic diagram of a filter template according to embodiments of the present application. As shown in FIG. 7, if the filter information is the output information of the fixed filter of the current color component and the prediction information of the current color component, two filter templates are newly added, the shapes of the two filter templates are a diamond shape and a cross shape respectively, and the sizes of the two filter templates are both 5x5.
[0145] For example, in some embodiments, FIG. 8 is a schematic diagram of a filter template according to embodiments of the present application. As shown in FIG. 8, if the filter information is the residual information of the luminance component and the output information of the fixed filter of the current color component, two filter templates are newly added, the shapes of the two filter templates are both a cross shape, and the sizes of the two filter templates are 5x5 and 3x3 respectively.
[0146] Further, in embodiments of the present application, for the adaptive loop filter ALF, whether it is a luminance component or a chroma component (color component), the category information of the pixels of the component of the ALF filtered block is calculated respectively. The category information can be used to determine the corresponding fixed filter. Specifically, the filter coefficients corresponding to the fixed filter can be determined according to the category information and the quantization parameter.
[0147] It should be noted that, in embodiments of the present application, after the fixed filter corresponding to the luminance component (or color component) is determined, the fixed filter can be used to filter the component. Based on two different quantization parameters, two different fixed filters can be determined, for example, a first fixed filter and a second fixed filter.
[0148] It can be understood that, in embodiments of the present application, when filtering, two different fixed filters can be used to perform two filtering processes respectively, and the output information after the first filtering can be used as the input information of the second filtering.
[0149] Correspondingly, in the embodiments of the present application, the fixed filter of any image component (luminance component or color component) can be one of the two fixed filters corresponding to the component. Therefore, before taking the output information of the fixed filter as the input information of the newly added CCALF filter, it can be determined which one of the first fixed filter and the second fixed filter the fixed filter is.
[0150] Further, in the embodiments of the present application, the code stream is decoded to determine the filter index information, then the fixed filter is determined according to the filter index information, wherein the fixed filter includes the first fixed filter or the second fixed filter, and finally the output information of the fixed filter can be determined according to the fixed filter.
[0151] Further, in the embodiments of the present application, the index of the fixed filter can be determined through the value of the filter index information, so that the corresponding fixed filter can be determined.
[0152] Exemplarily, in some embodiments, when the value of the filter index information is a first value, it indicates that the fixed filter is the first fixed filter. When the value of the filter index information is a second value, it indicates that the fixed filter is the second fixed filter.
[0153] Exemplarily, in some embodiments, if the current color component of the current image is the chrominance C b component, and the filtering information is the output information of the fixed filter of the color component, then the filter index information can be represented by a syntax element sh_alf_cc_cb_fixed_filter_idx, that is, sh_alf_cc_cb_fixed_filter_idx indicates the index value of the fixed filter. If the value of sh_alf_cc_cb_fixed_filter_idx is 0, it is determined that the fixed filter is the first fixed filter, that is, the filtering result of the first fixed filter is taken as the newly added filtering information. If the value of sh_alf_cc_cb_fixed_filter_idx is 1, it is determined that the fixed filter is the second fixed filter, that is, the filtering result of the second fixed filter is taken as the newly added filtering information.
[0154] Further, in the embodiments of the present application, when the output information of the fixed filter is determined according to the fixed filter, the coefficient index information corresponding to the filter of the ALF can be determined; in the case where the coefficient index information of the fixed filter is the same as the coefficient index information corresponding to the filter of the ALF, the output information of the fixed filter is determined according to the filtering result corresponding to the filter of the ALF; in the case where the coefficient index information of the fixed filter is different from the coefficient index information corresponding to the filter of the ALF, filtering is performed according to the fixed filter, and the output information of the fixed filter is determined.
[0155] It should be noted that, in the embodiments of the present application, the coefficient index information can be used to determine the index value of the filtering coefficient.
[0156] It should be noted that, in the embodiments of the present application, after the fixed filter is determined, the coefficient index information of the filtering coefficient of the fixed filter can be compared with the coefficient index information of the filtering coefficient corresponding to the filter of the ALF of the same image component, and if the two are the same, the fixed filter can be considered to be the same as the filter of the ALF of the same image component, and thus the filtering results of the two filters can also be considered to be the same. At this time, the filtering result of the filter of the ALF that has been obtained can be directly reused, that is, the output information of the fixed filter is determined according to the filtering result corresponding to the filter of the ALF.
[0157] Correspondingly, in the embodiments of the present application, after the coefficient index information of the filtering coefficient of the fixed filter is compared with the coefficient index information of the filtering coefficient corresponding to the filter of the ALF of the same image component, if the two are different, the filtering result of the filter of the ALF that has been obtained cannot be reused, and filtering needs to be performed according to the fixed filter to obtain the output information of the fixed filter.
[0158] Exemplarily, in some embodiments, assuming that the fixed filter is the fixed filter of the current color component, whether the index values of the filtering coefficients of the chroma fixed filter used by the current color component and the filtering coefficients of the fixed filter used when the ALF chroma filter is used are the same can be compared. If the values are the same, the fixed filtering result is reused, otherwise, the fixed filtering result is recalculated according to the corresponding filter index. The fixed filtering result is obtained.
[0159] Further, in the embodiments of the present application, when the output information of the fixed filter is determined according to the fixed filter, filtering can be directly performed, that is, filtering is performed according to the fixed filter, and the output information of the fixed filter is determined.
[0160] Further, in the embodiments of the present application, the first filtering coefficient corresponding to the current color component can be determined by decoding the code stream.
[0161] Step 103, determining the reconstructed block of the current block in the current picture according to the first filter coefficients.
[0162] In embodiments of the present application, if it is determined that the current color component is filtered using the filter information based on the first syntax element, after determining the first filter coefficients corresponding to the current color component, the CCALF filtering can be further performed according to the first filter coefficients, so that the reconstructed block of the current block in the current picture can be determined. Wherein, the reconstructed block of the current block can be understood as the reconstructed block of the current color component of the current block.
[0163] It can be understood that, in embodiments of the present application, in addition to the filter coefficients corresponding to the newly added filter information, the first filter coefficients can also include the filter coefficients corresponding to the input information of the CCALF in the conventional scheme, for example, the filter coefficients corresponding to the luma reconstructed pixels and the filter coefficients corresponding to the luma residual pixels.
[0164] Further, 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 current 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 current color component of the current pixel.
[0165] Further, in embodiments of the present application, it is assumed that the filter information is the output information of a fixed filter, wherein the output information of the fixed filter can include the output information of the fixed filter of the luma component, and / or the output information of the fixed filter of the color component, and / or the output information of the fixed filter in the CCALF, that is, the first filter coefficients can include the filter coefficients of one or more of the output information of the fixed filter of the luma component, the output information of the fixed filter of the color component, and the output information of the fixed filter in the CCALF, and can also include the filter coefficients corresponding to the luma reconstructed pixels and the filter coefficients corresponding to the luma residual pixels.
[0166] 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 current 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 output information of the fixed filter, the filter coefficient corresponding to the output information of the fixed filter, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0167] Further, in embodiments of the present application, it is assumed that the filtering information is residual information of a color component, wherein the residual information of the color component can include residual pixels of a current color component (a first color component) and / or residual pixels of a second color component, i.e., the first filtering coefficients can include filtering coefficients corresponding to the residual pixels of the current color component and / or filtering coefficients corresponding to the residual pixels of the second color component, and can further include filtering coefficients corresponding to the luma reconstructed pixels and filtering coefficients corresponding to the luma residual pixels.
[0168] Correspondingly, in embodiments of the present application, when determining the reconstructed block of the current block in the current picture according to the first filtering coefficients, for a current pixel in the current block, a filtered reconstructed value of a current color component of the current pixel is determined according to the luma reconstructed pixels, the filtering coefficients corresponding to the luma reconstructed pixels, the luma residual pixels, the filtering coefficients corresponding to the luma residual pixels, the residual information of the color component, the filtering coefficients corresponding to the residual information of the color component, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0169] Exemplarily, in some embodiments, it is assumed that the filtering information is output information of a fixed filter, such as a pixel value FixedC(*) output by the fixed filter. Then, the filtering process can be performed using the following formula:
[0170] wherein recC' is the filtered reconstructed pixel value, recC is the reconstructed pixel value of the pixel to be filtered, denotes the filtering coefficient, recY(*) denotes the luma reconstructed pixel, resY(*) denotes the luma residual pixel, FixedC(*) denotes the pixel value output by the fixed filter, x corresponds to the position of x in the filter shape, i is a pixel at a non-x position, and scale is the scale factor.
[0171] Further, in embodiments of the present application, after decoding the bitstream and determining the first syntax element identification information, i.e., after step 101, the method for decoding processing performed by the decoder can further include the following steps:
[0172] Step 104, in a case where it is determined that the current color component does not use the filtering information for filtering based on the first syntax element identification information, determining second filtering coefficients corresponding to the current color component; wherein the second filtering coefficients include filtering coefficients corresponding to the luma reconstructed pixels and filtering coefficients corresponding to the luma residual pixels.
[0173] In the embodiments of the present application, after the first syntax element identification information is determined, if it is determined based on the first syntax element identification information that the current color component is not filtered using the filtering information, then the second filter coefficient corresponding to the current color component can be further determined. The second filter coefficient includes the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.
[0174] That is, in the embodiments of the present application, if it is determined based on the first syntax element identification information that the current color component is not filtered using the filtering information, it can be considered that when the CCALF filtering is performed on the current color component, the input information of the CCALF does not need to be increased, but the conventional input information, such as the luma reconstructed pixel and the luma residual pixel, can be directly used for the CCALF filtering.
[0175] It can be understood that in the embodiments of the present application, in the case that the current color component is not filtered using the filtering information, the input information of the CCALF can include the luma reconstructed pixel and / or the luma residual pixel, or can include the related information of other luma components or color components, which is not limited in the present application.
[0176] 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 current color component is filtered using the newly added filtering information, and the second filter coefficient is the filter coefficient corresponding to the case that the current color component is not filtered using the newly added filtering 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 filtering information.
[0177] In step 105, the reconstructed block of the current block in the current image is determined according to the second filter coefficient.
[0178] In the embodiments of the present application, if it is determined based on the first syntax element identification information that the current color component is not filtered using the filtering information, after the second filter coefficient corresponding to the current color component is determined, the CCALF filtering can be further performed according to the second 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 current color component of the current block.
[0179] 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.
[0180] 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, a filtered reconstructed value of a current 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 current color component of the current pixel.
[0181] Exemplarily, in some embodiments, the filtering process can be performed using the above formula (6).
[0182] Further, in the embodiments of the present application, the code stream can be decoded to determine the fourth syntax element identification information; in the case that the fourth syntax element identification information indicates that the filter coefficient of the current 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 current 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.
[0183] That is, in the embodiments of the present application, whether the first filter coefficient is skipped can be determined by the fourth syntax element identification information transmitted in the code stream.
[0184] Exemplarily, in some embodiments, in the case that the value of the fourth syntax element identification information is a first value, it is determined that the first filter coefficient is skipped. In the case that the value of the fourth syntax element identification information is a second value, it is determined that the first filter coefficient is not skipped.
[0185] It should be noted that, in the embodiments of the present application, the fourth syntax element identification information can be used to indicate whether the first filter coefficient needs to be skipped. 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 fourth 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 fourth syntax element identification information can also be a flag, which is not limited herein.
[0186] It should be further noted that if the fourth 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.
[0187] Taking the first value as 1 and the second value as 0 as an example, in the embodiments of the present application, if the fourth syntax element identification information has a value of 1, it can be determined that the first filter coefficient is processed by skipping. Otherwise, if the fourth syntax element identification information has a value of 0, it can be determined that the first filter coefficient is not processed by skipping.
[0188] Exemplarily, in some embodiments of the present application, if the current color component of the current image is a chroma C b component, the fourth syntax element identification information can be represented by the 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 skipping. If the value of alf_cc_cb_skip_signal_flag is 0, it is determined that the first filter coefficient is not processed by skipping, and if the value of alf_cc_cb_skip_signal_flag is 1, it is determined that the first filter coefficient is processed by skipping.
[0189] 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 any specific limitation.
[0190] Exemplarily, in some embodiments, at the decoding end, after decoding the code stream and determining the fourth syntax element identification information, it can be further determined whether to perform the corresponding skipping processing based on the skipping position and the skipping value of the filter coefficient corresponding to the current color component according to the fourth syntax element identification information. Wherein, if the current color component of the current image is a chroma C b component, when alf_cc_cb_skip_signal_flag is 1, the skipping processing can be performed, i.e., the coding and decoding of part of the first filter coefficient is selected to be skipped. When alf_cc_cb_skip_signal_flag is 0, the skipping processing can not be performed, and at this time, the first filter coefficient is normally coded and decoded.
[0191] It should be noted that in the embodiments of the present application, the fourth syntax element identification information can be understood as a transmission optimization flag bit, that is, can be used to indicate whether to perform optimization processing on the transmission of the filter coefficient.
[0192] Exemplarily, in some embodiments, if the current color component of the current image is a chroma C b The fourth syntax element identification information (transmission optimization flag bit) can also be represented by the syntax element alf_cc_cb_filters_trans_opt, that is, alf_cc_cb_filters_trans_opt indicates whether to perform skip processing (transmission optimization) on the first filter coefficient. If the value of alf_cc_cb_skip_signal_flag is 0, it is determined that the first filter coefficient is not subjected to skip processing (transmission optimization), and if the value of alf_cc_cb_skip_signal_flag is 1, it is determined that the first filter coefficient is subjected to skip processing (transmission optimization).
[0193] In summary, through the decoding method proposed by the above steps 101 to 105, for CCALF, new input information such as filter information is introduced, and corresponding filter coefficients (filter templates) are also added, which can suppress the noise caused by brightness to a certain extent, thereby improving the filtering performance.
[0194] Exemplarily, in some embodiments, for CCALF, taking the syntax semantic level in ECM as an example:
[0195] slice header
[0196] alf_data
[0197] Among them, sh_alf_cc_cb_fixed_filter_idx represents that the chroma U component uses the chroma fixed filter index. The binary variable takes a value of 0 to indicate that the filtering result of the chroma fixed filter 0 is used as input, and takes a value of 1 to indicate that the filtering result of the chroma fixed filter 1 is used as input.
[0198] sh_alf_cc_cr_fixed_filter_idx represents that the chroma V component uses the chroma fixed filter index. The binary variable takes a value of 0 to indicate that the filtering result of the chroma fixed filter 0 is used as input, and takes a value of 1 to indicate that the filtering result of the chroma fixed filter 1 is used as input.
[0199] alf_cc_cb_filters_chroma_fixed_filter_tap indicates a chroma U component fixed filter flag. A binary variable, when taking value 0, two coefficients at position 27 and position 28 are not transmitted, and when taking value 1, two coefficients at position 27 and position 28 are transmitted.
[0200] alf_cc_cr_filters_chroma_fixed_filter_tap indicates a chroma V component fixed filter flag. A binary variable, when taking value 0, two coefficients at position 27 and position 28 are not transmitted, and when taking value 1, two coefficients at position 27 and position 28 are transmitted.
[0201] alf_cc_cb_filters_trans_opt indicates a chroma U component transmission optimization flag. A binary variable, when taking value 1, four coefficients at position 22, 23, 25 and 26 are not transmitted, and when taking value 0, four coefficients at position 22, 23, 25 and 26 are transmitted.
[0202] alf_cc_cr_filters_trans_opt indicates a chroma V component transmission optimization flag. A binary variable, when taking value 1, four coefficients at position 22, 23, 25 and 26 are not transmitted, and when taking value 0, four coefficients at position 22, 23, 25 and 26 are transmitted.
[0203] Exemplarily, in some embodiments, FIG. 9 is a schematic diagram of experimental results of the method proposed in the embodiments of the present application, as shown in FIG. 9, after the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0. The results of testing part of the test sequences required by ECM show that the performance of class B under all intra is as high as about 1%, which indicates that the method proposed in the embodiments of the present application has certain potential and can effectively improve the coding performance.
[0204] The embodiments of the present application provide a decoding method, in the process of filtering a current color component, new input information can be introduced, that is, output information of a fixed filter is taken as new filtering information, and the filtering information is combined with a filtering coefficient corresponding to the filtering information to implement filtering processing on the current color component, 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.
[0205] Still another embodiment of the present application provides an encoding method, which is applied to an encoder and used in a scenario of performing filtering processing by CCALF. FIG. 10 is a schematic diagram of the encoding method proposed in the embodiments of the present application, as shown in FIG. 10, the method of the encoder for performing encoding processing can include the following steps:
[0206] In step 201, a first filter coefficient corresponding to the current color component is determined; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information; the filter information comprises at least one of the following: output information of a fixed filter, residual information of the luma component, residual information of the color component; the fixed filter comprises one of the following: a fixed filter of the luma component, a fixed filter of the color component, a fixed filter in the CCALF.
[0207] In the embodiments of the present application, the first filter coefficient corresponding to the current color component can be determined first; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information.
[0208] It should be noted that in the embodiments 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; wherein the three image components are respectively a luma component, a blue color component and a red color component; specifically, the luma component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0209] It can be understood that in the embodiments of the present application, the image component of the current image can comprise a current luma 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 current color component can be understood as a blue color component of the current image, i.e., the current color component can be a U component; the current color component can also be understood as a red color component of the current image, i.e., the current color component can be a V component. The present application does not make specific limitations.
[0210] It should be noted that in the embodiments of the present application, the filter information can comprise information of any form, type and quantity related to the current image.
[0211] Exemplarily, in some embodiments, the filter information can comprise at least one of the following: output information of a fixed filter, residual information of the luma component, residual information of the color component; the fixed filter comprises one of the following: a fixed filter of the luma component, a fixed filter of the color component, a fixed filter in the CCALF.
[0212] Exemplarily, in some embodiments, the filtering information can further comprise at least one of the following: prediction information of the luma component, reconstruction information of the luma component, frame type information of the luma component, quantization parameter information of the luma component, reconstruction information of the luma component before deblocking filtering, deblocking filtering boundary strength information of the luma component, prediction information of the color component, reconstruction information of the color component, frame type information of the color component, quantization parameter information of the color component, reconstruction information of the color component before deblocking filtering, deblocking filtering boundary strength information of the color component.
[0213] It can be understood that, in embodiments of the present application, the related information of the color component can comprise information of any one or both of the two color components. For example, the reconstruction information of the color component can comprise reconstruction information of the current color component, and / or reconstruction information of the second color component.
[0214] Exemplarily, in some embodiments, if the fixed filter is a fixed filter of the color component, the filtering information can comprise output information of the fixed filter of the current color component, or can also comprise output information of the fixed filter of another color component other than the current color component, or can also comprise output information of the fixed filter of both of the two color components.
[0215] It should be noted that, in embodiments of the present application, when performing CCALF filtering on the current 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.
[0216] It can be understood that, in 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 filter templates and corresponding filter coefficients (filtering coefficients) of the CCALF can change, that is, compared with the conventional technology, the first filtering coefficient corresponding to the current color component can no longer be 28.
[0217] Further, in embodiments of the present application, in the case where it is determined based on the first syntax element identification information that the current color component uses the filtering information for filtering, third syntax element identification information can be determined; and then the number of first filtering coefficients can be determined according to the third syntax element identification information.
[0218] Further, in embodiments of the present application, in the case where it is determined based on the first syntax element identification information that the current color component uses the filtering information for filtering, third syntax element identification information is determined; and then the number of added filtering coefficients corresponding to the current color component can be determined according to the third syntax element identification information.
[0219] 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. Among them, it can be selected to directly use the third syntax element identification information to indicate the number of the first filter coefficients, or it can be selected to use the third syntax element identification information to indicate the number of the added filter coefficients, that is, to indicate the increment of the filter coefficients corresponding to the current 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.
[0220] 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 alf_cc_num_coeffs is used to represent the number of the CCALF filter coefficients (the first filter coefficients), when the value of alf_cc_num_coeffs is 32, it can be determined that the number of the first filter coefficients is 32.
[0221] It can be understood that in the embodiments of the present application, in the case where the filter information is added as the input information of the CCALF, the change of the filter coefficients corresponding to the current 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.
[0222] Further, in the embodiments of the present application, since the filter information can include at least one of the output information of the fixed filter (the fixed filter of the luminance component, the fixed filter of the color component, the fixed filter in the CCALF), 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 the 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 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.
[0223] 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 output information of the fixed filter of the current color component, then the number of the corresponding added filter templates is 1; if the filter information is the output information of the fixed filter of the current color component and the residual information of the luminance component, then the number of the corresponding added filter templates is 2.
[0224] It should be noted that in the embodiments of the present application, the size and shape of the newly added filter template can be the same or different corresponding to different filtering information, which is not limited in the present application.
[0225] 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.
[0226] 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.
[0227] That is, in the embodiments of the present application, for any newly added filter template, the size and shape of the filter template are not limited.
[0228] Exemplarily, in some embodiments, as shown in FIG. 6, if the filtering information is the output information of the fixed filter of the current color component, one filter template is newly added, the shape of the filter template is cross, and the size is 3x3.
[0229] Exemplarily, in some embodiments, as shown in FIG. 7, if the filtering information is the output information of the fixed filter of the current color component and the prediction information of the current color component, two filter templates are newly added, the shapes of the two filter templates are diamond and cross respectively, and the sizes are both 5x5.
[0230] Exemplarily, in some embodiments, as shown in FIG. 8, if the filtering information is the residual information of the luminance component and the output information of the fixed filter of the current color component, two filter templates are newly added, the shapes of the two filter templates are both cross, and the sizes are 5x5 and 3x3 respectively.
[0231] Further, in the embodiments of the present application, when determining the first filter coefficient of the current color component, the covariance matrix and the error vector of the same category of pixels can be accumulated respectively, and then the Wiener-Hopf equation is constructed, and the filter coefficient of the category is calculated by solving the equation.
[0232] Exemplarily, in some embodiments, assuming that the number of the first filter coefficient is 29, for each pixel, the covariance matrix A is a 29x29 square matrix. Denote each element of the matrix A as a i,j , wherein 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 iwhere i ∈ [0, 1, 2, …, 25, 26, 27, 28]. After obtaining the covariance matrix and error vector of each pixel, the covariance matrix and error vector of the same class of pixels in a frame of image are summed up respectively. The Wiener-Hopf equation Ac = B is constructed, where A is the sum of the covariance matrices of the same class of pixels, and B is the sum of the error vectors of the same class of pixels. The coefficients c of this class need to be solved, where c is a 29x1 vector.
[0233] 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, c' i is the scaled value. After obtaining c' i , look up table is performed on c' i . By comparison, the number closest to c' i in {-64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64} is selected as the integerized coefficient , that is, the corresponding first filter coefficient is obtained.
[0234] Further, in the embodiments of the present application, for the ALF, whether it is the luminance component or the chrominance component (color component), the class information of the pixels of the component of the block before ALF filtering is calculated respectively. Wherein, the class information can be used to determine the corresponding fixed filter. Specifically, the corresponding filter coefficient can be determined according to the class information and the quantization parameter, that is, the corresponding fixed filter is determined.
[0235] It should be noted that in the embodiments of the present application, after determining the fixed filter corresponding to the luminance component (or color component), the fixed filter can be used for filtering processing of the component. Wherein, based on two different quantization parameters, two different fixed filters can be determined, for example, a first fixed filter and a second fixed filter.
[0236] It can be understood that in the embodiments of the present application, when filtering, two different fixed filters can be used to perform two times of filtering processing respectively, wherein the output information after the first filtering can be used as the input information of the second filtering.
[0237] Correspondingly, in the embodiments of the present application, the fixed filter of any image component (luminance component or color component) can be one of the two fixed filters corresponding to the component. Therefore, before taking the output information of the fixed filter as the input information of the newly added CCALF filtering, it can be determined which one of the first fixed filter and the second fixed filter the fixed filter is.
[0238] Further, in the embodiments of the present application, the fixed filter includes the first fixed filter or the second fixed filter. In the determination process of the fixed filter, the reconstructed block of the current block can be determined according to the first fixed filter, and the third generation value corresponding to the first fixed filter is determined; the reconstructed block of the current block can be determined according to the second fixed filter, and the fourth generation value corresponding to the second fixed filter is determined; then the filter index information is set according to the third generation value and the fourth generation value; and the filter index information is written into the bitstream.
[0239] It can be understood that, in the embodiments of the present application, the first fixed filter and the second fixed filter can be used respectively for filtering processing, and then the output result (filtering result) of the first fixed filter and the output result (filtering result) of the second fixed filter are introduced into the CCALF filtering process as newly added filtering information to obtain the reconstructed block of the corresponding current block. Further, the third generation value corresponding to the first fixed filter and the fourth generation value corresponding to the second fixed filter can be determined based on the reconstructed block of the current block. If the third generation value is less than or equal to the fourth generation value, the first fixed filter can be used as the final fixed filter, and if the third generation value is greater than the fourth generation value, the second fixed filter can be used as the final fixed filter.
[0240] Further, in the embodiments of the present application, the filter index information can be further set according to the comparison result of the third generation value corresponding to the first fixed filter and the fourth generation value corresponding to the second fixed filter, and then the filter index information is written into the bitstream and transmitted to the decoding end.
[0241] Further, in the embodiments of the present application, after the corresponding fixed filter is determined, the value of the filter index information can be set to indicate the index of the fixed filter.
[0242] Exemplarily, in some embodiments, when the value of the filter index information is a first value, it indicates that the fixed filter is the first fixed filter. When the value of the filter index information is a second value, it indicates that the fixed filter is the second fixed filter.
[0243] Exemplarily, in some embodiments, if the current color component of the current image is the chroma C bIf the filter information is the output information of the fixed filter of the color component, the filter index information can be indicated by a syntax element sh_alf_cc_cb_fixed_filter_idx, i.e., sh_alf_cc_cb_fixed_filter_idx indicates the index value of the fixed filter. If the value of sh_alf_cc_cb_fixed_filter_idx is 0, it is determined that the fixed filter is the first fixed filter, i.e., the filtering result of the first fixed filter is taken as the new filter information. If the value of sh_alf_cc_cb_fixed_filter_idx is 1, it is determined that the fixed filter is the second fixed filter, i.e., the filtering result of the second fixed filter is taken as the new filter information.
[0244] Further, in the embodiments of the present application, when the output information of the fixed filter is determined according to the fixed filter, the coefficient index information corresponding to the filter of the ALF can be determined; in the case where the coefficient index information of the fixed filter is the same as the coefficient index information corresponding to the filter of the ALF, the output information of the fixed filter is determined according to the filtering result corresponding to the filter of the ALF; in the case where the coefficient index information of the fixed filter is different from the coefficient index information corresponding to the filter of the ALF, the output information of the fixed filter is determined by filtering according to the fixed filter.
[0245] It should be noted that, in the embodiments of the present application, the coefficient index information can be used to determine the index value of the filtering coefficient.
[0246] It should be noted that, in the embodiments of the present application, after the fixed filter is determined, the coefficient index information of the filtering coefficient of the fixed filter can be compared with the coefficient index information of the filtering coefficient corresponding to the filter of the ALF of the same image component. If the two are the same, it can be considered that the fixed filter is the same as the filter of the ALF of the same image component, and thus the filtering results of the two filters can also be considered to be the same. At this time, it can be selected to directly reuse the filtering result of the filter of the ALF that has been obtained, i.e., the output information of the fixed filter is determined according to the filtering result corresponding to the filter of the ALF.
[0247] Correspondingly, in the embodiments of the present application, after the coefficient index information of the filtering coefficient of the fixed filter is compared with the coefficient index information of the filtering coefficient corresponding to the filter of the ALF of the same image component, if the two are different, the filtering result of the filter of the ALF that has been obtained cannot be reused, and filtering processing needs to be performed according to the fixed filter to obtain the output information of the fixed filter.
[0248] Exemplarily, in some embodiments, assuming the fixed filter is the fixed filter of the current color component, whether the index value of the filter coefficient of the chroma fixed filter used by the current color component and the index value of the filter coefficient of the fixed filter used when performing ALF chroma filtering are same can be compared. If the values are same, the fixed filtering result is multiplexed, otherwise, the fixed filtering result is recalculated according to the corresponding filter index. The fixed filtering result is obtained.
[0249] Further, in the embodiments of the present application, when the output information of the fixed filter is determined according to the fixed filter, the filtering process can be directly performed, i.e., filtering is performed according to the fixed filter to determine the output information of the fixed filter.
[0250] Step 202, determining the reconstructed block of the current block in the current image according to the first filter coefficient.
[0251] In the embodiments of the present application, after the first filter coefficient corresponding to the current color component is determined, the 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 current color component of the current block.
[0252] 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 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.
[0253] Further, in the embodiments of the present application, when the reconstructed block of the current block in the current image is determined according to the first filter coefficient, for the current pixel in the current block, the filtered reconstructed value of the current 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 current color component of the current pixel.
[0254] Further, in embodiments of the present application, it is assumed that the filter information is the output information of the fixed filter, wherein the output information of the fixed filter can include the output information of the fixed filter of the luma component, and / or the output information of the fixed filter of the color component, and / or the output information of the fixed filter in the CCALF, i.e., the first filter coefficient can include the filter coefficient of one or more of the output information of the fixed filter of the luma component, the output information of the fixed filter of the color component, and the output information of the fixed filter in the CCALF, and can also include the filter coefficient corresponding to the luma reconstructed pixel and the filter coefficient corresponding to the luma residual pixel.
[0255] Correspondingly, in 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 current 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 output information of the fixed filter, the filter coefficient corresponding to the output information of the fixed filter, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0256] Further, in embodiments of the present application, it is assumed that the filter information is the residual information of the color component, wherein the residual information of the color component can include the residual pixel of the current color component (the first color component) and / or the residual pixel of the second color component, i.e., the first filter coefficient can include the filter coefficient corresponding to the residual pixel of the current color component and / or the filter coefficient corresponding to the residual 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.
[0257] Correspondingly, in 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 current 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 component, the filter coefficient corresponding to the residual information of the color component, and the scale factor; and then the reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
[0258] Exemplarily, in some embodiments, it is assumed that the filter information is the output information of the fixed filter, such as the pixel value FixedC(*) after the output of the fixed filter. Then, the filtering process can be performed using the above formula (7).
[0259] In step 203, the first syntax element identification information is set and written into the bitstream in a case that the current color component is determined to use the filter information for filtering based on the reconstructed block of the current block in the current picture.
[0260] 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 the current color component of the current picture uses the filter information for filtering adaptively according to the reconstructed block of the current block. If the current color component is determined to use the filter information for filtering 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 bitstream.
[0261] Further, in the embodiments of the present application, the method of the encoder for encoding processing can further include the following steps:
[0262] In step 204, the second filter coefficient corresponding to the current color component of the current picture is 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.
[0263] In the embodiments of the present application, the second filter coefficient corresponding to the current 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.
[0264] It should be noted that in the embodiments of the present application, when the current color component performs the CCALF filtering, the conventional input information such as the luminance reconstructed pixel and the luminance residual pixel can be selected for the CCALF filtering.
[0265] 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.
[0266] 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 current 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 current 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.
[0267] In step 205, the reconstructed block of the current block in the current picture is determined according to the second filter coefficient.
[0268] In the embodiments of the present application, after determining the second filter coefficient corresponding to the current color component, the CCALF filtering can be further performed according to the second filter coefficient, so that the reconstructed block of the current block in the current image can be determined. Wherein, the reconstructed block of the current block can be understood as the reconstructed block of the current color component of the current block.
[0269] 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.
[0270] Further, in the embodiments of the present application, when the reconstructed block of the current block in the current image is determined according to the second filter coefficient, for the current pixel in the current block, the filtered reconstructed value of the current 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 current color component of the current pixel.
[0271] Exemplarily, in some embodiments, the filtering process can be performed using the above formula (6).
[0272] Further, in the embodiments of the present application, when it is adaptively determined whether to use the filter information to filter the current color component of the current image 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 current 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 current color component does not use the filter information for filtering.
[0273] 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. Wherein, if the first generation value obtained by using the filter information as the newly added input information is less than or equal to the second generation value obtained by not adding the input information, it can be determined that the current color component uses the filter information for filtering.
[0274] Further, in the embodiments of the present application, after adaptively determining whether the current 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 bitstream.
[0275] It should be noted that in the embodiments of the present application, if the added filtering information is the output information of the fixed filter, considering that the fixed filter can include the first fixed filter and the second fixed filter, therefore, when determining the first generation value, in the case that the third generation value corresponding to the first fixed filter is less than or equal to the fourth generation value corresponding to the second fixed filter, the third generation value can be determined as the first generation value; in the case that the third generation value corresponding to the first fixed filter is greater than the fourth generation value corresponding to the second fixed filter, the fourth generation value can be determined as the first generation value.
[0276] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether the filtering information is used to filter the current color component.
[0277] Further, in the 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.
[0278] Correspondingly, in the 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.
[0279] That is to say, in the 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. Wherein the first representation form can be a scalar form, and the second representation form can be an array form.
[0280] Further, in the embodiments of the present application, in the case that 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, therefore, the first syntax element identification information can be used to determine whether the filtering information is used to filter the current color component of the current image.
[0281] Further, in the embodiments of the present application, in the case that 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, therefore, the first syntax element identification information can be used to determine whether the filtering information is used to filter the current filter of the current color component of the current image.
[0282] It can be understood that, in the embodiments of the present application, the current 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 a picture-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.
[0283] Further, in the embodiments of the present application, after it is determined whether the filter information is used to filter the current color component, the value of the first syntax element identification information can be further set.
[0284] 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 current 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 current color component.
[0285] 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 current 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.
[0286] 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.
[0287] 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 current color component is filtered using the filtering information, the value of the first syntax element identification information can be set to 1. Otherwise, if it is determined that the current color component is not filtered using the filtering information, the value of the first syntax element identification information can be set to 0.
[0288] Exemplarily, in some embodiments, if the current color component of the current image is a chroma C b component, and the filtering information is output information of a fixed filter of the color component, the first syntax element identification information can be represented by a syntax element alf_cc_cb_filters_chroma_fixed_filter_tap, i.e., alf_cc_cb_filters_chroma_fixed_filter_tap indicates whether the output information of the fixed filter of the color component is used to filter the current color component of the current image. If the value of alf_cc_cb_filters_chroma_fixed_filter_tap is 0, it is determined that the output information of the fixed filter of the color component is not used to filter the current color component of the current image, and if the value of alf_cc_cb_filters_chroma_fixed_filter_tap is 1, it is determined that the output information of the fixed filter of the color component is used to filter the current color component of the current image.
[0289] Of course, the value of alf_cc_cb_filters_chroma_fixed_filter_tap is not limited to 0 and 1, and the present application does not make any specific limitation.
[0290] Further, in the embodiments of the present application, in the case of adaptively determining that the CCALF is used to filter the current color component of the current image, 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.
[0291] It should be noted that in the embodiments of the present application, the corresponding penalty value can be determined in the case that the current color component of the current image is not filtered using the CCALF. The corresponding penalty value can also be determined in the case that the current color component of the current image is filtered using the CCALF. Furthermore, 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.
[0292] It should be noted that in the embodiments of the present application, in the case that it is determined that the current 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.
[0293] That is to say, in the embodiments of the present application, it can be first determined whether the CCALF filtering is performed on the current color component of the current image, and if the CCALF filtering is used, it can be further determined whether the CCALF filtering is performed using the filter parameter.
[0294] 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 filtering is used, i.e., the second syntax element identification information can be used to indicate whether the CCALF filtering is used.
[0295] Exemplarily, in some embodiments, in the case that it is determined that the CCALF filtering is not performed on the current color component of the current image, the second syntax element identification information is set to have a first value. In the case that it is determined that the CCALF filtering is performed on the current color component of the current image, the second syntax element identification information is set to have a second value.
[0296] 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 CCALF filtering is performed on the current color component of the current image. 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.
[0297] 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.
[0298] 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 CCALF is not used for filtering the current color component of the current image. Otherwise, if the value of the second syntax element identification information is 0, CCALF can be used for filtering the current color component of the current image.
[0299] It can be understood that in the embodiments of the present application, if the filtering 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 (filtering coefficients) of CCALF can change, that is, compared with the conventional technology, the first filtering coefficient corresponding to the current color component can no longer be 28.
[0300] Further, in the embodiments of the present application, in the case where it is determined that the current color component uses the filtering information for filtering, the number of first filtering coefficients is determined; then the third syntax element identification information is set according to the number of first filtering coefficients; and the third syntax element identification information is written into the bitstream.
[0301] Further, in the embodiments of the present application, in the case where it is determined that the current color component uses the filtering information for filtering, the number of first filtering coefficients is determined; then the third syntax element identification information is set according to the number of first filtering coefficients; and the third syntax element identification information is written into the bitstream.
[0302] That is, in the embodiments of the present application, the number of first filtering 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 filtering coefficients, or it can be selected to use the third syntax element identification information to indicate the number of added filtering coefficients, that is, to indicate the increment of the filtering coefficient corresponding to the current color component when the filtering information is selected as the input information of CCALF compared with the case where the filtering information is not used as the input information of CCALF.
[0303] 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.
[0304] 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 current 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.
[0305] Further, in the embodiments of the present application, since the filter information can include at least one of the output information of the fixed filter (the fixed filter of the luminance component, the fixed filter of the color component, the fixed filter in the CCALF), 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 the deblocking filter of the luminance component, the deblocking filter 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 the deblocking filter of the color component, the deblocking filter boundary strength information of the color component. Therefore, the number of the newly added filter templates corresponding to the filter information can also be one or more.
[0306] That is, in the embodiments of the present application, the number of newly added 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 newly added 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 newly added filter templates is 2.
[0307] 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 filter information can be the same or different, which is not specifically limited in the present application.
[0308] Further, in the embodiments of the present application, in a case where it is determined to skip the filter coefficient of the current color component of the current image, a skip position of the filter coefficient and a skip value of the filter coefficient corresponding to the current color component are determined, and fourth syntax element identification information is set and written into the bitstream; 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 image is determined according to the first filter coefficient.
[0309] That is, in the embodiments of the present application, whether the first filter coefficient is skipped can be determined according to the fourth syntax element identification information transmitted in the bitstream.
[0310] Exemplarily, in some embodiments, in a case where the fourth syntax element identification information takes the first value, it is determined to skip the first filter coefficient. In a case where the fourth syntax element identification information takes the second value, it is determined not to skip the first filter coefficient.
[0311] It should be noted that, in the embodiments of the present application, the fourth syntax element identification information can be used to indicate whether the first filter coefficient needs to be skipped. 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 fourth 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 fourth syntax element identification information can also be a flag, which is not limited herein.
[0312] It should also be noted that, if the fourth 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.
[0313] 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 to skip the first filter coefficient, the fourth syntax element identification information can be set to take the value 1. Otherwise, if it is determined not to skip the first filter coefficient, the fourth syntax element identification information can be set to take the value 0.
[0314] Exemplarily, in some embodiments of the present application, if the current color component of the current image is the chroma C b The fourth syntax element identification information can be represented 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 skipping. If the value of alf_cc_cb_skip_signal_flag is 0, it is determined that the first filter coefficient is not processed by skipping, and if the value of alf_cc_cb_skip_signal_flag is 1, it is determined that the first filter coefficient is processed by skipping.
[0315] 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.
[0316] Exemplarily, in some embodiments, at the encoding end, if the current color component of the current image is the chroma 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 (the skip values of the filter coefficients) in part of the filter coefficients, alf_cc_cb_skip_signal_flag is set to 1, indicating that the encoding of the 0 value filter coefficient of the chroma Cb component is skipped; otherwise, alf_cc_cb_skip_signal_flag is set to 0, indicating that the filter coefficient is normally encoded at this time.
[0317] It should be noted that in the embodiments of the present application, the fourth syntax element identification information can be understood as a transmission optimization flag, i.e., it can be used to indicate whether the transmission of the filter coefficient is optimized.
[0318] Exemplarily, in some embodiments, if the current color component of the current image is the chroma C b component, the fourth syntax element identification information (the transmission optimization flag) can also be represented by a syntax element alf_cc_cb_filters_trans_opt, i.e., alf_cc_cb_filters_trans_opt indicates whether the first filter coefficient is processed by skipping (transmission optimization). If the value of alf_cc_cb_skip_signal_flag is 0, it is determined that the first filter coefficient is not processed by skipping (transmission optimization), and if the value of alf_cc_cb_skip_signal_flag is 1, it is determined that the first filter coefficient is processed by skipping (transmission optimization).
[0319] In summary, by the decoding method proposed by the above steps 201 to 205, new input information such as filter information is introduced for CCALF, and the corresponding filter coefficient (filter template) is newly added, which can suppress the noise caused by brightness to a certain extent, thereby improving the filtering performance.
[0320] Exemplarily, in some embodiments, taking the syntax semantic level in the ECM as an example:
[0321] slice header
[0322] alf_data
[0323] Wherein, sh_alf_cc_cb_fixed_filter_idx represents the color U component using the color fixed filter index. Binary variable, when the value is 0, it means using the filtering result of color fixed filter 0 as input, when the value is 1, it means using the filtering result of color fixed filter 1 as input.
[0324] sh_alf_cc_cr_fixed_filter_idx represents the color V component using the color fixed filter index. Binary variable, when the value is 0, it means using the filtering result of color fixed filter 0 as input, when the value is 1, it means using the filtering result of color fixed filter 1 as input.
[0325] alf_cc_cb_filters_chroma_fixed_filter_tap represents the color U component fixed filter flag. Binary variable, when the value is 0, it means not transmitting two coefficients at position 27 and position 28, when the value is 1, it means transmitting two coefficients at position 27 and position 28.
[0326] alf_cc_cr_filters_chroma_fixed_filter_tap represents the color V component fixed filter flag. Binary variable, when the value is 0, it means not transmitting two coefficients at position 27 and position 28, when the value is 1, it means transmitting two coefficients at position 27 and position 28.
[0327] alf_cc_cb_filters_trans_opt represents the color U component transmission optimization flag. Binary variable, when the value is 1, it means not transmitting four coefficients at positions 22, 23, 25 and 26. When the value is 0, it means that the four coefficients at positions 22, 23, 25 and 26 need to be transmitted.
[0328] alf_cc_cr_filters_trans_opt represents a chroma V component transmission optimization flag. A binary variable, taking a value of 1 indicates that four coefficients at positions 22, 23, 25 and 26 are not transmitted. A value of 0 indicates that the four coefficients at positions 22, 23, 25 and 26 need to be transmitted.
[0329] Exemplarily, in some embodiments, after the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, the results of testing part of the test sequences required by the ECM show that the performance of class B under all intra is as high as about 1%, which indicates that the method proposed in the embodiments of the present application has certain potential and can effectively improve the coding performance.
[0330] The embodiments of the present application provide a coding method. In the process of filtering a current color component, new input information can be introduced, that is, output information of a fixed filter is taken as new filtering information, and the filtering processing of the current color component is implemented in combination with the filtering coefficients corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, the coding and decoding efficiency is effectively improved, and the compression performance is improved.
[0331] Still another embodiment of the present application proposes a coding and decoding method. The method is applied to a codec and is used in a scenario of performing filtering processing through CCALF. For CCALF, a new filter template is proposed by introducing new input information, so as to further optimize the coding performance of CCALF. For example, after introducing the chroma fixed filtering information (output information of the fixed filter), the noise caused by the luminance can be inhibited to a certain extent, so as to improve the filtering performance. In addition, according to the coefficient transmission optimization, the bit cost of the scheme will also be reduced.
[0332] Supposing that the newly introduced filtering information is the output information of the fixed filter, the coding and decoding method proposed in the embodiments of the present application is exemplarily described below by taking the chroma pixel processed by the chroma fixed filter as the input of CCALF. At present, the present application does not determine the specific type and quantity of the filtering information. In addition to using the output information of the chroma fixed filter as the input information of CCALF, the filtering information can also be the output of the luminance fixed filter, the output of the fixed filter of other components of the chroma, and the output of the fixed filter of CCALF itself. It can also be the prediction, residual or other forms of information of the chroma component.
[0333] Correspondingly, in order to be able to use the newly added input information, the embodiment of the present application proposes a new filter template, as shown in Figure 6, the filter coefficient index of CCALF in the current ECM is 0 to 26, therefore, this paper continues to increase the filter coefficient index (for example, 27, 28, x, 29, 30) on this basis. The coefficient at x is generally not calculated and is 0 by default. 27, 28, 29, 30 represent the pixel values of the chroma information (filter information) output after the chroma fixed filter processing in the current position periphery (in turn, up, left, right, down).
[0334] It should be noted that for each chroma component, the information filtered by the same component fixed filter can be selected, for example, when the U component is CCALF filtered, the result filtered by the U component fixed filter is used as the input; when the V component is CCALF filtered, the result filtered by the V component fixed filter is used as the input. The filters of each chroma component (U / V component) are processed separately, so only one component is introduced here, and the other component is the same process.
[0335] It should be noted that in the embodiment of the present application, the filter shape and the number of taps of the fixed filter information input are not limited. It can be 3x3, or 5x5. It can be a cross, it can be a diamond, or it can be any other shape. It can be a symmetric coefficient design, or it can be an asymmetric coefficient design.
[0336] Figure 11 is a schematic diagram of the filter template proposed in the embodiment of the present application, as shown in Figure 11, the filter coefficient index can also be a symmetric design form. It should be noted that when the filter template changes, the corresponding coefficient index will also change.
[0337] Figure 12 is a schematic diagram of the filter template proposed in the embodiment of the present application, as shown in Figure 12, the shape of the filter can be a cross.
[0338] Figure 13 is a schematic diagram of the filter template proposed in the embodiment of the present application, as shown in Figure 13, the shape of the filter can be a diamond.
[0339] Further, in the embodiment of the present application, after adding new input information, the CCALF filtering process can finally be realized through the above formula (7).
[0340] 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, the processing process of the Cr component is similar), which can specifically include the following parts:
[0341] First, calculate the category information of all pixels of the component before ALF filtering.
[0342] Second, according to the information of each pixel category and the quantization parameter, the corresponding filter coefficient is selected, and each pixel of the component before ALF filtering is filtered.
[0343] Third, assuming that the number of the first filter coefficient is 29, the covariance matrix and the error vector of each pixel are calculated. Here, the covariance matrix A is a 29x29 square matrix, and each element of the matrix A is denoted as a i,j where i, j ∈ [0, 1, 2, …, 25, 26, 27, 28], and for a i,j The value of a i,j = R(i) x R(j) (1)
[0344] The value of R(i) is:
[0345] where resY(*), resiY(*) and FixedC(*) have been introduced above, and will not be repeated here. x corresponds to the position of x in the filter shape, and i is the pixel at the non-x position.
[0346] For the error vector B, it is a 29x1 vector. The acquisition method is referred to formula (3).
[0347] Fourth, the filter coefficient is calculated. According to the calculated covariance matrix and error vector, the Wiener-Hopf equation is constructed, and the filter coefficient is solved. It should be noted that for each category, two sets of filter coefficients are solved, the first set is the filter coefficient after using the fixed filter information, and the other set is the filter coefficient without using the fixed filter information.
[0348] Fifth, the rate-distortion cost cost1 of the filter filtering after the component uses the fixed filter information 0 (the first fixed filter) and the rate-distortion cost cost2 of the filter filtering after the component uses the fixed filter information 1 (the second fixed filter) are calculated. If cost1 < cost2, the filter filtering after the component uses the fixed filter information 0 is used, and the fixed filter category (filter index information) is set to 0, otherwise, the filter filtering after the component uses the fixed filter information 1 is used, and the fixed filter category is set to 1. The smaller value of cost1 and cost2 is denoted as cost3.
[0349] Step 6, calculate the rate-distortion cost cost4 of the component filtered by the filter without using the fixed filter information. If cost3 < cost4, use the filter after the fixed filter information, and set the fixed filter flag (the first syntax element identification information) to 1, otherwise, do not use the filter after the fixed filter information, and set the fixed filter flag to 0. Record the smaller value of cost3 and cost4 as cost5.
[0350] Step 7, perform transmission optimization on the filter coefficients. Set part of the coefficients to 0 and do not transmit them, and record the rate-distortion cost at this time as cost6. If cost6 < cost5, set the transmission optimization flag (the fourth syntax element identification information) to 1, and set the part of the coefficients to 0, and do not transmit the part of the coefficients; otherwise, set the transmission optimization flag to 0, do not perform the zero setting operation, and all the coefficients need to be transmitted to the decoding end. Record the smaller value of cost6 and cost5 as cost7.
[0351] Step 8, calculate the filter cost cost8 of the component filtered by the filter of the same chroma component of the previous frame, if cost7 < cost8, use the CCALF new filter to filter the component of the current image; otherwise, use the filter of the same chroma component of the previous frame to filter the component of the current image. Record the smaller value of cost7 and cost8 as cost9.
[0352] Step 9, calculate the rate-distortion cost cost10 of the component filtered without using CCALF, if cost9 < cost10, use CCALF to filter the component of the current image; otherwise, do not use CCALF to filter the component of the current image.
[0353] Step 10, if the chroma component of the current image needs to be filtered, and needs to use the new filter, use the new filter coefficient to filter the component of the current image; if the filter of the same chroma component of the previous frame is used to filter, use the filter coefficient to filter the chroma component of the current image. After filtering the pixels that need to be filtered, write them into the reconstructed image. For the pixels that do not need to be filtered, directly write them into the reconstructed image.
[0354] In the tenth step, if the current image uses CCALF to filter the chroma component, information such as whether the CTU uses CCALF and the filter category used by the CTU is written into the code stream. If a new filter set is used, the fixed filter flag, the transmission optimization flag, the fixed filter category, the number of filter sets, the filter order, the filter coefficients, and the like are written into the code stream and transmitted to the decoding end. (Hereinafter, the index in the candidate list, the number of filter sets, the filter order, the filter coefficients, whether the CTU uses CCALF, and the filter category used by the CTU are collectively referred to as CCALF parameter information.)
[0355] Exemplarily, in some embodiments, at the decoding end, when the decoding end enters the loop filtering CCALF module, the current chroma component is processed (taking the Cb component as an example, the processing process of the Cr component is similar), which can specifically include the following parts:
[0356] When parsing, if the APS unit exists in the current image, the APS unit is parsed. If the CCALF new filter flag of the chroma component (U component or V component) in the APS unit is 1, the fixed filter flag of the current image is parsed, and if the fixed filter flag is 0, the parsing of the coefficients at positions 27 and 28 (filter coefficients of the fixed filter) is directly skipped, and the two coefficients are set to 0, otherwise, the two coefficients are parsed from the code stream.
[0357] When parsing the slice header information, if the current image uses CCALF to filter the component, the index value of the chroma fixed filter used by the current image is parsed.
[0358] When decoding, if the current chroma component (current color component) of the current image uses CCALF for filtering, the corresponding APS unit is selected according to the APS ID used by the current image, and the filter coefficients in the current APS unit are obtained. In addition, whether the index value of the chroma fixed filter used by the chroma component is the same as the index value of the fixed filter used when the ALF chroma filter is used is compared. If the values are the same, the fixed filter result is reused, otherwise, the fixed filter result is recalculated according to the corresponding filter index. After obtaining the fixed filter result, the corresponding pixels are filtered according to the above filtering formula, which is not described here.
[0359] The transmission optimization flag of the component of the current image can also be parsed when parsing the APS information. If the transmission optimization flag is 1, the parsing of the coefficients at positions 22, 23, 25, and 26 is directly skipped, and the four coefficients are set to 0. Otherwise, the four coefficients are parsed from the code stream.
[0360] Exemplarily, in some embodiments, for CCALF, taking the syntax semantic level in ECM as an example:
[0361] slice header
[0362] alf_data
[0363] Wherein, sh_alf_cc_cb_fixed_filter_idx represents the color U component using the color fixed filter index. A binary variable, when the value is 0, it means that the filtering result of the color fixed filter 0 is used as the input, and when the value is 1, it means that the filtering result of the color fixed filter 1 is used as the input.
[0364] sh_alf_cc_cr_fixed_filter_idx represents the color V component using the color fixed filter index. A binary variable, when the value is 0, it means that the filtering result of the color fixed filter 0 is used as the input, and when the value is 1, it means that the filtering result of the color fixed filter 1 is used as the input.
[0365] alf_cc_cb_filters_chroma_fixed_filter_tap represents the color U component fixed filter flag bit. A binary variable, when the value is 0, the two coefficients at position 27 and position 28 are not transmitted, and when the value is 1, the two coefficients at position 27 and position 28 are transmitted.
[0366] alf_cc_cr_filters_chroma_fixed_filter_tap represents the color V component fixed filter flag bit. A binary variable, when the value is 0, the two coefficients at position 27 and position 28 are not transmitted, and when the value is 1, the two coefficients at position 27 and position 28 are transmitted.
[0367] alf_cc_cb_filters_trans_opt represents the color U component transmission optimization flag bit. A binary variable, when the value is 1, it means that the four coefficients at positions 22, 23, 25 and 26 are not transmitted. The value is 0, it means that the four coefficients at positions 22, 23, 25 and 26 need to be transmitted.
[0368] alf_cc_cr_filters_trans_opt represents the color V component transmission optimization flag bit. A binary variable, when the value is 1, it means that the four coefficients at positions 22, 23, 25 and 26 are not transmitted. The value is 0, it means that the four coefficients at positions 22, 23, 25 and 26 need to be transmitted.
[0369] Exemplarily, in some embodiments, after the method proposed in the embodiments of the present application is implemented on the reference software ECM-12.0, the results of testing part of the test sequences required by the ECM show that the performance of class B under all intra is as high as about 1%, which indicates that the method proposed in the embodiments of the present application has certain potential and can effectively improve the coding performance.
[0370] The embodiments of the present application provide a coding and decoding method. In the process of filtering a current color component, new input information is introduced, that is, output information of a fixed filter is taken as new filtering information, and the filtering of the current 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, the coding and decoding efficiency is effectively improved, and the compression performance is improved.
[0371] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 14, a constituent structure schematic diagram of an encoder 100 proposed in the embodiments of the present application is shown. As shown in FIG. 14, the encoder 100 can include a first determining unit 1001; wherein,
[0372] The first determining unit 1001 is configured to determine a first filtering coefficient corresponding to a current color component; wherein the first filtering coefficient at least includes a filtering coefficient corresponding to filtering information, and the filtering information includes at least one of the following: output information of a fixed filter, residual information of a luma component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter of a luma component, a fixed filter of a color component, and a fixed filter in CCALF; a reconstructed block of a current block in a current image is determined according to the first filtering coefficient; in a case where the current color component is determined to be filtered using the filtering information based on the reconstructed block of the current block in the current image, a first syntax element identification information is set, and the first syntax element identification information is written into a bitstream.
[0373] 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 an "entropy encoder") for encoding processing the value of a to-be-encoded syntax element.
[0374] 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, etc., and of course can also be a module, and can also be non-modular. Moreover, the constituent parts in the embodiments of the present application 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.
[0375] 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 technical solutions of the embodiments essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiments. The aforementioned 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.
[0376] 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. The computer program is executed by the first processor to implement the encoding method in any one of the foregoing embodiments.
[0377] Based on the composition of the encoder 100 and the computer readable storage medium, referring to FIG. 15, a specific hardware structure schematic diagram of the encoder 100 provided by the embodiments of the present application is shown. As shown in FIG. 15, 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 a data bus, a power bus, a control bus, and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the first bus system 1005 in the figure. Among them,
[0378] The first communication interface 1002 is used for receiving and sending signals in the process of transceiving information with other external network elements;
[0379] The first memory 1003 is used for storing a computer program capable of running on the first processor 1004;
[0380] The first processor 1004 is configured to, when the computer program is running, perform the following steps: determining a first filter coefficient corresponding to a current color component; wherein the first filter coefficient comprises at least a filter coefficient corresponding to filter information, the filter information comprising at least one of the following: output information of a fixed filter, residual information of a luma component, residual information of a color component; the fixed filter comprising one of the following: a fixed filter of a luma component, a fixed filter of a color component, a fixed filter in CCALF; determining a reconstructed block of a current block in a current picture according to the first filter coefficient; setting a first syntax element identification information and writing the first syntax element identification information into a bitstream in a case that it is determined that the current color component is filtered using the filter information based on the reconstructed block of the current block in the current picture.
[0381] It can be understood that the first memory 1003 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The first memory 1003 of the system and method described herein is intended to include, without being limited to, these and any other suitable types of memory.
[0382] 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.
[0383] 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-purpose 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.
[0384] 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.
[0385] The embodiment provides an encoder, in the process of filtering a current color component, new input information can be introduced, that is, output information of a fixed filter is taken as new filtering information, and filtering processing of the current 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.
[0386] In another embodiment of the present application, based on the same inventive concept as in the preceding embodiments, referring to FIG. 16, a constituent structure schematic diagram of a decoder 200 proposed in the embodiment of the present application is shown. As shown in FIG. 16, the decoder 200 can include: a second determining unit 2001; wherein,
[0387] 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 current color component is filtered using filtering information, determine a first filtering coefficient corresponding to the current 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: output information of a fixed filter, residual information of a luma component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter of a luma component, a fixed filter of a color component, and a fixed filter in CCALF; and determine a reconstructed block of a current block in the current image according to the first filtering coefficient.
[0388] 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.
[0389] 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 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.
[0390] 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.
[0391] Based on the composition of the decoder 200 and the computer readable storage medium, referring to FIG. 17, a specific hardware structure schematic diagram of the decoder 200 provided by the embodiment of the application is shown. As shown in FIG. 17, 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,
[0392] The second communication interface 2002 is configured to receive and send signals in the process of transceiving information with other external network elements;
[0393] The second memory 2003 is configured to store a computer program capable of running on the second processor 2004;
[0394] 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 current color component in a case that it is determined that the current color component uses 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: output information of a fixed filter, residual information of a luma component, residual information of a color component; the fixed filter includes one of the following: a fixed filter of a luma component, a fixed filter of a color component, a fixed filter in CCALF; and determining a reconstructed block of a current block in the current image according to the first filter coefficient.
[0395] Optionally, as another embodiment, the second processor 2004 is further configured to, when running the computer program, execute the method in any one of the preceding embodiments.
[0396] 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.
[0397] The embodiment provides a decoder, which can introduce new input information in the process of filtering a current color component, that is, taking output information of a fixed filter as new filtering information, and combining the filtering information with corresponding filtering coefficients to implement filtering processing on the current color component, so that a more reasonable filtering effect can be obtained, and coding and decoding efficiency and compression performance are improved.
[0398] In still another embodiment of the present application, referring to FIG. 18, a structural diagram of a coding and decoding system is shown. As shown in FIG. 18, the coding and decoding system 300 can include an encoder 100 and a decoder 200.
[0399] In the embodiment of the present application, the encoder 100 can be any one of the encoders described in the foregoing embodiments, and the decoder 200 can be any one of the decoders described in the foregoing embodiments.
[0400] 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 filter index information.
[0401] It should be noted that, in the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0402] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0403] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
[0404] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.
[0405] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments or device embodiments.
[0406] 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
[0407] 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 current color component uses filtering information for filtering based on the first syntax element identification information, first filtering coefficients corresponding to the current color component are determined. The first filtering coefficients at least include filtering coefficients corresponding to the filtering information. The filtering information includes at least one of the following: output information of a fixed filter, residual information of a luma component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of the luma component, a fixed filter of the color component, and a fixed filter in CCALF. A reconstructed block of a current block in a current image is determined according to the first filtering coefficients. At an encoding end, first filtering coefficients corresponding to the current color component are determined. The first filtering coefficients at least include filtering coefficients corresponding to the filtering information. The filtering information includes at least one of the following: output information of a fixed filter, residual information of a luma component, and residual information of a color component. The fixed filter includes one of the following: a fixed filter of the luma component, a fixed filter of the color component, and a fixed filter in CCALF. A reconstructed block of a current block in a current image is determined according to the first filtering coefficients. In a case where it is determined that the current color component uses the filtering information for filtering based on the reconstructed block of the current block in the current image, the 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 current color component, that is, the output information of the fixed filter is taken as new filtering information, and the filtering processing of the current color component is realized by combining the filtering information and the filtering coefficients corresponding to the filtering information, so that a more reasonable filtering effect can be obtained, and the coding and decoding efficiency and the 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; In a case where it is determined based on the first syntax element identification information that the current color component uses filtering information, determining a first filter coefficient corresponding to the current color component; wherein the first filter coefficient includes at least a filter coefficient corresponding to the filtering information, and the filtering information includes at least one of the following: output information of a fixed filter, residual information of a luminance component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter for the luminance component, a fixed filter for the color component, and a fixed filter in a cross-component adaptive loop filter (CCALF); A reconstructed block of a current block in the 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 current 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, it is determined according to the first syntax element identification information whether a current filter of the current color component of the current image uses the filtering information for filtering.
3. The method according to claim 2, wherein: Decoding the code stream to determine second syntax element identification information; In a case where it is determined based on the second syntax element identification information that the current color component of the current image is filtered using CCALF, the process of determining the first syntax element identification information is executed.
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 current 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 current color component is filtered using the filtering information; The increased number of filter coefficients corresponding to the current color component is determined according to the third syntax element identification information.
6. The method according to claim 1, wherein The method further comprises: Decode the code stream and determine the filter index information; Determine the fixed filter according to the filter index information; wherein the fixed filter includes a first fixed filter or a second fixed filter; According to the fixed filter, output information of the fixed filter is determined.
7. The method according to claim 6, wherein: The step of determining output information of the fixed filter according to the fixed filter includes: Determine coefficient index information corresponding to a filter of an adaptive loop filter ALF; When the coefficient index information of the fixed filter is the same as the coefficient index information corresponding to the ALF filter, determining the output information of the fixed filter according to the filtering result corresponding to the ALF filter; In a case where the coefficient index information of the fixed filter is different from the coefficient index information corresponding to the filter of the ALF, filtering is performed according to the fixed filter to determine output information of the fixed filter.
8. The method according to claim 6, wherein: The step of determining output information of the fixed filter according to the fixed filter includes: Filtering is performed according to the fixed filter to determine output information of the fixed filter.
9. The method according to claim 7 or 8, 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, determining, 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, output information of the fixed filter, the filter coefficient corresponding to the output information of the fixed filter, and a scale factor, a filtered reconstructed value of the current color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
10. The method according to claim 9, wherein: The filtering information also includes at least one of the following: prediction information of the luminance component, reconstruction information of the luminance component, 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, prediction information of the color component, reconstruction information of the color 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.
11. The method according to claim 1, 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.
12. The method according to claim 1, wherein The method further comprises: Decoding the code stream to determine identification information of a fourth syntax element; When the fourth syntax element identification information indicates that the filter coefficient of the current color component of the current image is skipped, determining a skip position and a skip value of the filter coefficient corresponding to the 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.
13. 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 current color component is not filtered using the filtering information, a second filter coefficient corresponding to the current 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.
14. A coding method, applied to an encoder, comprising: Determine a first filter coefficient corresponding to the current color component; wherein the first filter coefficient includes at least a filter coefficient corresponding to filter information, the filter information includes at least one of the following: output information of a fixed filter, residual information of a luminance component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter for a luminance component, a fixed filter for a color component, and a fixed filter in a CCALF; 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 that the current color component is filtered using the filtering information, first syntax element identification information is set and the first syntax element identification information is written into a bitstream.
15. The method according to claim 1, 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 current 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 current color component of the current image uses the filtering information for filtering.
16. The method according to claim 2, wherein: The method further comprises: Determining a second filter coefficient corresponding to the current 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.
17. The method according to claim 3, 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 current 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 current color component is not filtered using the filtering information.
18. The method according to claim 4, wherein The fixed filter includes a first fixed filter or a second fixed filter, and the method further includes: determining a reconstructed block of the current block according to the first fixed filter, and determining a third generation value corresponding to the first fixed filter; determining a reconstructed block of the current block according to the second fixed filter, and determining a fourth generation value corresponding to the second fixed filter; If the third-generation value is less than or equal to the fourth-generation value, determining the third-generation value as the first-generation value; In a case where the third generation value is greater than the fourth generation value, the fourth generation value is determined as the first generation value.
19. The method according to claim 5, wherein The method further comprises: Setting filter index information according to the third generation value and the fourth generation value; The filter index information is written into the bitstream.
20. The method according to any one of claims 1 to 6, wherein: The method further comprises: Determine the coefficient index information corresponding to the ALF filter; When the coefficient index information of the fixed filter is the same as the coefficient index information corresponding to the ALF filter, determining the output information of the fixed filter according to the filtering result corresponding to the ALF filter; In a case where the coefficient index information of the fixed filter is different from the coefficient index information corresponding to the filter of the ALF, filtering is performed according to the fixed filter to determine output information of the fixed filter.
21. The method according to claim 1, wherein: The method further comprises: Filtering is performed according to the fixed filter to determine output information of the fixed filter.
22. The method according to any one of claims 1 to 6, wherein: The method further comprises: In the case of adaptively determining to use CCALF to filter the current color component of the current image, executing the first syntax element identification information determination process, setting the second syntax element identification information, and writing the second syntax element identification information into the code stream.
23. The method according to any one of claims 1 to 6, wherein: The method further comprises: In a case where it is determined that the current 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.
24. The method according to any one of claims 1 to 6, wherein: The method further comprises: In a case where it is determined that the current 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 current 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 current color component; The third syntax element identification information is written into the bitstream.
25. 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, determining, 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, output information of the fixed filter, the filter coefficient corresponding to the output information of the fixed filter, and a scale factor, a filtered reconstructed value of the current color component of the current pixel; A reconstructed block of the current block is determined based on the filtered reconstructed value of the current color component of the current pixel.
26. The method according to any one of claims 1 or 12, wherein The filtering information also includes at least one of the following: prediction information of the luminance component, reconstruction information of the luminance component, 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, prediction information of the color component, reconstruction information of the color 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.
27. The method according to claim 1, 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.
28. The method according to claim 1, wherein The method further comprises: In a case where it is determined that the filter coefficient of the current 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 current color component, setting fourth syntax element identification information, and writing the fourth 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.
29. 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 filter index information.
30. An encoder, comprising a first determining unit; wherein: The first determination unit is configured to determine a first filter coefficient corresponding to a current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter for a luminance component, a fixed filter for a color component, and a fixed filter in a CCALF; determining a reconstructed block of a current block in a current image based on the first filter coefficient; and setting first syntax element identification information when determining that the current color component is filtered using the filter information based on the reconstructed block of the current block in the current image, and writing the first syntax element identification information into a bitstream.
31. 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 14 to 28 when running the computer program.
32. 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 current color component is filtered using the filtering information, determine the first filter coefficient corresponding to the current 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: output information of a fixed filter, residual information of a luminance component, and residual information of a color component; the fixed filter includes one of the following: a fixed filter for a luminance component, a fixed filter for a color component, and a fixed filter in CCALF; and determine a reconstructed block of the current block in the current image based on the first filter coefficient.
33. 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 13 when running the computer program.
34. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 13 or any one of claims 14 to 28 when executed.
Citation Information
Patent Citations
Video encoding and decoding method and device, and storage medium
CN114097236A
System and method for reducing reconstruction error in video coding based on cross-component correlation
CN114586347A
Apparatus and method for coding video based on filtering
CN114586349A
Adaptive in-loop filtering method and device
CN114731399A
Directional cross component filter for video coding
US20220279176A1