Encoding method, decoding method, encoder, decoder, bitstream, and storage medium

By skipping some index information during the adaptive loop filtering process, the problem of high code rate overhead in adaptive loop filtering is solved, thus improving encoding and decoding efficiency.

WO2026000233A1PCT designated stage Publication Date: 2026-01-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/101544
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, the adaptive loop filtering process incurs significant code rate overhead, which affects encoding and decoding efficiency.

Method used

Under certain conditions, the encoding or decoding of some index information is skipped, reducing the bit rate of the adaptive loop filtering process. Through a nonlinear adaptive loop filtering method, the limit value index of the input value is encoded and decoded only when specific conditions are met.

Benefits of technology

It effectively reduces the bit rate overhead of the adaptive loop filtering process and improves encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024101544_02012026_PF_FP_ABST
    Figure CN2024101544_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an encoding method, a decoding method, an encoder, a decoder, a bitstream, and a storage medium. The decoding method comprises: decoding a bitstream, and determining a plurality of filter coefficients for a first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, and the first filter coefficient corresponding to a first filter input value; on the basis of the plurality of filter coefficients, performing non-linear adaptive loop filtering on the first reconstructed value; and if the first filter coefficient satisfies a first condition, skipping decoding first index information, the first index information being used for indicating a limit value for the first filter input value, and the first condition being related to the value of the first filter coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method, coder, bitstream and storage medium TECHNICAL FIELD

[0001] The present application relates to the technical field of video coding, and in particular to a coding method, a coder, a bitstream and a storage medium. BACKGROUND

[0002] In a video coding framework, an adaptive loop filter (ALF) and a cross component adaptive loop filter (CCALF) are filters designed to minimize the error between a reconstructed image and an original image. How to reduce the code rate overhead of the adaptive loop filtering process to improve coding efficiency is a problem to be solved.

[0003] SUMMARY

[0004] The present application provides a coding method, a coder, a bitstream and a storage medium. The various aspects involved in the present application are introduced below.

[0005] In a first aspect, a decoding method is provided, which is applied to a decoder, and the decoding method comprises: decoding a bitstream, determining a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, the first filter coefficient corresponding to a first filter input value; performing nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients; and if the first filter coefficient satisfies a first condition, skipping decoding of first index information, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0006] In a second aspect, a decoder is provided, comprising: a determination unit configured to decode a bitstream and determine a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, the first filter coefficient corresponding to a first filter input value; a filtering unit configured to perform nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients; and a decoding unit configured to, if the first filter coefficient satisfies a first condition, skip decoding of first index information, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0007] In a third aspect, a decoder is provided, comprising: a memory for storing a computer program; and a processor for executing the method of the first aspect when the computer program is run.

[0008] In a fourth aspect, an encoding method is provided, which is applied to an encoder, and the encoding method comprises: determining a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, the first filter coefficient corresponding to a first filter input value; performing nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients; and if the first filter coefficient satisfies a first condition, skipping encoding of first index information, the first index information being used to indicate a limited value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0009] In a fifth aspect, an encoder is provided, comprising: a determining unit configured to determine a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, the first filter coefficient corresponding to a first filter input value; a filtering unit configured to perform nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients; and an encoding unit configured to, if the first filter coefficient satisfies a first condition, skip encoding of first index information, the first index information being used to indicate a limited value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0010] In a sixth aspect, an encoder is provided, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement the method of the second aspect.

[0011] In a seventh aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and the computer program is executed to implement the method of the first aspect or the second aspect.

[0012] In an eighth aspect, a computer program product is provided, comprising a computer program, and the computer program is executed to implement the method of the first aspect or the second aspect.

[0013] In a ninth aspect, a non-volatile computer-readable storage medium storing a bitstream is provided, the bitstream is generated by using an encoding method of an encoder, or the bitstream is decoded by using a decoding method of a decoder, wherein the decoding method is the method of the first aspect, and the encoding method is the method of the second aspect.

[0014] In a tenth aspect, a bitstream is provided, comprising a bitstream generated according to the method of the second aspect.

[0015] In the related art, when performing nonlinear adaptive loop filtering on a reconstructed value, the index value of the limited value of each filter input is encoded into a bitstream. In the embodiments of the present application, a part of the index values are skipped from being encoded under certain conditions, so that the code rate required by the adaptive loop filtering process can be reduced, and the coding and decoding efficiency can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0016] FIG. 1 is a schematic diagram of a video encoder to which embodiments of the present application can be applied.

[0017] FIG. 2 is a schematic diagram of a video decoder to which embodiments of the present application can be applied.

[0018] FIG. 3 is a schematic diagram of a loop filter module to which embodiments of the present application can be applied.

[0019] FIG. 4A is a schematic diagram of a chroma adaptive loop filter.

[0020] FIG. 4B is a schematic diagram of a luma adaptive loop filter.

[0021] FIG. 5 is a schematic diagram of a cross-component adaptive loop filter.

[0022] FIG. 6 is a flowchart of a cross-component adaptive loop filtering process.

[0023] FIG. 7 is a flowchart of a decoding method according to an embodiment of the present application.

[0024] FIG. 8 is a flowchart of an encoding method according to an embodiment of the present application.

[0025] FIG. 9 is a schematic diagram of a decoder according to an embodiment of the present application.

[0026] FIG. 10 is a schematic diagram of a decoder according to another embodiment of the present application.

[0027] FIG. 11 is a schematic diagram of an encoder according to an embodiment of the present application.

[0028] FIG. 12 is a schematic diagram of an encoder according to another embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the present application will be described below with reference to the accompanying drawings.

[0030] FIG. 1 is a schematic block diagram of a video encoder according to an embodiment of the present application.

[0031] It should be understood that the video encoder 100 can be used for lossy compression of images, and can also be used for lossless compression of images. The lossless compression can be visually lossless compression or mathematically lossless compression.

