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

By referencing the already encoded and decoded filter coefficients to determine the filter coefficients to be encoded and decoded, the problem of large codeword overhead in time-domain adaptive loop filtering technology is solved, thus improving encoding and decoding efficiency.

WO2026085787A1PCT designated stage Publication Date: 2026-04-30GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

In multi-functional video coding, the encoding and decoding of filter coefficients in temporal adaptive loop filtering technology suffers from large codeword overhead, resulting in low encoding and decoding efficiency.

Method used

By referencing the already encoded and decoded filter coefficients, the filter coefficients to be encoded and decoded are determined, and a new method for determining filter coefficients is adopted, reducing the codeword overhead in the encoding and decoding process.

Benefits of technology

It effectively reduces codeword overhead and improves encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024126883_30042026_PF_FP_ABST
    Figure CN2024126883_30042026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are an encoding method and a decoding method. The decoding method comprises: decoding a bitstream, so as to determine reference identification information; when it is determined, on the basis of the reference identification information, that parsed coefficients are to be referenced, decoding the bitstream, so as to determine a coefficient residual corresponding to a first coefficient, wherein the first coefficient is a filter coefficient to be parsed of a first filter currently being parsed; and on the basis of the coefficient residual, which corresponds to the first coefficient, and reference coefficients, determining a parsed first coefficient, wherein the reference coefficients comprise parsed filter coefficients of a second filter and / or a second coefficient, and the second coefficient is a parsed filter coefficient of the first filter.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding / decoding methods, bitstreams, encoders, decoders, and storage media Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. Background Technology

[0002] In Versatile Video Coding (VVC), in order to improve filtering performance, the Time Adaptive Loop Filter (TALF) scheme has been proposed. TALF is an adaptive loop filtering technique that uses an image that has been reconstructed in the temporal or spatial domain as an information source to improve the reconstructed pixels at the current position in the current image.

[0003] In common techniques, filter coefficients used for filtering can be transmitted via a bitstream. However, encoding and decoding a large number of filter coefficients results in high codeword overhead, reducing encoding and decoding efficiency.

[0004] Summary of the Invention

[0005] This application provides an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium, which can effectively reduce codeword overhead and improve encoding / decoding efficiency.

[0006] The technical solution of this application embodiment can be implemented as follows:

[0007] In a first aspect, embodiments of this application provide a decoding method applied to a decoder, the method comprising:

[0008] Decode the bitstream and determine the reference identifier information;

[0009] If the reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded to determine the coefficient residual corresponding to the first coefficient; wherein, the first coefficient is the filter coefficient to be parsed of the first filter currently being parsed;

[0010] Based on the coefficient residuals and reference coefficients corresponding to the first coefficients, the analyzed first coefficients are determined; wherein, the reference coefficients include the analyzed filter coefficients of the second filter and / or the second coefficients, and the second coefficients are the analyzed filter coefficients of the first filter.

[0011] Secondly, embodiments of this application provide an encoding method applied to an encoder, the method comprising:

[0012] If the reference encoded coefficients are determined, reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream;

[0013] The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bit stream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the second filter that has been encoded and / or the second coefficient, wherein the second coefficient is the encoded filter coefficient of the first filter.

[0014] Thirdly, embodiments of this application provide a bitstream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least: reference identification information, residual value, residual symbol, and first coefficient.

[0015] Fourthly, embodiments of this application provide an encoder, the encoder including a first determining portion; wherein,

[0016] In the first determining part, when the configuration is set to determine the reference encoded coefficients, a reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream; the coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bitstream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the encoded second filter and / or the second coefficient, the second coefficient being the encoded filter coefficient of the first filter.

[0017] Fifthly, embodiments of this application provide an encoder, which includes a first memory and a first processor; wherein,

[0018] A first memory for storing computer programs that can run on a first processor;

[0019] A first processor is configured to execute the encoding method described above when running the computer program.

[0020] Sixthly, embodiments of this application provide a decoder, which includes a second determining portion; wherein,

[0021] The second determining part is configured to decode the bitstream and determine reference identification information; when a reference parsed coefficient is determined based on the reference identification information, the bitstream is decoded to determine the coefficient residual corresponding to the first coefficient; wherein, the first coefficient is the filter coefficient to be parsed of the currently parsed first filter; based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined; wherein, the reference coefficient includes the parsed filter coefficient of the second filter and / or the second coefficient, the second coefficient being the parsed filter coefficient of the first filter.

[0022] In a seventh aspect, embodiments of this application provide a decoder, which includes a second memory and a second processor; wherein,

[0023] The second memory is used to store computer programs that can run on the second processor;

[0024] The second processor is used to execute the decoding method described above when running the computer program.

[0025] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed, implements the decoding method as described in the first aspect or the encoding method as described in the second aspect.

[0026] In a ninth aspect, embodiments of this application provide a computer-readable storage medium for storing a bitstream generated by the encoding method described in the first aspect.

[0027] This application provides an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the decoding end, the bitstream is decoded to determine reference identification information. If reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded again to determine the coefficient residual corresponding to a first coefficient. The first coefficient is the filter coefficient to be parsed for the currently parsed first filter. Based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined. The reference coefficient includes the filter coefficients of the parsed second filter and / or a second coefficient, where the second coefficient is the parsed filter coefficient of the first filter. At the encoding end, if reference encoded coefficients are determined, reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream. The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bitstream. The first coefficient is the filter coefficient to be encoded for the currently encoded first filter. The reference coefficient includes the filter coefficients of the encoded second filter and / or a second coefficient, where the second coefficient is the encoded filter coefficient of the first filter. Therefore, the embodiments of this application propose a new method for determining filter coefficients, namely, determining the filter coefficients to be encoded and decoded by referring to the already encoded and decoded filter coefficients. In this case, it is possible to choose to refer to the already encoded and decoded filter coefficients of different filters, or to choose to refer to the already encoded and decoded coefficients of the same filter currently being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency. Attached Figure Description

[0028] Figure 1 is a schematic diagram of the application of a coding framework provided by related technologies;

[0029] Figure 2 is a schematic diagram of the filter proposed in an embodiment of this application;

[0030] Figure 3 is a schematic diagram of the filter proposed in the embodiment of this application;

[0031] Figure 4 is a system block diagram of an encoder provided in an embodiment of this application;

[0032] Figure 5 is a system block diagram of a decoder provided in an embodiment of this application;

[0033] Figure 6 is a schematic diagram of the decoding method proposed in the embodiments of this application;

[0034] Figure 7 is a schematic diagram of the encoding method proposed in the embodiments of this application;

[0035] Figure 8 is a schematic diagram of the encoder structure proposed in the embodiment of this application;

[0036] Figure 9 is a schematic diagram of the specific hardware structure of the encoder proposed in the embodiment of this application;

[0037] Figure 10 is a schematic diagram of the composition structure of the decoder proposed in the embodiment of this application;

[0038] Figure 11 is a schematic diagram of the specific hardware structure of the decoder proposed in the embodiment of this application;

[0039] Figure 12 is a schematic diagram of the composition structure of the encoding and decoding system proposed in the embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0041] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0042] Digital video compression technology primarily compresses massive amounts of digital video data to facilitate transmission and storage. With the surge in internet video and increasing demands for video clarity, while existing digital video compression standards can save considerable video data, there is still a need to pursue better digital video compression technologies to reduce the bandwidth and traffic burden of digital video transmission.

[0043] In digital video encoding, the encoder reads unequal samples from the original video sequence in different color formats, including luminance and chrominance components; that is, the encoder reads a black-and-white or color image. This data is then divided into blocks, and the block data is passed to the encoder for encoding.

[0044] Common video codec standards all employ a block-based hybrid coding framework. Each frame of a video image is divided into squares of equal size (e.g., 128×128, 64×64, etc.) called Largest Coding Units (LCUs) or Coding Tree Units (CTUs). Each LCU or CTU can be further divided into rectangular Coding Units (CUs) according to rules. Moreover, Coding Units may be further divided into smaller Prediction Units (PUs), Transform Units (TUs), etc.

[0045] Figure 1 is a schematic diagram of an application of a coding framework provided by related technologies. As shown in Figure 1, the hybrid coding framework may include a prediction module 11, a transform and quantization module 12, an entropy coding module 13, an inverse quantization and inverse transform module 14, a loop filtering module 15, and a decoding image buffer module 16. The prediction module 11 may include an intra-frame prediction module 11a and an inter-frame prediction module 11b. The inter-frame prediction module 11b may include a motion estimation module and a motion compensation module. Since there is a strong correlation between adjacent samples within a video image frame, using intra-frame prediction in video coding and decoding technology can eliminate spatial redundancy between adjacent samples. However, since there is also a strong similarity between adjacent frames in a video image, using inter-frame prediction in video coding and decoding technology can eliminate temporal redundancy between adjacent frames, thereby improving coding and decoding efficiency. The basic workflow of a video codec is as follows: At the encoding end, a frame is divided into blocks. Intra-frame prediction or inter-frame prediction is used on the coded blocks to generate prediction blocks. The original block of the coded block is subtracted from the prediction block to obtain a residual block. The residual block is transformed and quantized to obtain a quantization coefficient matrix. The quantization coefficient matrix is ​​entropy-encoded and output to the bitstream. At the decoding end, intra-frame prediction or inter-frame prediction is used on the coded blocks to generate prediction blocks. On the other hand, the bitstream is decoded to obtain a quantization coefficient matrix. The quantization coefficient matrix is ​​inverse-quantized and inverse-transformed to obtain a residual block. The prediction block and the residual block are added to obtain the reconstructed value. The reconstructed value forms the reconstructed image. Loop filtering is performed on the reconstructed image based on the image or based on the blocks to obtain the decoded image. The encoding end also needs similar operations to the decoding end to obtain the decoded image. The decoded image can be used as a reference frame for inter-frame prediction in subsequent frames. The block division information, prediction, transformation, quantization, entropy coding, loop filtering, and other mode information or parameter information determined at the encoding end need to be output to the bitstream if necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, loop filtering, and other mode or parameter information as the encoding end by parsing and analyzing existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as that obtained by the decoding end. The decoded image obtained by the encoding end is usually also called the reconstructed image. During prediction, the coded block can be divided into prediction units, and during transform, the coded block can be divided into transform units. The division of prediction units and transform units can be different. The above is the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. The embodiments of this application are applicable to the basic flow of a video codec under this block-based hybrid coding framework, but are not limited to this framework and flow.

[0046] Understandably, intra-frame prediction only references information from the same frame to predict sample information within the current block, thus eliminating spatial redundancy; inter-frame prediction can reference image information from different frames, using motion estimation to search for the motion vector information that best matches the current block, thus eliminating temporal redundancy; transform converts the predicted image block to the frequency domain, redistributing energy, and combined with quantization, removes information that is not sensitive to the human eye, thus eliminating visual redundancy; entropy coding can eliminate character redundancy based on the current context model and the probability information of the binary code stream; loop filtering mainly processes the samples after inverse transform and inverse quantization to compensate for distorted information and provide a better reference for subsequent encoded samples.

[0047] Loop filtering is prevalent in existing video coding standards, significantly improving the subjective and objective quality of reconstructed video. In VVC, loop filtering includes a deblocking filter (DBF), sample adaptive offset (SAO), adaptive loop filter (ALF), and cross component adaptive loop filter (CCALF). In the latest JVET Legacy Video Coding Exploration Platform Reference Software Test Model (ECM), loop filtering further includes cross component sample adaptive offset (CCSAO) and bilateral filter (BIF).

[0048] The principle of adaptive loop filtering and cross-component adaptive loop filtering is to calculate one or more sets of filter coefficients based on the relationship between the reconstructed values ​​and the original sample values. The filter coefficients are transmitted through the bitstream. After the decoder obtains the filter coefficients, it can construct a filter and use the filter to filter the reconstructed image, making the reconstructed image closer to the original image after filtering.

[0049] Adaptive Loop Filtering in the Temporal Domain (TALF) is an adaptive loop filtering technique that uses an image that has been reconstructed in the temporal or spatial domain as an information source to improve the reconstructed pixels at the current position in the current image.

[0050] I. Unidirectional Filtering and Bidirectional Time-Domain Adaptive Loop Filtering

[0051] In time-domain adaptive loop filtering, filters are divided into unidirectional and bidirectional filters, which can be further subdivided into the following six types (assuming the current position is (x, y) in the current image).

[0052] 1. Use the (x, y) of the nearest reference image in the time domain of the current image and its corresponding reconstructed values ​​as the filter input to perform unidirectional filtering;

[0053] 2. Use the (x, y) values ​​of the second nearest reference image in the temporal domain of the current image and the corresponding reconstructed values ​​of its surroundings as the filter input to perform unidirectional filtering; (in bidirectional prediction images, there may be a second nearest reference image whose temporal distance is the same as the nearest reference image).

[0054] 3. Use the (x, y) values ​​of the nearest and second nearest reference images in the time domain of the current image and their corresponding reconstructed values ​​as filter inputs to perform bidirectional filtering;

[0055] 4. When the current position (x, y) belongs to the inter-frame prediction block and there is an Mv0 pointing to the reference image list 0 in the motion buffer, use Mv0 and (x, y) to find the reference position (x', y'), and use the (x', y') of the reference image pointed to by Mv0 and the corresponding reconstruction value of its surrounding area as the filter input to perform one-way filtering.

[0056] 5. When the current position (x, y) belongs to the inter-frame prediction block and there is an Mv1 pointing to the reference image list 1 in the motion buffer, use Mv1 and (x, y) to find the reference position (x', y'), and use the (x', y') of the reference image pointed to by Mv1 and the corresponding reconstruction value of its surrounding area as the filter input to perform one-way filtering.

[0057] 6. When the current position (x, y) belongs to the inter-frame prediction block, and there are Mv0 pointing to reference image list 0 and Mv1 pointing to reference image list 1 in the motion buffer, use Mv0 and (x, y) to find the reference position (x', y'), use Mv1 and (x, y) to find the reference position (x”, y”), and use the reconstructed values ​​of (x', y') of the reference image pointed to by Mv0 and its surrounding area and the reconstructed values ​​of (x”, y”) of the reference image pointed to by Mv1 and its surrounding area as filter inputs to perform bidirectional filtering.

[0058] In some embodiments, in addition to using Mv to guide the offset to find the filter input in the reconstructed image, Bv can also be used to guide the offset to find the filter input in the current image.

[0059] Figure 2 is a schematic diagram of the filter proposed in an embodiment of this application. As shown in Figure 2, a 5x5 symmetrical filter contains 7 filter coefficients. Bidirectional filtering uses two filters as shown in Figure 1 for filtering.

[0060] Figure 3 is a schematic diagram of the filter proposed in an embodiment of this application. As shown in Figure 3, a 7x7 symmetrical filter contains 13 filter coefficients. The filter in Figure 3 is used for unidirectional filtering.

[0061] The time-domain adaptive loop filter further includes the reuse of historical filters, adaptive accuracy of filter coefficients, and nonlinear truncation of the filter.

[0062] II. Time-Domain Adaptive Loop Filter for Reusing Historical Decoding

[0063] Adaptive loop filter (ALF), cross component adaptive loop filter (CCALF), and cross component sample adaptive offset (CCSAO) all employ techniques to reuse already decoded filters on the current image. This saves on the extra codeword overhead of encoding and decoding new filter coefficients. In ALF and CCALF, filter-related syntax elements are encoded and decoded in the APS (Adaptive Preset Filter). If the current image reuses a historical filter, an index in the APS is encoded and decoded to indicate which APS filter is being reused. In CCSAO, the reused filter information is indicated by the syntax elements in the header. Historical CCSAO filters are recorded using a FIFO of length N, and a header index is encoded and decoded to indicate which of the N historical filters is being reused.

[0064] Similar to these, TALF also introduces adaptive loop filters that reuse history. One implementation method is to store and update the FIFO used to store historical filters on a slice-by-slice basis. The current slice determines whether it uses temporal adaptive filtering by parsing the slice-level control identifier. If the current slice uses it, an identifier is further parsed to indicate whether the historical temporal adaptive loop filter is reused. If it is not reused, the current image's filter and its coefficients are further parsed and used to update the FIFO; otherwise, a reuse index is parsed to indicate which set of filters in the FIFO is reused. The method for updating the FIFO is to shift each element in the FIFO one position to the right and store one or more sets of filters parsed from the current slice at the beginning of the FIFO; if the number of elements in the FIFO reaches the maximum FIFO length, the last element of the FIFO is removed first, and then the elements are shifted and the filters are stored.

[0065] Third, in ALF, when the nonlinear ALF mode is set to 1, ALF uses nonlinear filtering, and each input value of the filter is limited to a specified range. This design also exists in TALF.

[0066] The following example does not use a non-linear TALF:

[0067] For unidirectional filtering in the Random Access (RA) configuration, or a 7x7 symmetric 13-tap filter using a reconstructed value from a reconstructed image as input in the Low Delay (LD) configuration, the filtering formula is:

[0068] Among them, rec (x,y) rec′ represents the reconstructed value of the current image at coordinates (x, y) before inputting TALF. (x,y) c represents the reconstructed value of the current image at coordinates (x, y) after TALF filtering. i The filter coefficients represent the filter parameters. and It is in the inter-frame reference image (xu) i ,yu i ) and (x+u i y+ui ) Reconstructed sample values.

[0069] For bidirectional filtering in RA, or two 5x5 symmetrical 14-tap filters using reconstructed values ​​from two reconstructed images as input in LD, the filtering formula is:

[0070] (2)

[0071] A formula K(a, b) that restricts the range of values ​​can be defined as follows, where b is an integer greater than or equal to zero.

[0072] K(a,b)=min(b,max(-b,a)) (3)

[0073] Where min(i,j) is the smaller of i and j, and max(i,j) is the larger of i and j.

[0074] When using nonlinear time-domain adaptive loop filtering, for unidirectional filtering in RA, or a 7x7 symmetric 13-tap filter using a reconstructed image as input in LD, the filtering formula is:

[0075] Among them, b i Represents the corresponding c i The filter coefficient positions are used to limit the range of filter inputs, and in this scheme, they are determined by the syntax elements used for encoding and decoding in the bitstream.

[0076] For bidirectional filtering in RA, or two 5x5 symmetrical 14-tap filters using reconstructed values ​​from two reconstructed images as input in LD, the filtering formula is:

[0077] IV. Adaptive Accuracy of Time-Domain Loop Filters

[0078] Assuming the time-domain loop filter is defined as shown in formulas (1) and (2), the filter coefficients c should ideally be floating-point numbers. However, considering the issues of coefficient representation and hardware implementation, actual ALF, CCALF, TALF, etc., should use integer precision coefficients. Furthermore, actual filtering should involve biasing and shifting operations. When the range of integer coefficient values ​​is large, more codewords are needed to represent the coefficients, and the reconstructed image after filtering is closer to the original image with less distortion. When the range of integer coefficient values ​​is small, fewer codewords are needed to represent the coefficients, but the reconstructed image after filtering differs significantly from the original image, resulting in greater distortion. The process of obtaining better compression efficiency is the process of obtaining the best balance between codewords and distortion. Therefore, the time-domain loop filter needs a precision that can achieve optimal rate-distortion. This precision affects the number of codewords consumed by encoding and decoding, and also affects the quality of the reconstructed image.

[0079] Below is an example of a TALF filtering process. For instance, when using two reconstructed images as input in RA or LD, the filter value is calculated as follows:

[0080] A variable shift value can be used because a large shift value results in a wide range of filter coefficients, better filtering, and more codewords; a small shift value results in a narrow range of filter coefficients, poorer filtering, and fewer codewords. Transmitting a variable shift value through the bitstream makes the filter coefficients more adaptive. The transmitted shift value can be one for each temporal filter, one for each frame, or one for each sequence.

[0081] In related technologies, the absolute value of each filter coefficient is represented using 0th-order exponential Golomb code when encoding and decoding. Due to the introduction of a variable shift value, the range of coefficient values ​​is wider when the shift is larger. Using 0th-order Golomb code cannot minimize the number of codewords used when encoding and decoding coefficients. Therefore, a variable-order Golomb code can be introduced to encode and decode each coefficient. For example, each filter can choose an optimal order from 0, 1, ... N, and the order is transmitted to each filter through the bitstream, allowing the coefficient encoding of each filter to use the optimal exponential Golomb order. Besides transmitting an order per filter, some embodiments can also transmit the order on a per-image, per-sequence basis, meaning that the time-domain filter coefficients encoded and decoded in an image use the same order of exponential Golomb code, or the same sequence uses the same order of exponential Golomb code.

[0082] V. Implementation Methods of TALF

[0083] The decoder parses the bitstream to obtain the current image's filtering mode, number of filters, filter coefficients, whether each CTU uses TALF filtering, and which set of filters to use.

[0084] After ALF filtering, the CTUs selected by ALF in the current image are filtered using the corresponding filter.

[0085] Referring to the decoding practices specified in the VVC standard text, the time-domain adaptive loop filtering implemented in this scheme should include the following parts:

[0086] (a) Parsing sequence-level syntax elements

[0087] The sequence flag `sps_talf_enabled_flag` indicates whether the current sequence can use TALF. When this syntax element is not present in the bitstream, its value is inferred to be 0. A value of 1 indicates that the current sequence can use TALF, while a value of 0 indicates that TALF cannot be used.

[0088] (b) Parsing fragment-level syntax elements

[0089] The `sh_talf_enabled_flag` syntax element is the TALF enable flag in the slice header. When this syntax element is not present in the bitstream, its value is inferred to be 0. A value of 1 indicates that TALF can be used in the current slice, while a value of 0 indicates that TALF cannot be used.

[0090] The talf_filter_mode syntax element is a syntax element that indicates which TALF mode the current chip uses. The values ​​0 to 5 indicate which of the six filtering modes (one-way and two-way filtering) the current chip uses.

[0091] The `talf_num_filters_signalled_minus1` syntax element indicates the number of TALF filters in the current slice minus one. In this scheme, since a slice can have a maximum of 8 TALF filters, the value of `talf_num_filters_signalled_minus1` can be 0, 1, 2, ..., or 7. A value of 0 indicates that the current slice has one TALF filter; 1 indicates that the current slice has two TALF filters; 2 indicates that the current slice has three TALF filters; 3 indicates that the current slice has four TALF filters, and so on. When this syntax element is not present in the bitstream, its value is 0.

[0092] The variable numCoeff represents the number of filter coefficients in the filter. In this scheme, the filters used for the forward and backward directions in the RA configuration and the most recent first and second frames in the LD configuration are symmetrical 7x7 filters with 13 coefficients. Therefore, numCoeff is equal to 13 in the corresponding cases (i.e., talf_filter_mode is 0 or 1). For the bidirectional filtering in the RA configuration and the filters used for the two most recent images in the LD configuration, the filters are two 5x5 filters with 7 coefficients each, for a total of 14 coefficients. Therefore, numCoeff is equal to 14 in the corresponding cases (i.e., talf_filter_mode is 2).

[0093] The `talf_coeff_abs[sfIdx][j]` syntax element indicates the absolute value of the j-th coefficient of the sfIdx-th filter group, represented using K-order exponential Golomb code where K is 0. Its value is 0 when this syntax element is not present in the bitstream.

[0094] The `talf_coeff_sign[sfIdx][j]` syntax element indicates the sign of the j-th coefficient of the sfIdx-th filter group. A value of 1 indicates a negative coefficient, and a value of 0 indicates a positive coefficient. Its value is 0 when this syntax element is not present in the bitstream.

[0095] The FIFO of the historical time-domain filter needs to be cleared when at least one of the following three conditions is true, as shown in the table above.

[0096] The tAlfParamPool.clear() operation clears the FIFO of the history time-domain filter.

[0097] The `talf_reuse_flag` syntax element indicates whether the historical time-domain loop filter is reused during the current slice encoding / decoding. A value of 1 indicates reuse of the historical time-domain loop filter, while a value of 0 indicates non-reuse. When this flag is not present in the bitstream, its value is 0.

[0098] The `talf_reuse_index` syntax element represents the index of the historical time-domain loop filter FIFO used in the current slice multiplexing. Since the maximum FIFO length used in this scheme is 8, the index value can be 0, 1, 2, 3, 4, 5, 6, or 7, represented using a fixed-length code of 3 bins. When this syntax element is not present in the bitstream, its value is 0.

[0099] If the current chip does not reuse the historical time-domain adaptive loop filter, and the current chip uses time-domain loop filtering technology, then the FIFO of the historical time-domain loop filter needs to be updated based on the new filter obtained from the analysis.

[0100] `talf_shift_minus6` indicates the variable precision used by one or more time-domain loop filters in the current slice encoding / decoding. It means subtracting 6 from the shift value used in the filtering. This syntax element is represented in this scheme using a fixed-length code of length 2 bins, with values ​​of 0, 1, 2, or 3. Its value is 0 when this syntax element is not present in the bitstream.

[0101] `talf_k_order[sfIdx]` represents the exponential Golomb order used when calculating the absolute value of the `sfIdx`-th filter encoding / decoding coefficients in the current slice. Its value is either 0 or 1; 0 indicates the use of 0th-order exponential Golomb code, and 1 indicates the use of 1st-order exponential Golomb code. Its value is 0 when this syntax element is not present in the bitstream.

[0102] The operation tAlfParamPool[poolIdx][0].shift = talf_shift_minus6 + 6 means restoring the parsed talf_shift_minus6 to the shift value and updating the first and second positions of the FIFO in the historical time-domain loop filter.

[0103] `talf_clip_flag[sfIdx]` indicates whether the `sfIdx`-th time-domain loop filter in the current slice uses nonlinearity. This syntax element takes the value 0 or 1; 1 indicates that the `sfIdx`-th time-domain loop filter uses nonlinearity, and 0 indicates that nonlinearity is not used. When this syntax element is not present in the bitstream, its value is 0.

[0104] `talf_clip_idx[sfIdx][j]` represents the nonlinearity index value used by the i-th coefficient of the sfIdx-th time-domain loop filter in the current slice. This syntax element takes the value 0, 1, 2, or 3. A value of 0 indicates that the input of the filter coefficient at this position does not use nonlinearity. 1, 2, and 3 represent the indices of the corresponding nonlinear truncation values, used to retrieve the truncation value from the nonlinear truncation value table. This syntax element uses a fixed-length code encoding / decoding of 2 bins. Its value is 0 if this syntax element does not exist in the bitstream.

[0105] The operation tAlfParamPool[poolIdx][0].clipIdx[sfIdx][j]=talf_clip_idx[sfIdx][j] means that the parsed talf_clip_idx value is assigned to the FIFO of the corresponding historical time-domain loop filter.

[0106] (c) Parse the code tree block syntax elements