[0032] The video encoder 100 can be applied to image data in luma chroma (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, Y represents luminance (Luma), Cb (U) represents blue chroma, and Cr (V) represents red chroma. U and V are used to describe color and saturation as chroma (Chroma). For example, in the color format, 4:2:0 means that there are 4 luminance components and 2 chroma components (YYYYCbCr) for every 4 samples, 4:2:2 means that there are 4 luminance components and 4 chroma components (YYYYCbCrCbCr) for every 4 samples, and 4:4:4 means that all samples are displayed (YYYYCbCrCbCrCbCrCbCr).

[0033] For example, the video encoder 100 reads video data, divides one image into a plurality of coding tree units (CTUs) for each image in the video data, and in some examples, the CTU can be referred to as a "tree block", a "largest coding unit" (LCU) or a "coding tree block" (CTB). Each CTU can be associated with a block of samples having an equal size within the image. Each sample can correspond to a luminance (luma) sample and two chrominance (chroma) samples. Therefore, each CTU can be associated with a block of luminance samples and two blocks of chroma samples. A CTU size can be, for example, 128x128, 64x64, 32x32, etc. A CTU can be further divided into a plurality of coding units (CUs) for coding. A CU can be a rectangular block or a square block. A CU can correspond to a prediction unit (PU) and a transform unit (TU).

[0034] The video encoder and the video decoder can support various PU sizes. Assuming that the size of a particular CU is 2Nx2N, the video encoder and the video decoder can support a PU size of 2Nx2N or NxN for intra prediction, and support symmetric PUs of 2Nx2N, 2NxN, Nx2N, NxN, or similar sizes for inter prediction. The video encoder and the video decoder can also support asymmetric PUs of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.

[0035] In some embodiments, as shown in FIG. 1, the video encoder 100 can include a prediction module 110, a residual module 120, a transform / quantization module 130, an inverse transform / quantization module 140, a reconstruction module 150, a loop filtering module 160, a decoded picture buffer 170, and an entropy encoding module 180. It is noted that the video encoder 100 can include more, less, or different functional components.

[0036] Optionally, in this application, the current block can be referred to as a current coding unit (CU). The prediction block can also be referred to as a predicted picture block or a picture predicted block, and the reconstructed picture block can also be referred to as a reconstructed block or a picture reconstructed block. Due to the need for parallel processing, a picture can be divided into slices. The slices in the same picture can be processed in parallel, that is, there is no data dependency between them. While "frame" is a commonly used term, it can generally be understood as a frame being a picture. In this article, the frame can also be replaced by picture or slice, etc.

[0037] In some embodiments, the prediction module 110 includes an inter-prediction module 111 and an intra-prediction module 112. Due to the strong correlation between adjacent samples in a picture of a video, the intra-prediction method is used in video coding technology to eliminate the spatial redundancy between adjacent samples. Due to the strong similarity between adjacent pictures in a video, the inter-prediction method is used in video coding technology to eliminate the temporal redundancy between adjacent pictures, thereby improving the coding efficiency.

[0038] The inter-prediction module 111 can be used for inter-prediction, which can include motion estimation and motion compensation, and can refer to image information of different pictures. Inter-prediction uses motion information to find a reference block in a reference picture, generates a prediction block from the reference block, and is used to eliminate temporal redundancy. Inter-prediction uses motion information to find a reference block in a reference picture, generates a prediction block from the reference block. The motion information includes a reference picture list where the reference picture is located, a reference picture index, and a motion vector. The motion vector can be an integer sample or a fractional sample. If the motion vector is a fractional sample, an interpolation filter needs to be used in the reference picture to obtain the required fractional sample block. Here, the integer sample or fractional sample block in the reference picture found according to the motion vector is called a reference block. Some technologies directly use the reference block as the prediction block, and some technologies generate the prediction block based on the reference block. Generating the prediction block based on the reference block can also be understood as using the reference block as the prediction block and then processing the prediction block to generate a new prediction block.

[0039] The intra-prediction module 112 only refers to the information of the same picture to predict the sample information in the current code picture block, which is used to eliminate spatial redundancy.

[0040] There are multiple prediction modes for intra prediction. For example, the H.264 / AVC standard has 8 angular prediction modes and 1 non-angular prediction mode, and the H.265 / HEVC extends to 33 angular prediction modes and 2 non-angular prediction modes. The intra prediction modes used by high efficiency video coding (HEVC) are Planar, DC, and 33 angular modes, for a total of 35 prediction modes. The intra modes used by versatile video coding (VVC) are Planar, DC, and 65 angular modes, for a total of 67 prediction modes.

[0041] It should be noted that with the increase of angular modes, the intra prediction will be more accurate and more in line with the needs of the development of high-definition and ultra-high-definition digital video.

[0042] The residual module 120 can generate a residual block for the CU based on the sample block of the CU and the prediction block of the CU. For example, the residual module 120 can generate the residual block for the CU such that each sample in the residual block has a value equal to a difference between a sample in the sample block of the CU and a corresponding sample in the prediction block of the CU.

[0043] The transform / quantization module 130 can quantize the transform coefficients. The transform / quantization module 130 can quantize the transform coefficients associated with the CU based on a quantization parameter (QP) value associated with the CU. The video encoder 100 can adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.

[0044] The inverse transform / quantization module 140 can apply inverse quantization and inverse transform to the quantized transform coefficients, respectively, to reconstruct the residual block from the quantized transform coefficients.

[0045] The reconstruction module 150 can add samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by the prediction module 110 to generate a reconstructed image block associated with the CU. By reconstructing each sample block of the CU in this way, the video encoder 100 can reconstruct the sample block of the CU.

[0046] The loop filter module 160 is configured to process the samples after inverse transform and inverse quantization, to compensate for distortion information and provide a better reference for subsequent encoding samples. For example, a deblocking filter operation can be performed to reduce blocking artifacts of the sample block associated with the CU.

[0047] In some embodiments, the in-loop filtering module 160 includes a deblocking filter module for removing blocking artifacts and a sample adaptive offset / adaptive loop filtering (SAO / ALF) module for removing ringing artifacts.

[0048] The decoded picture buffer 170 can store reconstructed sample blocks. The inter prediction module 111 can use reference pictures containing reconstructed sample blocks to perform inter prediction for PUs of other pictures. In addition, the intra prediction module 112 can use reconstructed sample blocks in the decoded picture buffer 170 to perform intra prediction for other PUs in the same picture as the CU.

[0049] The entropy encoding module 180 can receive quantized transform coefficients from the transform / quantization module 130. The entropy encoding module 180 can perform one or more entropy encoding operations on the quantized transform coefficients to generate entropy encoded data.

[0050] FIG. 2 is a schematic block diagram of a video decoder that the embodiments of the present application relate to.

[0051] As shown in FIG. 2, the video decoder 200 includes an entropy decoding module 210, a prediction module 220, an inverse quantization / transform module 230, a reconstruction module 240, an in-loop filtering module 250, and a decoded picture buffer 260. It is noted that the video decoder 200 can include more, less, or different functional components.

[0052] The video decoder 200 can receive a bitstream. The entropy decoding module 210 can parse the bitstream to extract syntax elements from the bitstream. As part of parsing the bitstream, the entropy decoding module 210 can parse entropy encoded syntax elements in the bitstream. The prediction module 220, the inverse quantization / transform module 230, the reconstruction module 240, and the in-loop filtering module 250 can decode video data according to the syntax elements extracted from the bitstream, i.e., generate decoded video data.

[0053] In some embodiments, the prediction module 220 includes an inter prediction module 221 and an intra prediction module 222.

[0054] The intra prediction module 222 can perform intra prediction to generate a prediction block for a PU. The intra prediction module 222 can use an intra prediction mode to generate the prediction block for the PU based on sample blocks of spatial neighboring PUs. The intra prediction module 222 can also determine the intra prediction mode for the PU according to one or more syntax elements parsed from the bitstream.

[0055] Inter prediction module 221 can construct a first reference picture list (List 0) and a second reference picture list (List 1) based on syntax elements parsed from the bitstream. In addition, if the PU is coded using inter prediction, entropy decoding module 210 can parse the motion information of the PU. Inter prediction module 221 can determine one or more reference blocks for the PU based on the motion information of the PU. Inter prediction module 221 can generate the prediction block for the PU based on the one or more reference blocks for the PU.

[0056] Inverse quantization / transform module 230 can inverse quantize (i.e., de-quantize) the transform coefficients associated with a TU. Inverse quantization / transform module 230 can use the QP value associated with the CU of the TU to determine a degree of quantization.

[0057] After inverse quantizing the transform coefficients, inverse quantization / transform module 230 can apply one or more inverse transforms to the inverse quantized transform coefficients in order to produce a residual block associated with the TU.

[0058] Reconstruction module 240 uses the residual block associated with a TU of a CU and the prediction block of the PU of the CU to reconstruct the sample block of the CU. For example, reconstruction module 240 can add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the sample block of the CU, resulting in a reconstructed image block.

[0059] Loop filtering module 250 can perform in-loop filtering operations to reduce blocking artifacts of the sample block associated with the CU.

[0060] Video decoder 200 can store the reconstructed images of the CU in decoded picture buffer 260. Video decoder 200 can use the reconstructed images in decoded picture buffer 260 as reference pictures in subsequent predictions, or can pass the reconstructed images to a display device for presentation.

[0061] The basic procedure of video coding is as follows: at the encoding side, a picture is divided into blocks, for a current block, prediction module 110 generates a prediction block of the current block using intra prediction or inter prediction. Residual module 120 can calculate a residual block based on the prediction block and the original block of the current block, i.e., the difference between the prediction block and the original block of the current block, which can also be referred to as residual information. The residual block can be processed by transform / quantization module 130, which can remove information that is not sensitive to human eyes to eliminate visual redundancy. Optionally, the residual block before being processed by transform / quantization module 130 can be referred to as a time-domain residual block, and the residual block after being processed by transform / quantization module 130 can be referred to as a frequency-domain residual block or a frequency-domain residual block. Entropy encoding module 180 receives the quantized transform coefficients output by transform / quantization module 130, and can perform entropy encoding on the quantized transform coefficients to output a bitstream. For example, entropy encoding module 180 can eliminate character redundancy based on a target context model and probability information of a binary code stream.

[0062] At the decoding side, the entropy decoding module 210 can parse the bitstream to obtain the prediction information of the current block, the quantized coefficient matrix, etc. The prediction module 220 generates a prediction block of the current block based on the prediction information using intra prediction or inter prediction. The inverse quantization / transformation module 230 uses the quantized coefficient matrix obtained from the bitstream to perform inverse quantization and inverse transformation on the quantized coefficient matrix to obtain a residual block. The reconstruction module 240 adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed block constitutes a reconstructed image. The loop filter module 250 performs loop filtering on the reconstructed image based on the image or based on the block to obtain a decoded image. The encoding side also needs to perform similar operations to obtain the decoded image. The decoded image can also be referred to as a reconstructed image, and the reconstructed image can be used as a reference image for inter prediction of subsequent images.

[0063] It should be noted that the block division information determined by the encoding side, as well as the mode information or parameter information of prediction, transformation, quantization, entropy coding, loop filtering, etc. are carried in the bitstream when necessary. The decoding side determines the same block division information as the encoding side by analyzing the bitstream and the existing information, and determines the mode information or parameter information of prediction, transformation, quantization, entropy coding, loop filtering, etc., so as to ensure that the decoded image obtained by the encoding side is the same as the decoded image obtained by the decoding side.

[0064] The above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process can be optimized. The present application is applicable to the basic process of the video codec under the block-based hybrid coding framework, but is not limited to the framework and process.

[0065] In the above introduction, the loop filter module performs loop filtering on the reconstructed image based on the image or based on the block to obtain a filtered reconstructed image. As shown in FIG. 3, the loop filter module 300 can include a deblocking filter (DBF) 310, a sample adaptive offset (SAO) 320, an adaptive loop filter (ALF) 330, and a cross-component adaptive loop filter (CCALF) 340, etc. In addition, the loop filter module 300 can also include a cross-component sample adaptive offset (CCSAO) 350 and a bilateral filter (BIF) 360. The adaptive loop filter and the cross-component adaptive loop filter will be described in detail below.

[0066] The principle of adaptive loop filtering is to calculate one or more sets of filter coefficients from the reconstructed values and the original sample values. The filter coefficients are transmitted through the code stream, and the decoder can construct a filter after obtaining the filter coefficients and use the filter to filter the reconstructed image, so that the reconstructed image is closer to the original image after filtering.

[0067] The adaptive loop filtering is applicable to the luminance component and the chrominance component. In the adaptive loop filter, the luminance component and the chrominance component have respective filters. As shown in FIG. 4A, the filter on the chrominance component is a 5x5 diamond-shaped coefficient-symmetric filter, including seven filter coefficients c0 to c6. As shown in FIG. 4B, the filter of the luminance component is a 7x7 diamond-shaped coefficient-symmetric filter, including thirteen filter coefficients c0 to c12.

[0068] The adaptive loop filter uses the reconstructed samples in the filter window as input values, multiplies and sums the adaptive filter coefficients to generate a correction value of the reconstructed value at the center position of the filter, adds the correction value to the reconstructed value at the center position to obtain the filtered reconstructed value.

[0069] In the related art, the adaptive loop filtering can also be more finely processed. For example, the adaptive loop filtering can increase more coefficients, and the input values of the filter are not limited to the current reconstructed value, but can also include residual values, reconstructed values before deblocking filtering, reconstructed values after deblocking filtering, reconstructed values after Gaussian filtering, etc. Most of the input values of the adaptive loop filtering described above have undergone some pre-filtering processing, so that the adaptive loop filtering does not need to transmit a large number of adaptive coefficients through the code stream.

[0070] The cross-component adaptive filtering is only applicable to the chrominance component. As shown in FIG. 5, the cross-component adaptive filtering can be an 8-coefficient filter. As shown in FIG. 6, the cross-component adaptive filtering uses the reconstructed value of the luminance as the filter input, generates a correction value with the filter coefficient, and adds the correction value to the chrominance component to improve the subjective and objective quality of the chrominance. In the related art, the number of coefficients of the filter can be further increased to improve the filtering efficiency. At the same time, the residual value of the luminance and the reconstructed value of the chrominance, etc. can also be used as the input of the cross-component adaptive filter.

[0071] In the related art, the method of adaptive loop filtering of luminance and chrominance is as follows:

[0072] where (x, y) represents the current ALF filtering position, (i, j) represents each position under the filter window, I'(x, y) represents the filtered ALF output value, w(i, j) represents the filter coefficient of each position under the filter window, and I(x+i, y+j) represents the filter input value of each position under the filter window, i.e., the reconstructed value before ALF filtering.

[0073] With further evolution of related technologies, luminance and chrominance can be subjected to nonlinear adaptive loop filtering. The nonlinear adaptive loop filtering mainly has two parts of improvements compared with the traditional adaptive loop filtering. Next, the two parts of improvements are described in detail.

[0074] First, the nonlinear adaptive loop filtering improves the filtering formula, so that the filter can reduce one filter coefficient while the performance remains unchanged. The improved filtering formula is as follows:

[0075] Comparing formula (1-1), it can be found that:

[0076] 1. The input value and the filter coefficient of the filter at (0, 0) under the filter window are removed;

[0077] 2. The filter input needs to be subtracted from I(x, y), and the filter coefficient needs to be added after the filter input to obtain the filter output value after I(x, y) is added.

[0078] Second, the nonlinear adaptive loop filtering limits the range of the filter input, as shown in the following formula:

[0079] where K(d, b) = min(b, max(-b, d)) represents a function for limiting the filter input value, max(-b, d) represents taking the maximum value between -b and d, and min(b, max(-b, d)) represents taking the minimum value between b and max(-b, d). Each input I(x+i, y+j)-I(x, y) under the filter window is limited to the range of -k(i, j) to k(i, j), so that the input value is selectively limited, which can effectively avoid some filtering noise.

[0080] In the nonlinear adaptive loop filtering, each coefficient of each filter includes a limiting value (such as k(i, j)) for limiting the filter input value. For example, the limiting value in the related technology can have four values, one of which is selected for nonlinear adaptive loop filtering at the encoding end, and the limiting value index is encoded into the code stream; at the decoding end, the limiting value index can be parsed from the code stream, and the value of the limiting value is obtained by looking up the table.

[0081] An adaptive parameter set (APS) is a picture level parameter set used to transmit some adaptive parameters. The APS syntax elements in the related standard are listed as follows:

[0082] The APS parameter set includes a plurality of syntax elements, for example, aps_adaptation_parameter_set_id is used to assign an index to the currently decoded APS set; aps_params_type is used to indicate the type of the APS parameter set, for example, it can be a parameter set for coding ALF adaptive parameters, or a parameter set for LMCS or SCALING. When the type of this APS parameter set is an ALF type parameter set, the number of ALF filters, filter parameters and other data are further parsed; alf_data() is a function for coding and decoding these parameters and data.

[0083] The above table is an example of the syntax elements for coding and decoding ALF in the APS in the related standard. When alf_luma_filter_signal_flag is true, it indicates that the ALF information of the luminance needs to be coded and decoded. These information includes alf_luma_clip_flag, which indicates whether the non-linear is included in the luminance ALF filter coded and decoded in the current APS; if the identification information is true, it indicates that the non-linear index value alf_luma_clip_idx of each coefficient of each luminance filter needs to be coded and decoded, the index value takes 0, 1, 2 or 3, which is used to obtain the input range of each luminance ALF coefficient by table lookup in the coding process. Similarly, when the chroma alf_chroma_filter_signal_flag is true, there are corresponding alf_chroma_clip_flag and alf_chroma_clip_idx.

[0084] In different standards, because the number of ALF filter coefficients is different, the number of index values (alf_luma_clip_idx and alf_chroma_clip_idx) of the limit values that need to be coded and decoded is also different.

[0085] According to the above introduction, it can be known that when the reconstructed value is subjected to non-linear adaptive loop filtering, the index value of the limit value of each filtering input needs to be coded into the code stream, which leads to a large code rate overhead of the adaptive loop filtering process. Therefore, how to reduce the code rate overhead of the adaptive loop filtering process to improve the coding and decoding efficiency is a problem to be solved.

[0086] To solve the above problems, an embodiment of the present application provides an encoding method, comprising: determining a filter coefficient of a first reconstructed value, the filter coefficient corresponding to a first filter input value; performing nonlinear adaptive loop filtering on the first reconstructed value according to the filter coefficient; and skipping encoding of first index information if a first condition is met, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the filter coefficient.

[0087] In addition, an embodiment of the present application further provides a decoding method, comprising: decoding a code stream, determining a filter coefficient of a first reconstructed value, the filter coefficient corresponding to a first filter input value; performing nonlinear adaptive loop filtering on the first reconstructed value according to the filter coefficient; and skipping decoding of first index information if the filter coefficient meets a first condition, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the filter coefficient.

[0088] An embodiment of the present application skips encoding of a part of index values under certain conditions, thereby reducing the code rate required by the adaptive loop filtering process, and further helping to improve the encoding and decoding efficiency.

[0089] The decoding method of an embodiment of the present application is described in detail below in combination with FIG. 7.

[0090] FIG. 7 is a flowchart of a decoding method provided by an embodiment of the present application. The method of FIG. 7 can be applied to a decoder.

[0091] Referring to FIG. 7, in step S710, a code stream is decoded, and a plurality of filter coefficients of a first reconstructed value are determined.

[0092] An embodiment of the present application does not specifically limit the type of the first reconstructed value. For example, the first reconstructed value can be a reconstructed luminance value. For another example, the first reconstructed value can be a reconstructed chroma value. The reconstructed chroma value herein can be a reconstructed value of a U component or a reconstructed value of a V component.

[0093] The filter coefficient of the first reconstructed value can be obtained by parsing the code stream. For example, the filter coefficient can be carried in an APS subset, and the filter coefficient is obtained at the decoding end through the APS subset. For another example, the filter coefficient can depend on other parameter information (for example, a first parameter) in the code stream, and the filter coefficient is derived according to the parameter information after the parameter information is parsed at the decoding end.

[0094] The number of filter coefficients of the first reconstructed value is related to the type of the filter. For example, as shown in FIG. 4A, when the first reconstructed value is a reconstructed chroma value, the type of the filter can be a 5x5 diamond-shaped coefficient-symmetric filter, including 7 filter coefficients. For another example, as shown in FIG. 4B, when the first reconstructed value is a reconstructed luma value, the type of the filter can be a 7x7 diamond-shaped coefficient-symmetric filter, including 13 filter coefficients. For another example, as shown in FIG. 5, the type of the filter can be an 8-coefficient filter.

[0095] In the filtering process, different filter coefficients correspond to different filter windows, and each filter window has its own filter input value. For example, the first filter coefficient can correspond to the first filter input value in the filter window.

[0096] The first filter input value can have multiple types. For example, the first filter input value can include the initial reconstructed value, the residual value, the reconstructed value before the deblocking filtering, the reconstructed value after the deblocking filtering, and the reconstructed value after the Gaussian filtering.

[0097] In step S720, the first reconstructed value is subjected to the nonlinear adaptive loop filtering according to the plurality of filter coefficients.

[0098] The nonlinear adaptive loop filtering described above can be a filtering process of the reconstructed values of the same component, or a filtering process of the reconstructed values across components.

[0099] In some implementations, the manner in which the first reconstructed value is subjected to the nonlinear adaptive loop filtering can include determining a first correction value according to the plurality of filter coefficients and the plurality of filter input values, and then determining a second reconstructed value according to the first reconstructed value and the first correction value. Illustratively, the first correction value here can be determined based on the sum of the products of the plurality of filter coefficients and the plurality of filter input values. Illustratively, the second reconstructed value can be equal to the sum of the first reconstructed value and the first correction value.

[0100] The filter input values of the filter in the nonlinear adaptive loop filtering process are to be limited based on a limit value to eliminate some filtering noise. Therefore, at least part of the plurality of filter input values described above are filter input values after being limited based on the limit value.

[0101] The limit value can limit the filter input value within a certain value range. For example, the first filter coefficient corresponds to the first filter input value, and under the action of the limit value, the first filter input value can be limited within a first value range.

[0102] Illustratively, the nonlinear adaptive loop filtering of the first reconstructed value can be represented based on the following formula:

[0103] where I (x, y) represents the second reconstructed value, I (x, y) represents the first reconstructed value, I (x+i, y+j)-I (x, y) represents the filter input value, w(i,j) represents the filter coefficient, and K(d,b)=min(b,max(-b,d)) represents a function of limiting the filter input value, where max(-b,d) represents taking the maximum value between -b and d, and min(b,max(-b,d)) represents taking the minimum value between b and max(-b,d). Each filter input I (x+i, y+j)-I (x, y) under the filter window is limited in the range of -k(i,j) to k(i,j).

[0104] In step S730, if the first filter coefficient satisfies the first condition, the first index information is skipped from being decoded. The first index information here is used to indicate the limited value of the first filter input value.

[0105] According to the foregoing introduction, it can be known that, in the related art, the index information corresponding to the limited value of each filter input is encoded when performing the nonlinear adaptive loop filtering on the reconstructed value, and the limited value of each filter input value can be determined by decoding the index information at the decoding end. This results in a large overhead of the nonlinear adaptive loop filtering process.

[0106] In the embodiments of the present application, if the filter coefficient satisfies a certain condition, a part of the index values are skipped from being encoded and decoded, so that the code rate required by the adaptive loop filtering process can be reduced, and the encoding and decoding efficiency can be improved.

[0107] The nonlinear adaptive loop filtering can be understood as adjusting the first reconstructed value based on the correction value, and the correction value can be determined based on the sum of the products of a plurality of filter coefficients and a plurality of filter input values. As shown in formula (1-4), when the value of the first filter coefficient (i.e., w(i,j)) is much smaller than the values of other filter coefficients, the product of the first filter coefficient and the first filter input value can have little influence on the value of the correction value. For example, if the first filter coefficient is 0, the product of the first filter coefficient and the first filter input value is always 0, and the value of the correction value will not be affected. At this time, the first filter input value does not need to be limited, that is, it is unnecessary to encode and decode the index value of the limited value of the first filter input.

[0108] The first condition is related to the value of the first filter coefficient. In some implementation manners, the first condition can be that the value of the first filter coefficient is 0. In other implementation manners, the first condition can be that the value of the first filter coefficient is less than or equal to a first threshold. For example, the first threshold here can be a decimal close to 0.

[0109] In some implementation manners, if the first filter coefficient does not satisfy the first condition, the first index information is still decoded.

[0110] In some embodiments, the first identification information is decoded before the nonlinear adaptive loop filtering is performed. The first identification information is used to indicate whether the nonlinear adaptive loop filtering is performed. If the first identification information indicates that the nonlinear adaptive loop filtering is performed, the first reconstructed value is subjected to the nonlinear adaptive loop filtering; if the first identification information indicates that the nonlinear adaptive loop filtering is not performed, the first reconstructed value is subjected to the linear adaptive loop filtering as shown in equation (1-2).

[0111] In some embodiments, the second identification information is determined by parsing the bitstream. The second identification information is used to indicate the type of the first reconstructed value subjected to the adaptive loop filtering. For example, the second identification information indicates that the reconstructed luma value is subjected to the adaptive loop filtering; or the second identification information indicates that the reconstructed chroma value is subjected to the adaptive loop filtering.

[0112] In the foregoing introduction, three types of parameter information (the first index information, the first identification information, and the second identification information) used in the adaptive loop filtering are mentioned. The parameter information can be syntax elements related to the coding adaptive loop filtering in the APS. For example, the first index information can be alf_luma_clip_idx or alf_chroma_clip_idx, the first identification information can be alf_luma_clip_flag or alf_chroma_clip_flag, and the second identification information can be alf_luma_filter_signal_flag or alf_chroma_filter_signal_flag.

[0113] In some embodiments, the parameter information can also be syntax elements related to the coding adaptive loop filtering in the picture header or the slice header.

[0114] The decoding method provided by the embodiments of the present application is described above in combination with FIG. 7, and the encoding method provided by the embodiments of the present application is described in detail below in combination with FIG. 8.

[0115] FIG. 8 is a flowchart of an encoding method provided by an embodiment of the present application. The method of FIG. 8 can be applied to an encoder.

[0116] Referring to FIG. 8, in step S810, a plurality of filter coefficients of a first reconstructed value are determined.

[0117] The type of the first reconstructed value is not specifically limited in the embodiments of the present application. For example, the first reconstructed value can be a reconstructed luma value. For another example, the first reconstructed value can be a reconstructed chroma value. The reconstructed chroma value can be a reconstructed value of a U component or a reconstructed value of a V component.

[0118] The filter coefficients of the first reconstructed value can be determined based on the current reconstructed image. For example, the filter coefficients of the first reconstructed value can be filter coefficients generated based on sample values of the current reconstructed image using a Wiener filter principle.

[0119] The filter coefficients of the first reconstructed value can be written in an APS subset. Alternatively, the filter coefficients of the first reconstructed value can also be combined with other parameter information (e.g., the first parameter) and written in a bitstream.

[0120] The number of the filter coefficients of the first reconstructed value is related to the type of the filter. For example, as shown in FIG. 4A, when the first reconstructed value is a reconstructed chroma value, the type of the filter can be a 5x5 diamond-shaped filter with symmetric coefficients, including 7 filter coefficients. For another example, as shown in FIG. 4B, when the first reconstructed value is a reconstructed luma value, the type of the filter can be a 7x7 diamond-shaped filter with symmetric coefficients, including 13 filter coefficients. For another example, as shown in FIG. 5, the type of the filter can be an 8-coefficient filter.

[0121] In the filtering process, different filter coefficients correspond to different filter windows, and each filter window has its own filter input value. Taking the first filter coefficient as an example, the first filter coefficient can correspond to the first filter input value in the filter window.

[0122] The first filter input value can be various. For example, the first filter input value can include the initial reconstructed value, the residual value, the reconstructed value before the deblocking filtering, the reconstructed value after the deblocking filtering, and the reconstructed value after the Gaussian filtering.

[0123] In step S820, the first reconstructed value is subjected to the nonlinear adaptive loop filtering according to the plurality of filter coefficients.

[0124] The nonlinear adaptive loop filtering described above can be a filtering process of reconstructed values of the same component, or a filtering process of reconstructed values across components.

[0125] In some implementations, the manner in which the first reconstructed value is subjected to the nonlinear adaptive loop filtering can include determining a first correction value according to the plurality of filter coefficients and the plurality of filter input values, and then determining a second reconstructed value according to the first reconstructed value and the first correction value. Illustratively, the first correction value here can be determined based on a sum of products of the plurality of filter coefficients and the plurality of filter input values. Illustratively, the second reconstructed value can be equal to a sum of the first reconstructed value and the first correction value.

[0126] The filter input values of the filter in the nonlinear adaptive loop filtering process are to be limited based on a limit value to eliminate some filtering noise. Therefore, at least part of the plurality of filter input values described above are filter input values after being limited based on the limit value.

[0127] The limiting value can limit the filtered input value in a certain value range. For example, the first filtered input value corresponds to the first filter coefficient, and under the action of the limiting value, the first filtered input value can be limited in the first value range.

[0128] Exemplarily, the nonlinear adaptive loop filtering of the first reconstructed value can be represented based on the following formula:

[0129] wherein I'(x, y) represents the second reconstructed value, I(x, y) represents the first reconstructed value, I(x+i, y+j)-I(x, y) represents the filtered input value, w(i, j) represents the filter coefficient, and K(d, b)=min(b, max(-b, d)) represents a function of limiting the filter input value, wherein max(-b, d) represents the maximum value between -b and d, and min(b, max(-b, d)) represents the minimum value between b and max(-b, d). Each filtered input I(x+i, y+j)-I(x, y) under the filter window is limited in the range of -k(i, j) to k(i, j).

[0130] In step S830, if the first filter coefficient satisfies the first condition, the encoding of the first index information is skipped. The first index information here is used to indicate the limiting value of the first filtered input value.

[0131] According to the foregoing introduction, it can be known that in the related art, the index information corresponding to the limiting value of each filtered input needs to be encoded when performing the nonlinear adaptive loop filtering on the reconstructed value, and the limiting value of each filtered input value can be determined by decoding the index information at the decoding end. This results in a large overhead of the nonlinear adaptive loop filtering process.

[0132] In the embodiment of the present application, if the filter coefficient satisfies a certain condition, a part of the index value is skipped in the encoding and decoding, so as to reduce the code rate required by the adaptive loop filtering process, and further to help improve the encoding and decoding efficiency.

[0133] The nonlinear adaptive loop filtering can be understood as adjusting the first reconstructed value based on the correction value, and the correction value can be determined based on the sum of the products of multiple filter coefficients and multiple filtered input values. As shown in formula (1-5), when the value of the first filter coefficient (such as w(i, j)) is much smaller than that of other filter coefficients, the product of the first filter coefficient and the first filtered input value may have little influence on the value of the correction value. For example, if the first filter coefficient is 0, the product of the first filter coefficient and the first filtered input value is always 0, and has no influence on the value of the correction value. At this time, there is no need to limit the first filtered input value, that is, it is unnecessary to encode the index value of the limiting value of the first filtered input.

[0134] The first condition is related to the value of the first filter coefficient. In some implementations, the first condition can be that the value of the first filter coefficient is 0. In other implementations, the first condition can be that the value of the first filter coefficient is less than or equal to a first threshold. For example, the first threshold here can be a small number close to 0.

[0135] In some implementations, if the first filter coefficient does not satisfy the first condition, the first index information is still encoded.

[0136] In some implementations, before performing the non-linear adaptive loop filtering on the first reconstructed value, it can be determined whether the current reconstructed image needs to perform the non-linear adaptive loop filtering. In the case that the current reconstructed image performs the non-linear adaptive loop filtering, the first reconstructed value is subjected to the non-linear adaptive loop filtering; in the case that the current reconstructed image does not perform the non-linear adaptive loop filtering, the first reconstructed value is subjected to the linear adaptive loop filtering as shown in formula (1-2).

[0137] In some implementations, the first identification information can be written into the bitstream. The first identification information here is used to indicate whether to perform the non-linear adaptive loop filtering. In the case that the first identification information indicates to perform the non-linear adaptive loop filtering, the first reconstructed value is subjected to the non-linear adaptive loop filtering; in the case that the first identification information indicates not to perform the non-linear adaptive loop filtering, the first reconstructed value is subjected to the linear adaptive loop filtering.

[0138] In some implementations, the second identification information can be written into the bitstream. The second identification information is used to indicate the type of the first reconstructed value subjected to the adaptive loop filtering. For example, the second identification information can indicate that the reconstructed luma value is subjected to the adaptive loop filtering; or, the second identification information can indicate that the reconstructed chroma value is subjected to the adaptive loop filtering.

[0139] In the foregoing introduction, three kinds of parameter information (the first index information, the first identification information and the second identification information) used for adaptive loop filtering are mentioned. These parameter information can be syntax elements related to the coding adaptive loop filtering in the APS. For example, the first index information can be alf_luma_clip_idx or alf_chroma_clip_idx, the first identification information can be alf_luma_clip_flag or alf_chroma_clip_flag, and the second identification information can be alf_luma_filter_signal_flag or alf_chroma_filter_signal_flag.

[0140] In some implementations, the parameter information can also be syntax elements related to the coding of the ALF in the picture header or slice header.

[0141] The embodiments of the present application will be described in more detail with reference to specific examples. It should be noted that the following examples are only used to help understand the embodiments of the present application, but not to limit the embodiments of the present application to the specific values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes according to the examples given below, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0142] In the conventional nonlinear adaptive loop filtering scheme, the filtering formula on the luminance and chrominance components is as follows:

[0143] where I'(x, y) represents the second reconstruction value, I(x, y) represents the first reconstruction value, I(x+i, y+j)-I(x, y) represents the filtering input value, w(i, j) represents the filtering coefficient, and K(d, b)=min(b, max(-b, d)) represents a function of limiting the filtering input value, where max(-b, d) represents the maximum value between -b and d, and min(b, max(-b, d)) represents the minimum value between b and max(-b, d). Each filtering input I(x+i, y+j)-I(x, y) under the filtering window is limited in the range of -k(i, j) to k(i, j).

[0144] According to the analysis of formula (1-6), when the filtering coefficient w(i, j) corresponding to the position (i, j) under the filtering window is 0, no matter how the nonlinear function limits the filtering input value at this position in the range of -k(i, j) to k(i, j), the product of the input value and the filtering coefficient is always zero, which means that in the case of the filtering coefficient being 0, the method of limiting the input range and coding a nonlinear index is unnecessary.

[0145] The improvement proposed in this example is to modify the part of coding the ALF nonlinear related syntax elements in APS. The following table is an example of coding the ALF nonlinear syntax elements part.

[0146] In the above table, when the corresponding ALF coefficient of luminance or chrominance is 0, the coding of alf_luma_clip_idx[sfIdx][j] and alf_chroma_clip_idx[sfIdx][j] is skipped, and the default value is 0 (the index value of 0 represents that the input range value is not limited).

[0147] In some embodiments, the ALF related syntax elements are not necessarily coded in the APS, for example, can be coded in the picture header or slice header, in such cases, the method of conditionally skipping the coding of the non-linear index based on whether the filter coefficient is 0 is also applicable

[0148] In some embodiments, the ALF coefficients are not directly coded, in which case, a process of deriving the ALF coefficients is needed when coding the non-linear index, and then it is determined whether to skip the coding of the non-linear index based on whether the ALF coefficient is 0.

[0149] The present example adds some conditions (such as whether the filter coefficient is 0) for coding the adaptive loop non-linear index, and based on the conditions, the coding of the non-linear index can be skipped, thereby saving the code word overhead of this part, and further helping to improve the coding efficiency.

[0150] The method embodiments of the present application are described in detail above in combination with FIGS. 1 to 8, and the device embodiments of the present application are described in detail below in combination with FIGS. 9 to 12. It should be understood that the description of the method embodiments and the description of the device embodiments correspond to each other, and therefore, the parts not described in detail can be referred to the foregoing method embodiments.

[0151] FIG. 9 is a structural schematic diagram of a decoder provided by an embodiment of the present application. As shown in FIG. 9, the decoder 900 includes a determination unit 910, a filtering unit 920, and a decoding unit 930.

[0152] The determination unit 910 is configured to decode a code stream, determine a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients including a first filter coefficient, the first filter coefficient corresponding to a first filter input value;