[0107] The `talf_ctb_idc[CtbAddrX][CtbAddrY]` syntax element indicates whether the luminance block of the coding tree, which is CtbAddrX in the horizontal direction and CtbAddrY in the vertical direction, uses TALF filtering. When `talf_reuse_flag` is 0, its value ranges from 0 to `talf_num_filters_signalled_minus1`. For example, if `talf_num_filters_signalled_minus1` is 1, then the value of `talf_ctb_idc` can be 0 or 1. If `talf_num_filters_signalled_minus1` is 2, then `talf_ctb_idc` can take the value 0, 1, or 2. When `talf_reuse_flag` is 1, its value range should be 1 to `tAlfParamPool[poolIdx][talf_reuse_idx].filterCount`, where `tAlfParamPool[poolIdx][talf_reuse_idx].filterCount` represents the number of filters in the selected historical filter group. `talf_ctb_idc` being 0 indicates that the current coding tree luma block does not use TALF filtering, 1 indicates that the first filter group is used, 2 indicates that the second filter group is used, and so on. Its value is 0 when the syntax element does not exist in the bitstream.

[0108] (d) Reconstructing filter coefficients

[0109] If the current slice's talf_ctb_idc is not equal to 0 and talf_reuse_flag is 0, the coefficients, shift values, and nonlinear limit values ​​of the time-domain adaptive loop filter need to be reconstructed.

[0110] The process of obtaining the filter coefficients tAlfCoeff of the current slice is as follows:

[0111] for(sfIdx=0;sfIdx<=talf_num_filters_signalled_minus1;sfIdx++)

[0112] {

[0113] for(j=0;j <numCoeff;j++)

[0114] {

[0115] tAlfCoeff[sfIdx][j]=(talf_coeff_sign[sfIdx][j]==1)?

[0116] -talf_coeff_abs[sfIdx][j]:talf_coeff_abs[sfIdx][j]

[0117] }

[0118] }

[0119] The process of obtaining the nonlinear tAlfClip value of the current slice is as follows:

[0120] - Construct a non-linear truncation value table based on the pixel depth inputBitdepth of the luminance component.

[0121] - Obtain the nonlinear cutoff value for each coefficient of each filter in the current slice:

[0122] The process of obtaining the shift value of the adaptive loop filter for the current slice is as follows:

[0123] shift = talf_shift_minus6 + 6

[0124] If the current slice's talf_ctb_idc is not equal to 0 and talf_reuse_flag is 1, then the coefficient values, shift values, and nonlinear limit values ​​need to be obtained from the FIFO of the historical time-domain adaptive loop filter.

[0125] The process of obtaining the filter coefficients tAlfCoeff of the current slice is as follows:

[0126] for(sfIdx=0;sfIdx<=talf_num_filters_signalled_minus1;sfIdx++)

[0127] {

[0128] for(j=0;j <numCoeff;j++)

[0129] {

[0130] tAlfCoeff[sfIdx][j]=tAlfParamPool[poolIdx][talf_reuse_idx].coeff[sfIdx][j]

[0131] }

[0132] }

[0133] The process of obtaining the nonlinear tAlfClip value of the current slice is as follows:

[0134] - Construct a non-linear truncation value table based on the pixel depth inputBitdepth of the luminance component.

[0135] - Obtain the nonlinear cutoff value for each coefficient of each filter in the current slice:

[0136] The process of obtaining the shift value of the adaptive loop filter for the current slice is as follows:

[0137] shift=tAlfParamPool[poolIdx][talf_reuse_idx].shift

[0138] (e) Perform TALF filtering on the luminance coding tree block

[0139] If the talf_ctb_idc flag of the current luminance coding tree block is non-zero, TALF filtering is required. This step first requires obtaining the following variable values:

[0140] - A reconstructed luminance image array rec after luminance adaptive loop filtering.

[0141] -talf_filter_mode mode value

[0142] - Indicates the luminance coordinates (xCtb, yCtb) of the current luminance coding tree block in the current image.

[0143] - The width tAlfWidth and height tAlfHeight of the luminance coding tree block

[0144] - The coefficients tAlfCoeff[][] of the time-domain adaptive loop filter.

[0145] - The cutoff value tAlfClip[][] of the time-domain adaptive loop filter.

[0146] -Time-domain adaptive loop filter shift value

[0147] The first step is to obtain the reconstructed image and MV:

[0148] The input image of the filter is determined based on talf_filter_mode.

[0149] If talf_filter_mode is 0, then the nearest reconstructed image rec0 is used as input;

[0150] If talf_filter_mode is 3, then check the motion vector buffer corresponding to the current position (x, y), and check whether the motion vector buffer contains Mv0 pointing to the reference image in the reference image list 0. If it contains it, then use the reference image rec0 pointed to by Mv0 as input; otherwise, skip the filtering at the current position.

[0151] If talf_filter_mode is 1, the backward nearest reconstructed image rec1 is used in RA mode, and the forward second nearest reconstructed image rec1 is used as input in LD mode.

[0152] If talf_filter_mode is 4, then check the motion vector buffer corresponding to the current position (x, y), and check whether the motion vector buffer contains Mv1 pointing to the reference image in reference image list 1. If it contains it, then use the reference image rec1 pointed to by Mv1 as input; otherwise, skip the filtering at the current position.

[0153] If talf_filter_mode is 2, then in RA mode, the forward nearest reconstructed image rec0 and the backward nearest reconstructed image rec1 are used as input, and in LD mode, the forward nearest reconstructed image rec0 and the second nearest reconstructed image rec1 are used as input.

[0154] If talf_filter_mode is 5, then check the motion vector buffer corresponding to the current position (x, y). Check if the motion vector buffer contains Mv0 pointing to the reference image in reference image list 0 and Mv1 pointing to the reference image in reference image list 1. If it contains them, then use the reference image rec0 pointed to by Mv0 and the reference image rec1 pointed to by Mv1 as input. Otherwise, skip the filtering at the current position.

[0155] The second step is to obtain the shift value:

[0156] If Mv0 and Mv1 are found in the first step, then since Mv is used in inter-frame prediction with subpixel precision, the position offset on the reconstructed image pointed to by Mv is obtained here by rounding to positive pixel precision.

[0157] The horizontal integer pixel offset of Mv0 is:

[0158] Offset0X=Mv0. Hor<0? -((abs(Mv0.Hor)+8)>>4):((abs(Mv0.Hor)+8)>>4)

[0159] The vertical integer pixel position offset of Mv0 is:

[0160] Offset0Y=Mv0. Ver<0? -((abs(Mv0.Ver)+8)>>4):((abs(Mv0.Ver)+8)>>4)

[0161] The horizontal integer pixel offset of Mv1 is:

[0162] Offset1X=Mv1.Hor<0? -((abs(Mv1.Hor)+8)>>4):((abs(Mv1.Hor)+8)>>4)

[0163] The vertical integer pixel position offset of Mv1 is:

[0164] Offset1Y=Mv1.Ver<0? -((abs(Mv1.Ver)+8)>>4):((abs(Mv1.Ver)+8)>>4)

[0165] If talf_filter_mode is 0, 1, or 2 in the first step, since it is not necessary to export offset values ​​based on Mv, Offset0X, Offset0Y, Offset1X, and Offset1Y are set to 0.

[0166] The third step is to reconstruct the image based on the obtained positional offset and then filter it using filtering coefficients.

[0167] The filtering calculation for each position in the luminance-coded block is as follows:

[0168] talf_filter_mode is 2:

[0169] In the above calculation and filtering process, shift is 6, BitDepth variable is the bit depth of the luminance component, and x and y represent the horizontal and vertical coordinates of the reconstructed image array. x0, y0, x1, and y1 are the coordinates of the center positions of rec0 and rec1 after offset, respectively. When reconstructing values ​​in the arrays of coordinate positions rec0 and rec1, the horizontal coordinate should be limited to between 0 and the image width picWidth-1, and the vertical coordinate should be limited to between 0 and the image height picHeight-1, referring to formula (3).

[0170] When talf_filter_mode is 5, compared to talf_filter_mode 2, filtering for positions without corresponding motion information needs to be skipped.

[0171] When talf_filter_mode is 0:

[0172] When talf_filter_mode is 3, compared to talf_filter_mode is 0, filtering for positions without corresponding motion information needs to be skipped.

[0173] When talf_filter_mode is 1:

[0174] When talf_filter_mode is 4, compared to talf_filter_mode 1, filtering for positions without corresponding motion information needs to be skipped.

[0175] During the filtering process, this scheme uses the same image edge padding method as ALF to obtain the TALF input values ​​outside the required image range.

[0176] In some embodiments, ALF filtering performs edge padding on a block-by-block basis. Filtering within a block does not use the reconstructed values ​​of other blocks. In this case, TALF can also perform edge padding on a block-by-block basis.

[0177] In the latest JVET Enhanced Compression Model (ECM) reference software test model, motion information includes motion vectors (MV), block vectors (BV), and a series of coding unit-level variables. This motion information is referenced in inter-frame prediction or IBC, intraTMP prediction modes. After each coding unit decides its prediction mode, the unit's motion information is stored in a motion information buffer. However, storing motion information in the motion information buffer pixel by pixel would require a large amount of on-chip storage. In ECM, to save on-chip storage, motion information is stored in sub-blocks of NxN pixels, for example, N=2, N=4, etc.

[0178] In the common TALF method, after determining the filter coefficients, the encoder can write the filter coefficients into the bitstream and transmit them to the decoder.

[0179] In other words, in common techniques, filter coefficients that perform filtering can be transmitted through the bitstream. However, encoding and decoding a large number of filter coefficients results in high codeword overhead, reducing encoding and decoding efficiency.

[0180] To address the aforementioned issues, embodiments of this application provide an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the decoding end, the bitstream is decoded to determine reference identification information. If reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded to determine the coefficient residual corresponding to a first coefficient. The first coefficient is the filter coefficient to be parsed for the currently parsed first filter. Based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined. The reference coefficient includes the filter coefficients of the parsed second filter and / or a second coefficient, where the second coefficient is the parsed filter coefficient of the first filter. At the encoding end, if reference encoded coefficients are determined, reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream. The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bitstream. The first coefficient is the filter coefficient to be encoded for the currently encoded first filter. The reference coefficient includes the filter coefficients of the encoded second filter and / or a second coefficient, where the second coefficient is the encoded filter coefficient of the first filter. Therefore, the embodiments of this application propose a new method for determining filter coefficients, namely, determining the filter coefficients to be encoded and decoded by referring to the already encoded and decoded filter coefficients. In this case, it is possible to choose to refer to the already encoded and decoded filter coefficients of different filters, or to choose to refer to the already encoded and decoded coefficients of the same filter currently being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

[0181] Referring to Figure 4, which shows an example of a system block diagram of an encoder provided in an embodiment of this application. As shown in Figure 4, the encoder 10 may include: a segmentation unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, a filtering unit 113, a Decoded Picture Buffer (DPB) unit 114, and an entropy coding unit 115. Here, the input of the encoder 10 can be a video composed of a series of images or a single still image, and the output of the encoder 10 can be a bitstream (also called a "bitstream") representing a compressed version of the input video.

[0182] The segmentation unit 101 segments the images in the input video into one or more Coding Tree Units (CTUs). The segmentation unit 101 divides the image into multiple tiles, and can further divide a tile into one or more bricks. Here, a tile or a brick can include one or more complete and / or partial CTUs. Additionally, the segmentation unit 101 can form one or more slices, where a slice can include one or more tiles arranged in raster order in the image, or one or more tiles covering a rectangular area of ​​the image. The segmentation unit 101 can also form one or more sub-images, where a sub-image can include one or more slices, tiles, or bricks.

[0183] During the encoding process of encoder 10, segmentation unit 101 transmits the CTU to prediction unit 102. Typically, prediction unit 102 may consist of block segmentation unit 103, motion estimation (ME) unit 104, motion compensation (MC) unit 105, and intra-prediction unit 106. Specifically, block segmentation unit 103 iteratively uses quadtree segmentation, binary tree segmentation, and ternary tree segmentation to further divide the input CTU into smaller coding units (CUs). Prediction unit 102 can use ME unit 104 and MC unit 105 to obtain inter-frame prediction blocks of the CUs. Intra-prediction unit 106 can use various intra-prediction modes, including MIP modes, to obtain intra-frame prediction blocks of the CUs. In the example, rate-distortion optimized motion estimation can be invoked by ME unit 104 and MC unit 105 to obtain inter-frame prediction blocks, and rate-distortion optimized mode determination can be invoked by intra-prediction unit 106 to obtain intra-frame prediction blocks.

[0184] Prediction unit 102 outputs the predicted block of the CU. First adder 107 calculates the difference between the CU in the output of segmentation unit 101 and the predicted block of the CU, i.e., the residual CU. Transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. Quantization unit 109 quantizes the coefficients and outputs quantization coefficients (i.e., levels). Inverse quantization unit 110 performs a scaling operation on the quantization coefficients to output reconstructed coefficients. Inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in transform unit 108 and outputs the reconstructed residual. Second adder 112 calculates the reconstructed CU by adding the reconstructed residual to the predicted block of the CU from prediction unit 102. Second adder 112 also sends its output to prediction unit 102 as an intra-frame prediction reference. After all CUs in the image or sub-image are reconstructed, filtering unit 113 performs loop filtering on the reconstructed image or sub-image. Here, the filtering unit 113 includes one or more filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, an adaptive loop filter (ALF), a luma mapping with chroma scaling (LMCS) filter, and a neural network-based filter. Alternatively, when the filtering unit 113 determines that the CU is not used as a reference for encoding other CUs, the filtering unit 113 performs loop filtering on one or more target samples in the CU.