[0153] The filtering unit 920 is configured to perform non-linear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients.

[0154] The decoding unit 930 is configured to skip decoding first index information if the first filter coefficient satisfies a first condition, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0155] In some implementations, the first condition includes that the value of the first filter coefficient is 0.

[0156] In some implementations, the decoding unit 930 is further configured to decode the first index information if the first filter coefficient does not satisfy the first condition.

[0157] In some embodiments, the decoder 900 further includes a first determining unit configured to decode the bitstream to determine first identification information, the first identification information being used to indicate whether to perform non-linear adaptive loop filtering; and the filtering unit 920 is further configured to perform non-linear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients if the first identification information indicates to perform non-linear adaptive loop filtering.

[0158] In some embodiments, the filtering unit 920 is further configured to perform linear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients if the first identification information indicates not to perform non-linear adaptive loop filtering.

[0159] In some embodiments, the decoder 900 further includes a second determining unit configured to decode the bitstream to determine second identification information, the second identification information being used to indicate a type of the first reconstructed value.

[0160] In some embodiments, the type of the first reconstructed value includes:

[0161] The first reconstructed value is a reconstructed luma value; or

[0162] The first reconstructed value is a reconstructed chroma value.

[0163] In some embodiments, the determining unit 910 is further configured to decode the bitstream to determine a first parameter; and determine the plurality of filter coefficients according to the first parameter.

[0164] In some embodiments, the first filter input value includes one or more of the following: an initial reconstructed value, a residual value, a reconstructed value before deblocking filtering, a reconstructed value after deblocking filtering, and a reconstructed value after Gaussian filtering.

[0165] In some embodiments, the first index information is carried in one of the following: an adaptive parameter set, a picture header, and a slice header.

[0166] In some embodiments, the filtering unit 920 is further configured to determine a first correction value according to the plurality of filter coefficients and a plurality of filter input values; and determine a second reconstructed value according to the first reconstructed value and the first correction value.

[0167] In some embodiments, the first correction value is determined based on a sum of products of the plurality of filter coefficients and the plurality of filter input values.

[0168] In some embodiments, the limit value is used to limit the first filter input value within a first value range.

[0169] It can be understood that, in the embodiments of the present application, the "unit" can be part of a circuit, part of a processor, part of a program or software, etc., and of course can also be a module, and can also be non-modular. Moreover, the components in the embodiments can be integrated in a processing unit, or can be physically present as individual units, 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.

[0170] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer-readable storage medium, based on this understanding, the technical solutions of the embodiments essentially or the parts that contribute to the prior art 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, includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) or processor (processor) execute all or part of the steps of the method described in the embodiments. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various storage program codes.

[0171] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the decoder 900, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the decoding method in the first embodiment.