[0185] The output of the filtering unit 113 is a decoded image or sub-image, which is buffered in the DPB unit 114. The DPB unit 114 outputs the decoded image or sub-image according to timing and control information. Here, the image stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter-frame prediction or intra-frame prediction. Finally, the entropy coding unit 115 converts the parameters (such as control parameters and supplementary information) necessary for decoding the image from the encoder 10 into binary form, and writes such binary form into the bitstream according to the syntax structure of each data unit, which is the final output bitstream of the encoder 10.

[0186] Furthermore, encoder 10 may be a first memory having a first processor and a computer program for recording. When the first processor reads and runs the computer program, encoder 10 reads the input video and generates a corresponding bitstream. Alternatively, encoder 10 may also be a computing device having one or more chips. These units, implemented as integrated circuits on the chips, have similar connection and data exchange functions to the corresponding units in Figure 4.

[0187] Referring to Figure 5, it shows an example of a system block diagram of a decoder provided in an embodiment of this application. As shown in Figure 5, the decoder 20 may include: a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filtering unit 208, and a decoded image buffer unit 209. Here, the input of the decoder 20 is a bitstream representing a compressed version of a video or a still image, and the output of the decoder 20 may be a decoded video composed of a series of images or a decoded still image.

[0188] The input bitstream to decoder 20 can be the bitstream generated by encoder 10. Parsing unit 201 parses the input bitstream and obtains the values ​​of syntax elements from it. Parsing unit 201 converts the binary representation of the syntax elements into numerical values ​​and sends these values ​​to units in decoder 20 to obtain one or more decoded images. Parsing unit 201 can also parse one or more syntax elements from the input bitstream to display the decoded images.

[0189] During the decoding process of decoder 20, parsing unit 201 sends the value of the syntax element and one or more variables set or determined according to the value of the syntax element for obtaining one or more decoded images to the unit in decoder 20.

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

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

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

[0193] Adder 207 performs an addition operation on its inputs (the predicted block from prediction unit 202 and the reconstructed residual from inverse transform unit 206) to obtain the reconstructed block of the current decoded block. The reconstructed block is also sent to prediction unit 202 as a reference for other blocks encoded in intra-frame prediction mode.

[0194] After all CUs in an image or sub-image are reconstructed, filtering unit 208 performs loop filtering on the reconstructed image or sub-image. Filtering unit 208 includes one or more filters, such as deblocking filters, sampling adaptive compensation filters, adaptive loop filters, luminance mapping and chroma scaling filters, and neural network-based filters. Alternatively, when filtering unit 208 determines that a reconstructed block is not used as a reference for decoding other blocks, filtering unit 208 performs loop filtering on one or more target samples in the reconstructed block. Here, the output of filtering unit 208 is a decoded image or sub-image, which is buffered in DPB unit 209. DPB unit 209 outputs the decoded image or sub-image based on timing and control information. The image stored in DPB unit 209 can also be used as a reference for performing inter-frame prediction or intra-frame prediction by prediction unit 202.

[0195] Furthermore, decoder 20 can be a second memory having a second processor and a computer program for recording. When the first processor reads and runs the computer program, decoder 20 reads the input bitstream and generates the corresponding decoded video. Alternatively, decoder 20 can also be a computing device having one or more chips. These units, implemented as integrated circuits on the chips, have similar connection and data exchange functions to the corresponding units in Figure 5.

[0196] It should also be noted that when the embodiments of this application are applied to encoder 10, "encoding block" specifically refers to the block to be encoded in the video image (which can also be simply referred to as "encoding block"); when the embodiments of this application are applied to decoder 20, "encoding block" specifically refers to the block to be decoded in the video image (which can also be simply referred to as "decoding block").

[0197] Based on Figure 4, the encoding method in this embodiment is mainly applied to the "filtering unit 113" part of the encoder 10.

[0198] Based on Figure 5, the decoding method in this embodiment is mainly applied to the "filtering unit 208" part of the decoder 20.

[0199] In other words, the encoding and decoding methods in the embodiments of this application can be applied to a video encoding system (referred to as "encoder"), a video decoding system (referred to as "decoder"), or even to both a video encoding system and a video decoding system simultaneously, but no limitations are made here.

[0200] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0201] One embodiment of this application proposes a decoding method. This method is applied to a decoder and can be used in scenarios where filtering is performed by a TALF filter or in scenarios where filtering is performed by other filtering techniques. This application does not impose any specific limitations.

[0202] Figure 6 is a schematic diagram of the decoding method proposed in the embodiment of this application. As shown in Figure 6, the decoding method of the decoder may include the following steps:

[0203] Step 1001: Decode the bitstream and determine the reference identifier information.

[0204] In the embodiments of this application, decoding the bitstream can determine the reference identification information.

[0205] It should be noted that, in the embodiments of this application, the reference identification information can be used to determine whether to refer to the parsed coefficients, that is, based on the reference identification information, it can be determined whether to use the already decoded filter coefficients to determine the undecoded filter coefficients.

[0206] Furthermore, in the embodiments of this application, the parsed coefficients are the filter coefficients that have been decoded, wherein the parsed coefficients may include, but are not limited to, the filter coefficients of the parsed filter and / or the parsed filter coefficients of the currently parsed filter.

[0207] In other words, the decoding method proposed in this application supports referencing already parsed coefficients when parsing filter coefficients. Specifically, it can choose to refer to the filter coefficients of already parsed filters to determine the filter coefficients to be parsed for the filter currently being parsed, or it can choose to refer to the already parsed filter coefficients of the filter currently being parsed to determine the filter coefficients to be parsed for the filter currently being parsed.

[0208] It is understood that, in the embodiments of this application, the reference identification information may include first reference identification information, wherein the first reference identification information is used to indicate whether to reference the filter coefficients of an already parsed filter. Determining the filter coefficients to be parsed for the filter currently being parsed by referencing the filter coefficients of an already parsed filter can be understood as using an already encoded / decoded filter to assist in determining the filter coefficients of the filter currently being encoded / decoded, which is a reference scheme for coefficients between different filters.

[0209] It is understood that, in the embodiments of this application, the reference identification information may include second reference identification information, wherein the second reference identification information is used to indicate whether to reference the already resolved filter coefficients of the currently being resolved filter. Referring to the already resolved filter coefficients of the currently being resolved filter to determine the filter coefficients to be resolved for the filter being resolved can be understood as using the determined filter coefficients of the filter being encoded / decoded to assist in determining the filter coefficients of the filter being encoded / decoded, which is a reference scheme for different coefficients within the same filter.

[0210] Furthermore, in the embodiments of this application, the reference identification information can be used to determine whether to reference the parsed coefficients. The reference identification information can be a flag, wherein if the current block is a CTU corresponding to the current image, then the reference identification information can be a CTU-level flag; if the current block is a CU corresponding to the current image, then the reference identification information can be a CU-level flag. Of course, corresponding to a sub-region of any size in the current image, the reference identification information can also be a flag of other block levels. This application does not impose specific limitations.

[0211] Furthermore, in the embodiments of this application, whether to refer to the parsed coefficients can be determined by referencing the value of the reference identification information.

[0212] For example, in some embodiments, if the reference identifier information has a first value, it is determined that the parsed coefficients will not be referenced. If the reference identifier information has a second value, it is determined that the parsed coefficients will be referenced.

[0213] It should be noted that, in the embodiments of this application, the reference identification information can be used to indicate whether the already resolved coefficients are used to determine the coefficients to be resolved. Furthermore, the first value and the second value are different, and both the first value and the second value can be in parametric form or in numerical form; no limitation is made here.

[0214] Furthermore, in the embodiments of this application, the reference identification information can be an image-level mark, or a slice-level or block-level mark; this application does not impose any specific limitations.

[0215] For example, in some embodiments, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; even in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. The first and second values ​​are not limited in any way in the embodiments of this application.

[0216] Taking a first value of 0 and a second value of 1 as an example, in this embodiment of the application, if the reference identifier information is 0, then it can be determined that the already parsed coefficients are not referenced. Otherwise, if the reference identifier information is 1, then it can be determined that the already parsed coefficients are referenced.

[0217] For example, in some embodiments, the first reference identification information can be represented by the syntax element control identifier talf_inter_refer, wherein the first reference identification information talf_inter_refer can indicate whether to reference the filter coefficients of an already parsed filter, that is, the first reference identification information talf_inter_refer can indicate whether to reference the parsed coefficients of different filters.

[0218] For example, in some embodiments, if the value of `talf_inter_refer` is 0, it is determined that the resolved coefficients are not referenced, specifically, the filter coefficients of the already resolved filter are not referenced. If the value of `talf_inter_refer` is 1, it is determined that the resolved coefficients are referenced, specifically, the filter coefficients of the already resolved filter are referenced. Of course, the value of `talf_inter_refer` is not limited to 0, and this application does not impose a specific limitation.

[0219] For example, in some embodiments, the second reference identification information can be represented by the syntax element control identifier talf_intra_refer, wherein the second reference identification information talf_intra_refer can indicate whether to refer to the already parsed filter coefficients of the currently parsed filter, that is, the second reference identification information talf_intra_refer can indicate whether to refer to the already parsed coefficients of the same filter.

[0220] For example, in some embodiments, if the value of `talf_intra_refer` is 0, it is determined that the already resolved coefficients are not referenced; specifically, the already resolved filter coefficients of the currently resolved filter are not referenced. If the value of `talf_intra_refer` is 1, it is determined that the already resolved coefficients are referenced; specifically, the already resolved filter coefficients of the currently resolved filter are referenced. Of course, the value of `talf_intra_refer` is not limited to 0, and this application does not impose a specific limitation.

[0221] Step 1002: Based on the reference identifier information, determine the reference parsed coefficients, decode the bitstream, and determine the coefficient residual corresponding to the first coefficient; wherein, the first coefficient is the filter coefficient to be parsed of the first filter currently being parsed.

[0222] In the embodiments of this application, after determining the reference identification information, if the reference parsed coefficients are determined based on the reference identification information, the bitstream can be further decoded to determine the coefficient residuals corresponding to the first coefficient.

[0223] It should be noted that, in the embodiments of this application, the first coefficient can be the filter coefficient to be parsed of the first filter currently being parsed, and the first filter can be the filter being parsed.

[0224] Furthermore, in the embodiments of this application, the coefficient residual corresponding to the first coefficient can be determined based on the true value of the first coefficient and the referenced resolved coefficient (reference coefficient).

[0225] Accordingly, in the embodiments of this application, when the reference resolved coefficients are determined, the filter coefficients to be resolved (first coefficients) of the first filter before resolution can be determined based on the reference resolved coefficients (reference coefficients) and in combination with the coefficient parameters corresponding to the first coefficients.

[0226] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient, the bitstream can be decoded to determine the residual value and the residual sign corresponding to the first coefficient; then, the coefficient residual corresponding to the first coefficient can be determined based on the residual value and the residual sign.

[0227] It is understood that, in the embodiments of this application, the residual value corresponding to the first coefficient can be used to determine the absolute value of the first coefficient. The sign of the residual corresponding to the first coefficient can be used as the sign of the first coefficient, including positive and negative signs.

[0228] It is understood that in the embodiments of this application, there may be a dependency relationship between the residual value corresponding to the first coefficient and the residual sign corresponding to the first coefficient. For example, the residual sign corresponding to the first coefficient is parsed only when the residual value corresponding to the first coefficient is not 0; the residual sign corresponding to the first coefficient is not parsed when the residual value corresponding to the first coefficient is 0.

[0229] Of course, the sign of the residual corresponding to the first coefficient can also be determined independently of the residual value corresponding to the first coefficient. That is, the sign of the residual corresponding to the first coefficient is determined regardless of whether the residual value corresponding to the first coefficient is 0.

[0230] Furthermore, in the embodiments of this application, after determining the residual value and the residual sign corresponding to the first coefficient respectively, the coefficient residual corresponding to the first coefficient can be determined by combining the residual value and the residual sign corresponding to the first coefficient.

[0231] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter. Correspondingly, the coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j], the residual value corresponding to the first coefficient can be represented as talf_resi_abs[sfIdx][j], and the residual sign corresponding to the first coefficient can be represented as talf_resi_sign[sfIdx][j].

[0232] Step 1003: Based on the coefficient residuals and reference coefficients corresponding to the first coefficients, determine the analyzed first coefficients; wherein, the reference coefficients include the analyzed filter coefficients of the second filter and / or the second coefficients, and the second coefficients are the analyzed filter coefficients of the first filter.

[0233] In the embodiments of this application, after determining the coefficient residual corresponding to the first coefficient, the parsed first coefficient can be further determined based on the coefficient residual corresponding to the first coefficient and the reference coefficient.

[0234] It should be noted that, in the embodiments of this application, the reference coefficients may include the filter coefficients of the resolved second filter, or the filter coefficients of the currently resolved first filter, i.e., the second coefficients.

[0235] It is understood that, in the embodiments of this application, the parsed second filter can be any one or more filters preceding the currently parsed first filter.

[0236] For example, in some embodiments, the second filter may be the preceding resolved filter of the first filter. For instance, the first filter may be the currently resolved sfIdx-th filter, and the second filter may be the sfIdx-1-th filter, which is a previously resolved filter.

[0237] Furthermore, in the embodiments of this application, since the second filter is a resolved filter, all the filter coefficients of the second filter have been resolved. Accordingly, when referencing the resolved filter coefficients of the second filter, any one or more filter coefficients of the second filter can be selected as reference coefficients.

[0238] It should be noted that, in the embodiments of this application, the consistency between the shape of the first filter and the shape of the second filter is not limited. That is, the first filter and the second filter can be filters with the same shape or filters with different shapes. This application does not make any specific limitations.

[0239] It should be noted that, in the embodiments of this application, the consistency between the number of coefficients of the first filter and the number of coefficients of the second filter is not limited. That is, the first filter and the second filter can be filters with a certain number of coefficients, or filters with different numbers of coefficients. This application does not make any specific limitations.