[0172] Based on the components of the decoder 900 and the computer readable storage medium, referring to FIG. 10, a specific hardware structure schematic diagram of a decoder 1000 provided by the embodiments of the present application is shown. As shown in FIG. 10, the decoder 1000 can include a communication interface 1010, a memory 1020 and a processor 1030; each component is coupled together through a bus system 1040. It can be understood that the bus system 1040 is used to realize the connection communication between the components. The bus system 1040 includes not only a data bus, but also a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system 1040 in FIG. 10. Among them,

[0173] The communication interface 1010 is used for receiving and sending signals in the process of transceiving information with other external network elements.

[0174] The memory 1020 is used for storing a computer program.

[0175] The processor 1030 is configured to, when the computer program is run:

[0176] decode the bitstream to determine a plurality of filter coefficients of the first reconstructed value, the plurality of filter coefficients comprising a first filter coefficient, the first filter coefficient corresponding to a first filter input value;

[0177] perform a non-linear in-loop filtering on the first reconstructed value according to the plurality of filter coefficients;

[0178] if the first filter coefficient satisfies a first condition, skip decoding first index information, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0179] It can be understood that the memory 1020 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. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example, but not by way of limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 1020 of the system and method described in the present application is intended to include, but not limited to, these and any other suitable types of memory.

[0180] The processor 1030 can be an integrated circuit chip power on the signal. In the implementation process, each step of the above method can be completed by the integrated logic circuit or the instruction in the form of software in the processor 1030. The processor 1030 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams 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 to execute, or a combination of hardware and software modules in the code processor to execute. The software module can be located in the random access memory, the flash memory, the read only memory, the programmable read only memory or the electrically erasable programmable memory, the register or other mature storage medium in the art. The storage medium is located in the memory 1020, and the processor 1030 reads the information in the memory 1020, and combines the hardware to complete the steps of the above method.

[0181] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or 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 the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.

[0182] Optionally, as another embodiment, the processor 1030 is further configured to execute the decoding method described in the foregoing embodiments when running the computer program.

[0183] FIG. 11 is a schematic diagram of a structure of an encoder according to an embodiment of the present application. As shown in FIG. 11, the encoder 1100 includes a determining unit 1110, a filtering unit 1120, and an encoding unit 1130.

[0184] The determining unit 1110 is configured to determine a plurality of filter coefficients of a first reconstructed value, the plurality of filter coefficients including a first filter coefficient, the first filter coefficient corresponding to a first filter input value.

[0185] The filtering unit 1120 is configured to perform nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients.

[0186] The encoding unit 1130 is configured to skip encoding first index information if the first filter coefficient satisfies a first condition, the first index information being used to indicate a limited value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0187] In some embodiments, the first condition includes that the value of the first filter coefficient is 0.

[0188] In some embodiments, the encoding unit 1130 is further configured to encode the first index information if the first filter coefficient does not satisfy the first condition.

[0189] In some embodiments, the encoder 1100 further includes a first determining unit configured to determine whether to perform nonlinear adaptive loop filtering, and the filtering unit 1120 is further configured to perform nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients if it is determined to perform nonlinear adaptive loop filtering.

[0190] In some embodiments, the filtering unit 1120 is further configured to perform linear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients if it is determined not to perform nonlinear adaptive loop filtering.

[0191] In some embodiments, the encoder 1100 further includes a first writing unit configured to write first identification information into a bitstream, the first identification information being used to indicate whether to perform nonlinear adaptive loop filtering.

[0192] In some embodiments, the encoder 1100 further includes a second writing unit configured to write second identification information into the bitstream, the second identification information being used to indicate a type of the first reconstructed value.

[0193] In some embodiments, the type of the first reconstructed value includes:

[0194] The first reconstructed value is a reconstructed luma value; or

[0195] The first reconstructed value is a reconstructed chroma value.

[0196] In some embodiments, the encoder 1100 further includes a second determining unit and a third writing unit, the second determining unit is configured to determine a first parameter according to the plurality of filter coefficients; and the third writing unit is configured to write the first parameter into the bitstream.

[0197] In some embodiments, the first filter input value includes one or more of the following:

[0198] The initial reconstructed value, the residual value, the reconstructed value before the deblocking filtering, the reconstructed value after the deblocking filtering, and the reconstructed value after the Gaussian filtering.

[0199] In some embodiments, the first index information is carried in one of the following: an adaptive parameter set, a picture header, and a slice header.

[0200] In some embodiments, the filtering unit 1120 is further configured to determine a first correction value according to the plurality of filter coefficients and the plurality of filter input values; and determine a second reconstructed value according to the first reconstructed value and the first correction value.

[0201] In some embodiments, the first correction value is determined based on a sum of products of the plurality of filter coefficients and the plurality of filter input values.

[0202] In some embodiments, the limit value is used to limit the first filter input value in a first value range.

[0203] 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 be a module, and can also be non-modular. Moreover, each component in the embodiments can be integrated in a processing unit, or each unit can exist physically independently, 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 functional module.

[0204] 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 parts that contribute to the prior art 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 plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to 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.

[0205] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the encoder 1100, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the decoding method in the first embodiment.

[0206] Based on the composition of the encoder 1100 and the computer readable storage medium, referring to FIG. 12, a specific hardware structure schematic diagram of an encoder 1200 provided by the embodiments of the present application is shown. As shown in FIG. 12, the encoder 1200 can include a communication interface 1210, a memory 1220 and a processor 1230; each component is coupled together through a bus system 1240. It can be understood that the bus system 1240 is used to realize the connection communication between the components. The bus system 1240 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 bus system 1240 in FIG. 12. Among them,

[0207] The communication interface 1210 is used for receiving and sending signals in the process of transceiving information with other external network elements.

[0208] The memory 1220 is used for storing a computer program.

[0209] The processor 1230 is used for executing the following steps when running the computer program:

[0210] determining a plurality of filter coefficients of the first reconstructed value, the plurality of filter coefficients including a first filter coefficient, the first filter coefficient corresponding to a first filter input value;

[0211] performing nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients;

[0212] If the first filter coefficient satisfies a first condition, encoding of first index information is skipped, the first index information being used to indicate a limit value of the first filter input value, the first condition being related to a value of the first filter coefficient.

[0213] It can be appreciated that the memory 1220 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 memory. Among them, the non-volatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The memory 1220 of the system and method described in the present application is intended to include but not limited to these and any other suitable types of memory.

[0214] The processor 1230 can be an integrated circuit chip power on the signal. In the implementation process, each step of the above method can be completed by the integrated logic circuit or the instruction in the form of software in the processor 1230. The processor 1230 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams 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 to execute, or a combination of hardware and software modules in the code processor to execute. 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, and other mature storage media in the art. The storage medium is located in the memory 1220, and the processor 1230 reads the information in the memory 1220, and combines the hardware to complete the steps of the above method.

[0215] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or 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 the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.

[0216] Optionally, as another embodiment, the processor 1230 is further configured to execute the encoding method described in the foregoing embodiments when running the computer program.

[0217] It should be noted that, in the present application, the terms "comprising", "containing" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

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

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

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

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