[0240] It is understood that, in the embodiments of this application, the second coefficient can be any one or more filter coefficients that have been resolved before the first coefficient of the currently resolved first filter.

[0241] For example, in some embodiments, the second coefficient can be the previous resolved filter of the first coefficient of the currently resolved first filter. For instance, the first coefficient is the j-th filter coefficient of the currently resolved sfIdx-th filter, the second coefficient is the (j-1)-th filter coefficient of the currently resolved sfIdx-th filter, and the second coefficient is a resolved filter coefficient.

[0242] Furthermore, in the embodiments of this application, the number of reference coefficients is not specifically limited. That is, one or more reference coefficients can be used to determine the filter coefficients to be resolved. If multiple reference coefficients are used, the source of the multiple reference coefficients is not specifically limited. For example, some reference coefficients are one or more coefficients of one or more second filters, and other reference coefficients are one or more resolved coefficients of the first filter. Alternatively, they can all be coefficients of the second filter or resolved coefficients of the first filter. This application does not make any specific limitations.

[0243] In other words, in the embodiments of this application, this application does not specifically limit the number of reference coefficients, the number of second filters, the number of coefficients of the referenced second filters, and the number of second coefficients.

[0244] It is understandable that, in the embodiments of the application, if multiple reference coefficients are used to determine the first coefficient to be parsed, one can choose to first perform preprocessing based on the multiple reference coefficients to obtain a processing result, and then derive the first coefficient to be parsed based on the processing result.

[0245] Furthermore, in the embodiments of this application, assuming the reference identification information is the first reference identification information talf_inter_refer, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the second filter.

[0246] In other words, in the embodiments of this application, when the filter coefficients of the reference already parsed filter are determined by the first reference identifier information talf_inter_refer, the filter coefficients of the reference already parsed second filter can be selected, and the parsed first coefficients can be determined based on the coefficient residuals corresponding to the first coefficients and the filter coefficients of the second filter.

[0247] Furthermore, in the embodiments of this application, when determining the analyzed first coefficient based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the second filter, a third filter is determined in the second filter; the analyzed first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the third filter.

[0248] It is understood that, in the embodiments of this application, for one or more parsed second filters, one or more parsed third filters can be selected to determine the first coefficients to be parsed. For example, the parsed first coefficients can be determined based on the coefficient residuals corresponding to the first coefficients and the filter coefficients of the third filter.

[0249] Furthermore, in an embodiment of this application, when determining the third filter in the second filter, the filter preceding the first filter in the second filter is determined as the third filter.

[0250] For example, in an embodiment of this application, assuming the first filter is the currently parsed sfIdx-th filter, and the second filter includes three parsed filters: the sfIdx-1-th filter, the sfIdx-2-th filter, and the sfIdx-3-th filter, then the sfIdx-1-th filter can be selected as the third filter, that is, the filter in the second filter that precedes the first filter is selected as the third filter.

[0251] Furthermore, in the embodiments of this application, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the third filter, the third coefficient corresponding to the first coefficient is determined in the filter coefficient of the third filter; the parsed first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the third coefficient.

[0252] It is understood that, in the embodiments of this application, for the resolved third filter, all filter coefficients of the third filter have been resolved. Accordingly, when referring to the resolved filter coefficients of the third filter, any one or more filter coefficients of the second filter can be selected as reference coefficients, that is, the third coefficients are determined.

[0253] It is understood that, in the embodiments of this application, when selecting reference coefficients, the third coefficient corresponding to the first coefficient can be determined from the filter coefficients of the third filter using the relevant information of the first coefficient. The relevant information of the first coefficient includes, but is not limited to, the coefficient index of the first coefficient, the filter position corresponding to the first coefficient, and the order of the filter coefficients corresponding to the first coefficient.

[0254] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, where j is the coefficient index of the first coefficient. Then, when determining the third coefficient corresponding to the first coefficient in the filter coefficients of the third filter, the j-th coefficient of the sfIdx-1-th filter (the third filter) can be selected as the third coefficient, that is, the third coefficient is represented as tAlfCoeff[sfIdx-1][j].

[0255] Furthermore, in the embodiments of this application, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the third coefficient, mathematical operations can be performed on the coefficient residual corresponding to the first coefficient and the third coefficient, such as performing a summation operation on the coefficient residual corresponding to the first coefficient and the third coefficient to determine the parsed first coefficient.

[0256] For example, in some embodiments, it is assumed that the first coefficient is represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, and the third coefficient is represented as tAlfCoeff[sfIdx-1][j], which is the j-th coefficient of the sfIdx-1-th filter. The coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j]. Then, the parsed first coefficient can be determined by tAlfCoeff[sfIdx][j] = tAlfCoeff[sfIdx-1][j] + tAlfCoeffResi[sfIdx][j].

[0257] Therefore, in the embodiments of this application, a new method for analyzing filter coefficients is introduced, which allows for cross-referencing when analyzing the coefficients of different filters.

[0258] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When referring to [c], the coefficients of filter 0 that have already been encoded and decoded can be used as a reference. 0,0 c 0,n The residual c′ of the coefficients of filter 1 can be obtained analytically first. 1,nThen, the coefficients of filter 1 can be reconstructed from the coefficient residuals of filter 1 and the coefficients of filter 0, as shown in the following formula:

[0259] c1, n =c′ 1,n +c0, n (1)

[0260] For example, in some embodiments, the syntax elements refer to the following:

[0261] In this embodiment, a first reference identifier, namely the `talf_inter_refer` identifier, is introduced. When it is 1, it indicates that the coefficients of the currently decoded filter reference the coefficients of the previous filter, and the current filter coefficients need to be obtained by parsing the filter residual and the values ​​of the previous filter coefficients from the bitstream. When it is 0, it indicates that the coefficients of the current filter are encoded and decoded according to the conventional scheme. If there is a previous filter that has already been decoded before the current filter is encoded and decoded, the `talf_inter_refer` identifier needs to be parsed from the bitstream. If this syntax element does not exist in the bitstream, its default value is 0.

[0262] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0263] for(j=0;j <numCoeff;j++)

[0264] {

[0265] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx-1][j]+tAlfCoeffResi[sfIdx][j]

[0266] }

[0267] Where tAlfCoeffResi is the residual coefficient of the current filter, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0268] Furthermore, in the embodiments of this application, assuming the reference identifier information is the second reference identifier information talf_intra_refer, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the second coefficient.

[0269] In other words, in the embodiments of this application, when the resolved filter coefficients of the reference currently resolved filter are determined by the second reference identifier information talf_intra_refer, the resolved second coefficients of the reference currently resolved first filter can be selected, and the resolved first coefficients can be determined based on the coefficient residuals corresponding to the first coefficients and the second coefficients.

[0270] Furthermore, in the embodiments of this application, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the second coefficient, a fourth coefficient corresponding to the first coefficient is determined from the second coefficient; the parsed first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the fourth coefficient.

[0271] It is understood that, in the embodiments of this application, for one or more parsed second coefficients of the currently parsed first filter, any one or more filter coefficients among the one or more parsed second coefficients can be selected as reference coefficients, that is, the fourth coefficient can be determined.

[0272] It is understood that, in the embodiments of this application, when selecting reference coefficients, the fourth coefficient corresponding to the first coefficient can be determined from the second coefficients using the relevant information of the first coefficient. The relevant information of the first coefficient includes, but is not limited to, the coefficient index of the first coefficient, the filter position corresponding to the first coefficient, and the order of the filter coefficients corresponding to the first coefficient.

[0273] Furthermore, in the embodiments of this application, when determining the fourth coefficient corresponding to the first coefficient in the second coefficient, the coefficient preceding the first coefficient in the second coefficient can be determined as the fourth coefficient.

[0274] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], that is, the j-th filter coefficient of the sfIdx-th filter, where j is the coefficient index of the first coefficient. The second coefficient may include the four resolved filter coefficients: the (j-1)-th, (j-2)-th, (j-3)-th, and (j-4)-th filter coefficients of the sfIdx-th filter. When determining the fourth coefficient corresponding to the first coefficient in the second coefficient, the (j-1)-th filter coefficient of the sfIdx-th filter can be selected as the fourth coefficient, that is, the fourth coefficient is represented as tAlfCoeff[sfIdx][j-1].

[0275] Furthermore, in the embodiments of this application, when determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the fourth coefficient, mathematical operations can be performed on the coefficient residual corresponding to the first coefficient and the fourth coefficient, such as performing a summation operation on the coefficient residual corresponding to the first coefficient and the fourth coefficient to determine the parsed first coefficient.

[0276] For example, in some embodiments, it is assumed that the first coefficient is represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, and the fourth coefficient is represented as tAlfCoeff[sfIdx][j-1], which is the (j-1)-th coefficient of the sfIdx-th filter. The coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j]. Then, the parsed first coefficient can be determined by tAlfCoeff[sfIdx][j] = tAlfCoeff[sfIdx][j-1] + tAlfCoeffResi[sfIdx][j].

[0277] Therefore, in the embodiments of this application, a new method for analyzing filter coefficients is introduced, which allows the coefficients within the same filter to be referenced from each other when analyzing the coefficients of the same filter.

[0278] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When doing so, the coefficients of filter 1, which has already been encoded and decoded, can be referenced. Specifically, the residual c′ of the coefficients of filter 1 can be obtained first through analysis. 1,n Then, the coefficient residuals of filter 1 and the encoded / decoded filter coefficients c of filter 1 can be used. 1,n-1 Reconstruct the coefficients c of filter 1 1,n Please refer to the following formula:

[0279] c 1,n =c′ 1,n +c 1,n-1 (2)

[0280] For example, in some embodiments, the syntax elements refer to the following:

[0281] In this embodiment, a second reference identifier, talf_intra_refer, is introduced. When it is 1, it means that the current filtering coefficient is referenced to the previous filtering coefficient, and the current filtering coefficient needs to be obtained by parsing the residual of the filtering coefficient and the value of the previous filtering coefficient from the bitstream. When it is 0, it means that the current filter coefficient is encoded and decoded according to the conventional scheme. When there is no previous filtering coefficient, the residual value is the current filtering coefficient value. If this syntax element does not exist in the bitstream, its default value is 0.

[0282] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0283] for(j=0;j <numCoeff;j++)

[0284] {

[0285] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx][j-1]+tAlfCoeffResi[sfIdx][j]

[0286] }

[0287] Where tAlfCoeffResi is the residual coefficient of the current filter coefficients, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0288] Furthermore, in the embodiments of this application, when it is determined that the parsed coefficients are not referenced based on the reference identifier information, the bitstream is decoded to determine the parsed first coefficients.

[0289] In other words, in the embodiments of this application, if it is determined by the reference identification information that the parsed coefficients are not referenced, the bitstream can be further decoded to determine the parsed first coefficients.

[0290] Furthermore, when determining the first coefficient, the numerical parameter and sign parameter of the coefficient corresponding to the first coefficient can be determined by decoding the bitstream; then the first coefficient can be determined based on the numerical parameter and sign parameter.

[0291] It is understood that, in the embodiments of this application, the coefficient numerical parameter can be used to determine the absolute value of the filter coefficients. The coefficient sign parameter can be used to determine the sign of the filter coefficients, including positive and negative signs.

[0292] In summary, the decoding method proposed in this application reduces the number of codewords required to decode the filter coefficients by using the decoded filter coefficients as a reference for the current filter coefficients to be decoded, thereby reducing codeword consumption.

[0293] It is understood that the decoding method proposed in this application, the time-domain adaptive loop filtering, can introduce various methods for representing filter coefficients. In addition to directly decoding the current filter coefficient, the current filter coefficient can also be decoded by referring to a previously decoded filter coefficient or a previously decoded filter coefficient in the previous filter.

[0294] This application provides a decoding method, which is a new way to determine filter coefficients. Specifically, the filter coefficients to be encoded and decoded are determined by referring to the previously encoded and decoded filter coefficients. The reference can be either the previously encoded and decoded filter coefficients of different filters or the previously encoded and decoded coefficients of the same filter currently being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

[0295] One embodiment of this application proposes an encoding method applied to an encoder. This method can be used in scenarios where filtering is performed through a TALF filter, or in scenarios where filtering is performed through other filtering techniques. This application does not impose any specific limitations.

[0296] Figure 7 is a schematic diagram of the encoding method proposed in the embodiment of this application. As shown in Figure 7, the method of the encoder performing encoding processing may include the following steps:

[0297] Step 2001: If the reference encoded coefficients are determined, set the reference identification information to indicate the reference encoded coefficients and write the reference identification information into the bitstream.

[0298] In the embodiments of the application, it can be first determined whether to reference the encoded coefficients, and then the first information can be set. Specifically, if it is determined that the encoded coefficients should be referenced, reference identification information is set to indicate that the encoded coefficients should be referenced, and the reference identification information is written into the bitstream.

[0299] Furthermore, in the embodiments of this application, when determining whether to refer to encoded coefficients, the cost of filtering with reference to encoded coefficients and the cost of filtering without referencing encoded coefficients can be determined; then, based on the cost of filtering with reference to encoded coefficients and the cost of filtering without referencing encoded coefficients, it is determined whether to refer to encoded coefficients, and reference identification information is further determined, and then the reference identification information is written into the bitstream.

[0300] In the embodiments of this application, the methods for calculating cost value include, but are not limited to, rate-distortion optimization algorithms.

[0301] It should be noted that, in the embodiments of this application, the reference identification information can be used to determine whether to refer to the encoded coefficients, that is, based on the reference identification information, it can be determined whether to use the already encoded filter coefficients to determine the uncoded filter coefficients.