[0222] The above is only 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.

Claims

1. A decoding method applied to a decoder, the method comprising: Decode the bitstream and determine multiple filtering coefficients for the first reconstructed value, wherein the multiple filtering coefficients include a first filtering coefficient, and the first filtering coefficient corresponds to a first filtered input value; The first reconstructed value is subjected to nonlinear adaptive loop filtering based on the plurality of filtering coefficients; If the first filter coefficient satisfies the first condition, then the decoding of the first index information is skipped. The first index information is used to indicate the limit value of the first filter input value. The first condition is related to the value of the first filter coefficient.

2. The method according to claim 1, wherein, The first condition includes: The first filter coefficient is set to 0.

3. The method according to claim 1 or 2, wherein, The method further includes: If the first filter coefficient does not meet the first condition, then decode the first index information.

4. The method according to any one of claims 1 to 3, wherein, Before performing nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients, the method further includes: Decode the bitstream and determine the first identification information, which is used to indicate whether to perform nonlinear adaptive loop filtering; The step of performing nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients includes: If the first identification information indicates that nonlinear adaptive loop filtering is to be performed, then the first reconstructed value is subjected to nonlinear adaptive loop filtering based on the plurality of filtering coefficients.

5. The method according to claim 4, wherein, The method further includes: If the first identification information indicates that nonlinear adaptive loop filtering is not performed, then linear adaptive loop filtering is performed on the first reconstructed value according to the plurality of filtering coefficients.

6. The method according to any one of claims 1 to 5, wherein, The method further includes: Decode the bitstream and determine the second identification information, which is used to indicate the type of the first reconstructed value; The types of the first reconstructed value include: The first reconstructed value is the reconstructed brightness value; or, The first reconstructed value is the reconstructed chromaticity value.

7. The method according to claim 1, wherein, The plurality of filter coefficients used to determine the first reconstructed value include: Decode the bitstream and determine the first parameter; The plurality of filtering coefficients are determined based on the first parameter.

8. The method according to claim 1, wherein, The first filtered input value includes one or more of the following: Initial reconstructed value, residual value, reconstructed value before deblocking filter, reconstructed value after deblocking filter, and reconstructed value after Gaussian filtering.

9. The method according to claim 1, wherein, The first index information is carried in one of the following ways: Adaptive parameter set, image header, and title sequence.

10. The method according to claim 1, wherein, The step of performing nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients includes: Based on the plurality of filter coefficients and the plurality of filter input values, a first correction value is determined; The second reconstruction value is determined based on the first reconstruction value and the first correction value.

11. The method according to claim 10, wherein, The first correction value is determined based on the sum of the products of the plurality of filter coefficients and the plurality of filter input values.

12. The method according to any one of claims 1 to 11, wherein, The limiting value is used to restrict the first filtered input value to a first value range.

13. An encoding method applied to an encoder, the method comprising: Determine multiple filtering coefficients for the first reconstructed value, the multiple filtering coefficients including the first filtering coefficient, the first filtering coefficient corresponding to the first filtered input value; The first reconstructed value is subjected to nonlinear adaptive loop filtering based on the plurality of filtering coefficients; If the first filter coefficient satisfies the first condition, the encoding of the first index information is skipped. The first index information is used to indicate the limit value of the first filter input value. The first condition is related to the value of the first filter coefficient.

14. The method according to claim 13, wherein, The first condition includes: The first filter coefficient is set to 0.

15. The method according to claim 13 or 14, wherein, The method further includes: If the first filter coefficient does not meet the first condition, then the first index information is encoded.

16. The method according to any one of claims 13 to 15, wherein before performing nonlinear adaptive loop filtering on the first reconstructed value according to the plurality of filter coefficients, the method further comprises: Determine whether to perform nonlinear adaptive loop filtering; The step of performing nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients includes: If it is determined that nonlinear adaptive loop filtering is to be performed, then the first reconstructed value is subjected to nonlinear adaptive loop filtering based on the plurality of filtering coefficients.

17. The method of claim 16, wherein: If it is determined that nonlinear adaptive loop filtering should not be performed, then linear adaptive loop filtering is performed on the first reconstructed value based on the plurality of filtering coefficients.

18. The method according to claim 16 or 17, wherein, The method further includes: The first identification information is written into the bitstream, and the first identification information is used to indicate whether nonlinear adaptive loop filtering is performed.

19. The method according to any one of claims 13 to 18, wherein, The method further includes: The second identification information is written into the bitstream, and the second identification information is used to indicate the type of the first reconstructed value; The types of the first reconstructed value include: The first reconstructed value is the reconstructed brightness value; or, The first reconstructed value is the reconstructed chromaticity value.

20. The method according to claim 13, wherein, The method further includes: The first parameter is determined based on the plurality of filter coefficients; Write the first parameter into the bitstream.

21. The method according to claim 13, wherein, The first filtered input value includes one or more of the following: Initial reconstructed value, residual value, reconstructed value before deblocking filter, reconstructed value after deblocking filter, and reconstructed value after Gaussian filtering.

22. The method according to claim 13, wherein, The first index information is carried in one of the following ways: Adaptive parameter set, image header, and title sequence.

23. The method according to claim 13, wherein, The step of performing nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients includes: Based on the plurality of filter coefficients and the plurality of filter input values, a first correction value is determined; The second reconstruction value is determined based on the first reconstruction value and the first correction value.

24. The method according to claim 23, wherein, The first correction value is determined based on the sum of the products of the plurality of filter coefficients and the plurality of filter input values.

25. The method according to any one of claims 13 to 24, wherein, The limiting value is used to restrict the first filtered input value to a first value range.

26. A decoder, comprising: The determining unit is configured to decode the bitstream and determine multiple filtering coefficients of the first reconstructed value, wherein the multiple filtering coefficients include a first filtering coefficient, and the first filtering coefficient corresponds to a first filtered input value. The filtering unit is configured to perform nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients; The decoding unit is configured to skip decoding the first index information if the first filter coefficient satisfies a first condition. The first index information is used to indicate the limit value of the first filter input value, and the first condition is related to the value of the first filter coefficient.

27. A decoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 1 to 12 when running the computer program.

28. An encoder, comprising: The determining unit is configured to determine a plurality of filter coefficients for a first reconstructed value, wherein the plurality of filter coefficients includes a first filter coefficient, and the first filter coefficient corresponds to a first filter input value. The filtering unit is configured to perform nonlinear adaptive loop filtering on the first reconstructed value based on the plurality of filtering coefficients; The encoding unit is configured to skip encoding first index information if the first filter coefficient satisfies a first condition. The first index information is used to indicate the limit value of the first filter input value, and the first condition is related to the value of the first filter coefficient.

29. An encoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 13 to 25 when running the computer program.

30. A non-volatile computer-readable storage medium for storing a bitstream, said bitstream being generated by an encoding method using an encoder, or said bitstream being decoded by a decoding method using a decoder, wherein, The decoding method is the method as described in any one of claims 1 to 12, and the encoding method is the method as described in any one of claims 13 to 25.

31. A bitstream comprising a bitstream generated by the method as described in any one of claims 13 to 25.

32. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 12, or 13 to 25.

Citation Information

Patent Citations

  • Adaptive loop filtering (ALF) with non-linear clipping

    CN113228646A

  • Adaptive loop filter set index signaling

    CN113728650A

  • Method and apparatus for non-linear loop filtering

    CN113748678A

  • Signaling of transform skip mode

    CN114270838A

  • Filter coefficient setting device, filter coefficient setting method, and image encoder

    JP2012065120A