[0302] Furthermore, in the embodiments of this application, the encoded coefficients are the already encoded filter coefficients, wherein the encoded coefficients may include, but are not limited to, the filter coefficients of the already encoded filter and / or the encoded filter coefficients of the currently encoded filter.

[0303] In other words, the encoding method proposed in this application supports referencing already encoded coefficients when encoding filter coefficients. Specifically, it is possible to determine the filter coefficients to be encoded for the filter being encoded (currently encoded) by referring to the filter coefficients of already encoded filters, or it is possible to determine the filter coefficients to be encoded for the filter being encoded (currently encoded) by referring to the already encoded filter coefficients of the filter being encoded (currently encoded).

[0304] It is understood that, in the embodiments of this application, the reference identification information may include first reference identification information, wherein the first reference identification information is used to indicate whether to reference the filter coefficients of an already encoded filter. Determining the filter coefficients to be encoded for the filter currently being encoded by referencing the filter coefficients of an already encoded filter can be understood as using an already encoded / decoded filter to assist in determining the filter coefficients of the filter currently being encoded / decoded, which is a reference scheme for coefficients between different filters.

[0305] It is understood that, in the embodiments of this application, the reference identification information may include second reference identification information, wherein the second reference identification information is used to indicate whether to reference the encoded filter coefficients of the currently encoded filter. Determining the filter coefficients to be encoded in the filter being encoded by referencing the encoded filter coefficients of the currently encoded filter can be understood as using the determined filter coefficients of the filter being encoded / decoded to assist in determining the filter coefficients of the filter being encoded / decoded, which is a reference scheme for different coefficients within the same filter.

[0306] Furthermore, in the embodiments of this application, the reference identification information can be used to determine whether to reference encoded coefficients. The reference identification information can be a flag, wherein if the current block is a CTU corresponding to the current image, then the reference identification information can be a CTU-level flag; if the current block is a CU corresponding to the current image, then the reference identification information can be a CU-level flag. Of course, corresponding to any size sub-region in the current image, the reference identification information can also be a flag of other block levels. This application does not impose specific limitations.

[0307] Furthermore, in the embodiments of this application, whether to refer to the encoded coefficient can be determined by referring to the value of the reference identification information.

[0308] For example, in some embodiments, if the reference identification information has a first value, it is determined that the encoded coefficients are not referenced. If the reference identification information has a second value, it is determined that the encoded coefficients are referenced.

[0309] It should be noted that, in the embodiments of this application, the reference identification information can be used to indicate whether to use the encoded coefficients to determine the coefficients to be encoded. Furthermore, the first value and the second value are different, and the first value and the second value can be in parameter form or in numerical form; no limitation is made here.

[0310] Furthermore, in the embodiments of this application, the reference identification information can be an image-level mark, or a slice-level or block-level mark; this application does not impose any specific limitations.

[0311] For example, in some embodiments, the first value can be set to 1 and the second value can be set to 0; in another specific example, the first value can also be set to true and the second value can also be set to false; even in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. The first and second values ​​are not limited in any way in the embodiments of this application.

[0312] Taking a first value of 0 and a second value of 1 as an example, in this embodiment of the application, if the reference identifier information is 0, then it can be determined that the encoded coefficients are not referenced. Otherwise, if the reference identifier information is 1, then it can be determined that the encoded coefficients are referenced.

[0313] For example, in some embodiments, the first reference identification information can be represented by the syntax element control identifier talf_inter_refer, wherein the first reference identification information talf_inter_refer can indicate whether to reference the filter coefficients of an already encoded filter, that is, the first reference identification information talf_inter_refer can indicate whether to reference the encoded coefficients of different filters.

[0314] For example, in some embodiments, if the value of `talf_inter_refer` is 0, it is determined that the encoded coefficients are not referenced, specifically, the filter coefficients of the encoded filter are not referenced. If the value of `talf_inter_refer` is 1, it is determined that the encoded coefficients are referenced, specifically, the filter coefficients of the encoded filter are referenced. Of course, the value of `talf_inter_refer` is not limited to 0, and this application does not impose a specific limitation.

[0315] For example, in some embodiments, the second reference identification information can be represented by the syntax element control identifier talf_intra_refer, wherein the second reference identification information talf_intra_refer can indicate whether to reference the encoded filter coefficients of the currently encoded filter, that is, the second reference identification information talf_intra_refer can indicate whether to reference the encoded coefficients of the same filter.

[0316] For example, in some embodiments, if the value of `talf_intra_refer` is 0, it is determined that the encoded coefficients are not referenced, specifically the encoded filter coefficients of the currently encoded filter. If the value of `talf_intra_refer` is 1, it is determined that the encoded coefficients are referenced, specifically the encoded filter coefficients of the currently encoded filter. Of course, the value of `talf_intra_refer` is not limited to 0, and this application does not impose a specific limitation.

[0317] Step 2002: Determine the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient, and write the coefficient residual corresponding to the first coefficient into the bit stream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the second filter that has been encoded and / or the second coefficient, and the second coefficient is the filter coefficient of the first filter that has been encoded.

[0318] In the embodiments of this application, when the reference encoded coefficients are determined, the coefficient residual corresponding to the first coefficient can be determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient can be written into the bitstream.

[0319] It is understood that, in the embodiments of this application, the coefficient residual corresponding to the first coefficient can be used for the reconstruction of the first coefficient.

[0320] It should be noted that, in the embodiments of this application, the first coefficient can be the filter coefficient to be encoded of the first filter currently being encoded, and the first filter can be the filter being encoded.

[0321] Furthermore, in the embodiments of this application, the coefficient residual corresponding to the first coefficient can be determined based on the true value of the first coefficient and the reference encoded coefficient (reference coefficient).

[0322] Accordingly, in the embodiments of this application, when the reference encoded coefficients are determined, the coefficient residual corresponding to the coefficient residual of the first coefficient of the currently encoded first filter can be determined based on the reference encoded coefficients (reference coefficients) and in combination with the true value corresponding to the first coefficient.

[0323] Furthermore, in the embodiments of this application, when writing the coefficient residual corresponding to the first coefficient into the code stream, the residual value and residual symbol corresponding to the first coefficient can be determined based on the coefficient residual corresponding to the first coefficient; and the residual value and residual symbol are written into the code stream.

[0324] It is understood that, in the embodiments of this application, the residual value corresponding to the first coefficient can be used to determine the absolute value of the first coefficient. The sign of the residual corresponding to the first coefficient can be used as the sign of the first coefficient, including positive and negative signs.

[0325] It is understood that in the embodiments of this application, there may be a dependency relationship between the residual value corresponding to the first coefficient and the residual symbol corresponding to the first coefficient. For example, the residual symbol corresponding to the first coefficient may be encoded only when the residual value corresponding to the first coefficient is not 0; the residual symbol corresponding to the first coefficient may not be encoded when the residual value corresponding to the first coefficient is 0.

[0326] Of course, the sign of the residual corresponding to the first coefficient can also be independent of the value of the residual corresponding to the first coefficient. That is, regardless of whether the value of the residual corresponding to the first coefficient is 0, the encoding of the sign of the residual corresponding to the first coefficient is executed.

[0327] Furthermore, in the embodiments of this application, after determining the coefficient residual corresponding to the first coefficient, the residual value and the residual sign corresponding to the first coefficient can be determined based on the coefficient residual corresponding to the first coefficient.

[0328] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter. Correspondingly, the coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j], the residual value corresponding to the first coefficient can be represented as talf_resi_abs[sfIdx][j], and the residual sign corresponding to the first coefficient can be represented as talf_resi_sign[sfIdx][j].

[0329] It should be noted that, in the embodiments of this application, the reference coefficients may include the filter coefficients of the encoded second filter, or the encoded filter coefficients of the currently encoded first filter, i.e., the second coefficients.

[0330] It is understood that, in the embodiments of this application, the encoded second filter can be any one or more filters preceding the currently encoded first filter.

[0331] For example, in some embodiments, the second filter may be the preceding encoded filter of the first filter. For instance, the first filter may be the currently encoded sfIdx-th filter, and the second filter may be the sfIdx-1-th filter, which is an already encoded filter.

[0332] Furthermore, in the embodiments of this application, since the second filter is an encoded filter, all the filter coefficients of the second filter are encoded. Accordingly, when referencing the encoded filter coefficients of the second filter, any one or more filter coefficients of the second filter can be selected as reference coefficients.

[0333] It should be noted that, in the embodiments of this application, the consistency between the shape of the first filter and the shape of the second filter is not limited. That is, the first filter and the second filter can be filters with the same shape or filters with different shapes. This application does not make any specific limitations.

[0334] It should be noted that, in the embodiments of this application, the consistency between the number of coefficients of the first filter and the number of coefficients of the second filter is not limited. That is, the first filter and the second filter can be filters with a certain number of coefficients, or filters with different numbers of coefficients. This application does not make any specific limitations.

[0335] It is understood that, in the embodiments of this application, the second coefficient can be any one or more previously encoded filter coefficients preceding the first coefficient of the currently encoded first filter.

[0336] For example, in some embodiments, the second coefficient can be the previous encoded filter of the first coefficient of the currently encoded first filter. For instance, the first coefficient is the j-th filter coefficient of the currently encoded sfIdx-th filter, and the second coefficient is the (j-1)-th filter coefficient of the currently encoded sfIdx-th filter, and the second coefficient is an encoded filter coefficient.

[0337] Furthermore, in the embodiments of this application, the number of reference coefficients is not specifically limited. That is, one or more reference coefficients can be used to determine the filter coefficients to be encoded. If multiple reference coefficients are used, the source of the multiple reference coefficients is not specifically limited. For example, some reference coefficients are one or more coefficients of one or more second filters, and other reference coefficients are one or more encoded coefficients of the first filter. Alternatively, they can all be coefficients of the second filter or encoded coefficients of the first filter. This application does not make any specific limitations.

[0338] In other words, in the embodiments of this application, this application does not specifically limit the number of reference coefficients, the number of second filters, the number of coefficients of the referenced second filters, and the number of second coefficients.

[0339] It is understandable that, in the embodiments of the application, if multiple reference coefficients are used to determine the first coefficient to be encoded, one can choose to first perform preprocessing based on the multiple reference coefficients to obtain a processing result, and then derive the first coefficient to be encoded based on the processing result.

[0340] Furthermore, in the embodiments of this application, assuming the reference identification information is the first reference identification information talf_inter_refer, when determining the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient, the coefficient residual corresponding to the first coefficient can be determined based on the true value of the first coefficient and the filter coefficient of the second filter.

[0341] In other words, in the embodiments of this application, if the reference identification information is the first reference identification information talf_inter_refer, that is, when the filter coefficients of the reference already encoded filter are determined, the filter coefficients of the reference already encoded second filter can be selected, and the coefficient residual corresponding to the first coefficient can be determined according to the true value corresponding to the first coefficient and the filter coefficients of the second filter.

[0342] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the filter coefficient of the second filter, a third filter is determined in the second filter; the coefficient residual corresponding to the first coefficient is determined based on the true value of the first coefficient and the filter coefficient of the third filter.

[0343] It is understood that, in the embodiments of this application, for one or more encoded second filters, one or more encoded third filters can be selected to determine the first coefficient to be encoded. For example, the coefficient residual corresponding to the first coefficient can be determined based on the true value corresponding to the first coefficient and the filter coefficient of the third filter.

[0344] Furthermore, in an embodiment of this application, when determining the third filter in the second filter, the filter preceding the first filter in the second filter is determined as the third filter.

[0345] For example, in an embodiment of this application, assuming the first filter is the currently encoded sfIdx-th filter, and the second filter includes three encoded filters: the sfIdx-1-th filter, the sfIdx-2-th filter, and the sfIdx-3-th filter, then the sfIdx-1-th filter can be selected as the third filter, that is, the filter preceding the first filter in the second filter is selected as the third filter.

[0346] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the filter coefficients of the third filter, the third coefficient corresponding to the first coefficient is determined in the filter coefficients of the third filter; the coefficient residual corresponding to the first coefficient is determined based on the true value of the first coefficient and the third coefficient.

[0347] It is understood that in the embodiments of this application, for the encoded third filter, all filter coefficients of the third filter have been encoded. Accordingly, when referring to the filter coefficients of the encoded third filter, any one or more filter coefficients of the second filter can be selected as reference coefficients, that is, the third coefficients are determined.

[0348] It is understood that, in the embodiments of this application, when selecting reference coefficients, the third coefficient corresponding to the first coefficient can be determined from the filter coefficients of the third filter using the relevant information of the first coefficient. The relevant information of the first coefficient includes, but is not limited to, the coefficient index of the first coefficient, the filter position corresponding to the first coefficient, and the order of the filter coefficients corresponding to the first coefficient.

[0349] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, where j is the coefficient index of the first coefficient. Then, when determining the third coefficient corresponding to the first coefficient in the filter coefficients of the third filter, the j-th coefficient of the sfIdx-1-th filter (the third filter) can be selected as the third coefficient, that is, the third coefficient is represented as tAlfCoeff[sfIdx-1][j].

[0350] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the third coefficient, mathematical operations can be performed on the true value of the first coefficient and the third coefficient, such as performing a difference operation on the true value of the first coefficient and the third coefficient to determine the coefficient residual corresponding to the first coefficient.

[0351] For example, in some embodiments, it is assumed that the first coefficient is represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, and the third coefficient is represented as tAlfCoeff[sfIdx-1][j], which is the j-th coefficient of the sfIdx-1-th filter. The coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j]. Then, the coefficient residual corresponding to the first coefficient can be determined by tAlfCoeffResi[sfIdx][j] = tAlfCoeff[sfIdx][j] - tAlfCoeff[sfIdx-1][j].

[0352] Therefore, in the embodiments of this application, a new method for encoding filter coefficients is introduced, which allows for mutual reference when encoding coefficients of different filters.

[0353] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When referring to [c], the coefficients of filter 0 that have already been encoded and decoded can be used as a reference. 0,0 c 0,n The residual c′ of the coefficients of filter 1 can be obtained using the following formula. 1,n :

[0354] c′ 1,n =c 1,n -c 0,n (3)

[0355] Then the residual c′ of the coefficients of filter 1 1,n Write it into the bitstream.

[0356] For example, in some embodiments, the syntax elements refer to the following:

[0357] In this embodiment, a first reference identifier, namely the `talf_inter_refer` identifier, is introduced. When it is 1, it indicates that the coefficients of the currently decoded filter reference the coefficients of the previous filter, and the current filter coefficients need to be obtained by parsing the filter residual and the values ​​of the previous filter coefficients from the bitstream. When it is 0, it indicates that the coefficients of the current filter are encoded and decoded according to the conventional scheme. If there is a previous filter that has already been decoded before the current filter is encoded and decoded, the `talf_inter_refer` identifier needs to be parsed from the bitstream. If this syntax element does not exist in the bitstream, its default value is 0.

[0358] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0359] for(j=0;j <numCoeff;j++)

[0360] {

[0361] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx-1][j]+tAlfCoeffResi[sfIdx][j]

[0362] }

[0363] Where tAlfCoeffResi is the residual coefficient of the current filter, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0364] Furthermore, in the embodiments of this application, assuming the reference identification information is the second reference identification information talf_intra_refer, when determining the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient, the coefficient residual corresponding to the first coefficient can be determined based on the true value of the first coefficient and the second coefficient.

[0365] In other words, in the embodiments of this application, if the reference identification information is the second reference identification information talf_intra_refer, that is, when the encoded filter coefficients of the currently encoded filter are determined, the encoded second coefficients of the currently encoded first filter can be selected as references, and the coefficient residuals corresponding to the first coefficients can be determined based on the true values ​​corresponding to the first coefficients and the second coefficients.

[0366] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the second coefficient, a fourth coefficient corresponding to the first coefficient is determined from the second coefficient; the coefficient residual corresponding to the first coefficient is determined based on the true value of the first coefficient and the fourth coefficient.

[0367] It is understood that, in the embodiments of this application, for one or more encoded second coefficients of the first filter currently being encoded, any one or more filter coefficients among the one or more encoded second coefficients can be selected as reference coefficients, i.e., the fourth coefficient can be determined.

[0368] It is understood that, in the embodiments of this application, when selecting reference coefficients, the fourth coefficient corresponding to the first coefficient can be determined from the second coefficients using the relevant information of the first coefficient. The relevant information of the first coefficient includes, but is not limited to, the coefficient index of the first coefficient, the filter position corresponding to the first coefficient, and the order of the filter coefficients corresponding to the first coefficient.

[0369] Furthermore, in the embodiments of this application, when determining the fourth coefficient corresponding to the first coefficient in the second coefficient, the coefficient preceding the first coefficient in the second coefficient can be determined as the fourth coefficient.

[0370] For example, in some embodiments, the first coefficient can be represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, where j is the coefficient index of the first coefficient. The second coefficient can include the four encoded filter coefficients: the (j-1)-th, (j-2)-th, (j-3)-th, and (j-4)-th filter coefficients of the sfIdx-th filter. When determining the fourth coefficient corresponding to the first coefficient in the second coefficient, the (j-1)-th filter coefficient of the sfIdx-th filter can be selected as the fourth coefficient, that is, the fourth coefficient is represented as tAlfCoeff[sfIdx][j-1].

[0371] Furthermore, in the embodiments of this application, when determining the coefficient residual corresponding to the first coefficient based on the true value corresponding to the first coefficient and the fourth coefficient, mathematical operations can be performed on the true value corresponding to the first coefficient and the fourth coefficient, such as performing a difference operation on the true value corresponding to the first coefficient and the fourth coefficient to determine the coefficient residual corresponding to the first coefficient.

[0372] For example, in some embodiments, it is assumed that the first coefficient is represented as tAlfCoeff[sfIdx][j], which is the j-th filter coefficient of the sfIdx-th filter, and the fourth coefficient is represented as tAlfCoeff[sfIdx][j-1], which is the (j-1)-th coefficient of the sfIdx-th filter. The coefficient residual corresponding to the first coefficient can be represented as tAlfCoeffResi[sfIdx][j]. Then, the coefficient residual corresponding to the first coefficient can be determined by tAlfCoeffResi[sfIdx][j] = tAlfCoeff[sfIdx][j] - tAlfCoeff[sfIdx][j-1].

[0373] Therefore, in the embodiments of this application, a new method for encoding filter coefficients is introduced, in which coefficients within the same filter can be referenced to each other when encoding the coefficients of the same filter.

[0374] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When referring to the coefficients c of the already encoded / decoded filter 1, you can refer to the following: 1,n-1 The residual c′ of the coefficients of filter 1 can be obtained using the following formula. 1,n :

[0375] c′ 1,n =c 1,n -c 1,n-1 (4)

[0376] For example, in some embodiments, the syntax elements refer to the following:

[0377] In this embodiment, a second reference identifier, talf_intra_refer, is introduced. When it is 1, it means that the current filtering coefficient is referenced to the previous filtering coefficient, and the current filtering coefficient needs to be obtained by parsing the residual of the filtering coefficient and the value of the previous filtering coefficient from the bitstream. When it is 0, it means that the current filter coefficient is encoded and decoded according to the conventional scheme. When there is no previous filtering coefficient, the residual value is the current filtering coefficient value. If this syntax element does not exist in the bitstream, its default value is 0.

[0378] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0379] for(j=0;j <numCoeff;j++)

[0380] {

[0381] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx][j-1]+tAlfCoeffResi[sfIdx][j]

[0382] }

[0383] Where tAlfCoeffResi is the residual coefficient of the current filter coefficients, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0384] Furthermore, in an embodiment of this application, the first coefficient is written into the bitstream without referencing the encoded coefficients.

[0385] In other words, in the embodiments of this application, if it is determined that the parsed coefficients are not referenced, the first coefficient can be directly encoded.

[0386] In summary, the encoding method proposed in this application reduces the number of codewords required for encoding coefficients by using the encoded filter coefficients as a reference for the current filter coefficients to be encoded, thereby reducing codeword consumption.

[0387] It is understood that the encoding method proposed in this application, the time-domain adaptive loop filtering, can introduce various methods for representing filter coefficients. In addition to directly encoding the current filter coefficient, the current filter coefficient can also be encoded by referring to a previously encoded filter coefficient or a filter coefficient encoded in a previous filter.

[0388] This application provides an encoding method, which is a new way to determine filter coefficients. Specifically, the filter coefficients to be encoded and decoded are determined by referring to the previously encoded and decoded filter coefficients. The reference can be either the previously encoded and decoded filter coefficients of different filters or the previously encoded and decoded coefficients of the same filter being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

[0389] Based on the above embodiments, this application proposes an encoding / decoding method that can introduce two new methods for encoding and decoding filter coefficients. One method allows for mutual reference when encoding and decoding coefficients of different filters; the other allows for mutual reference when encoding and decoding coefficients within the same filter.

[0390] In the embodiments of this application, a new analytical method for filter coefficients is introduced, which allows for cross-referencing when analyzing the coefficients of different filters.

[0391] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When referring to [c], the coefficients of filter 0 that have already been encoded and decoded can be used as a reference. 0,0 c 0,n The residual c′ of the coefficients of filter 1 can be obtained analytically first. 1,n Then, the coefficients of filter 1 can be reconstructed from the coefficient residuals of filter 1 and the coefficients of filter 0, as shown in the following formula:

[0392] c 1,n =c′ 1,n +c0,n (1)

[0393] Exemplarily, in some embodiments, the coefficients [c] of the codec filter 1 1,0 c 1,n When referring to [c], the coefficients of filter 0 that have already been encoded and decoded can be used as a reference. 0,0 c 0,n The residual c′ of the coefficients of filter 1 can be obtained using the following formula. 1,n :

[0394] c′ 1,n =c 1,n -c 0,n (3)

[0395] Then the residual c1′ of the coefficients of filter 1, n Write it into the bitstream.

[0396] For example, in some embodiments, the syntax elements refer to the following:

[0397] In this embodiment, a first reference identifier, namely the `talf_inter_refer` identifier, is introduced. When it is 1, it indicates that the coefficients of the currently decoded filter reference the coefficients of the previous filter, and the current filter coefficients need to be obtained by parsing the filter residual and the values ​​of the previous filter coefficients from the bitstream. When it is 0, it indicates that the coefficients of the current filter are encoded and decoded according to the conventional scheme. If there is a previous filter that has already been decoded before the current filter is encoded and decoded, the `talf_inter_refer` identifier needs to be parsed from the bitstream. If this syntax element does not exist in the bitstream, its default value is 0.

[0398] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0399] for(j=0;j <numCoeff;j++)

[0400] {

[0401] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx-1][j]+tAlfCoeffResi[sfIdx][j]

[0402] }

[0403] Where tAlfCoeffResi is the residual coefficient of the current filter, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0404] In the embodiments of this application, a new analytical method for filter coefficients is introduced, in which coefficients within the same filter can be referenced to each other when analyzing the coefficients of the same filter.

[0405] For example, in some embodiments, the codec filter coefficients [c0, ..., c] are... n When doing so, the coefficients of the already encoded / decoded filter can be referenced. Specifically, the residual c′ of the coefficients of filter 1 can be obtained first through analysis. n Then, the coefficient residuals c′ of the filter can be used. n The encoded and decoded filter coefficients c of the filter n-1 Construct the coefficients c of filter 1 n Please refer to the following formula:

[0406] c n =c′ n +c n-1 (5)

[0407] For example, in some embodiments, the codec filter coefficients [c0, ..., c] are... n When calculating the residual, the coefficients already encoded and decoded within the filter can be referenced to obtain the residual. The residual c′ of the filter coefficients can be obtained using the following formula. n :

[0408] c ′ n =c n -c n-1 (6)

[0409] Then the residual c′ of the filter coefficients n Write it into the bitstream.

[0410] For example, in some embodiments, the syntax elements refer to the following:

[0411] In this embodiment, a second reference identifier, talf_intra_refer, is introduced. When it is 1, it means that the current filtering coefficient is referenced to the previous filtering coefficient, and the current filtering coefficient needs to be obtained by parsing the residual of the filtering coefficient and the value of the previous filtering coefficient from the bitstream. When it is 0, it means that the current filter coefficient is encoded and decoded according to the conventional scheme. When there is no previous filtering coefficient, the residual value is the current filtering coefficient value. If this syntax element does not exist in the bitstream, its default value is 0.

[0412] The process of reconstructing the coefficients of the current filter based on the residual values ​​is as follows:

[0413] for(j=0;j <numCoeff;j++)

[0414] {

[0415] tAlfCoeff[sfIdx][j]=tAlfCoeff[sfIdx][j-1]+tAlfCoeffResi[sfIdx][j]

[0416] }

[0417] Where tAlfCoeffResi is the residual coefficient of the current filter coefficients, which is obtained by combining talf_resi_abs and talf_resi_sign.

[0418] In summary, the encoding method proposed in this application reduces the number of codewords required for encoding coefficients by using the encoded filter coefficients as a reference for the current filter coefficients to be encoded, thereby reducing codeword consumption.

[0419] It is understood that the encoding method proposed in this application, the time-domain adaptive loop filtering, can introduce various methods for representing filter coefficients. In addition to directly encoding the current filter coefficient, the current filter coefficient can also be encoded by referring to a previously encoded filter coefficient or a filter coefficient encoded in a previous filter.

[0420] This application proposes an encoding / decoding method, which is a new way to determine filter coefficients. Specifically, the filter coefficients to be encoded / decoded are determined by referring to the already encoded / decoded filter coefficients. The reference can be either the already encoded / decoded filter coefficients of different filters or the already encoded / decoded coefficients of the same filter currently being encoded. This can save codewords for encoding / decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding / decoding efficiency.

[0421] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, referring to FIG8, a schematic diagram of the composition structure of the encoder 50 proposed in this application embodiment is shown. As shown in FIG8, the encoder 50 may include: a first determining portion 501; wherein,

[0422] The first determining part 501 is configured to, when determining the reference encoded coefficients, set reference identification information to indicate the reference encoded coefficients and write the reference identification information into the bitstream; determine the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient, and write the coefficient residual corresponding to the first coefficient into the bitstream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the encoded second filter and / or the second coefficient, and the second coefficient is the encoded filter coefficient of the first filter.

[0423] It should be noted that, in the embodiments of this application, encoder 50 can also be regarded as a data processing mode (or "entropy encoder"), used to encode the values ​​of the syntax elements to be encoded.

[0424] Understandably, in the embodiments of this application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or as a software functional module.

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

[0426] Therefore, embodiments of this application provide a computer-readable storage medium applied to an encoder 50, wherein the computer-readable storage medium stores a computer program, which, when executed by a first processor, implements the encoding method described in any of the foregoing embodiments.

[0427] Based on the composition of encoder 50 and the computer-readable storage medium, see Figure 9, which shows a schematic diagram of the specific hardware structure of encoder 50 provided in this embodiment. As shown in Figure 9, encoder 50 may include: a first communication interface 502, a first memory 503, and a first processor 504; the various components are coupled together through a first bus system 505. It is understood that the first bus system 505 is used to realize the connection and communication between these components. In addition to a data bus, the first bus system 505 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the first bus system 505 in the figure.

[0428] The first communication interface 502 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0429] The first memory 503 is used to store computer programs that can run on the first processor 504;

[0430] The first processor 504 is configured to, when running the computer program, perform the following: if a reference encoded coefficient is determined, set reference identification information to indicate the reference encoded coefficient and write the reference identification information into the bitstream; determine the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient, and write the coefficient residual corresponding to the first coefficient into the bitstream; wherein the first coefficient is the filter coefficient to be encoded of the currently encoded first filter; the reference coefficient includes the filter coefficient of the encoded second filter and / or the second coefficient, the second coefficient being the encoded filter coefficient of the first filter.

[0431] It is understood that the first memory 503 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 503 of the systems and methods described in this application is intended to include, but is not limited to, these and any other suitable types of memory.

[0432] The first processor 504 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the first processor 504 or by instructions in software form. The first processor 504 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the first memory 503. The first processor 504 reads the information in the first memory 503 and completes the steps of the above method in conjunction with its hardware.

[0433] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0434] Alternatively, as another embodiment, the first processor 504 is further configured to execute any of the encoding methods described in the foregoing embodiments when running the computer program.

[0435] This embodiment provides an encoder that determines the filter coefficients to be encoded or decoded by referring to the previously encoded or decoded filter coefficients. The encoder can choose to refer to the previously encoded or decoded filter coefficients of different filters or the previously encoded or decoded coefficients of the same filter being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

[0436] In another embodiment of this application, based on the same inventive concept as the foregoing embodiments, referring to FIG10, a schematic diagram of the composition structure of the decoder 70 proposed in this application embodiment is shown. As shown in FIG10, the decoder 70 may include: a second determining portion 701; wherein,

[0437] The second determining part 701 is configured to decode the bitstream and determine reference identification information; when the reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded and the coefficient residual corresponding to the first coefficient is determined; wherein, the first coefficient is the filter coefficient to be parsed of the first filter currently being parsed; based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined; wherein, the reference coefficient includes the filter coefficients of the parsed second filter and / or the second coefficient, and the second coefficient is the parsed filter coefficient of the first filter.

[0438] It should be noted that, in the embodiments of this application, the decoder 70 can also be regarded as a data processing mode (or "entropy decoder"), which is used to decode the values ​​of the syntax elements to be decoded.

[0439] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0440] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applied to the decoder 70. The computer-readable storage medium stores a computer program, which, when executed by a second processor, implements the method described in any of the foregoing embodiments.

[0441] Based on the composition of decoder 70 and the computer-readable storage medium, Figure 11 illustrates a schematic diagram of the specific hardware structure of decoder 70 provided in this embodiment. As shown in Figure 11, decoder 70 may include: a second communication interface 702, a second memory 703, and a second processor 704; the various components are coupled together through a second bus system 705. It is understood that the second bus system 705 is used to realize the connection and communication between these components. In addition to a data bus, the second bus system 705 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as the second bus system 705 in the figure.

[0442] The second communication interface 702 is used for receiving and sending signals during the process of sending and receiving information with other external network elements;

[0443] The second memory 703 is used to store computer programs that can run on the second processor 704;

[0444] The second processor 704 is configured to, when running the computer program, perform the following: decode the bitstream and determine reference identification information; if a reference parsed coefficient is determined based on the reference identification information, decode the bitstream and determine the coefficient residual corresponding to the first coefficient; wherein the first coefficient is the filter coefficient to be parsed for the currently parsed first filter; and determine the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the reference coefficient; wherein the reference coefficient includes the parsed filter coefficient of the second filter and / or the second coefficient, and the second coefficient is the parsed filter coefficient of the first filter.

[0445] Alternatively, as another embodiment, the second processor 704 is also configured to perform any of the methods described in the foregoing embodiments when running the computer program.

[0446] It is understood that the second memory 703 has similar hardware functions to the first memory 503, and the second processor 704 has similar hardware functions to the first processor 504; these will not be described in detail here.

[0447] This embodiment provides a decoder that determines the filter coefficients to be encoded or decoded by referring to the previously encoded or decoded filter coefficients. The reference can be either the previously encoded or decoded filter coefficients of different filters or the previously encoded or decoded coefficients of the same filter currently being encoded. This saves codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

[0448] In another embodiment of this application, referring to FIG12, a schematic diagram of the composition structure of the encoding and decoding system proposed in this application is shown. As shown in FIG12, the encoding and decoding system 90 may include an encoder 50 and a decoder 70.

[0449] In the embodiments of this application, the encoder 50 may be any of the encoders described in the foregoing embodiments, and the decoder 70 may be any of the decoders described in the foregoing embodiments.

[0450] Furthermore, embodiments of this application also propose a bitstream, wherein the bitstream is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least: reference identification information, residual value, residual sign, and first coefficient.

[0451] Furthermore, this embodiment provides a computer-readable storage medium for storing a bitstream generated by any of the encoding methods in the foregoing embodiments.

[0452] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0453] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0454] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0455] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0456] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

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

[0458] This application provides an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the decoding end, the bitstream is decoded to determine reference identification information. If reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded again to determine the coefficient residual corresponding to a first coefficient. The first coefficient is the filter coefficient to be parsed for the currently parsed first filter. Based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined. The reference coefficient includes the filter coefficients of the parsed second filter and / or a second coefficient, where the second coefficient is the parsed filter coefficient of the first filter. At the encoding end, if reference encoded coefficients are determined, reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream. The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bitstream. The first coefficient is the filter coefficient to be encoded for the currently encoded first filter. The reference coefficient includes the filter coefficients of the encoded second filter and / or a second coefficient, where the second coefficient is the encoded filter coefficient of the first filter. Therefore, the embodiments of this application propose a new method for determining filter coefficients, namely, determining the filter coefficients to be encoded and decoded by referring to the already encoded and decoded filter coefficients. In this case, it is possible to choose to refer to the already encoded and decoded filter coefficients of different filters, or to choose to refer to the already encoded and decoded coefficients of the same filter currently being encoded. This can save codewords for encoding and decoding filter coefficients, thereby effectively reducing codeword overhead and improving encoding and decoding efficiency.

Claims

1. A decoding method applied to a decoder, the method comprising: Decode the bitstream and determine the reference identifier information; If the reference parsed coefficients are determined based on the reference identification information, the bitstream is decoded to determine the coefficient residual corresponding to the first coefficient; wherein, the first coefficient is the filter coefficient to be parsed of the first filter currently being parsed; Based on the coefficient residuals and reference coefficients corresponding to the first coefficients, the analyzed first coefficients are determined; wherein, the reference coefficients include the analyzed filter coefficients of the second filter and / or the second coefficients, and the second coefficients are the analyzed filter coefficients of the first filter.

2. The method according to claim 1, wherein, The reference identification information includes first reference identification information, and the step of determining the parsed first coefficient based on the coefficient residual and reference coefficient corresponding to the first coefficient includes: The first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the second filter.

3. The method according to claim 2, wherein, Determining the analyzed first coefficient based on the coefficient residual corresponding to the first coefficient and the filter coefficients of the second filter includes: Determine the third filter from the second filter; The first coefficient is determined based on the coefficient residual corresponding to the first coefficient and the filter coefficient of the third filter.

4. The method according to claim 3, wherein, Determining the third filter in the second filter includes: The filter preceding the first filter in the second filter is determined as the third filter.

5. The method according to claim 3, wherein, Determining the analyzed first coefficient based on the coefficient residual corresponding to the first coefficient and the filter coefficients of the third filter includes: A third coefficient corresponding to the first coefficient is determined from the filter coefficients of the third filter; The first coefficient after analysis is determined based on the coefficient residual corresponding to the first coefficient and the third coefficient.

6. The method according to claim 1, wherein, The reference identification information includes second reference identification information, and the step of determining the parsed first coefficient based on the coefficient residual corresponding to the first coefficient and the reference coefficient includes: Based on the coefficient residual corresponding to the first coefficient and the second coefficient, the first coefficient after analysis is determined.

7. The method according to claim 6, wherein, The step of determining the analyzed first coefficient based on the coefficient residual corresponding to the first coefficient and the second coefficient includes: Determine the fourth coefficient from the second coefficient that corresponds to the first coefficient; The first coefficient after analysis is determined based on the coefficient residual corresponding to the first coefficient and the fourth coefficient.

8. The method according to claim 7, wherein, Determining the fourth coefficient corresponding to the first coefficient from the second coefficient includes: The coefficient preceding the first coefficient in the second coefficient is determined as the fourth coefficient.

9. The method according to any one of claims 1-5, wherein, The decoded bitstream determines the coefficient residual corresponding to the first coefficient, including: Decode the bitstream to determine the residual value and the residual sign corresponding to the first coefficient; Based on the residual value and the residual sign, the coefficient residual corresponding to the first coefficient is determined.

10. The method according to claim 1, wherein, The method further includes: If, based on the reference identifier information, it is determined that the parsed coefficients are not referenced, the bitstream is decoded to determine the parsed first coefficients.

11. An encoding method applied to an encoder, the method comprising: If the reference encoded coefficients are determined, reference identification information is set to indicate the reference encoded coefficients, and the reference identification information is written into the bitstream; The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bit stream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the second filter that has been encoded and / or the second coefficient, wherein the second coefficient is the encoded filter coefficient of the first filter.

12. The method according to claim 11, wherein, The reference identification information includes first reference identification information, and the step of determining the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient includes: Based on the true value of the first coefficient and the filter coefficient of the second filter, the coefficient residual corresponding to the first coefficient is determined.

13. The method according to claim 12, wherein, The step of determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the filter coefficients of the second filter includes: Determine the third filter from the second filter; Based on the true value of the first coefficient and the filter coefficient of the third filter, the coefficient residual corresponding to the first coefficient is determined.

14. The method according to claim 13, wherein, Determining the third filter in the second filter includes: The filter preceding the first filter in the second filter is determined as the third filter.

15. The method according to claim 13, wherein, Determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the filter coefficients of the third filter includes: A third coefficient corresponding to the first coefficient is determined from the filter coefficients of the third filter; Based on the true value of the first coefficient and the third coefficient, the coefficient residual corresponding to the first coefficient is determined.

16. The method according to claim 11, wherein, The reference identification information includes second reference identification information, and the step of determining the coefficient residual corresponding to the first coefficient based on the first coefficient and the reference coefficient includes: Based on the true value of the first coefficient and the second coefficient, the coefficient residual corresponding to the first coefficient is determined.

17. The method according to claim 16, wherein, The step of determining the coefficient residual corresponding to the first coefficient based on the true value of the first coefficient and the second coefficient includes: Determine the fourth coefficient from the second coefficient that corresponds to the first coefficient; Based on the true value of the first coefficient and the fourth coefficient, the coefficient residual corresponding to the first coefficient is determined.

18. The method according to claim 17, wherein, Determining the fourth coefficient corresponding to the first coefficient from the second coefficient includes: The coefficient preceding the first coefficient in the second coefficient is determined as the fourth coefficient.

19. The method according to any one of claims 11-15, wherein, The step of writing the coefficient residual corresponding to the first coefficient into the bitstream includes: The residual value and the residual sign corresponding to the first coefficient are determined based on the coefficient residual corresponding to the first coefficient; Write the residual value and the residual symbol into the code stream.

20. The method according to claim 11, wherein, The method further includes: If it is determined that the encoded coefficients are not referenced, the first coefficient is written into the bitstream.

21. A bitstream, said bitstream being generated by bit encoding based on information to be encoded; wherein, The information to be encoded includes at least: reference identification information, residual value, residual symbol, and first coefficient.

22. An encoder, the encoder comprising a first defining portion; wherein, The first determining part is configured to, when determining the reference encoded coefficients, set reference identification information to indicate the reference encoded coefficients, and write the reference identification information into the bitstream; The coefficient residual corresponding to the first coefficient is determined based on the first coefficient and the reference coefficient, and the coefficient residual corresponding to the first coefficient is written into the bit stream; wherein, the first coefficient is the filter coefficient to be encoded of the first filter currently being encoded; the reference coefficient includes the filter coefficient of the second filter that has been encoded and / or the second coefficient, wherein the second coefficient is the encoded filter coefficient of the first filter.

23. An encoder, the encoder comprising a first memory and a first processor; wherein, A first memory for storing computer programs that can run on a first processor; A first processor is configured to, while running the computer program, perform the method as described in any one of claims 11-20.

24. A decoder, the decoder comprising a second determining portion; wherein, The second determining part is configured to decode the bitstream and determine reference identification information; when a reference parsed coefficient is determined based on the reference identification information, the bitstream is decoded to determine the coefficient residual corresponding to the first coefficient; wherein, the first coefficient is the filter coefficient to be parsed of the currently parsed first filter; based on the coefficient residual corresponding to the first coefficient and the reference coefficient, the parsed first coefficient is determined; wherein, the reference coefficient includes the parsed filter coefficient of the second filter and / or the second coefficient, the second coefficient being the parsed filter coefficient of the first filter.

25. A decoder, comprising a second memory and a second processor; wherein, The second memory is used to store computer programs that can run on the second processor; A second processor is configured to, while running the computer program, perform the method as described in any one of claims 1-10.

26. A computer-readable storage medium storing a computer program that, when executed, implements the decoding method as described in any one of claims 1-10, or the encoding method as described in any one of claims 11-20.

27. A computer-readable storage medium for storing a bitstream generated by the encoding method of any one of claims 11-20.