Coding method, decoding method, bit stream, coder, decoder and storage medium
By employing the Temporal Adaptive Loop Filtering (TALF) method in video coding, and using relevant information from inter-frame reference images to nonlinearly restrict the filter input, the problem of unsatisfactory filtering effects in existing technologies is solved, thereby improving encoding and decoding performance and reducing codeword consumption.
Patent Information
- Application Number
- PCT/CN2024/103947
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2026-01-08
AI Technical Summary
In existing video coding technologies, filters fail to fully utilize the relevant information of the reconstructed image in the temporal domain, resulting in unsatisfactory filtering effects and reduced encoding and decoding performance.
The Temporal Adaptive Loop Filtering (TALF) method is adopted. During the filtering process, the limit values corresponding to the filter coefficients are selected to nonlinearly limit the input of the filter, and the relevant information of the inter-frame reference image is used to reduce codeword consumption.
It improves encoding and decoding performance by reducing codeword consumption through optimized filtering, thereby increasing encoding and decoding efficiency.
Smart Images

Figure CN2024103947_08012026_PF_FP_ABST
Abstract
Description
Coding and decoding method, code stream, encoder, decoder and storage medium TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of image processing, and particularly relate to a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. BACKGROUND
[0002] In the multi-functional video coding (VVC), the in loop filter includes a DeBlocking Filter (DBF), a Sample adaptive Offset (SAO), an Adaptive loop filter (ALF) and a Cross Component Adaptive Loop Filter (CCALF).
[0003] However, the common filtering technology does not fully utilize the related information of the temporal reconstructed image, and the filtering effect is not ideal, which reduces the coding and decoding performance.
[0004] SUMMARY
[0005] Embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can improve the filtering effect and improve the coding and decoding performance.
[0006] The technical scheme of the embodiments of the present application can be implemented as follows:
[0007] In a first aspect, the embodiments of the present application provide a decoding method applied to a decoder, and the method comprises:
[0008] In a case where it is determined that the current block image is filtered using the TALF, at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block are determined;
[0009] The code stream is decoded, and non-linear restriction identification information is determined;
[0010] In a case where it is determined that the input of the filter is restricted based on the non-linear restriction identification information, the code stream is decoded, a non-linear index parameter corresponding to the filter coefficients is determined, and a restriction value corresponding to the filter coefficients is determined according to the non-linear index parameter;
[0011] The current block is filtered based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block and the restriction value corresponding to the filter coefficients, and a filtered reconstructed value of the current block is determined.
[0012] In a second aspect, an embodiment of the present application provides an encoding method applied to an encoder, the method comprising:
[0013] determining at least one inter-frame reference image corresponding to a current image and filter coefficients corresponding to a current block;
[0014] when filtering the current image using TALF, determining non-linear restriction identification information according to a Lagrangian value when restricting input of the filter and a Lagrangian value when not restricting the input of the filter, and writing the non-linear restriction identification information into a bitstream;
[0015] when it is determined that the input of the filter is restricted, determining a restriction value corresponding to the filter coefficients, and determining a non-linear index parameter corresponding to the filter coefficients based on the restriction value corresponding to the filter coefficients, and writing the non-linear index parameter corresponding to the filter coefficients into the bitstream.
[0016] In a third aspect, an embodiment of the present application provides a bitstream, the bitstream being generated by bit encoding to-be-encoded information; wherein the to-be-encoded information at least comprises non-linear restriction identification information and a non-linear index parameter.
[0017] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first determining unit; wherein
[0018] the first determining unit is configured to determine at least one inter-frame reference image corresponding to a current image and filter coefficients corresponding to a current block; when filtering the current image using TALF, determine non-linear restriction identification information according to a Lagrangian value when restricting input of the filter and a Lagrangian value when not restricting the input of the filter, and write the non-linear restriction identification information into a bitstream; when it is determined that the input of the filter is restricted, determine a restriction value corresponding to the filter coefficients, and determine a non-linear index parameter corresponding to the filter coefficients based on the restriction value corresponding to the filter coefficients, and write the non-linear index parameter corresponding to the filter coefficients into the bitstream.
[0019] In a fifth aspect, an embodiment of the present application provides an encoder, the encoder comprising a first memory and a first processor; wherein
[0020] the first memory is configured to store a computer program capable of running on the first processor;
[0021] the first processor is configured to execute the encoding method as described above when running the computer program.
[0022] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second determining unit, wherein
[0023] The second determining unit is configured to, in a case where it is determined that the current block image is filtered using TALF, determine at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block; decode the code stream to determine non-linear restriction identification information; in a case where it is determined based on the non-linear restriction identification information that the input of the filter is restricted, decode the code stream to determine a non-linear index parameter corresponding to the filter coefficients, and determine a restriction value corresponding to the filter coefficients according to the non-linear index parameter; filter the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block, and the restriction value corresponding to the filter coefficients, to determine the filtered reconstructed value of the current block.
[0024] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor, wherein
[0025] The second memory is configured to store a computer program capable of running on the second processor.
[0026] The second processor is configured to, when running the computer program, execute the decoding method as described above.
[0027] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed to implement the decoding method as described in the first aspect, or to implement the encoding method as described in the second aspect.
[0028] In a ninth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium being configured to store a code stream generated by the encoding method as described in the first aspect.
[0029] The embodiment of the present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium. At the decoding end, when it is determined that the current block image is filtered by using TALF, at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block are determined; the code stream is decoded to determine non-linear restriction identification information; when it is determined that the input of the filter is restricted based on the non-linear restriction identification information, the code stream is decoded to determine a non-linear index parameter corresponding to the filter coefficients, and a restriction value corresponding to the filter coefficients is determined according to the non-linear index parameter; the current block is filtered based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block and the restriction value corresponding to the filter coefficients, to determine the filtered reconstructed value of the current block. At the encoding end, at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block are determined; when the current image is filtered by using TALF, the non-linear restriction identification information is determined according to the cost value when the input of the filter is restricted and the cost value when the input of the filter is not restricted, and the non-linear restriction identification information is written into the code stream; when it is determined that the input of the filter is restricted, the restriction value corresponding to the filter coefficients is determined, and the non-linear index parameter corresponding to the filter coefficients is determined based on the restriction value corresponding to the filter coefficients, and the non-linear index parameter corresponding to the filter coefficients is written into the code stream. Therefore, the embodiment of the present application provides a time domain adaptive loop filtering method, in the TALF filtering process, the restriction value corresponding to the filter coefficients can be selected to perform non-linear restriction on the input of the filter, so that the code word consumption can be reduced, and the coding and decoding performance is improved. BRIEF DESCRIPTION OF DRAWINGS
[0030] FIG. 1 is an application schematic diagram of an encoding framework provided by the related art;
[0031] FIG. 2 is an application schematic diagram of a loop filtering module provided by the related art;
[0032] FIG. 3 is a shape schematic diagram one of a common luma adaptive loop filter;
[0033] FIG. 4 is a shape schematic diagram two of a common chroma adaptive loop filter;
[0034] FIG. 5 is a realization process schematic diagram of loop filtering;
[0035] FIG. 6 is a shape schematic diagram of a cross-component adaptive filter;
[0036] FIG. 7 is a relationship of encoding / decoding and playing order under a RA configuration;
[0037] FIG. 8 is a system composition block diagram of an encoder provided by the embodiment of the present application;
[0038] Figure 9 is a system block diagram of a decoder according to an embodiment of the present application;
[0039] Figure 10 is a flowchart of a decoding method according to an embodiment of the present application;
[0040] Figure 11 is a diagram of an implementation of TALF filtering according to an embodiment of the present application;
[0041] Figure 12 is a diagram of another implementation of TALF filtering according to an embodiment of the present application;
[0042] Figure 13 is a diagram of a third implementation of TALF filtering according to an embodiment of the present application;
[0043] Figure 14 is a diagram of a fourth implementation of TALF filtering according to an embodiment of the present application;
[0044] Figure 15 is a diagram of a fifth implementation of TALF filtering according to an embodiment of the present application;
[0045] Figure 16 is a diagram of a sixth implementation of TALF filtering according to an embodiment of the present application;
[0046] Figure 17 is a diagram of a seventh implementation of TALF filtering according to an embodiment of the present application;
[0047] Figure 18 is a diagram of a first implementation of a filter according to an embodiment of the present application;
[0048] Figure 19 is a diagram of a second implementation of a filter according to an embodiment of the present application;
[0049] Figure 20 is a diagram of a third implementation of a filter according to an embodiment of the present application;
[0050] Figure 21 is a diagram of a fourth implementation of a filter according to an embodiment of the present application;
[0051] Figure 22 is a diagram of a fifth implementation of a filter according to an embodiment of the present application;
[0052] Figure 23 is a diagram of a sixth implementation of a filter according to an embodiment of the present application;
[0053] Figure 24 is a diagram of a seventh implementation of a filter according to an embodiment of the present application;
[0054] Figure 25 is a flowchart of an encoding method according to an embodiment of the present application;
[0055] Figure 26 is a diagram of an eighth implementation of a filter according to an embodiment of the present application;
[0056] Figure 27 is a diagram of a ninth implementation of a filter according to an embodiment of the present application;
[0057] Figure 28 is a block diagram of an encoder according to an embodiment of the present application;
[0058] Fig. 29 is a specific hardware structure diagram of the encoder according to the embodiment of the present application;
[0059] Fig. 30 is a composition structure diagram of the decoder according to the embodiment of the present application;
[0060] Fig. 31 is a specific hardware structure diagram of the decoder according to the embodiment of the present application;
[0061] Fig. 32 is a composition structure diagram of the codec system according to the embodiment of the present application. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the related application, but not to limit the application. In addition, it should be noted that only the parts related to the application are shown in the drawings for convenience of description.
[0063] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subset of all possible embodiments, and can be combined with each other without conflict. It should be noted that the terms "first\second\third" involved in the embodiments of the present application are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0064] Digital video compression technology is mainly to compress large digital video data for transmission and storage. With the surge of Internet video and people's increasing demand for video clarity, although the existing digital video compression standard can save a lot of video data, better digital video compression technology is still needed to reduce the bandwidth and traffic pressure of digital video transmission.
[0065] In the process of digital video encoding, the encoder reads unequal samples of the original video sequence of different color formats, including luminance components and chrominance components, i.e. the encoder reads a black and white or color image. Then the image is divided into blocks, and the block data is handed over to the encoder for encoding.
[0066] The general-purpose video coding standards all adopt a hybrid coding framework based on blocks. Each frame of a video image is partitioned into square-shaped Largest Coding Unit (LCU) or Coding Tree Unit (CTU) of the same size (e.g., 128x128, 64x64, etc.), each of which can be further partitioned into rectangular Coding Unit (CU) according to a rule; and a coding unit can be further partitioned into smaller Prediction Unit (PU), Transform Unit (TU), etc.
[0067] FIG. 1 is a schematic diagram of an application of a coding framework provided by the related art. As shown in FIG. 1, the hybrid coding framework can include a prediction module 11, a transform and quantization module 12, an entropy coding module 13, an inverse quantization and inverse transform module 14, a loop filtering module 15, and a decoded picture buffer module 16. The prediction module 11 can include an intra prediction module 11a and an inter prediction module 11b, and the inter prediction module 11b can include a motion estimation module and a motion compensation module. Because there is a strong correlation between adjacent samples in a frame of a video image, using an intra prediction mode in a video coding technology can eliminate spatial redundancy between adjacent samples. However, because there is also a strong similarity between adjacent frames in a video image, using an inter prediction mode in a video coding technology can eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. The basic process of a video codec is as follows: at an encoding end, a frame of an image is divided into blocks, an intra prediction or an inter prediction is used for a coding block to generate a prediction block of the coding block, an original block of the coding block is subtracted from the prediction block to obtain a residual block, a transform and quantization are performed on the residual block to obtain a quantized coefficient matrix, and the quantized coefficient matrix is entropy coded and output to a bitstream. At a decoding end, an intra prediction or an inter prediction is used for a coding block to generate a prediction block of the coding block, and on the other hand, a quantized coefficient matrix is obtained by decoding the bitstream, the quantized coefficient matrix is inverse quantized and inverse transformed to obtain a residual block, and the prediction block and the residual block are added to obtain a reconstructed value. The reconstructed value constitutes a reconstructed image, and a decoded image is obtained by performing loop filtering on the reconstructed image on a block basis or on an image basis. The encoding end also needs to perform similar operations as the decoding end to obtain a decoded image. The decoded image can be used as a reference frame for inter prediction of subsequent frames. If necessary, block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information determined by the encoding end need to be output to the bitstream. The decoding end analyzes and determines the same block division information, prediction, transform, quantization, entropy coding, loop filtering, and other mode information or parameter information as the encoding end, so as to ensure that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end. The decoded image obtained by the encoding end is usually also called a reconstructed image. When prediction is performed, a coding block can be divided into prediction units, and when transform is performed, the coding block can be divided into transform units. The division of the prediction units and the transform units can be different. The above is the basic process of a video codec under a hybrid coding framework based on blocks. With the development of technology, some modules or steps of the framework or process can be optimized. Embodiments of the present application are applicable to the basic process of a video codec under the hybrid coding framework based on blocks, but are not limited to the framework and process.
[0068] It can be understood that, intra prediction only refers to the information of the same frame image, predicts the sample information in the current partition block, and is used to eliminate spatial redundancy; inter prediction can refer to the image information of different frames, uses motion estimation to search for a motion vector information most matching the current partition block, and is used to eliminate temporal redundancy; transform converts the predicted image block to a frequency domain, energy is redistributed, and information not sensitive to human eyes can be removed in combination with quantization, and is used to eliminate visual redundancy; entropy coding can eliminate character redundancy according to a current context model and probability information of a binary code stream; and loop filtering mainly processes samples after inverse transform and inverse quantization, makes up for distortion information, and provides better reference for subsequent coding samples.
[0069] Loop filtering is widely used in existing video coding standards, which greatly improves the subjective and objective quality of reconstructed video. In VVC, loop filtering includes DeBlocking Filter (DBF), Sample adaptive Offset (SAO), Adaptive loop filter (ALF) and Cross Component Adaptive Loop Filter (CCALF). In the latest JVET traditional video coding exploration platform reference software test model (Enhanced Compression Model, ECM), loop filtering additionally includes Cross component sample adaptive offset (CCSAO) and Bilateral filter (BIF). For example, FIG. 2 is an application schematic diagram of a loop filtering module provided by the related art, and a block diagram of ECM loop filtering is shown in FIG. 2.
[0070] The principle of adaptive loop filtering and cross component adaptive loop filtering is to calculate one or more sets of filter coefficients through the relationship between reconstructed values and original sample values. The filter coefficients are transmitted through a code stream, and the decoder can construct a filter after obtaining the filter coefficients, and use the filter to filter the reconstructed image, so that the reconstructed image is closer to the original image after filtering.
[0071] The adaptive loop filtering in VVC can be applied to luminance and chrominance components. FIG. 3 is a shape diagram of a common luminance adaptive loop filter, as shown in FIG. 3, the filter on the luminance component is a 7x7 diamond-shaped coefficient symmetric filter. FIG. 4 is a shape diagram of a common chrominance adaptive loop filter, as shown in FIG. 4, the filter on the chrominance component is a 5x5 diamond-shaped coefficient symmetric filter.
[0072] The adaptive loop filter for luma and chroma in VVC uses the reconstructed samples under the filter window as input values, which are multiplied by adaptive filter coefficients and then summed to produce a correction value for the center position of the filter. The correction value is added to the reconstructed value at the center position to obtain the filtered value.
[0073] In ECM, the adaptive loop filter is more refined. The adaptive loop filter in ECM has more coefficients, and the input values of the filter are not limited to the current reconstructed value, but can also include residual values, reconstructed values before deblocking filtering, reconstructed values after deblocking filtering, reconstructed values after Gaussian filtering, and the like. Most of the inputs of the adaptive loop filter in ECM have undergone some pre-filtering processing, so that the adaptive loop filter does not need to transmit a large number of adaptive coefficients through the code stream as before.
[0074] Exemplarily, the cross-component adaptive filter in VVC is an 8-coefficient filter, which is only applicable to the chroma component. The cross-component adaptive filter uses the reconstructed value of luma as the filter input, and produces a correction value with the filter coefficients to be added to the chroma component to improve the subjective and objective quality of the chroma. In ECM, the number of filter coefficients is further increased to achieve higher filtering efficiency. At the same time, the residual value of luma and the reconstructed value of chroma are further made as inputs of the cross-component adaptive filter.
[0075] FIG. 5 is a schematic diagram of the implementation process of loop filtering. As shown in FIG. 5, the CCALF can take the reconstructed information and the residual information (l0) of luma as inputs, so the CCALF takes the luma reconstructed information and the luma residual information output by the SAO as inputs, calculates the filter coefficients to perform filtering processing, and obtains the filtering result (l1). or In addition, the chroma ALF itself filters the chroma reconstructed information output by the SAO to obtain the corresponding filtering result. Finally, the filtering result (l1) of the CCALF and the filtering result of the chroma ALF are added to obtain the final chroma filtering result. or
[0076] FIG. 6 is a schematic diagram of the shape of the cross-component adaptive filter. As shown in FIG. 6, the luma information (luma samples) can be used to minimize the error between the chroma reconstructed image and the original image, so as to complete the correction of the chroma samples.
[0077] Video encoding and decoding usually include three mainstream configurations: all intra (AI), random access (RA) and low delay (LD). In AI configuration, all video frames are encoded using intra coding technology; in RA configuration, according to the setting, a plurality of inter-coded frames are inserted between every two intra-coded frames; in LD configuration, except for the first encoded frame being an intra-coded frame, the rest are inter-coded frames. In AI and LD configurations, the encoding and decoding order of video frames is the same as the playing order, while in RA, the encoding and decoding order and the playing order can be different.
[0078] Exemplarily, FIG. 7 is a relationship between the encoding / decoding and playing order in an RA configuration. As shown in FIG. 7, the actual RA encoding / decoding order is not performed according to the variable (picture order count, POC) order used to determine the video playing order. For example, in the current ECM CTC test condition, the encoding / decoding order, POC value and temporal level (TemporalId, TID) relationship of RA are shown in Table 1 as follows:
[0079] Table 1
[0080] The inter-coded frame with a larger TID has more available reference images and is often easier to compress. Therefore, the higher the TID, the larger the quantization parameter used, and the lower the code rate can be.
[0081] Adaptive parameter set (APS) is a picture-level parameter set, which is used to transmit some adaptive parameters. The APS syntax element table in VVC is as follows:
[0082] The APS parameter set includes a plurality of syntax elements, wherein aps_adaptation_parameter_set_id is used to assign an index to the currently decoded APS set, aps_params_type is used to indicate the type of the APS parameter set, which in VVC can be a parameter set for encoding ALF adaptive parameters, or a parameter set for luma mapping with chroma scaling (LMCS) filter or SCALING. When this APS is an ALF type parameter set, the number of ALF filters, filter parameters and other data are further parsed.
[0083] Since the common filtering techniques do not fully utilize the correlation information of the time-domain reconstructed image, the filtering effect is not ideal, and the coding and decoding performance is reduced. In this regard, the TALF scheme is proposed in the embodiments of the present application, which can fully utilize the correlation information of the inter-frame reference image, thereby improving the filtering effect.
[0084] Further, the embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium. In the TALF filtering process, the limiting value corresponding to the filter coefficient can be selected to perform nonlinear limiting on the input of the filter, thereby reducing the consumption of codewords and improving the coding and decoding performance.
[0085] Referring to FIG. 8, an example of a system composition block diagram of an encoder provided by the embodiments of the present application is shown. As shown in FIG. 8, the encoder 10 can include a partition unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, a dequantization unit 110, an inverse transform unit 111, a second adder 112, a filtering unit 113, a decoded picture buffer (DPB) unit 114 and an entropy encoding unit 115. Here, the input of the encoder 10 can be a video composed of a series of pictures or a still picture, and the output of the encoder 10 can be a bitstream (also referred to as a "code stream") for representing the compressed version of the input video.
[0086] The partition unit 101 partitions the pictures in the input video into one or more coding tree units (CTUs). The partition unit 101 divides the picture into a plurality of tiles (or 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. In addition, the partition unit 101 can form one or more slices, wherein a slice can include one or more tiles arranged in raster order in the picture, or one or more tiles covering a rectangular region in the picture. The partition unit 101 can also form one or more sub-pictures, wherein a sub-picture can include one or more slices, tiles or bricks.
[0087] In the encoding process of the encoder 10, the partition unit 101 delivers a CTU to the prediction unit 102. Generally, the prediction unit 102 can be composed of a block partition unit 103, a motion estimation (ME) unit 104, a motion compensation (MC) unit 105, and an intra prediction unit 106. Specifically, the block partition unit 103 iteratively partitions an input CTU into smaller coding units (CUs) using quad-tree partitioning, binary-tree partitioning, and ternary-tree partitioning. The prediction unit 102 can obtain an inter prediction block for a CU using the ME unit 104 and the MC unit 105. The intra prediction unit 106 can obtain an intra prediction block for a CU using various intra prediction modes including the MIP mode. In an example, a rate-distortion optimized motion estimation approach can be invoked by the ME unit 104 and the MC unit 105 to obtain the inter prediction block, and a rate-distortion optimized mode determination approach can be invoked by the intra prediction unit 106 to obtain the intra prediction block.
[0088] The prediction unit 102 outputs the prediction block of a CU, and the first adder 107 calculates the difference between the CU in the output of the partition unit 101 and the prediction block of the CU, i.e., a residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs quantized coefficients (i.e., levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in the transform unit 108 and outputs a reconstructed residual. The second adder 112 calculates a reconstructed CU by adding the reconstructed residual and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 to be used as an intra prediction reference. After all CUs in a picture or sub-picture are reconstructed, the filter unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filter unit 113 contains one or more filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, an adaptive loop filter (ALF), a luma mapping with chroma scaling (LMCS) filter, and a neural network based filter, etc. Alternatively, when the filter unit 113 determines that a CU is not to be used as a reference for encoding of other CUs, the filter unit 113 performs loop filtering on one or more target samples in the CU.
[0089] The output of the filtering unit 113 is decoded pictures or sub-pictures, which are buffered to the DPB unit 114. The DPB unit 114 outputs the decoded pictures or sub-pictures according to the timing and control information. Here, the pictures stored in the DPB unit 114 can also be used as reference for the inter prediction or intra prediction performed by the prediction unit 102. Finally, the entropy encoding unit 115 converts the parameters (such as control parameters and supplemental information, etc.) necessary for decoding the pictures from the encoder 10 into binary form, and writes such binary form into the bitstream according to the syntax structure of each data unit, i.e., the bitstream finally output by the encoder 10.
[0090] Further, the encoder 10 can be a computing device having a first processor and a first memory storing a computer program. When the first processor reads and runs the computer program, the encoder 10 reads the input video and generates the corresponding bitstream. In addition, the encoder 10 can also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 9.
[0091] Referring to FIG. 9, it shows an example of system composition block diagram of a decoder provided by an embodiment of the present application. As shown in FIG. 9, the decoder 20 can include a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transformation unit 206, an adder 207, a filtering unit 208, and a decoded picture buffer unit 209. Here, the input of the decoder 20 is a bitstream used to represent a compressed version of a video or a still picture, and the output of the decoder 20 can be a decoded video composed of a series of pictures or a decoded still picture.
[0092] The input bitstream of the decoder 20 can be the bitstream generated by the encoder 10. The parsing unit 201 parses the input bitstream and obtains the values of the syntax elements from the input bitstream. The parsing unit 201 converts the binary representation of the syntax elements into digital values and sends the digital values to the units in the decoder 20 to obtain one or more decoded pictures. The parsing unit 201 can also parse one or more syntax elements from the input bitstream to display the decoded pictures.
[0093] During the decoding process of the decoder 20, the parsing unit 201 sends the values of the syntax elements and one or more variables used to obtain one or more decoded pictures, which are set or determined according to the values of the syntax elements, to the units in the decoder 20.
[0094] The prediction unit 202 determines a prediction block for a current decoding block (e.g., a CU). Here, the prediction unit 202 can include a motion compensation unit 203 and an intra prediction unit 204. Specifically, when an inter decoding mode is indicated for decoding the current decoding block, the prediction unit 202 passes relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain an inter prediction block; when an intra prediction mode (including a MIP mode indicated based on a MIP mode index value) is indicated for decoding the current decoding block, the prediction unit 202 passes relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain an intra prediction block.
[0095] The inverse quantization unit 205 has the same function as the inverse quantization unit 110 in the encoder 10. The inverse quantization unit 205 performs a scaling operation on the quantized coefficients (i.e., levels) from the parsing unit 201 to obtain reconstructed coefficients.
[0096] 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., inverse operations of one or more transform operations performed by the inverse transform unit 111 in the encoder 10) to obtain reconstructed residuals.
[0097] The adder 207 performs an addition operation on its inputs (a prediction block from the prediction unit 202 and reconstructed residuals from the inverse transform unit 206) to obtain a reconstructed block for the current decoding block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks encoded in the intra prediction mode.
[0098] After all CUs in a picture or sub-picture are reconstructed, the filter unit 208 performs loop filtering on the reconstructed picture or sub-picture. The filter unit 208 contains one or more filters, such as a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, a luma mapping and chroma scaling filter, and a neural network based filter, etc. Alternatively, when the filter unit 208 determines that a reconstructed block is not used as a reference for decoding other blocks, the filter unit 208 performs loop filtering on one or more target samples in the reconstructed block. Here, the output of the filter unit 208 is a decoded picture or sub-picture, which is buffered to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture according to the timing and control information. Pictures stored in the DPB unit 209 can also be used as a reference for performing inter prediction or intra prediction by the prediction unit 202.
[0099] Further, the decoder 20 can be a second processor and a second memory recording a computer program. When the first processor reads and runs the computer program, the decoder 20 reads the input code stream and generates the corresponding decoded video. In addition, the decoder 20 can also be a computing device with one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 8.
[0100] It should be further noted that when the embodiments of the present application are applied to the encoder 10, the "coding block" specifically refers to a current block to be encoded in a video image (which can also be referred to as a "coding block" for short); when the embodiments of the present application are applied to the decoder 20, the "coding block" specifically refers to a current block to be decoded in a video image (which can also be referred to as a "decoding block" for short).
[0101] Based on FIG. 7, the encoding method in the embodiments of the present application is mainly applied to the "filtering unit 113" part in the encoder 10.
[0102] Based on FIG. 8, the decoding method in the embodiments of the present application is mainly applied to the "filtering unit 208" part in the decoder 20.
[0103] That is, the encoding and decoding method in the embodiments of the present application can be applied to a video encoding system (referred to as an "encoder" for short), a video decoding system (referred to as a "decoder" for short), or even both a video encoding system and a video decoding system, but here is not limited.
[0104] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0105] An embodiment of the present application proposes a decoding method, which is applied to a decoder and used in a scene of performing filtering processing through a TALF filter. FIG. 10 is a schematic diagram of the decoding method proposed in the embodiment of the present application. As shown in FIG. 10, the method of the decoder for decoding processing can include the following steps:
[0106] Step 1001: In a case where it is determined that a current block image uses TALF for filtering, at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block are determined.
[0107] In the embodiments of the present application, if it is determined that the current image uses TALF for filtering, at least one inter-frame reference image corresponding to the current image and filter coefficients corresponding to the current block can be determined.
[0108] Further, in the embodiments of the present application, the code stream can be decoded first to determine the first syntax element identification information.
[0109] It can be understood that, in the embodiments of the present application, the code stream is decoded, and the first syntax element identification information can be determined. The first syntax element identification information can be used to determine whether the current block in the current picture is filtered using the TALF, i.e., based on the first syntax element identification information, it can be determined whether the TALF filter is used to filter the reconstructed value of the image component of the current block.
[0110] Further, in the embodiments of the present application, for the TALF filter, the corresponding input information can include at least one inter-frame reference picture corresponding to the current picture, and the at least one inter-frame reference picture can be a decoded reconstructed picture in the time domain. The TALF filtering of the current block in the current picture can be completed using the reconstructed sample value of the at least one inter-frame reference picture.
[0111] It can be understood that, in the embodiments of the present application, the current block can be a CTU determined after the current picture is divided, the current block can also be a coding unit (CU) obtained after the CTU is divided, and the current block can also be a sub-region of any size obtained after the current picture is divided. The size and the obtaining manner of the current block in the current picture are not limited in the present application.
[0112] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether the TALF is used to filter the current block. The first syntax element identification information can be a flag. If the current block is a CTU corresponding to the current picture, the first syntax element identification information can be a CTU-level flag. If the current block is a CU corresponding to the current picture, the first syntax element identification information can be a CU-level flag. Of course, for a sub-region of any size in the current picture, the first syntax element identification information can also be a flag of another block level. The present application does not make specific limitation.
[0113] Further, in the embodiments of the present application, whether the TALF is used to filter the current block can be determined by the value of the first syntax element identification information.
[0114] Exemplarily, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that the TALF is not used to filter the current block. When the value of the first syntax element identification information is not the first value, it is determined that the TALF is used to filter the current block.
[0115] It should be noted that, in the embodiments of the present application, the first syntax element identification information can be used to indicate whether the TALF is used to filter the current block. In addition, the first value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0116] Exemplarily, in some embodiments, if the first syntax element identifies information as a block level flag, in one specific example, the first value can be set as 0; in another specific example, the first value can also be set as false. The first value in the embodiments of the present application is not limited in any way.
[0117] Taking the first value as 0 as an example, in the embodiments of the present application, if the value of the first syntax element identifying information is 0, it can be determined that the current block does not use TALF for filtering. Otherwise, if the value of the first syntax element identifying information is not 0, it can be determined that the current block uses TALF for filtering.
[0118] Exemplarily, in some embodiments, if the current block of the current image is a CTU, the first syntax element identifying information can be a CTU level syntax, for example, the first syntax element identifying information can be represented by a syntax element control flag talf_ctb_idc[CtbAddrX][CtbAddrY], that is, talf_ctb_idc[CtbAddrX][CtbAddrY] indicates whether TALF is used for filtering the current block of the current image. If the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0, it is determined that TALF is not used for filtering the current block, and if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is not 0, it is determined that TALF is used for filtering the current block. Of course, the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is not limited to 0, and the present application does not make specific limitations.
[0119] Further, in the embodiments of the present application, the code stream can be decoded first to determine the second syntax element identifying information; in the case where it is determined based on the second syntax element identifying information that the current image is allowed to use TALF for filtering, the determination process of the first syntax element identifying information is performed, that is, the parsing process of the first syntax element identifying information is performed.
[0120] Further, in the embodiments of the present application, the second syntax element identifying information can be used to determine whether the current image is allowed to use TALF for filtering. The second syntax element identifying information can be a flag.
[0121] It should be noted that, in the embodiments of the present application, the second syntax element identifying information can be a picture level flag, a slice level (slice level) flag, a sub-picture level flag, or a tile level flag. The present application does not make specific limitations.
[0122] Exemplarily, in some embodiments, if the second syntax element identifies information is a flag at slice level, the second syntax element identifies information can be used to determine whether the current slice is allowed to use TALF for filtering.
[0123] Further, in embodiments of the present application, whether the current picture (and / or the current slice) is allowed to use TALF for filtering can be determined by the value of the second syntax element identifies information.
[0124] Exemplarily, in some embodiments, if the value of the second syntax element identifies information is the second value, it is determined that the current picture (and / or the current slice) is allowed to use TALF for filtering. If the value of the second syntax element identifies information is the third value, it is determined that the current picture (and / or the current slice) is not allowed to use TALF for filtering.
[0125] It should be noted that, in embodiments of the present application, the second syntax element identifies information can be used to indicate whether the current picture (and / or the current slice) is allowed to use TALF for filtering. In addition, the second value and the third value are different, and the second value and the third value can be in the form of a parameter or in the form of a number. In general, the second syntax element identifies information can be a parameter written in a slice header or a picture header, which is not limited herein.
[0126] It should be further noted that, if the second syntax element identifies information is a flag at picture level or a flag at slice level, in one specific example, the second value can be set to 1, and the third value can be set to 0; in another specific example, the second value can also be set to true, and the third value can also be set to false; or in yet another specific example, the second value can also be set to 0, and the third value can also be set to 1; or the second value can also be set to false, and the third value can also be set to true. The second value and the third value in embodiments of the present application are not limited.
[0127] Suppose the second syntax element identifies information is a flag at picture level, and the second value is 1 and the third value is 0, in embodiments of the present application, if the value of the second syntax element identifies information is 1, it is determined that the current picture uses TALF for filtering. Otherwise, if the value of the second syntax element identifies information is 0, it is determined that the current picture does not use TALF for filtering.
[0128] Exemplarily, in some embodiments, assuming the second syntax element identification information is a picture level flag, the second syntax element identification information can be represented by a syntax element ph_talf_enabled_flag, i.e., ph_talf_enabled_flag indicates whether the current picture is allowed to use TALF for filtering. If the value of ph_talf_enabled_flag is 0, it is determined that the current picture is not allowed to use TALF for filtering, and if the value of ph_talf_enabled_flag is 1, it is determined that the current picture is allowed to use TALF for filtering.
[0129] Exemplarily, in some embodiments, assuming the second syntax element identification information is a slice level flag, the second syntax element identification information can be represented by a syntax element sh_talf_enabled_flag, i.e., sh_talf_enabled_flag indicates whether the current slice is allowed to use TALF for filtering. If the value of sh_talf_enabled_flag is 0, it is determined that the current slice is not allowed to use TALF for filtering, and if the value of sh_talf_enabled_flag is 1, it is determined that the current slice is allowed to use TALF for filtering.
[0130] Of course, the value of sh_talf_enabled_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0131] Therefore, in the embodiments of the present application, the parsing of the first syntax element identification information can be dependent on the second syntax element identification information. That is, the block level identification can depend on the picture level identification, or the block level identification can depend on the slice level identification. For example, in the case of determining that the current picture (and / or the current slice) uses TALF for filtering based on the second syntax element identification information, the determination of the first syntax element identification information can be further performed, otherwise, the first syntax element identification information does not need to be decoded again.
[0132] Exemplarily, in some embodiments, an example of encoding picture level TALF identifier (second syntax element identification information) in picture header and corresponding APS index can be as follows:
[0133] In the above example, ph_talf_enabled_flag is used to indicate whether the current picture uses TALF for filtering, and ph_talf_aps_id can be used to indicate in which APS parameter set the adaptive parameters (such as the number of filters, filter coefficients) of TALF and other information are obtained when TALF is used.
[0134] Further, in the embodiments of the present application, the code stream can be decoded first to determine the third syntax element identification information; and in the case that it is determined based on the third syntax element identification information that the current sequence is filtered using TALF, the determination process of the second syntax element identification information is performed.
[0135] Further, in the embodiments of the present application, the third syntax element identification information can be used to determine whether the current sequence is filtered using TALF. The third syntax element identification information can be a flag, for example, a sequence-level flag.
[0136] Further, in the embodiments of the present application, whether the current sequence is filtered using TALF can be determined by the value of the third syntax element identification information.
[0137] For example, in some embodiments, in the case that the value of the third syntax element identification information is a fourth value, it is determined that the current sequence is filtered using TALF. In the case that the value of the third syntax element identification information is a fifth value, it is determined that the current sequence is not filtered using TALF.
[0138] It should be noted that in the embodiments of the present application, the third syntax element identification information can be used to indicate whether the current sequence is filtered using TALF. In addition, the fourth value and the fifth value are different, and the fourth value and the fifth value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0139] It should also be noted that if the third syntax element identification information is a sequence-level flag, in one specific example, the fourth value can be set to 1, and the fifth value can be set to 0; in another specific example, the fourth value can also be set to true, and the fifth value can also be set to false; or in yet another specific example, the fourth value can also be set to 0, and the fifth value can also be set to 1; or the fourth value can also be set to false, and the fifth value can also be set to true. The fourth value and the fifth value in the embodiments of the present application are not limited.
[0140] Suppose the third syntax element identification information is a sequence-level flag, and the fourth value is 1 and the fifth value is 0, in the embodiments of the present application, if the value of the third syntax element identification information is 1, it can be determined that the current sequence is filtered using TALF. Otherwise, if the value of the third syntax element identification information is 0, it can be determined that the current sequence is not filtered using TALF.
[0141] Exemplarily, in some embodiments, assuming that the third syntax element identification information is a sequence level flag, the third syntax element identification information can be represented by a syntax element sps_talf_enabled_flag, i.e., sps_talf_enabled_flag indicates whether TALF is used for filtering the current sequence. If the value of sps_talf_enabled_flag is 0, it is determined that TALF is not used for filtering the current sequence, and if the value of sps_talf_enabled_flag is 1, it is determined that TALF is used for filtering the current sequence.
[0142] Of course, the value of sps_talf_enabled_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0143] Therefore, in the embodiments of the present application, the parsing of the second syntax element identification information can depend on the third syntax element identification information, i.e., the identification at the picture level (and / or slice level) can depend on the identification at the sequence level. For example, in the case of determining that TALF is used for filtering the current sequence based on the third syntax element identification information, the determination of the second syntax element identification information can be further performed, otherwise, the second syntax element identification information does not need to be decoded again.
[0144] That is, in the embodiments of the present application, TALF can include a sequence level enabling identification, i.e., the third syntax element identification information. For example, the manner of adding TALF sequence level identification in the standard text can be as follows:
[0145] Among them, sps_talf_enabled_flag is used to indicate whether TALF is used for filtering the current sequence, and sps_alf_enabled_flag is used to indicate whether ALF is used for filtering the current sequence.
[0146] Further, in the embodiments of the present application, the sequence level TALF identification can depend on the sequence level ALF identification, i.e., the parsing of the third syntax element identification information can have a dependent relationship with the parsing of the sequence level syntax element of ALF.
[0147] Exemplarily, in some embodiments, it is assumed that the sequence level ALF indication can be represented by a syntax element sps_alf_enabled_flag, i.e., sps_alf_enabled_flag indicates whether ALF is used for filtering the current sequence. If sps_alf_enabled_flag indicates that ALF is not used for filtering the current sequence, then the determination of the third syntax element indication information can be selected not to be decoded any more; if sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, then the determination of the third syntax element indication information can be further performed.
[0148] Exemplarily, in some embodiments, the TALF sequence level indication (the third syntax element indication information) can depend on the ALF picture level indication (the picture level ALF indication), and the dependency relationship can be as follows:
[0149] Wherein, sps_talf_enabled_flag is used for indicating whether TALF is used for filtering the current sequence, sps_alf_enabled_flag is used for indicating whether ALF is used for filtering the current sequence, and only when the current sequence allows ALF, i.e., sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, sps_talf_enabled_flag can be further parsed.
[0150] Further, in the embodiments of the present application, the picture level (and / or slice level) indication depends on the sequence level indication, which can include that the picture level (and / or slice level) TALF indication depends on the sequence level TALF indication, and can also include that the picture level (and / or slice level) TALF indication depends on the sequence level ALF indication.
[0151] That is to say, in the embodiments of the present application, the parsing of the second syntax element indication information can depend on the third syntax element indication information, or can depend on the sequence level ALF indication.
[0152] Exemplarily, in some embodiments, it is assumed that the sequence level ALF indication can be represented by a syntax element sps_alf_enabled_flag, i.e., sps_alf_enabled_flag indicates whether ALF is used for filtering the current sequence. If sps_alf_enabled_flag indicates that ALF is not used for filtering the current sequence, then the determination of the second syntax element indication information can be selected not to be decoded any more; if sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, then the determination of the second syntax element indication information can be further performed.
[0153] Exemplarily, in some embodiments, the TALF picture level identification (TALF picture level identification) can depend on the ALF sequence level identification (ALF sequence level identification), and the dependency relationship can be as follows:
[0154] Wherein, sps_talf_enabled_flag is used to indicate whether the current sequence is filtered by TALF, sps_alf_enabled_flag is used to indicate whether the current sequence is filtered by ALF, ph_talf_enabled_flag is used to indicate whether the current picture is filtered by TALF, and ph_talf_aps_id can be used to indicate where the adaptive parameters (such as filter number, filter coefficient) of TALF and other information are obtained in the APS parameter set when TALF is used.
[0155] Further, in the embodiments of the present application, the TALF identification at the picture level (and / or slice level) can also depend on the ALF identification at the picture level (and / or slice level).
[0156] That is, in the embodiments of the present application, the parsing of the second syntax element identification information can also depend on the ALF identification at the picture level (and / or slice level).
[0157] Exemplarily, in some embodiments, it is assumed that the ALF identification at the picture level can be represented by the syntax element ph_alf_enabled_flag, that is, ph_alf_enabled_flag indicates whether the current picture is allowed to be filtered by ALF. If ph_alf_enabled_flag indicates that the current picture is not filtered by ALF, then the decoding of the second syntax element identification information can be selected to be stopped; if ph_alf_enabled_flag indicates that the current picture is allowed to be filtered by ALF, then the determination of the second syntax element identification information can be further performed.
[0158] Exemplarily, in some embodiments, the TALF picture level identification (TALF picture level identification) can depend on the ALF picture level identification (ALF picture level identification), and the dependency relationship can be as follows:
[0159] sps_talf_enabled_flag is used to indicate whether the current sequence is filtered by TALF, ph_alf_enabled_flag is used to indicate whether the current picture is filtered by ALF, ph_talf_enabled_flag is used to indicate whether the current picture is filtered by TALF, and ph_talf_aps_id can be used to indicate where the adaptive parameters (e.g. filter number, filter coefficient) of TALF are obtained from the APS parameter set when TALF is used.
[0160] Exemplarily, in some embodiments, the TALF identification at the picture level (and / or slice level) can also depend on some high level syntax, for example, a high level syntax element pps_alf_info_in_ph_flag to identify the control identification of the picture level or slice level for parsing the ALF using the syntax elements at the picture level or slice level, and the ALF identifier can also exist in the slice header.
[0161] Exemplarily, in some embodiments, the TALF slice level identification (TALF identification at the slice level) can depend on the TALF control identification, and the dependency relationship can be as follows:
[0162] sps_talf_enabled_flag is used to indicate whether the current sequence is filtered by TALF, pps_alf_info_in_ph_flag is used to indicate whether the control identification of the picture level or slice level for parsing the ALF is using the syntax elements at the picture level or slice level, sh_talf_enabled_flag is used to indicate whether the current slice is filtered by TALF, and sh_talf_aps_id can be used to indicate where the adaptive parameters (e.g. filter number, filter coefficient) of TALF are obtained from the APS parameter set when TALF is used.
[0163] Further, in the embodiments of the present application, when it is determined that TALF is used for filtering, it can be further determined that at least one inter-frame reference picture corresponding to the current picture and the filter coefficient corresponding to the current block.
[0164] Further, in the embodiments of the present application, when determining the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block, the TALF parameters corresponding to the current block can be determined first; wherein the TALF parameters include one or more of a mode parameter, a number parameter, a coefficient value parameter and a coefficient sign parameter; then the filter mode and the number of filter groups are determined according to the TALF parameters; the at least one inter-frame reference picture can be determined according to the filter mode; and the filter coefficients corresponding to the current block can be determined according to the number of filter groups, the coefficient value parameter, the coefficient sign parameter and the first syntax element identification information.
[0165] It can be understood that, in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filtering, wherein the determined inter-frame reference picture corresponding to the current picture can be different for different filter modes. The number parameter can be used to determine the number of filter groups corresponding to the current picture. The coefficient value parameter can be used to determine the absolute value size of the filter coefficients. The coefficient sign parameter can be used to determine the sign of the filter coefficients, including positive and negative.
[0166] Further, in the embodiments of the present application, when determining the TALF parameters corresponding to the current block, in the case of determining that the current picture uses TALF filtering based on the second syntax element identification information, the code stream can be decoded to determine the APS index; then the APS set can be determined according to the APS index, and the TALF parameters are determined based on the APS set.
[0167] It can be understood that, in the embodiments of the present application, the APS index can be used to determine the APS parameter set corresponding to the current picture, that is, the APS set corresponding to the current picture can be determined through the APS index.
[0168] Exemplarily, in some embodiments, in the case of determining that the current slice uses TALF filtering based on the second syntax element identification information, the code stream can be further decoded to determine the corresponding APS index sh_talf_aps_id, which can be used to indicate in which APS parameter set the adaptive parameters (TALF parameters) of the TALF corresponding to the current slice are obtained when TALF is used.
[0169] Exemplarily, in some embodiments, in the case of determining that the current slice uses TALF filtering based on the second syntax element identification information, the code stream can be further decoded to determine the corresponding APS index sh_talf_aps_id, which can be used to indicate in which APS parameter set the adaptive parameters (TALF parameters) of the TALF corresponding to the current slice are obtained when TALF is used. It can be understood that, in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filtering, wherein the determined inter-frame reference picture corresponding to the current picture can be different for different filter modes. The number parameter can be used to determine the number of filter groups corresponding to the current picture. The coefficient value parameter can be used to determine the absolute value size of the filter coefficients. The coefficient sign parameter can be used to determine the sign of the filter coefficients, including positive and negative.
[0170] That is, in the embodiments of the present application, the TALF parameters corresponding to the current image can be saved in the APS, so that the TALF parameters can be obtained by parsing in the APS.
[0171] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing the APS is as follows:
[0172] Wherein, alf_data() is a function of parsing ALF, CCALF related syntax elements, parameters. The scheme can further add the syntax elements and parameters of TALF in alf_data() for parsing.
[0173] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing alf_data() is as follows:
[0174] Wherein, talf_filter_signal_flag is used to identify whether there is a TALF parameter in the parameters of the current alf_data.
[0175] talf_filter_mode is a mode parameter, which is used to indicate which mode the TALF belongs to among the forward / backward / bidirectional modes if there is a TALF parameter.
[0176] talf_num_filters_signalled_minus1 is a number parameter, which is used to indicate the number of filter groups. For example, if there is a TALF parameter, the value of talf_num_filters_signalled_minus1 is the number of TALF filters in the current APS minus one.
[0177] talf_coeff_abs is a coefficient value parameter, which is used to indicate the absolute value of the coefficient in each filter.
[0178] talf_coeff_sign is a coefficient sign parameter, which is used to indicate the positive or negative of the non-zero coefficient in each filter.
[0179] numCoeff variable represents the number of filter coefficients in the filter.
[0180] Further, in the embodiments of the present application, when determining the TALF parameters corresponding to the current block, in the case of determining that the current image uses TALF for filtering based on the second syntax element identification information, the TALF parameters can be determined by decoding the code stream.
[0181] That is, in the embodiments of the present application, the TALF parameters corresponding to the current image can be directly written into the code stream, so that the TALF parameters can be obtained by decoding the code stream. For example, the TALF parameters can be coded in the image header or the slice header.
[0182] Exemplarily, in some embodiments, the method of coding the TALF identifier and the TALF parameters in the image header is as follows:
[0183] Further, in the embodiments of the present application, when determining the filter mode and the number of filter groups according to the TALF parameters, the current configuration can be determined first; in the case of a random access (RA) configuration, the filter mode is determined in a first candidate mode according to the mode parameters; wherein the first candidate mode includes one or more of a forward filter mode, a backward filter mode and a bidirectional filter mode; in the case of a low delay (LD) configuration, the filter mode is determined in a second candidate mode according to the mode parameters; wherein the second candidate mode includes one or more of a first forward filter mode, a second forward filter mode and a third forward filter mode.
[0184] It should be noted that in the embodiments of the present application, the filter mode corresponding to the current image can be determined in combination with the current configuration and the mode parameters in the TALF parameters. Wherein, according to the current configuration, the determination of the filter mode based on the first candidate mode or the second candidate mode can be determined, and then the corresponding filter mode can be selected from the first candidate mode or the second candidate mode according to the mode parameters.
[0185] It can be understood that in the embodiments of the present application, for the RA configuration, the corresponding first candidate mode can include one or more of the forward filter mode, the backward filter mode and the bidirectional filter mode. Wherein, the forward filter mode can be understood as using the reconstructed information of the reconstructed image smaller than the POC of the current image as the input of the filter, the backward filter mode can be understood as using the reconstructed information of the reconstructed image larger than the POC of the current image as the input of the filter, and the bidirectional filter mode can be understood as using the reconstructed information of the reconstructed image smaller than the POC of the current image and the reconstructed information of the reconstructed image larger than the POC of the current image as the input of the filter.
[0186] It can be understood that, in the embodiments of the present application, for the LD configuration, the corresponding second candidate mode can include one or more of the first forward filtering mode, the second forward filtering mode and the third forward filtering mode. Wherein, for the coding under the LD configuration, the coding order is the same as the playing order, so only the reference image smaller than the current image POC can be used as the input of the filter, that is, only the forward filtering mode is supported. However, corresponding to different inter-frame reference images, the corresponding forward filtering mode can be distinguished into the first forward filtering mode, the second forward filtering mode and the third forward filtering mode.
[0187] Further, in the embodiments of the present application, after determining the filtering mode corresponding to the current image, at least one inter-frame reference image can be further determined according to the filtering mode.
[0188] It can be understood that, in the embodiments of the present application, the determination of the inter-frame reference image is dependent on the filtering mode, and for different filtering modes, the finally determined inter-frame reference image can be different.
[0189] Exemplarily, in some embodiments, if the POC value of the current image is N, for the RA configuration, if the determined filtering mode is the forward filtering mode, the image with the POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the reverse filtering mode, the image with the POC value of N+1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the bidirectional filtering mode, the images with the POC values of N-1 and N+1 can be selected as the inter-frame reference images of the current image.
[0190] Exemplarily, in some embodiments, if the POC value of the current image is N, for the LD configuration, the images with the POC values of N-1, N-2… can be used as the inter-frame reference images of the current image. For example, if the determined filtering mode is the first forward filtering mode, the image with the POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the second forward filtering mode, the image with the POC value of N-2 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the third forward filtering mode, the images with the POC values of N-1 and N-2 can be selected as the inter-frame reference images of the current image.
[0191] That is, in the embodiments of the present application, the POC values of the inter-frame reference images determined based on different filter modes can be different, and the number of the determined inter-frame reference images can also be different. For example, for the forward filter mode, the backward filter mode in the RA configuration, and the first forward filter mode (the nearest first frame) and the second forward filter mode (the nearest second frame) in the LD configuration, the current image corresponds to one inter-frame reference image; for the bidirectional filter mode in the RA configuration, and the third forward filter mode (the nearest first frame and the nearest second frame) in the LD configuration, the current image corresponds to two inter-frame reference images.
[0192] It can be seen that, for the time-domain adaptive loop filter type, the intra-frame encoded image has no reference image, and the inter-frame encoded image has a reference image, so the time-domain filter of the present scheme is applied to the inter-frame encoded image, for example, the inter-frame encoded image under the encoding type of the RA and LD configurations. For the coding under the LD configuration, the coding sequence is the same as the playing sequence, so when the time-domain adaptive filter is used for the inter-frame encoded image, the reference image with a smaller POC than the current image is always used as the input of the filter. For the coding under the RA configuration, the coding sequence can be different from the playing sequence, and when the time-domain filter is used for the current inter-frame encoded image, the reference frame with a larger or smaller POC than the current frame can be used as the input of the filter.
[0193] The forward filter uses the reconstructed information of the reconstructed image with a smaller POC than the current image as the input of the filter to generate the filter value acting on the current reconstructed image. For example, under the LD configuration, the POC of the current image is N, N is a non-negative integer, and the reconstructed values of the reconstructed images with POC values of N-1, N-2, … can be used as the input of the filter; for example, under the RA configuration, under the coding sequence, when the POC of the current image is N, the inter-frame encoded image with a TID of 5 can use the reconstructed value of the image with a POC value of N-1 as the input of the filter; the inter-frame encoded image with a TID of 4 can use the reconstructed value of the image with a POC value of N-2 as the input of the filter; the inter-frame encoded image with a TID of 3 can use the reconstructed value of the image with a POC value of N-4 as the input of the filter; the inter-frame encoded image with a TID of 2 can use the reconstructed value of the image with a POC value of N-8 as the input of the filter; the inter-frame encoded image with a TID of 1 can use the reconstructed value of the image with a POC value of N-16 as the input of the filter; and the inter-frame encoded image with a TID of 0 can use the reconstructed value of the image with a POC value of N-32 as the input of the filter.
[0194] It should be noted that, in the embodiments of the present application, the POC value of the reference frame used in the forward filter changes due to different encoding configurations.
[0195] Reverse filtering is to use the reconstructed information of the reconstructed image with a larger POC than the current image as the input of the filter to generate the filtered value acting on the current reconstructed image. In the current various coding configurations, reverse filtering is only used in the RA configuration. For example, in the RA configuration, when the POC of the current image is N in the coding order, the inter-coded image with TID of 5 can use the reconstructed value of the image with POC value of N+1 as the input of the filter; the TID of 4 can use the reconstructed value of the image with POC value of N+2 as the input of the filter; the TID of 3 can use the reconstructed value of the image with POC value of N+4 as the input of the filter; the TID of 2 can use the image with POC value of N+8 as the input of the filter; the TID of 1 can use the reconstructed value of the image with POC value of N+16 as the input of the filter; and the TID of 0 can use the reconstructed value of the image with POC value of N+32 as the input of the filter.
[0196] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in reverse filtering will change due to different coding configurations.
[0197] Bidirectional filtering is to use the reconstructed information of the image with a smaller POC than the current image and the image with a larger POC than the current image as the input of the filter to generate the filtered value acting on the current reconstructed image. In the current various coding configurations, bidirectional filtering is only used in the RA configuration. For example, in the RA configuration, when the POC of the current image is N in the coding order, the inter-coded image with TID of 5 can use the reconstructed value of the image with POC value of N+1 and N-1 as the input of the filter; the TID of 4 can use the reconstructed value of the image with POC value of N+2 and N-2 as the input of the filter; the TID of 3 can use the reconstructed value of the image with POC value of N+4 and N-4 as the input of the filter; the TID of 2 can use the image with POC value of N+8 and N-8 as the input of the filter; the TID of 1 can use the reconstructed value of the image with POC value of N+16 and N-16 as the input of the filter; and the TID of 0 can use the reconstructed value of the image with POC value of N+32 and N-32 as the input of the filter.
[0198] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in bidirectional filtering will change due to different coding configurations. In principle, in the RA configuration, bidirectional filtering always uses the reconstructed values of the two reconstructed images closest in forward and backward distance as the input of the filter.
[0199] Exemplarily, in some embodiments, assuming that the filtering mode is a forward filtering mode, the following forward filtering modes can be included but are not limited to:
[0200] 1. When in the RA configuration, use the reference picture with the closest temporal distance and smaller POC than the current picture as the input of the temporal filter;
[0201] 2. When in the LD configuration, use the reference picture with POC value N-1 as the input of the temporal filter corresponding to the first forward filter mode when the POC value of the current picture is N;
[0202] 3. When in the LD configuration, use the reference picture with POC value N-2 as the input of the temporal filter corresponding to the second forward filter mode when the POC value of the current picture is N;
[0203] 4. When in the LD configuration, use the reference pictures with POC values N-2 and N-1 as the inputs of the temporal filter corresponding to the third forward filter mode when the POC value of the current picture is N.
[0204] Further, in the embodiments of the present application, when the number of groups of filters is determined according to the TALF parameter, the number of groups of filters can be determined according to the quantity parameter. The number of groups of filters can be determined according to the quantity parameter and a preset value.
[0205] It can be understood that, in the embodiments of the present application, when the number of groups of filters is determined according to the quantity parameter and the preset value, the quantity parameter and the preset value can be mathematically operated to obtain the number of groups of filters.
[0206] Exemplarily, in some embodiments, the quantity parameter can be represented by a syntax element talf_num_filters_signalled_minus1, which is a syntax element indicating the number of TALF filters contained in the current slice minus 1 (i.e., the preset value is 1). The value of talf_num_filters_signalled_minus1 can be 0, 1, 2 or 3, assuming that a slice can have at most four TALF filters. The syntax element is 0, indicating that the current slice has one TALF filter; the syntax element is 1, indicating that the current slice has two TALF filters; the syntax element is 2, indicating that the current slice has three TALF filters; and the syntax element is 3, indicating that the current slice has four TALF filters. When the syntax element does not exist in the code stream, its value can be 0 by default.
[0207] Further, in the embodiments of the present application, when the filter coefficients corresponding to the current block are determined according to the number of groups of filters, the coefficient value parameter, the coefficient sign parameter and the first syntax element identification information, the candidate filter corresponding to the current block can be first determined according to the first syntax element identification information and the number of groups of filters; and then the filter coefficients corresponding to the current block are determined according to the candidate filter corresponding to the current block, the coefficient value parameter and the coefficient sign parameter.
[0208] It can be understood that in the embodiments of the present application, the first syntax element identification information can also be used to determine the TALF information used by the current block, for example, the candidate filter corresponding to the current block can be determined through the value of the first syntax element identification information.
[0209] For example, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that the current block is not filtered using TALF. When the value of the first syntax element identification information is not the first value, it is determined that the current block is filtered using TALF, and the candidate filter corresponding to the current block can be further determined according to the first syntax element identification information.
[0210] Further, in the embodiments of the present application, when the candidate filter corresponding to the current block is determined according to the first syntax element identification information and the group number of the filter, the group number index of the filter corresponding to the current block can be first determined according to the first syntax element identification information; then the candidate filter corresponding to the current block is determined according to the group number of the filter and the group number index of the filter corresponding to the current block.
[0211] It can be understood that in the embodiments of the present application, when it is determined that the current block is filtered using TALF, the group number index of the filter corresponding to the current block can be determined according to the value of the first syntax element identification information. The group number index of the filter can represent the index of the TALF filter used by the current block in the filter set coded in the current image, that is, the group number index of the filter can be used to select the candidate filter corresponding to the current block from the multiple filters corresponding to the current image.
[0212] For example, in some embodiments, if the current block of the current image is a CTU, assuming that the first syntax element identification information is represented by the syntax element control talf_ctb_idc[CtbAddrX][CtbAddrY], if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0, it is determined that the current block is not filtered using TALF, if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 1, then it can be determined that the candidate filter corresponding to the current block can be the first group of filters in the at least one group of filters, if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 2, then it can be determined that the candidate filter corresponding to the current block can be the second group of filters in the at least one group of filters.
[0213] It should be noted that in the embodiments of the present application, the value of the first syntax element identification information depends on the number of filter groups. Wherein, assuming that the number of corresponding filter groups can be determined by the number parameter talf_num_filters_signalled_minus1, then the value of the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY] can depend on talf_num_filters_signalled_minus1, for example, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY]-1 can be 0-talf_num_filters_signalled_minus1.
[0214] Further, in the embodiments of the present application, when determining the filter coefficients corresponding to the current block according to the candidate filter corresponding to the current block, the coefficient value parameter and the coefficient sign parameter, the value of the filter coefficients corresponding to the candidate filter can be determined according to the coefficient value parameter; at the same time, the sign of the filter coefficients corresponding to the candidate filter is determined according to the coefficient sign parameter; finally, the filter coefficients corresponding to the current block can be determined according to the value of the filter coefficients corresponding to the candidate filter and the sign of the filter coefficients corresponding to the candidate filter.
[0215] It can be understood that in the embodiments of the present application, after determining the candidate filter corresponding to the current block based on the first syntax element identification information, the reconstruction of the filter coefficients can be further combined with the coefficient value parameter and the coefficient sign parameter to obtain the filter coefficients corresponding to the current block.
[0216] Exemplarily, in some embodiments, the coefficient value parameter can be represented by the syntax element talf_coeff_abs[sfIdx][j], wherein talf_coeff_abs[sfIdx][j] can be used to determine the absolute value of the jth coefficient of the sfIdxth group of filters. For example, talf_coeff_abs[sfIdx][j] can be represented by using K-order exponential Golomb code, and K is 0.
[0217] It should be noted that in the embodiments of the present application, if the syntax element talf_coeff_abs[sfIdx][j] does not exist in the code stream, its value can be defaulted to 0.
[0218] Exemplarily, in some embodiments, the coefficient sign parameter can be represented by a syntax element talf_coeff_sign[sfIdx][j], where talf_coeff_sign[sfIdx][j] can be used to determine the sign of the jth coefficient of the sfIdxth group of filters. For example, when talf_coeff_sign[sfIdx][j] is equal to 1, it indicates that the sign of the jth coefficient of the sfIdxth group of filters is negative, and when talf_coeff_sign[sfIdx][j] is equal to 0, it indicates that the sign of the jth coefficient of the sfIdxth group of filters is positive.
[0219] It should be noted that in the embodiments of the present application, if the syntax element talf_coeff_sign[sfIdx][j] does not exist in the bitstream, it can be defaulted to 0.
[0220] That is, in the embodiments of the present application, if the candidate filter determined based on the first syntax element identification information is the sfIdxth group of filters, the reconstruction of the filter coefficients can be completed in combination with the coefficient value parameter talf_coeff_abs[sfIdx][j] and the coefficient sign parameter talf_coeff_sign[sfIdx][j].
[0221] Exemplarily, in some embodiments, based on the candidate filter corresponding to the current block, the filter coefficients are reconstructed according to the filter coefficient absolute value and the filter
[0222] The process of reconstructing the filter coefficients according to the coefficient sign is as follows:
[0223] Wherein, the numCoeff variable represents the number of filter coefficients in the filter.
[0224] Exemplarily, in some embodiments, in the case that the current picture corresponds to one inter-frame reference picture, for example, the forward filtering mode and the backward filtering mode in the RA configuration, and the first forward filtering mode (the nearest first frame) and the second forward filtering mode (the nearest second frame) in the LD configuration, a 7x7 symmetric filter containing 13 filter coefficients can be selected, and at this time, the value of the numCoeff variable can be 13; in the case that the current picture corresponds to two inter-frame reference pictures, for example, the bidirectional filtering mode in the RA configuration, and the third forward filtering mode (the nearest first frame and the nearest second frame) in the LD configuration, two 5x5 symmetric filters containing 7 filter coefficients can be selected, and at this time, the value of the numCoeff variable can be 14.
[0225] It should be noted that in the embodiments of the present application, the image-level control identifier can be applied to the slice level, the sub-picture level and the tile level, that is, the image-level syntax element identification information can be replaced by the slice-level syntax element identification information, the sub-picture-level syntax element identification information and the tile-level syntax element identification information, and the present application mainly takes the image-level control identifier as an example for illustration, and the type and form of the control identifier are not specifically limited.
[0226] In step 1002, the code stream is decoded to determine the non-linear restriction identification information.
[0227] In the embodiments of the present application, the code stream can also be decoded to determine the non-linear restriction identification information. The non-linear restriction identification information can be used to determine whether to restrict the input of the filter of the TALF, that is, the non-linear restriction identification information can be used to control the non-linear filtering of the TALF, that is, the non-linear restriction identification information is used to control whether to use the non-linear TALF.
[0228] It can be understood that in the embodiments of the present application, the non-linear TALF can be understood as restricting the input value corresponding to the filter coefficient of the TALF within a specified range.
[0229] For example, in some embodiments, a numerical range limiting manner K(a, b) can be used to determine the limiting value for limiting the input of the filter, and K(a, b) can be represented by the following formula: K(a, b) = min(b, max(-b, a)) (1)
[0230] Wherein, b is an integer greater than or equal to zero, min(i, j) is the smaller value of i and j, and max(i, j) is the larger value of i and j.
[0231] Further, in the embodiments of the present application, the non-linear restriction identification information can be used to determine whether to restrict the input of the filter of the TALF. The non-linear restriction identification information can be a flag, wherein whether to restrict the input of the filter of the TALF can be determined by the value of the non-linear restriction identification information.
[0232] It should be noted that in the embodiments of the present application, the non-linear restriction identification information can be used to indicate whether to restrict the input of the filter of the TALF. In addition, the value of the non-linear restriction identification information can be in the form of a parameter or in the form of a number, which is not limited here.
[0233] Exemplarily, in some embodiments, the nonlinear restriction identification information can be an image level or slice level flag. If the value of the nonlinear restriction identification information is 0, it can be determined that the input of the filter of the TALF is not restricted. Otherwise, if the value of the nonlinear restriction identification information is 1, it can be determined that the input of the filter of the TALF is restricted.
[0234] Exemplarily, in some embodiments, the nonlinear restriction identification information can be an image level or slice level flag. If the value of the nonlinear restriction identification information is false, it can be determined that the input of the filter of the TALF is not restricted. Otherwise, if the value of the nonlinear restriction identification information is true, it can be determined that the input of the filter of the TALF is restricted.
[0235] Exemplarily, in some embodiments, the nonlinear restriction identification information can be indicated by a syntax element control flag talf_clip_flag[sfIdx], i.e., talf_clip_flag[sfIdx] can indicate whether the input of the sfIdx-th group of filters is restricted. If the value of talf_clip_flag[sfIdx] is 0, it is determined that the input of the sfIdx-th group of filters is not restricted, and if the value of talf_clip_flag[sfIdx] is 1, it is determined that the input of the sfIdx-th group of filters is restricted. Of course, the value of talf_clip_flag[sfIdx] is not limited to 0 and 1, and the present application does not make specific limitations.
[0236] Exemplarily, in some embodiments, the parsing of the slice level syntax element can be as follows:
[0237] Wherein, talf_clip_flag[sfIdx] is used to further control whether a nonlinear index parameter is decoded for each nonzero coefficient of the sfIdx-th group of filters, i.e., whether the input value of the sfIdx-th group of filters is restricted can be controlled by talf_clip_flag[sfIdx].
[0238] As can be seen, in the embodiments of the present application, for the TALF filtering processing, the scheme of introducing the restriction of the input value of the filter by the nonlinear restriction identification information can save the consumption of code words in the coding and decoding process to a certain extent.
[0239] Step 1003, in the case of determining that the input of the filter is restricted based on the nonlinear restriction identification information, decoding the code stream, determining the nonlinear index parameter corresponding to the filter coefficient, and determining the restriction value corresponding to the filter coefficient according to the nonlinear index parameter.
[0240] In embodiments of the present application, after determining the non-linear restriction identification information, if it is determined to restrict the input of the filter based on the non-linear restriction identification information, the bitstream can be further decoded to determine the non-linear index parameter corresponding to the filter coefficient, and then the restriction value corresponding to the filter coefficient can be determined according to the non-linear index parameter.
[0241] Further, in embodiments of the present application, the non-linear index parameter corresponding to the filter coefficient can be used to determine the restriction value corresponding to the filter coefficient, which can be used to non-linearly restrict the input corresponding to the filter coefficient.
[0242] That is, in embodiments of the present application, the restriction value of the input corresponding to the filter coefficient can be further determined by the value of the non-linear index parameter.
[0243] It can be understood that, in embodiments of the present application, the non-linear index parameter corresponds to different filter coefficients, and different filter coefficients correspond to different non-linear index parameters. Therefore, after determining to restrict the input of the filter, the non-linear index parameter corresponding to any non-zero filter coefficient can be obtained by parsing.
[0244] It should be noted that, in embodiments of the present application, the non-linear index parameter can be an image-level flag or a slice-level (slice-level) flag. That is, in general, the non-linear index parameter can be a parameter written in the Slice header or picture header, which is not limited herein.
[0245] It can be understood that, in embodiments of the present application, the value of the non-linear index parameter can be in the form of a number or a parameter, which is not specifically limited in the present application.
[0246] Exemplarily, in some embodiments, if the value of the non-linear index parameter is 0, it can be determined that the input value corresponding to the filter coefficient is not restricted, if the value of the non-linear index parameter is not 0, it can be determined that the input value corresponding to the filter coefficient is restricted, and further, the corresponding restriction value can be determined according to the value of the non-linear index parameter.
[0247] Exemplarily, in some embodiments, the non-linear index parameter can be represented by a syntax element talf_clip_idx[sfIdx][j], wherein the syntax element talf_clip_idx[sfIdx][j] can be used to determine whether to restrict the input value corresponding to the jth filter coefficient of the sfIdxth group of filters, and to determine the restriction value of the input value corresponding to the jth filter coefficient of the sfIdxth group of filters.
[0248] Exemplarily, in some embodiments, the parsing of the slice-level syntax elements is as follows:
[0249] wherein for each coded temporal adaptive filter, a talf_clip_flag[sfldx] flag is coded, which is used to further control whether a non-linear index parameter talf_clip_idx[sfIdx][j] is coded for each non-zero coefficient of the filter, the non-linear index parameter can take values of 0, 1, 2, 3, wherein 0 represents no restriction on the range of the filter coefficient input value at the corresponding position of the filter, and 1, 2, 3 represent certain restrictions on the range of the filter coefficient input value at the corresponding position of the filter.
[0250] Further, in the embodiments of the present application, when determining the restriction value corresponding to the filter coefficient according to the non-linear index parameter, a list index can be first determined according to the non-linear index parameter; then a non-linear restriction list can be determined in the candidate list according to the list index; finally, the restriction value corresponding to the filter coefficient can be determined according to the non-linear restriction list.
[0251] Further, in the embodiments of the present application, when constructing the candidate list, a sample depth parameter can be first determined; then the candidate list can be constructed according to the sample depth parameter.
[0252] It should be noted that, in the embodiments of the present application, the candidate list (non-linear clipping value table) corresponding to the value of the non-linear index parameter can be constructed using the sample depth parameter, such as the sample depth of the luminance component, i.e., the mapping relationship between the index parameter and the candidate list can be determined.
[0253] Exemplarily, in some embodiments, the non-linear clipping value table (candidate list) can be constructed according to the sample depth inputBitdepth of the luminance component, as shown below:
[0254] Correspondingly, in the embodiments of the present application, after determining the non-linear index parameter corresponding to the filter coefficient, the mapping relationship between the index parameter and the candidate list can be used to determine the corresponding non-linear restriction list in combination with the candidate list, so that the restriction value (non-linear clipping value) corresponding to the filter coefficient can be determined according to the non-linear restriction list.
[0255] Exemplarily, in some embodiments, the process of determining the non-linear clipping value tAlfClip of each coefficient of each filter is as shown below:
[0256] Step 1004, filtering the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficient corresponding to the current block, and the limit value corresponding to the filter coefficient, to determine the filtered reconstructed value of the current block.
[0257] In the embodiments of the present application, after determining the nonlinear index parameter corresponding to the filter coefficient and determining the limit value corresponding to the filter coefficient according to the nonlinear index parameter, the limit value can be applied in the TALF filtering process, that is, the current block can be filtered based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficient corresponding to the current block, and the limit value corresponding to the filter coefficient, to determine the filtered reconstructed value of the current block.
[0258] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficient corresponding to the current block, and the limit value corresponding to the filter coefficient, to determine the filtered reconstructed value of the current block, for a current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, and the reconstructed sample value of the reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the inter-frame reference image; the filtered reconstructed sample value of the current sample position is determined according to the limit value corresponding to the filter coefficient, the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0259] It can be understood that, in the embodiments of the present application, for the forward filtering mode, the backward filtering mode in the RA configuration, and the first forward filtering mode (the nearest first frame) and the second forward filtering mode (the nearest second frame) in the LD configuration, the current image corresponds to one inter-frame reference image, and when performing TALF filtering on the reconstructed value of the current block based on the reconstructed samples of the one inter-frame reference image, the reference sample position corresponding to the current sample position can be determined in the one inter-frame reference image, and then the reconstructed sample value corresponding to the current sample position and the reconstructed sample value corresponding to the reference sample position are input into the TALF filter, combined with the determined filter coefficient corresponding to the current block and the limit value corresponding to the filter coefficient, to finally determine the filtered reconstructed sample value corresponding to the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0260] Exemplarily, in some embodiments, assuming that there is one inter- frame reference picture corresponding to the current picture, the process of filtering the sample value at the position (x, y) (current sample position) in the current picture using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0261] wherein rec' (x,y) is the reconstructed sample value at the position (x, y) after correction by the temporal adaptive filter, rec (x,y) is the reconstructed sample value at the position (x, y) to be corrected, and are the reconstructed sample values at the positions (x-u i , y-u i ) and (x+u i , y+u i ) in the inter- frame reference picture, and c is the temporal adaptive filter coefficient. b i represents the range value for limiting the filter input corresponding to the position of the filter coefficient c i , i.e. the limiting value corresponding to the filter coefficient, which can be determined by the coded non-linear index parameter in the code stream.
[0262] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of the at least one inter- frame reference picture, the filter coefficient corresponding to the current block and the limiting value corresponding to the filter coefficient, determining the filtered reconstructed value of the current block, for the current sample position in the current block, determining the reconstructed sample value at the current sample position according to the reconstructed value of the current block, determining the reconstructed sample value at the first reference sample position corresponding to the current sample position according to the reconstructed sample of the first inter- frame reference picture, and determining the reconstructed sample value at the second reference sample position corresponding to the current sample position according to the reconstructed sample of the second inter- frame reference picture; determining the filtered reconstructed sample value at the current sample position according to the limiting value corresponding to the filter coefficient, according to the filter coefficient corresponding to the current block, the reconstructed sample value at the current sample position, the reconstructed sample value at the first reference sample position and the reconstructed sample value at the second reference sample position; and determining the filtered reconstructed value of the current block according to the filtered reconstructed sample value at the current sample position.
[0263] It can be understood that, in the embodiments of the present application, for the bidirectional filtering mode in the RA configuration, and the third forward filtering mode (the nearest first frame and the nearest second frame) in the LD configuration, the current picture corresponds to two inter-frame reference pictures, when the TALF filtering is performed on the reconstructed value of the current block based on the reconstructed samples of the two inter-frame reference pictures, the reference sample positions corresponding to the current sample position can be determined in the two inter-frame reference pictures respectively, and then the reconstructed sample value corresponding to the current sample position, the reconstructed sample values corresponding to the two reference sample positions are input into the TALF filter, combined with the determined filter coefficients corresponding to the current block and the limit values corresponding to the filter coefficients, the filtered reconstructed sample value corresponding to the current sample position is finally determined, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0264] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0265] Wherein, rec' (x,y) is the reconstructed sample value at the (x, y) position after the correction of the time domain adaptive filter, rec (x,y) is the reconstructed sample value at the (x, y) position to be corrected, ref0 and ref1 are the reconstructed values of the first inter-frame reference picture and the second inter-frame reference picture respectively. and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the first inter-frame reference picture, and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the second inter-frame reference picture, c is the time domain adaptive filter coefficient. i represents the range value for limiting the filter input corresponding to the c i filter coefficient position, that is, the limit value corresponding to the filter coefficient, which can be determined by the coded nonlinear index parameter in the code stream.
[0266] In step 1005, in a case that it is determined not to limit the input of the filter based on the non-linear restriction identification information, the current block is filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block.
[0267] Further, in the embodiments of the present application, if it is determined not to limit the input of the filter based on the non-linear restriction identification information, after the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block are determined, the current block can be further filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block.
[0268] It can be understood that, in the embodiments of the present application, since the POC values of the inter-frame reference pictures determined based on different filter modes can be different, and the number of the determined inter-frame reference pictures can also be different, when the current block of the current picture is filtered by TALF, the filtering processes performed corresponding to different numbers of inter-frame reference pictures are also different.
[0269] Further, in the embodiments of the present application, when the current block is filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block, for a current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, and the reconstructed sample value of a reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the inter-frame reference picture; the filtered reconstructed sample value of the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0270] It can be understood that, in the embodiments of the present application, for the forward filter mode and the backward filter mode in the RA configuration, and the first forward filter mode (the nearest first frame) and the second forward filter mode (the nearest second frame) in the LD configuration, the current picture corresponds to one inter-frame reference picture, and when the reconstructed value of the current block is filtered by TALF based on the reconstructed samples of the one inter-frame reference picture, the reference sample position corresponding to the current sample position can be determined in the one inter-frame reference picture, and then the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position are input into the TALF filter respectively, combined with the determined filter coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value of the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0271] Exemplarily, in some embodiments, assuming that there is one inter- frame reference picture corresponding to the current picture, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current picture using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0272] wherein rec' (x,y) is the reconstructed sample value at the (x, y) position after the correction by the temporal adaptive filter, rec (x,y) is the reconstructed sample value at the (x, y) position to be corrected, and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the inter- frame reference picture, and c is the temporal adaptive filter coefficient.
[0273] Further, in the embodiments of the present application, when the filtered reconstructed sample value at the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value at the current sample position, and the reconstructed sample value at the reference sample position, the first sample difference value can be determined according to the reconstructed sample value at the current sample position and the reconstructed sample value at the reference sample position; and then the filtered reconstructed sample value at the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value at the current sample position, and the first sample difference value.
[0274] That is, in the embodiments of the present application, the first sample difference value can also be determined according to the reconstructed sample value at the current sample position and the reconstructed sample value at the reference sample position, and then the first sample difference value is taken as the input of the filter.
[0275] Exemplarily, in some embodiments, assuming that there is one inter- frame reference picture corresponding to the current picture, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current picture using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0276] Further, in the embodiments of the present application, when determining the filtered reconstructed sample value of the current sample position according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the reference sample position, the filtered reconstructed sample value of the current sample position can be determined as follows: determining the filter position corresponding to the reference sample position in the current block, and determining the reconstructed sample value of the filter position according to the reconstructed value of the current block; determining the second sample difference value according to the reconstructed sample value of the filter position and the reconstructed sample value of the reference sample position; determining the filtered reconstructed sample value of the current sample position according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, and the second sample difference value.
[0277] That is, in the embodiments of the present application, for each filter position, the second sample difference value can also be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the reference sample position, and then the second sample difference value is taken as the input of the filter.
[0278] Exemplarily, in some embodiments, it is assumed that the current image corresponds to one inter-frame reference image, at this time, the process of filtering the sample value of the position (current sample position) with coordinates (x, y) in the current image using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0279] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of at least one inter-frame reference image and the filter coefficient corresponding to the current block to determine the filtered reconstructed value of the current block, for the current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, the reconstructed sample value of the first reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the first inter-frame reference image, and the reconstructed sample value of the second reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the second inter-frame reference image; the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0280] It can be understood that, in the embodiments of the present application, for the bidirectional filtering mode in the RA configuration, and the third forward filtering mode (the nearest first frame and the nearest second frame) in the LD configuration, the current picture corresponds to two inter-frame reference pictures, and when the TALF filtering is performed on the reconstructed values of the current block based on the reconstructed samples of the two inter-frame reference pictures, the reference sample positions corresponding to the current sample position can be determined in the two inter-frame reference pictures respectively, and then the reconstructed sample value corresponding to the current sample position, the reconstructed sample values corresponding to the two reference sample positions are input into the TALF filter respectively, combined with the determined filter coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0281] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0282] Wherein, rec' (x,y) is the reconstructed sample value at the (x, y) position after the correction by the temporal adaptive filter, rec (x,y) is the reconstructed sample value at the (x, y) position to be corrected, ref0 and ref1 are the reconstructed values of the first inter-frame reference picture and the second inter-frame reference picture respectively. and are the reconstructed sample values at (x-u i , u-u i ) and (x+u i , y+u i ) of the first inter-frame reference picture, and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the second inter-frame reference picture, and c is the temporal adaptive filter coefficient.
[0283] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position, the third sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the first reference sample position; the fourth sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position can be determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the third sample difference value, and the fourth sample difference value.
[0284] That is, in the embodiments of the present application, the third sample difference value and the fourth sample difference value can also be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the two reference sample positions respectively, and then the third sample difference value and the fourth sample difference value can be taken as the input of the filter.
[0285] Exemplarily, in some embodiments, it is assumed that the current image corresponds to two inter-frame reference images, and at this time, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current image using 7 filter coefficients and 2 filters of 5x5 symmetry is as follows:
[0286] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position, the filter position corresponding to the reference sample position in the current block can be determined, and the reconstructed sample value of the filter position can be determined according to the reconstructed value of the current block; the fifth sample difference value can be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the first reference sample position; the sixth sample difference value can be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position can be determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the fifth sample difference value, and the sixth sample difference value.
[0287] That is, in the embodiments of the present application, for each filter position, the fifth sample difference value and the sixth sample difference value can also be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the two reference sample positions respectively, and then the fifth sample difference value and the sixth sample difference value can be taken as the input of the filter.
[0288] Exemplarily, in some embodiments, assuming that there are two inter- reference pictures corresponding to the current picture, the filtering process of the sample value at the coordinate (x, y) position (current sample position) in the current picture using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0289] It should be noted that in the embodiments of the present application, the filtering process shown in the above formula is an exemplary description of the TALF filtering proposed in the present application, and of course, in the actual application process, if the adaptive filter does not have the symmetry of the above example, the adaptive filter coefficients and the input values corresponding to each coefficient should also be adjusted accordingly. That is, the filtering process should be a process in which the adaptive filter coefficients and the reconstructed values of the reference picture at each related position act together.
[0290] It should be noted that in the embodiments of the present application, the filter coefficients can be integers, and the parameters used in the filtering process can also include bias and shift.
[0291] Further, in the embodiments of the present application, for the TALF filter, in addition to the at least one inter-reference picture decoded in the time domain, the corresponding input information can also include the reconstructed value of the current block, for example, the reconstructed value of any one image component of the current block. Wherein, the reconstructed value of the current block can be obtained after processing the current block in the current picture based on any loop filtering method.
[0292] That is, in the embodiments of the present application, the determination method of the reconstructed value of the current block is not specifically limited, and correspondingly, the specific position of the TALF filtering in the loop filtering process is not specifically limited, that is, the position of the temporal adaptive loop filtering can be at any place in the loop filtering.
[0293] Exemplarily, in some embodiments, FIG. 11 is an implementation schematic diagram one of the TALF filtering proposed in the embodiments of the present application, as shown in FIG. 11, the input of the TALF can include the reconstructed value on the reconstructed image of the current image before the ALF filtering and the reconstructed image decoded in the time domain.
[0294] Exemplarily, in some embodiments, FIG. 12 is an implementation schematic diagram two of the TALF filtering proposed in the embodiments of the present application, as shown in FIG. 12, the input of the TALF can include the reconstructed value on the reconstructed image of the current image after the Deblocking and the reconstructed image decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the SAO.
[0295] Exemplarily, in some embodiments, FIG. 13 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in FIG. 13, the position of TALF in loop filtering can be parallel to Deblocking.
[0296] Exemplarily, in some embodiments, FIG. 14 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in FIG. 14, the position of TALF in loop filtering can be before Deblocking.
[0297] Exemplarily, in some embodiments, FIG. 15 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in FIG. 15, the input of TALF can include the reconstructed value on the reconstructed image of the current image after Deblocking and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after Deblocking.
[0298] Exemplarily, in some embodiments, FIG. 16 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in FIG. 16, the input of TALF can include the reconstructed value on the reconstructed image of the current image after SAO and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after SAO.
[0299] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in FIG. 17, the input of TALF can also include the reconstructed value on the reconstructed image of the current image after ALF filtering and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after ALF.
[0300] Therefore, in some embodiments, TALF can be placed in any position in a series of loop filters, which means that the input of TALF includes the decoded image and the reconstructed value on the reconstructed image of any step in the current loop filtering.
[0301] Further, in the embodiments of the present application, the reconstructed value of the current block can be the reconstructed value of the luminance component of the current block or the reconstructed value of the chroma component of the current block, which is not limited in the present application.
[0302] That is to say, in the embodiments of the present application, TALF filtering can be applied to any image component of the current image.
[0303] It should be noted that in the embodiments of the present application, in the video image, the image components of the current image can include a first image component, a second image component and a third image component. Among them, the three image components are a luminance component, a blue color component and a red color component respectively, specifically, the luminance component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0304] Further, in the embodiments of the present application, the shape, size and tap number of the filter used in the TALF filtering process are not specifically limited, that is, filters of any shape and size can be applied to the TALF filtering process. For example, the shape of the filter used in the TALF filtering process includes but is not limited to diamond shape, cross shape, rectangle, square.
[0305] Exemplarily, in some embodiments, FIG. 18 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 18, a 5x5 symmetric filter contains 7 filter coefficients.
[0306] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 19, a 7x7 symmetric filter contains 13 filter coefficients.
[0307] Exemplarily, in some embodiments, FIG. 20 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 20, a 9x9 symmetric filter contains 21 filter coefficients.
[0308] Among them, the above several are symmetric filters, each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to two filter input values in the symmetric position except the filter center point.
[0309] Exemplarily, in some embodiments, FIG. 21 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 21, a 5x5 symmetric filter contains 4 filter coefficients.
[0310] Exemplarily, in some embodiments, FIG. 22 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 22, a 7x7 symmetric filter contains 6 filter coefficients.
[0311] Among them, the symmetric filter can also be that each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to filter input values in multiple directions except the filter center point.
[0312] Of course, the filter can also be asymmetric, meaning that each filter input position has a different coefficient value.
[0313] Exemplarily, in some embodiments, Fig. 23 is a schematic diagram of a filter six according to an embodiment of the present application. As shown in Fig. 23, a 5x5 asymmetric filter includes 13 filter coefficients.
[0314] Exemplarily, in some embodiments, for the forward filtering and backward filtering under the RA configuration, and the forward filtering using the reconstructed value in the POC N-1 reference image as input and the forward filtering using the reconstructed value in the POC N-2 reference image as input under the LD configuration, a 7x7 symmetric filter including 13 filter coefficients can be selected.
[0315] Exemplarily, in some embodiments, Fig. 24 is a schematic diagram of a filter seven according to an embodiment of the present application. As shown in Fig. 24, two 5x5 symmetric filters include 14 filter coefficients. Among them, for the bidirectional filtering under the RA configuration and the forward filtering using the reconstructed value in the POC N-1 and N-2 reference images as input under the LD configuration, two filters shown in Fig. 24 can be selected, which are respectively used for the reconstructed value in the two reference images as input.
[0316] It can be understood that the decoding method according to an embodiment of the present application is a method for improving the current image reconstruction quality by using the reconstructed sample value in the time domain as an information source and extracting information from the reconstructed sample of the reconstructed image by the TALF filter to filter the current image.
[0317] It can be understood that the decoding method according to an embodiment of the present application can be pre-defined or transmitted through a code stream.
[0318] It can be understood that the decoding method according to an embodiment of the present application can refer to different encoding configurations, and different filtering modes are proposed under different filtering modes. Among them, under the RA configuration, the filtering mode can be divided into forward filtering mode, backward filtering mode and bidirectional filtering mode; under the LD configuration, the filtering mode can be divided into first forward filtering mode, second forward filtering mode and third forward filtering mode.
[0319] It can be understood that the decoding method according to an embodiment of the present application can be used for the luminance component or the chrominance component.
[0320] It can be understood that the decoding method proposed in the embodiments of the present application can be any level of TALF switch identification, such as TALF switching in image units, TALF switching in CTU units, TALF switching in CU units, or TALF switching in other ways of dividing an image into sub-regions.
[0321] It can be understood that the decoding method proposed in the embodiments of the present application can also select to skip the coding and decoding processing of the CTU identifier, and directly determine whether to perform TALF filtering on the entire image through the image-level identifier. At this time, the current image corresponds to only one candidate filter.
[0322] The embodiments of the present application provide a decoding method, which can select to use the limit value corresponding to the filter coefficient to perform nonlinear limiting on the input of the filter in the TALF filtering process, thereby reducing the consumption of code words and improving the coding and decoding performance.
[0323] An embodiment of the present application provides an encoding method, which is applied to an encoder and used in a scenario of performing filtering processing through a TALF filter. FIG. 25 is a schematic diagram of the encoding method proposed in the embodiments of the present application. As shown in FIG. 25, the method of the encoder performing encoding processing can include the following steps.
[0324] Step 2001: determining at least one inter-frame reference image corresponding to a current image and a filter coefficient corresponding to a current block.
[0325] In the embodiments of the present application, at least one inter-frame reference image corresponding to a current image and a filter coefficient corresponding to a current block can be determined first.
[0326] It can be understood that in the embodiments of the present application, at least one inter-frame reference image corresponding to a current image and a filter coefficient corresponding to a current block can be determined respectively in the current configuration and each candidate mode corresponding to the current configuration.
[0327] Further, in the embodiments of the present application, for the TALF filter, the corresponding input information can include at least one inter-frame reference image corresponding to a current image, and the at least one inter-frame reference image can be a reconstructed image that has been encoded in the time domain. The TALF filtering of a current block in the current image can be completed by using the reconstructed sample value of the at least one inter-frame reference image.
[0328] It can be understood that in the embodiments of the present application, the current block can be a CTU determined after the current image is divided, the current block can also be a coding unit (CU) obtained after the CTU is divided, and the current block can also be a sub-region of any size obtained after the current image is divided. The size and the obtaining manner of the current block in the current image are not limited in the present application.
[0329] Further, in the embodiments of the present application, when determining the at least one inter-frame reference image corresponding to the current image and the filter coefficients corresponding to the current block, a candidate mode can be determined according to the current configuration first; then in each candidate mode, the at least one inter-frame reference image is determined, the candidate filter corresponding to the current block is determined, and the filter coefficients corresponding to the current block are determined based on the candidate filter corresponding to the current block.
[0330] Further, in the embodiments of the present application, when determining the candidate mode according to the current configuration, in the case that the current configuration is the RA configuration, the candidate mode is determined as a first candidate mode; wherein the first candidate mode includes one or more of a forward filtering mode, a reverse filtering mode and a bidirectional filtering mode; in the case that the current configuration is the LD configuration, the candidate mode is determined as a second candidate mode; wherein the second candidate mode includes one or more of a first forward filtering mode, a second forward filtering mode and a third forward filtering mode.
[0331] It can be understood that, in the embodiments of the present application, for the RA configuration, the corresponding first candidate mode can include one or more of the forward filtering mode, the reverse filtering mode and the bidirectional filtering mode. Wherein the forward filtering mode can be understood as using the reconstructed information of the reconstructed image smaller than the POC of the current image as the input of the filter, the reverse filtering mode can be understood as using the reconstructed information of the reconstructed image larger than the POC of the current image as the input of the filter, and the bidirectional filtering mode can be understood as using the reconstructed information of the image smaller than the POC of the current image and the reconstructed information of the image larger than the POC of the current image as the input of the filter.
[0332] It can be understood that, in the embodiments of the present application, for the LD configuration, the corresponding second candidate mode can include one or more of the first forward filtering mode, the second forward filtering mode and the third forward filtering mode. Wherein for the coding under the LD configuration, the coding order is the same as the playing order, so only the reference image smaller than the POC of the current image can be used as the input of the filter, i.e. only the forward filtering mode is supported. However, corresponding to different inter-frame reference images, the corresponding forward filtering mode can be distinguished as the first forward filtering mode, the second forward filtering mode and the third forward filtering mode.
[0333] Further, in the embodiments of the present application, after determining the filter mode corresponding to the current image, the at least one inter-frame reference image can be further determined according to the filter mode.
[0334] It can be understood that, in the embodiments of the present application, the determination of the inter-frame reference image is dependent on the filter mode, and for different filter modes, the finally determined inter-frame reference image can be different.
[0335] For example, in some embodiments, if the POC value of the current picture is N, for the RA configuration, if the determined filter mode is the forward filter mode, the picture with POC value N-1 can be selected as the inter-frame reference picture of the current picture; if the determined filter mode is the backward filter mode, the picture with POC value N+1 can be selected as the inter-frame reference picture of the current picture; if the determined filter mode is the bidirectional filter mode, the pictures with POC values N-1 and N+1 can be selected as the inter-frame reference pictures of the current picture.
[0336] For example, in some embodiments, if the POC value of the current picture is N, for the LD configuration, the pictures with POC values N-1, N-2, … can be used as the inter-frame reference pictures of the current picture. For example, if the determined filter mode is the first forward filter mode, the picture with POC value N-1 can be selected as the inter-frame reference picture of the current picture; if the determined filter mode is the second forward filter mode, the picture with POC value N-2 can be selected as the inter-frame reference picture of the current picture; if the determined filter mode is the third forward filter mode, the pictures with POC values N-1 and N-2 can be selected as the inter-frame reference pictures of the current picture.
[0337] That is, in the embodiments of the present application, the POC values of the determined inter-frame reference pictures can be different based on different filter modes, and the number of the determined inter-frame reference pictures can also be different. For example, for the forward filter mode, the backward filter mode in the RA configuration, and the first forward filter mode (the nearest first frame), the second forward filter mode (the nearest second frame) in the LD configuration, the current picture corresponds to one inter-frame reference picture; for the bidirectional filter mode in the RA configuration, and the third forward filter mode (the nearest first frame and the nearest second frame) in the LD configuration, the current picture corresponds to two inter-frame reference pictures.
[0338] Therefore, for the time domain adaptive loop filter type, the intra-frame encoded picture has no reference picture, and the inter-frame encoded picture has a reference picture, so the time domain filter of the present scheme is applied to the inter-frame encoded picture, for example, the inter-frame encoded picture under the encoding type of the RA and LD configurations. For the codec under the LD configuration, the codec order is the same as the playing order, so when the time domain adaptive filter is used for the inter-frame encoded picture, the reference picture with a smaller POC value than the current picture is always used as the input of the filter. For the codec under the RA configuration, the codec order can be different from the playing order, and when the time domain filter is used for the current inter-frame encoded picture, the reference picture with a larger or smaller POC value than the current frame can be used as the input of the filter.
[0339] The forward filter uses the reconstructed information of the reconstructed picture with a POC smaller than the POC of the current picture as the input of the filter to generate the filtered value acting on the current reconstructed picture. For example, in the LD configuration, the POC of the current picture is N, where N is a non-negative integer, the reconstructed value of the reconstructed picture with the POC value of N-1, N-2, … can be used as the input of the filter; for example, in the RA configuration, in the coding order, when the POC of the current picture is N, the inter-coded picture with the TID of 5 can use the reconstructed value of the picture with the POC value of N-1 as the input of the filter; the TID of 4 can use the reconstructed value of the picture with the POC value of N-2 as the input of the filter; the TID of 3 can use the reconstructed value of the picture with the POC value of N-4 as the input of the filter; the TID of 2 can use the picture with the POC value of N-8 as the input of the filter; the TID of 1 can use the reconstructed value of the picture with the POC value of N-16 as the input of the filter; and the TID of 0 can use the reconstructed value of the picture with the POC value of N-32 as the input of the filter.
[0340] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in the forward filtering will change due to different coding configurations.
[0341] The backward filter uses the reconstructed information of the reconstructed picture with a POC larger than the POC of the current picture as the input of the filter to generate the filtered value acting on the current reconstructed picture. In the current various coding configurations, the backward filter is only used in the RA configuration. For example, in the RA configuration, in the coding order, when the POC of the current picture is N, the inter-coded picture with the TID of 5 can use the reconstructed value of the picture with the POC value of N+1 as the input of the filter; the TID of 4 can use the reconstructed value of the picture with the POC value of N+2 as the input of the filter; the TID of 3 can use the reconstructed value of the picture with the POC value of N+4 as the input of the filter; the TID of 2 can use the picture with the POC value of N+8 as the input of the filter; the TID of 1 can use the reconstructed value of the picture with the POC value of N+16 as the input of the filter; and the TID of 0 can use the reconstructed value of the picture with the POC value of N+32 as the input of the filter.
[0342] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in the backward filtering will change due to different coding configurations.
[0343] Bidirectional filtering is to use the reconstructed information of the image with smaller POC than the current image and the image with larger POC than the current image as the input of the filter to generate the filtering value acting on the current reconstructed image. In the current various coding configurations, the reverse filtering is only used in the RA configuration. For example, in the RA configuration, when the POC of the current image is N in the coding order, the inter-coded image with TID of 5 can use the reconstructed values of the images with POC values of N+1 and N-1 as the input of the filter; the TID of 4 can use the reconstructed values of the images with POC values of N+2 and N-2 as the input of the filter; the TID of 3 can use the reconstructed values of the images with POC values of N+4 and N-4 as the input of the filter; the TID of 2 can use the images with POC values of N+8 and N-8 as the input of the filter; the TID of 1 can use the reconstructed values of the images with POC values of N+16 and N-16 as the input of the filter; and the TID of 0 can use the reconstructed values of the images with POC values of N+32 and N-32 as the input of the filter.
[0344] It should be noted that in the embodiments of the present application, the POC values of the reference frames used in bidirectional filtering will change due to different coding configurations. In principle, in the RA configuration, bidirectional filtering always uses the reconstructed values of the two frames of reconstructed images with the closest forward and backward distances as the input of the filter.
[0345] Exemplarily, in some embodiments, assuming that the filtering mode is a forward filtering mode, the following forward filtering modes can be included but are not limited to:
[0346] 1. In the RA configuration, the reference image with the closest time domain distance and smaller POC than the current image is used as the input of the time domain filtering;
[0347] 2. In the LD configuration, when the POC value of the current image is N, the reference image with POC value of N-1 is used as the input of the time domain filtering corresponding to the first forward filtering mode;
[0348] 3. In the LD configuration, when the POC value of the current image is N, the reference image with POC value of N-2 is used as the input of the time domain filtering corresponding to the second forward filtering mode;
[0349] 4. In the LD configuration, when the POC value of the current image is N, the two frames of reference images with POC values of N-2 and N-1 are used as the input of the time domain filtering corresponding to the third forward filtering mode.
[0350] It can be understood that in the embodiments of the present application, in the case of being configured as the RA configuration or the LD configuration according to the coding configuration, the mode allowed to be used by the TALF can be determined by traversing each candidate mode. The candidate modes of the TALF are three in the RA configuration and the LD configuration. For the RA configuration, in the corresponding first candidate mode, the forward filtering (forward filtering mode) is mode 1, the backward filtering (backward filtering mode) is mode 2, and the bidirectional filtering (bidirectional filtering mode) is mode 3; for the LD configuration, in the corresponding second candidate mode, using the reference image POC N-1 as the input of the TALF filter (first forward filtering mode) is mode 1, using the reference image POC N-2 as the input of the TALF filter (second forward filtering mode) is mode 2, and using the reference images POC N-1 and N-2 as the input of the TALF filter (third forward filtering mode) is mode 3.
[0351] Further, in the embodiments of the present application, each candidate mode can be traversed, in each candidate mode, the candidate filter corresponding to the current block is determined, and the filter coefficient corresponding to the current block is determined based on the candidate filter corresponding to the current block.
[0352] It can be understood that in the embodiments of the present application, each filtering mode (candidate mode) can be traversed, and the Wiener-Hopf equation can be constructed using the reconstructed value of the current image in the corresponding mode, the reconstructed value of the reference reconstructed image (inter-frame reference image), and the original value of the current image, and 1-4 sets of filter coefficients can be solved out. For each set of candidate filters that can be used for the current block, the filter coefficients corresponding to the candidate filter can be solved out, that is, the filter coefficients corresponding to the current block can include the filter coefficients of each set of candidate filters.
[0353] Step 2002, when filtering the current image using the TALF, determining the nonlinear restriction identification information according to the Lagrange value when the input of the filter is restricted and the Lagrange value when the input of the filter is not restricted, and writing the nonlinear restriction identification information into the bitstream.
[0354] In the embodiments of the present application, when filtering the current image using the TALF, the Lagrange value when the input of the filter is restricted and the Lagrange value when the input of the filter is not restricted can be determined, then the nonlinear restriction identification information can be determined according to the Lagrange value when the input of the filter is restricted and the Lagrange value when the input of the filter is not restricted, and the nonlinear restriction identification information can be written into the bitstream.
[0355] It should be noted that in the embodiments of the present application, any method can be used to calculate the Lagrange value, including but not limited to the rate-distortion optimization (RDO) algorithm.
[0356] It can be understood that, in the embodiments of the present application, the nonlinear restriction identification information can be used to determine whether to restrict the input of the filter of the TALF, i.e., the nonlinear restriction identification information can be used to control the nonlinear filtering of the TALF, i.e., to control whether to use the nonlinear TALF through the nonlinear restriction identification information.
[0357] It can be understood that, in the embodiments of the present application, the nonlinear TALF can be understood as restricting the input value corresponding to the filter coefficient of the TALF within a specified range.
[0358] Exemplarily, in some embodiments, a manner K(a, b) of limiting the value range can be used to determine the restriction value for restricting the input of the filter, and K(a, b) can be represented as formula (1).
[0359] Further, in the embodiments of the present application, the nonlinear restriction identification information can be used to determine whether to restrict the input of the filter of the TALF. The nonlinear restriction identification information can be a flag, and whether to restrict the input of the filter of the TALF can be determined through the value of the nonlinear restriction identification information.
[0360] It should be noted that, in the embodiments of the present application, the nonlinear restriction identification information can be used to indicate whether to restrict the input of the filter of the TALF. In addition, the value of the nonlinear restriction identification information can be in the form of a parameter or in the form of a number, which is not limited here.
[0361] Exemplarily, in some embodiments, the nonlinear restriction identification information can be an image-level or slice-level flag. If the value of the nonlinear restriction identification information is 0, it can be determined that the current block does not restrict the input of the filter of the TALF. Otherwise, if the value of the nonlinear restriction identification information is 1, it can be determined that the input of the filter of the TALF is restricted.
[0362] Exemplarily, in some embodiments, the nonlinear restriction identification information can be an image-level or slice-level flag. If the value of the nonlinear restriction identification information is false, it can be determined that the current block does not restrict the input of the filter of the TALF. Otherwise, if the value of the nonlinear restriction identification information is true, it can be determined that the input of the filter of the TALF is restricted.
[0363] Exemplarily, in some embodiments, the nonlinear restriction identification information can be indicated by a syntax element talf_clip_flag[sfIdx], i.e., talf_clip_flag[sfIdx] can indicate whether the input of the sfIdx-th group of filters is restricted. If talf_clip_flag[sfIdx] is equal to 0, it is determined that the input of the sfIdx-th group of filters is not restricted, and if talf_clip_flag[sfIdx] is equal to 1, it is determined that the input of the sfIdx-th group of filters is restricted. Of course, the value of talf_clip_flag[sfIdx] is not limited to 0 and 1, and the present application does not make a specific limitation.
[0364] Exemplarily, in some embodiments, the slice-level syntax element can be as follows:
[0365] Wherein, talf_clip_flag[sfIdx] is used to further control whether a nonlinear index parameter is decoded for each nonzero coefficient of the sfIdx-th group of filters, i.e., whether the input value of the sfIdx-th group of filters is restricted can be controlled by talf_clip_flag[sfIdx].
[0366] Therefore, in the embodiments of the present application, for the TALF filtering processing, the scheme of introducing the restriction on the input value of the filter through the nonlinear restriction identification information can save the code consumption to a certain extent in the encoding and decoding process.
[0367] Further, in the embodiments of the present application, after the cost value when the input of the filter is restricted and the cost value when the input of the filter is not restricted are determined, the nonlinear restriction identification information can be further determined according to the cost value when the input of the filter is restricted and the cost value when the input of the filter is not restricted. Wherein, in the case that the cost value when the input of the filter is restricted is greater than or equal to the cost value when the input of the filter is not restricted, the nonlinear restriction identification information is set to indicate that the input of the filter is not restricted; in the case that the cost value when the input of the filter is restricted is less than the cost value when the input of the filter is not restricted, the nonlinear restriction identification information is set to indicate that the input of the filter is restricted.
[0368] Step 2003, in the case that it is determined that the input of the filter is restricted, determining the restriction value corresponding to the filter coefficient, and determining the nonlinear index parameter corresponding to the filter coefficient based on the restriction value corresponding to the filter coefficient, and writing the nonlinear index parameter corresponding to the filter coefficient into the code stream.
[0369] Further, in the embodiments of the present application, when the restriction value corresponding to the filter coefficient is determined, and the nonlinear index parameter corresponding to the filter coefficient is determined based on the restriction value corresponding to the filter coefficient, the minimum value in the cost values corresponding to the candidate restriction values can be determined first; then the candidate restriction value corresponding to the minimum value is determined as the restriction value corresponding to the filter coefficient; the nonlinear restriction list in which the restriction value corresponding to the filter coefficient is located is determined; the list index corresponding to the nonlinear restriction list is determined according to the nonlinear restriction list and the candidate list; and the nonlinear index parameter is determined according to the list index.
[0370] Further, in the embodiments of the present application, the nonlinear index parameter corresponding to the filter coefficient can be used to determine the restriction value corresponding to the filter coefficient, and the restriction value can be used to perform nonlinear restriction on the input corresponding to the filter coefficient.
[0371] That is, in the embodiments of the present application, the restriction value of the input corresponding to the filter coefficient can be further determined by the value of the nonlinear index parameter.
[0372] It can be understood that, in the embodiments of the present application, the nonlinear index parameter corresponds to the filter coefficient in time domain, and different filter coefficients correspond to different nonlinear index parameters. Therefore, after determining the restriction on the input of the filter, the nonlinear index parameter corresponding to any nonzero filter coefficient can be obtained by analysis.
[0373] It should be noted that, in the embodiments of the present application, the nonlinear index parameter can be an image-level flag, or a slice-level (or slice-level) flag. That is, in general, the nonlinear index parameter can be a parameter written in the Slice header or picture header, which is not limited herein.
[0374] It can be understood that, in the embodiments of the present application, the value of the nonlinear index parameter can be in the form of a number, or in the form of a parameter, which is not limited in the present application.
[0375] Exemplarily, in some embodiments, if the value of the nonlinear index parameter is 0, it can be determined that the input value of the corresponding filter coefficient is not restricted, if the value of the nonlinear index parameter is not 0, it can be determined that the input value of the corresponding filter coefficient is restricted, and further, the corresponding restriction value can be determined according to the value of the nonlinear index parameter.
[0376] Exemplarily, in some embodiments, the non-linear index parameter can be represented by a syntax element talf_clip_idx[sfIdx][j], where the syntax element talf_clip_idx[sfIdx][j] can be used to determine whether to limit the input value corresponding to the jth filter coefficient of the sfIdxth group of filters, and determine the limited value of the input value corresponding to the jth filter coefficient of the sfIdxth group of filters.
[0377] Exemplarily, in some embodiments, the slice-level syntax elements are as follows:
[0378] For each coded temporal adaptive filter, a talf_clip_flag[sfIdx] flag can be encoded, which is used to further control whether to decode a non-linear index parameter talf_clip_idx[sfIdx][j] for each non-zero coefficient of the filter, and the non-linear index parameter can take values of 0, 1, 2, and 3, where 0 represents no limitation on the range of the filter coefficient input value at the corresponding position of the corresponding filter, and 1, 2, and 3 represent certain limitations on the range of the filter coefficient input value at the corresponding position of the corresponding filter.
[0379] Further, in the embodiments of the present application, when constructing the candidate list, the sample depth parameter can be determined first; and then the candidate list is constructed according to the sample depth parameter.
[0380] It should be noted that, in the embodiments of the present application, the candidate list (non-linear clipping value table) corresponding to the value of the non-linear index parameter can be constructed using the sample depth parameter, such as the sample depth of the luminance component, i.e., the mapping relationship between the index parameter and the candidate list can be determined.
[0381] Exemplarily, in some embodiments, the non-linear clipping value table (candidate list) can be constructed according to the sample depth inputBitdepth of the luminance component, as follows:
[0382] Correspondingly, in the embodiments of the present application, after determining the non-linear restriction list in which the limited value (non-linear clipping value) of the filter coefficient is located, the non-linear index parameter corresponding to the non-linear restriction list can be determined by using the mapping relationship between the index parameter and the candidate list in combination with the candidate list, and the non-linear index parameter is written into the bitstream.
[0383] Furthermore, in an embodiment of this application, when it is determined that the input to the filter is restricted, the current block is filtered based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block, and the restriction values corresponding to the filter coefficients, to determine the filtered reconstructed value of the current block.
[0384] Further, in the embodiments of this application, when filtering the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block, and the limit values corresponding to the filter coefficients, and determining the filtered reconstructed value of the current block, for the current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block; the reconstructed sample value of the reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the inter-frame reference image; the filtered reconstructed sample value of the current sample position is determined according to the limit values corresponding to the filter coefficients, the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0385] It is understood that in the embodiments of this application, for the forward filtering mode and backward filtering mode in the RA configuration, and the first forward filtering mode (most recent first frame) and the second forward filtering mode (most recent second frame) in the LD configuration, the current image corresponds to an inter-frame reference image. When performing TALF filtering on the reconstructed value of the current block based on the reconstructed sample of the inter-frame reference image, the reference sample position corresponding to the current sample position can be determined in the inter-frame reference image. Then, the reconstructed sample value corresponding to the current sample position and the reconstructed sample value corresponding to the reference sample position are respectively input into the TALF filter. Combined with the determined filter coefficients corresponding to the current block and the limit values corresponding to the filter coefficients, the filtered reconstructed sample value corresponding to the current sample position is finally determined. The above scheme is used to traverse any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0386] For example, in some embodiments, it is assumed that the current image corresponds to an inter-frame reference image. The process of filtering the sample value at coordinate (x, y) (the current sample position) in the current image using a 7x7 symmetric filter with 13 filter coefficients is as shown in formula (2). Where, b i Represents the corresponding c i The values used to limit the range of filter inputs at the positions of filter coefficients, i.e., the limit values corresponding to the filter coefficients, can be determined by the non-linear index parameters of the encoding and decoding in the bitstream.
[0387] Further, in the embodiments of this application, when filtering the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients corresponding to the current block, and the limit values corresponding to the filter coefficients, and determining the filtered reconstructed value of the current block, for the current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block; the reconstructed sample value of the first reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the first inter-frame reference image; the reconstructed sample value of the second reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the second inter-frame reference image; the filtered reconstructed sample value of the current sample position is determined according to the limit values corresponding to the filter coefficients, the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0388] It is understood that in the embodiments of this application, for the bidirectional filtering mode in the RA configuration and the third forward filtering mode (most recent first frame and most recent second frame) in the LD configuration, the current image corresponds to two inter-frame reference images. When performing TALF filtering on the reconstructed value of the current block based on the reconstructed samples of the two inter-frame reference images, the reference sample positions corresponding to the current sample position can be determined in the two inter-frame reference images respectively. Then, the reconstructed sample value corresponding to the current sample position and the reconstructed sample values corresponding to the two reference sample positions are respectively input into the TALF filter. Combined with the determined filter coefficients corresponding to the current block and the limit values corresponding to the filter coefficients, the filtered reconstructed sample value corresponding to the current sample position is finally determined. The above scheme is used to traverse any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0389] For example, in some embodiments, it is assumed that the current image corresponds to two inter-frame reference images. In this case, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current image using two 5x5 symmetrical filters with 7 filter coefficients is as shown in formula (3). Wherein, b i Represents the corresponding c i The values used to limit the range of filter inputs at the positions of filter coefficients, i.e., the limit values corresponding to the filter coefficients, can be determined by the non-linear index parameters of the encoding and decoding in the bitstream.
[0390] Further, in the embodiments of the present application, in the case that it is determined that the input of the filter is not to be limited, the current block is filtered based on the reconstructed samples of the at least one inter- reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block.
[0391] Further, in the embodiments of the present application, if it is determined that the input of the filter is not to be limited, after the at least one inter- reference picture corresponding to the current picture and the filter coefficients corresponding to the current block are determined, the current block can be further filtered based on the reconstructed samples of the at least one inter- reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block.
[0392] It can be understood that in the embodiments of the present application, in each candidate mode, each group of candidate filters can be used respectively to filter the reconstructed value of the current block by using the filter coefficients corresponding to the current block in the candidate filter and the reconstructed samples of the at least one inter- reference picture corresponding to the candidate mode, so as to determine the filtered reconstructed value of the current block.
[0393] It can be understood that in the embodiments of the present application, since the POC values of the inter- reference pictures determined based on different filter modes can be different, and the number of the determined inter- reference pictures can also be different, when the TALF filtering is performed on the current block of the current picture, the filtering processes performed corresponding to different numbers of inter- reference pictures are also different.
[0394] Further, in the embodiments of the present application, when the current block is filtered based on the reconstructed samples of the at least one inter- reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block, for a current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, and the reconstructed sample value of a reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the inter- reference picture; the filtered reconstructed sample value of the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0395] It can be understood that, in the embodiments of the present application, for the forward filtering mode in the RA configuration, the backward filtering mode, and the first forward filtering mode (the nearest first frame) and the second forward filtering mode (the nearest second frame) in the LD configuration, the current image corresponds to one inter-frame reference image, and when the TALF filtering is performed on the reconstructed value of the current block based on the reconstructed sample of the one inter-frame reference image, the reference sample position corresponding to the current sample position can be determined in the one inter-frame reference image, and then the reconstructed sample value corresponding to the current sample position and the reconstructed sample value corresponding to the reference sample position are input into the TALF filter, combined with the determined filter coefficient corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0396] Exemplarily, in some embodiments, assuming that the current image corresponds to one inter-frame reference image, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current image using 13 filter coefficients and a 7x7 symmetric filter is as formula (4).
[0397] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, and the reconstructed sample value of the reference sample position, the first sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position; and then the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, and the first sample difference value.
[0398] That is, in the embodiments of the present application, the first sample difference value can also be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position, and then the first sample difference value is taken as the input of the filter.
[0399] Exemplarily, in some embodiments, assuming that the current image corresponds to one inter-frame reference image, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current image using 13 filter coefficients and a 7x7 symmetric filter is as formula (5).
[0400] Further, in the embodiments of the present application, when determining the filtered reconstructed sample value of the current sample position according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the reference sample position, the filtered reconstructed sample value of the current sample position can be determined as follows. The filtering position corresponding to the reference sample position in the current block is determined according to the reconstructed value of the current block, and the reconstructed sample value of the filtering position is determined according to the reconstructed value of the current block. The second sample difference value is determined according to the reconstructed sample value of the filtering position and the reconstructed sample value of the reference sample position. The filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, and the second sample difference value.
[0401] That is, in the embodiments of the present application, for each filtering position, the second sample difference value can also be determined according to the reconstructed sample value of the filtering position and the reconstructed sample value of the reference sample position, and then the second sample difference value is taken as the input of the filter.
[0402] Exemplarily, in some embodiments, it is assumed that the current image corresponds to one inter-frame reference image, at this time, the process of filtering the sample value of the position (current sample position) with coordinates (x, y) in the current image using 13 filter coefficients and 7x7 symmetric filter is as formula (6).
[0403] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of at least one inter-frame reference image and the filter coefficient corresponding to the current block to determine the filtered reconstructed value of the current block, for the current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, the reconstructed sample value of the first reference sample position corresponding to the current sample position is determined according to the reconstructed sample of the first inter-frame reference image, and the reconstructed sample value of the second reference sample position corresponding to the current sample position is determined according to the reconstructed sample of the second inter-frame reference image. The filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position. The filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0404] It can be understood that, in the embodiments of the present application, for the bidirectional filter mode in the RA configuration, and the third forward filter mode (the nearest first frame and the nearest second frame) in the LD configuration, the current picture corresponds to two inter-frame reference pictures, and when the TALF filter is used to filter the reconstructed value of the current block based on the reconstructed samples of the two inter-frame reference pictures, the reference sample positions corresponding to the current sample position can be determined in the two inter-frame reference pictures respectively, and then the reconstructed sample value corresponding to the current sample position, the reconstructed sample values corresponding to the two reference sample positions are input into the TALF filter, combined with the determined filter coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position. According to the above scheme, any sample position of the current block is traversed to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0405] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetric 2 filters is as formula (7).
[0406] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, the reconstructed sample value of the second reference sample position, the filtered reconstructed sample value of the current sample position can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the first reference sample position; the fourth sample difference value is determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, the third sample difference value and the fourth sample difference value.
[0407] That is, in the embodiments of the present application, the third sample difference value and the fourth sample difference value can also be determined according to the reconstructed sample value of the current sample position and the reconstructed sample values of the two reference sample positions respectively, and then the third sample difference value and the fourth sample difference value are used as the input of the filter.
[0408] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetric 2 filters is as formula (8).
[0409] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, the reconstructed sample value of the second reference sample position, the filtered reconstructed sample value of the current sample position can be determined as follows: a filtering position corresponding to the reference sample position in the current block is determined, and the reconstructed sample value of the filtering position is determined according to the reconstructed value of the current block; a fifth sample difference value is determined according to the reconstructed sample value of the filtering position and the reconstructed sample value of the first reference sample position; a sixth sample difference value is determined according to the reconstructed sample value of the filtering position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the fifth sample difference value and the sixth sample difference value.
[0410] That is, in the embodiments of the present application, for each filtering position, the fifth sample difference value and the sixth sample difference value can also be determined according to the reconstructed sample value of the filtering position and the reconstructed sample values of the two reference sample positions respectively, and then the fifth sample difference value and the sixth sample difference value are taken as the input of the filter.
[0411] Exemplarily, in some embodiments, assuming that the current image corresponds to two inter-frame reference images, the filtering process of the sample value at the position (x, y) (current sample position) in the current image using 7 filter coefficients and 2 filters with 5x5 symmetry is as shown in formula (9).
[0412] It should be noted that in the embodiments of the present application, the filtering process shown in the above formula is an exemplary description of the TALF filtering proposed in the present application, and of course, in actual application, if the adaptive filter does not have the symmetry of the above example, the adaptive filter coefficients and the input values corresponding to each coefficient should also be adjusted accordingly. That is, the filtering process should be a process in which the adaptive filter coefficients and the reconstructed values of the reference image at each related position act together.
[0413] It should be noted that in the embodiments of the present application, the filter coefficient can be an integer, and the parameters used in the filtering process can also include bias and shift.
[0414] Further, in the embodiments of the present application, for the TALF filter, in addition to the at least one inter-frame reference image that has been decoded in the time domain, the corresponding input information can also include the reconstructed value of the current block, for example, the reconstructed value of any image component of the current block. The reconstructed value of the current block can be obtained after the current block in the current image is processed based on any loop filtering method.
[0415] That is, in the embodiments of the present application, the manner of determining the reconstructed value of the current block is not specifically limited, and correspondingly, the specific position of the TALF filtering in the loop filtering process is not specifically limited, i.e., the position of the temporal adaptive loop filtering can be at any position in the loop filtering.
[0416] Exemplarily, in some embodiments, FIG. 11 is an implementation schematic diagram one of the TALF filtering according to the embodiments of the present application, as shown in FIG. 11, the input of the TALF can include the reconstructed value on the reconstructed image of the current image before the ALF filtering and the decoded reconstructed image in the time domain, i.e., the position of the TALF in the loop filtering can be parallel to the ALF.
[0417] Exemplarily, in some embodiments, FIG. 12 is an implementation schematic diagram two of the TALF filtering according to the embodiments of the present application, as shown in FIG. 12, the input of the TALF can include the reconstructed value on the reconstructed image of the current image after the Deblocking and the decoded reconstructed image in the time domain, i.e., the position of the TALF in the loop filtering can be parallel to the SAO.
[0418] Exemplarily, in some embodiments, FIG. 13 is an implementation schematic diagram three of the TALF filtering according to the embodiments of the present application, as shown in FIG. 13, the position of the TALF in the loop filtering can be parallel to the Deblocking.
[0419] Exemplarily, in some embodiments, FIG. 14 is an implementation schematic diagram four of the TALF filtering according to the embodiments of the present application, as shown in FIG. 14, the position of the TALF in the loop filtering can be before the Deblocking.
[0420] Exemplarily, in some embodiments, FIG. 15 is an implementation schematic diagram five of the TALF filtering according to the embodiments of the present application, as shown in FIG. 15, the input of the TALF can include the reconstructed value on the reconstructed image of the current image after the Deblocking and the decoded reconstructed image in the time domain, i.e., the position of the TALF in the loop filtering can be after the Deblocking.
[0421] Exemplarily, in some embodiments, FIG. 16 is an implementation schematic diagram six of the TALF filtering according to the embodiments of the present application, as shown in FIG. 16, the input of the TALF can include the reconstructed value on the reconstructed image of the current image after the SAO and the decoded reconstructed image in the time domain, i.e., the position of the TALF in the loop filtering can be after the SAO.
[0422] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of an implementation of the TALF filtering according to the embodiments of the present application. As shown in FIG. 17, the input of the TALF can also include the reconstructed value on the reconstructed image of the decoded reconstructed image in the time domain and the current image after the ALF filtering, i.e., the position of the TALF in the loop filtering can be after the ALF.
[0423] Therefore, in some embodiments, the TALF can also be placed at any position in the series of loop filters, which means that the input of the TALF includes the reconstructed value on the reconstructed image of any loop in the current loop filtering and the decoded image.
[0424] Further, in the embodiments of the present application, the reconstructed value of the current block can be the reconstructed value of the luminance component of the current block or the reconstructed value of the chroma component of the current block, which is not specifically limited in the present application.
[0425] That is to say, in the embodiments of the present application, the TALF filtering can be applied to any image component of the current image.
[0426] It should be noted that in the embodiments of the present application, in the video image, the image component of the current image can include a first image component, a second image component and a third image component. Among them, the three image components are a luminance component, a blue color component and a red color component respectively. Specifically, the luminance component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V. In this way, the video image can be represented in YCbCr format or YUV format.
[0427] Further, in the embodiments of the present application, the shape, size and tap number of the filter used in the TALF filtering process are not specifically limited, i.e., any shape and size of the filter can be applied to the TALF filtering process. For example, the shape of the filter used in the TALF filtering process includes but is not limited to diamond, cross, rectangle and square.
[0428] Exemplarily, in some embodiments, FIG. 18 is a schematic diagram of a filter one according to the embodiments of the present application. As shown in FIG. 18, a 5x5 symmetric filter includes 7 filter coefficients.
[0429] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram of a filter two according to the embodiments of the present application. As shown in FIG. 19, a 7x7 symmetric filter includes 13 filter coefficients.
[0430] Exemplarily, in some embodiments, FIG. 20 is a schematic diagram three of a filter according to an embodiment of the present application, as shown in FIG. 20, a 9x9 symmetric filter, containing 21 filter coefficients.
[0431] wherein the above are symmetric filters, each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to two filter input values in symmetric positions, except for the filter center point.
[0432] Exemplarily, in some embodiments, FIG. 21 is a schematic diagram four of a filter according to an embodiment of the present application, as shown in FIG. 21, a 5x5 symmetric filter, containing 4 filter coefficients.
[0433] Exemplarily, in some embodiments, FIG. 22 is a schematic diagram five of a filter according to an embodiment of the present application, as shown in FIG. 22, a 7x7 symmetric filter, containing 6 filter coefficients.
[0434] wherein the symmetric filter can also be that each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to filter input values in multiple directions, except for the filter center point.
[0435] Of course, the filter can also be asymmetric, which means that each filter input position has different coefficient values.
[0436] Exemplarily, in some embodiments, FIG. 23 is a schematic diagram six of a filter according to an embodiment of the present application, as shown in FIG. 23, a 5x5 asymmetric filter, containing 13 filter coefficients.
[0437] Exemplarily, in some embodiments, for the forward filtering and backward filtering under RA configuration, and the forward filtering using the reconstructed value in the POC N-1 reference image as input and the forward filtering using the reconstructed value in the POC N-2 reference image as input under LD configuration, a 7x7 symmetric filter containing 13 filter coefficients can be selected.
[0438] Exemplarily, in some embodiments, FIG. 24 is a schematic diagram seven of a filter according to an embodiment of the present application, as shown in FIG. 24, two 5x5 symmetric filters, containing 14 filter coefficients in total. Wherein, for the bidirectional filtering under RA configuration and the forward filtering using the reconstructed value in the POC N-1 and N-2 reference images as input under LD configuration, two filters as shown in FIG. 24 can be selected, which are used for the reconstructed value in the two reference images as input respectively.
[0439] Further, in the embodiments of the present application, after filtering the current block based on the filter coefficients corresponding to the at least one inter-frame reference picture and the reconstructed samples of the current block, and determining the filtered reconstructed value of the current block, the first generation value can be determined according to the filtered reconstructed value of the current block, and the first syntax element identification information is determined based on the first generation value, and the first syntax element identification information is written into the bitstream; wherein the first syntax element identification information is used to determine whether the current block uses TALF for filtering.
[0440] Further, in the embodiments of the present application, when the first generation value is determined according to the filtered reconstructed value of the current block, in each candidate mode, the second generation value of the filter coefficients corresponding to the current block is determined according to the filtered reconstructed value of the current block; the smallest second generation value is determined as the first generation value corresponding to the filtering of the current block using TALF.
[0441] It can be understood that in the embodiments of the present application, each candidate filter can be traversed in each candidate mode, and the second generation value corresponding to the filtering using the filter coefficients corresponding to the current block is determined respectively, wherein the method of calculating the generation value includes but is not limited to rate-distortion optimization algorithm.
[0442] Correspondingly, in the embodiments of the present application, the candidate filter and the multiple possible combinations of filter coefficients can be traversed in each candidate mode, and multiple second generation values are calculated respectively, and then the minimum generation value in the multiple second generation values is determined as the first generation value corresponding to the filtering of the current block using TALF in the candidate mode.
[0443] Further, in the embodiments of the present application, when the first syntax element identification information is determined based on the first generation value, the third generation value corresponding to the filtering of the current block without using TALF can be determined; in the case that the first generation value is greater than or equal to the third generation value, the first syntax element identification information is set to indicate that the current block does not use TALF for filtering; in the case that the first generation value is less than the third generation value, the first syntax element identification information is set to indicate that the current block uses TALF for filtering.
[0444] It can be understood that in the embodiments of the present application, the optimal filter set in each mode, whether each CTU uses TALF and which group of TALF filters is calculated by rate-distortion optimization when judging whether each CTU opens TALF filtering according to 1-4 respectively.
[0445] Further, in embodiments of the present application, the first syntax element identification information can be used to determine whether the current block in the current picture is filtered using TALF, i.e. based on the first syntax element identification information, it can be determined whether the reconstructed value of the image component of the current block is filtered using a TALF filter.
[0446] Further, in embodiments of the present application, the first syntax element identification information can be used to determine whether the current block is filtered using TALF. The first syntax element identification information can be a flag, wherein if the current block is a CTU corresponding to the current picture, the first syntax element identification information can be a CTU-level flag, and if the current block is a CU corresponding to the current picture, the first syntax element identification information can be a CU-level flag. Of course, corresponding to any size sub-region in the current picture, the first syntax element identification information can also be a flag of other block level. The present application does not make specific limitation.
[0447] Further, in embodiments of the present application, it can be determined whether the current block is filtered using TALF through the value of the first syntax element identification information.
[0448] Exemplarily, in some embodiments, in the case that the value of the first syntax element identification information is a first value, it is determined that the current block is not filtered using TALF. In the case that the value of the first syntax element identification information is not the first value, it is determined that the current block is filtered using TALF.
[0449] It should be noted that in embodiments of the present application, the first syntax element identification information can be used to indicate whether the current block is filtered using TALF. In addition, the first value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0450] Exemplarily, in some embodiments, if the first syntax element identification information is a flag of a block level, in one specific example, the first value can be set to 0; in another specific example, the first value can also be set to false. The first value in embodiments of the present application is not limited.
[0451] Taking 0 as the first value, in embodiments of the present application, if the value of the first syntax element identification information is 0, it can be determined that the current block is not filtered using TALF. Otherwise, if the value of the first syntax element identification information is not 0, it can be determined that the current block is filtered using TALF.
[0452] Exemplarily, in some embodiments, if the current block of the current picture is a CTU, the first syntax element identification information can be a CTU level syntax, for example, the first syntax element identification information can be represented by a syntax element control talf_ctb_idc[CtbAddrX][CtbAddrY], i.e., talf_ctb_idc[CtbAddrX][CtbAddrY] indicates whether the current block of the current picture is filtered using TALF. If the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0, it is determined that the current block is not filtered using TALF, and if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is not 0, it is determined that the current block is filtered using TALF. Of course, the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is not limited to 0, and the present application does not make specific limitations.
[0453] Further, in the embodiments of the present application, the fourth generation value corresponding to each candidate mode when the current picture is filtered using TALF can also be determined according to the filtered reconstructed value of the current block in each candidate mode; and the smallest fourth generation value is determined as the fifth generation value corresponding to when the current picture is filtered using TALF.
[0454] Further, in the embodiments of the present application, the sixth generation value corresponding to when the current picture is not filtered using TALF is determined; in the case where the fifth generation value is greater than or equal to the sixth generation value, the second syntax element identification information is set to indicate that the current picture is not filtered using TALF; and in the case where the fifth generation value is less than the sixth generation value, the second syntax element identification information is set to indicate that the current picture is filtered using TALF.
[0455] Further, in the embodiments of the present application, in the case where the second syntax element identification information indicates that the current picture is filtered using TALF, the first syntax element is written into the bitstream.
[0456] Further, in the embodiments of the present application, the second syntax element identification information can be used to determine whether the current picture is allowed to be filtered using TALF. The second syntax element identification information can be a flag.
[0457] It should be noted that, in the embodiments of the present application, the second syntax element identification information can be a picture level flag, a slice level flag, a sub-picture level flag, or a tile level flag. The present application does not make specific limitations.
[0458] For example, in some embodiments, if the second syntax element identification information is a flag at a slice level, the second syntax element identification information can be used to determine whether the current slice is allowed to use TALF for filtering.
[0459] Further, in embodiments of the present application, whether the current picture (and / or the current slice) is allowed to use TALF for filtering can be determined by the value of the second syntax element identification information.
[0460] For example, in some embodiments, if the value of the second syntax element identification information is the second value, it is determined that the current picture (and / or the current slice) is allowed to use TALF for filtering. If the value of the second syntax element identification information is the third value, it is determined that the current picture (and / or the current slice) is not allowed to use TALF for filtering.
[0461] It should be noted that, in embodiments of the present application, the second syntax element identification information can be used to indicate whether the current picture (and / or the current slice) is allowed to use TALF for filtering. In addition, the second value and the third value are different, and the second value and the third value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0462] It should also be noted that, if the second syntax element identification information is a flag at a picture level or a flag at a slice level, in one specific example, the second value can be set to 1 and the third value can be set to 0; in another specific example, the second value can also be set to true and the third value can also be set to false; or in yet another specific example, the second value can also be set to 0 and the third value can also be set to 1; or the second value can also be set to false and the third value can also be set to true. The second value and the third value in embodiments of the present application are not limited.
[0463] Assuming that the second syntax element identification information is a flag at a picture level, and taking the second value as 1 and the third value as 0 as an example, in embodiments of the present application, if the value of the second syntax element identification information is 1, it is determined that the current picture uses TALF for filtering. Otherwise, if the value of the second syntax element identification information is 0, it is determined that the current picture does not use TALF for filtering.
[0464] Exemplarily, in some embodiments, assuming that the second syntax element identification information is a picture level flag, the second syntax element identification information can be represented by a syntax element ph_talf_enabled_flag, i.e., ph_talf_enabled_flag indicates whether the current picture is allowed to use TALF for filtering. If the value of ph_talf_enabled_flag is 0, it is determined that the current picture is not allowed to use TALF for filtering, and if the value of ph_talf_enabled_flag is 1, it is determined that the current picture is allowed to use TALF for filtering.
[0465] Exemplarily, in some embodiments, assuming that the second syntax element identification information is a slice level flag, the second syntax element identification information can be represented by a syntax element sh_talf_enabled_flag, i.e., sh_talf_enabled_flag indicates whether the current slice is allowed to use TALF for filtering. If the value of sh_talf_enabled_flag is 0, it is determined that the current slice is not allowed to use TALF for filtering, and if the value of sh_talf_enabled_flag is 1, it is determined that the current slice is allowed to use TALF for filtering.
[0466] Of course, the value of sh_talf_enabled_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0467] Therefore, in the embodiments of the present application, the coding of the first syntax element identification information can be dependent on the second syntax element identification information. That is, the block level identification can be dependent on the picture level identification, or the block level identification can be dependent on the slice level identification. For example, in the case of determining that the current picture (and / or the current slice) uses TALF for filtering based on the second syntax element identification information, the coding of the first syntax element identification information can be further performed, otherwise, the first syntax element identification information does not need to be coded again.
[0468] Further, in the embodiments of the present application, third syntax element identification information can be determined and written into the bitstream, wherein the third syntax element identification information is used to determine whether the current sequence uses TALF for filtering, and in the case that the third syntax element identification information indicates that the current sequence uses TALF for filtering, the second syntax element is written into the bitstream.
[0469] Further, in embodiments of the present application, the third syntax element identification information can be used to determine whether the current sequence is filtered using TALF. The third syntax element identification information can be a flag, for example, a sequence level flag.
[0470] Further, in embodiments of the present application, whether the current sequence is filtered using TALF can be determined by the value of the third syntax element identification information.
[0471] For example, in some embodiments, when the value of the third syntax element identification information is a fourth value, it is determined that the current sequence is filtered using TALF. When the value of the third syntax element identification information is a fifth value, it is determined that the current sequence is not filtered using TALF.
[0472] It should be noted that in embodiments of the present application, the third syntax element identification information can be used to indicate whether the current sequence is filtered using TALF. In addition, the fourth value and the fifth value are different, and the fourth value and the fifth value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0473] It should be further noted that if the third syntax element identification information is a sequence level flag, in one specific example, the fourth value can be set to 1, and the fifth value can be set to 0; in another specific example, the fourth value can also be set to true, and the fifth value can also be set to false; or in yet another specific example, the fourth value can also be set to 0, and the fifth value can also be set to 1; or the fourth value can also be set to false, and the fifth value can also be set to true. The fourth value and the fifth value in embodiments of the present application are not limited.
[0474] For example, assuming that the third syntax element identification information is a sequence level flag, and the fourth value is 1 and the fifth value is 0, in embodiments of the present application, if the value of the third syntax element identification information is 1, it is determined that the current sequence is filtered using TALF. Otherwise, if the value of the third syntax element identification information is 0, it is determined that the current sequence is not filtered using TALF.
[0475] Exemplarily, in some embodiments, assuming that the third syntax element identification information is a sequence level flag, the third syntax element identification information can be represented by a syntax element sps_talf_enabled_flag, i.e., sps_talf_enabled_flag indicates whether TALF is used for filtering the current sequence. If the value of sps_talf_enabled_flag is 0, it is determined that TALF is not used for filtering the current sequence, and if the value of sps_talf_enabled_flag is 1, it is determined that TALF is used for filtering the current sequence.
[0476] Of course, the value of sps_talf_enabled_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0477] Therefore, in the embodiments of the present application, the coding of the second syntax element identification information can be dependent on the third syntax element identification information, i.e., the identification at the picture level (and / or slice level) can be dependent on the identification at the sequence level. For example, in the case of determining that TALF is used for filtering the current sequence based on the third syntax element identification information, the coding of the second syntax element identification information can be further performed, otherwise, the second syntax element identification information does not need to be coded.
[0478] Further, in the embodiments of the present application, the TALF identification at the sequence level can be dependent on the ALF identification at the sequence level, i.e., the coding of the third syntax element identification information can have a dependent relationship with the coding of the sequence level syntax element of ALF.
[0479] Further, in the embodiments of the present application, the identification at the picture level (and / or slice level) dependent on the identification at the sequence level can include that the TALF identification at the picture level (and / or slice level) dependent on the TALF identification at the sequence level, and can also include that the TALF identification at the picture level (and / or slice level) dependent on the ALF identification at the sequence level.
[0480] That is, in the embodiments of the present application, the coding of the second syntax element identification information can be dependent on the third syntax element identification information, or can be dependent on the ALF identification at the sequence level.
[0481] Further, in the embodiments of the present application, the TALF identification at the picture level (and / or slice level) can also be dependent on the ALF identification at the picture level (and / or slice level).
[0482] That is, in the embodiments of the present application, the coding of the second syntax element identification information can also be dependent on the ALF identification at the picture level (and / or slice level).
[0483] Exemplarily, in some embodiments, the TALF identification at the picture level (and / or slice level) can also rely on some high level syntax, for example, a high level syntax element pps alf info in ph flag to identify the control identification of the picture level or slice level of the ALF using the syntax element of the picture level or slice level to parse the ALF, and the ALF identifier also exists in the slice header.
[0484] Further, in the embodiments of the present application, after the optimal candidate mode, the candidate filter and the corresponding filter coefficient are selected based on the rate-distortion optimization algorithm, the TALF parameters can be further determined, and the TALF parameters and the filter coefficient corresponding to the current block are written into the bitstream. Among them, the TALF parameters include one or more of the mode parameter, the number parameter, the coefficient value parameter and the coefficient sign parameter.
[0485] It can be understood that in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filter, wherein for different filter modes, the inter prediction reference picture corresponding to the current picture determined can be different. The number parameter can be used to determine the number of groups of the filter corresponding to the current picture. The coefficient value parameter can be used to determine the absolute value size of the filter coefficient. The coefficient sign parameter can be used to determine the sign of the filter coefficient, including positive and negative.
[0486] Exemplarily, in some embodiments, the coefficient value parameter can be determined according to the value of the filter coefficient corresponding to the current block; the coefficient sign parameter can be determined according to the sign of the filter coefficient corresponding to the current block; and the TALF parameter is determined according to the coefficient value parameter and the coefficient sign parameter, that is, the coefficient value parameter and the coefficient sign parameter in the TALF parameter are determined.
[0487] Exemplarily, in some embodiments, the filter mode corresponding to the fifth generation value and the number of groups of the candidate filter can be determined; the mode parameter can be determined according to the filter mode and the current configuration; the number parameter can be determined according to the number of groups of the candidate filter; and the TALF parameter is determined according to the mode parameter and the number parameter, that is, the mode parameter and the number parameter in the TALF parameter are determined.
[0488] Further, in the embodiments of the present application, the APS set corresponding to the TALF parameter can be determined; then the APS index corresponding to the APS set is determined, and the APS index is written into the bitstream.
[0489] It can be understood that in the embodiments of the present application, the APS index can be used to determine the APS parameter set corresponding to the current picture, that is, the APS set corresponding to the current picture can be determined through the APS index.
[0490] That is, in the embodiments of the present application, the TALF parameters corresponding to the current image can be saved in the APS, so that the TALF parameters can be obtained by parsing in the APS.
[0491] Further, in the embodiments of the present application, the TALF parameters can also be directly written into the code stream.
[0492] That is, in the embodiments of the present application, the TALF parameters corresponding to the current image can also be directly written into the code stream. For example, the TALF parameters can be coded in the image header or the slice header.
[0493] It can be understood that, in the embodiments of the present application, the first syntax element identification information can also be used to determine the TALF information used by the current block, for example, the value of the first syntax element identification information can be set according to the candidate filter corresponding to the current block finally determined.
[0494] For example, in some embodiments, when the value of the first syntax element identification information is a first value, it is indicated that the TALF is not used for filtering the current block. When the value of the first syntax element identification information is not the first value, it is indicated that the TALF is used for filtering the current block, and the value of the first syntax element identification information can be set to indicate the candidate filter corresponding to the current block.
[0495] It can be understood that, in the embodiments of the present application, when it is determined that the TALF is used for filtering the current block, the value of the first syntax element identification information can be set to indicate the group number index of the filter corresponding to the current block. The group number index of the filter can represent the index of the TALF filter used by the current block in the filter set coded in the current image, that is, the group number index of the filter can be used to select the candidate filter corresponding to the current block from the multiple filters corresponding to the current image.
[0496] For example, in the embodiments of the present application, the optimal filter mode, the group number of the filter, and the CTU switch optimized by the rate-distortion optimization are used to filter the reconstructed image, and the filter mode, the group number of the filter, and the filter coefficient are coded in the image header, the CTU switch, and the like.
[0497] It can be understood that the coding method proposed in the embodiments of the present application is a method of using the reconstructed sample value in the time domain as an information source to improve the reconstruction quality of the current image, and the information is extracted from the reconstructed sample of the reconstructed image by the TALF filter to filter the current image.
[0498] It can be understood that the filter coefficient of the filter in the time domain in the coding method proposed in the embodiments of the present application can be predefined or transmitted through the code stream.
[0499] It can be understood that the encoding method proposed in the embodiments of the present application can refer to different encoding configurations, and different filtering modes under different filtering modes are proposed. Among them, under the RA configuration, the filtering mode can be divided into forward filtering mode, reverse filtering mode and bidirectional filtering mode; under the LD configuration, the filtering mode can be divided into first forward filtering mode, second forward filtering mode and third forward filtering mode.
[0500] It can be understood that the encoding method proposed in the embodiments of the present application can be used for the luminance component, and can also be used for the chrominance component.
[0501] It can be understood that the encoding method proposed in the embodiments of the present application can be any level of switch identification, such as TALF, which can be switched as a unit of image, or as a unit of CTU, or as a unit of CU, or as a unit of other sub-regions of image.
[0502] It can be understood that the encoding method proposed in the embodiments of the present application can also select to skip the coding and decoding processing of the CTU identifier, and directly decide whether to perform TALF filtering on the entire image through the image-level identifier. At this time, the current image corresponds to only one candidate filter.
[0503] The embodiments of the present application provide an encoding method, which can select to use the limit value corresponding to the filter coefficient to perform nonlinear limitation on the input of the filter in the TALF filtering process, thereby reducing the consumption of code words and improving the coding and decoding performance.
[0504] Based on the above embodiments, the embodiments of the present application propose a time domain adaptive loop filtering technology, which is a technology of using the reconstructed image in the time domain as an information source to improve the adaptive loop filtering of the current frame reconstructed image. Further, in the TALF filtering process, the limit value corresponding to the filter coefficient can be selected to perform nonlinear limitation on the input of the filter, thereby reducing the consumption of code words and improving the coding and decoding performance.
[0505] The embodiments of the present application propose a technology of using the reconstructed image in the time domain to improve the quality of the current image, which can be that the encoder obtains one or more sets of filter coefficients for improving the quality of the current reconstructed image and transmits through the code stream; the decoder uses the information including but not limited to the reconstructed value in the time domain as input to filter the current image through the parsed filter coefficients.
[0506] The embodiments of the present application propose a technique of improving the quality of a current image by using a reconstructed image in the time domain, and the encoder can select appropriate filters and coefficients from a predefined set of one or more filters and coefficients, and transmit syntax elements related to whether to use the filters and coefficients through a bitstream; the decoder determines the filters and coefficients by analyzing the syntax elements, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0507] The embodiments of the present application propose a technique of improving the quality of a current image by using a reconstructed image in the time domain, and the encoder can select appropriate filters and coefficients from a predefined set of one or more filters and coefficients, and transmit syntax elements related to whether to use the filters and coefficients through a bitstream; the decoder determines the filters and coefficients by analyzing the syntax elements, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0508] Exemplarily, in some embodiments, a block-level identifier (first syntax element identifier information) can be used to indicate whether the current block is filtered by TALF.
[0509] Exemplarily, in some embodiments, taking a CTU level as an example, there is an identifier to control whether to start TALF at the CTU level. In addition, since a frame image can have multiple TALFs (candidate filters) for selection, when the TALF identifier of a CTU level is true, the relevant identifier representing the selected TALF filter for filtering the current CTU should also be parsed.
[0510] Exemplarily, in some embodiments, the parsing process of the first syntax element identifier information talf_ctb_idc[CtbAddrX][CtbAddrY] is as follows:
[0511] When the current slice / current picture allows the use of TALF, the CTU-level control flag talf_ctb_idc[CtbAddrX][CtbAddrY] is also coded when coding each CTU-level syntax, and the flag is non-zero when the current CTU uses TALF, and the value of talf_ctb_idc[CtbAddrX][CtbAddrY] - 1 corresponds to the index of the TALF filter used by the current CTU in the filter set coded in the current picture / slice. For example, if there are 3 sets of TALF filter coefficients coded in the current picture / slice, talf_ctb_idc[CtbAddrX][CtbAddrY] = 0 means that the current CTU does not use TALF, talf_ctb_idc[CtbAddrX][CtbAddrY] = 1 means that the first set of TALF filter coefficients is used to filter the current CTU, talf_ctb_idc[CtbAddrX][CtbAddrY] = 2 means that the second set of TALF filter coefficients is used to filter the current CTU, and talf_ctb_idc[CtbAddrX][CtbAddrY] = 3 means that the third set of TALF filter coefficients is used to filter the current CTU.
[0512] Of course, the CTU flag can also be discarded, and a decision can be made directly on whether to perform TALF filtering on the entire picture, or a CU-level flag can be used instead of the CTU, or a block-level flag of another size.
[0513] Exemplarily, in some embodiments, up to 4 sets of TALF coefficients (4 sets of filter coefficients corresponding to 4 sets of candidate filters) can be coded for each picture. Assuming that TALF is placed after ALF, a reference picture (inter-frame reference picture) can be used to further improve the quality of the reconstructed picture after ALF filtering.
[0514] Exemplarily, in some embodiments, a 7x7 symmetric filter and a 5x5 symmetric filter can be used. For TALF using one reconstructed picture (inter-frame reference picture) as input, 1 7x7, 13-coefficient symmetric filter is used for filtering; for TALF using two reconstructed pictures as input, 2 5x5, 7-coefficient symmetric filters are used for filtering.
[0515] Exemplarily, in some embodiments, the difference between the reconstructed value of the reconstructed picture and the reconstructed value of the current picture can be selected as the input of the TALF filter, assuming that the current picture corresponds to an inter-frame reference picture, at this time, the process of filtering the sample value of the coordinate (x, y) position (current sample position) in the current picture using a 13-filter coefficient, 7x7 symmetric filter is as follows:
[0516] Exemplarily, in some embodiments, the difference between the reconstructed value of the reconstructed image and the current image reconstructed value can be selected as the TALF filter input, assuming that the current image corresponds to two inter-frame reference images, at this time, the process of filtering the sample value of the coordinate (x, y) position (current sample position) in the current image using 7 filter coefficients, 5x5 symmetrical 2 filters is as follows:
[0517] It should be noted that in the embodiments of the present application, the filter related parameters (TALF parameters and filter coefficients) can be coded and decoded at the slice header (or image header), or can be written into the APS parameter set, which is not specifically limited in the present application.
[0518] It should be noted that in the embodiments of the present application, TALF filtering can be selected to be used for the luminance component, or TALF filtering can be selected to be used for the chrominance component (color component).
[0519] It should be noted that in the embodiments of the present application, when TALF filtering is only used for the luminance component, the chrominance component can also use the information of the reconstructed image in the time domain as auxiliary to improve the reconstructed quality of the current chrominance image.
[0520] Exemplarily, in some embodiments, at the encoding end, it is assumed that TALF is placed after ALF, that is, after ALF filtering, the decision process of TALF is entered.
[0521] First, according to the encoding configuration RA or LD, the mode allowed to be used by TALF is judged, and the TALF mode is three under RA and LD. The forward filtering is mode 1, the backward filtering is mode 2, and the bidirectional filtering is mode 3 under RA. The reference image POC N-1 is used as the TALF filter input as mode 1, the reference image POC N-2 is used as the TALF filter input as mode 2, and the reference images POC N-1 and N-2 are used as the TALF filter input as mode 3 under LD.
[0522] Each filtering mode is traversed, the current image reconstructed value under the corresponding mode is used, the reconstructed value of the reference reconstructed image and the original value of the current image are used to construct the Wiener-Hopf equation and analyze 1-4 groups of filter coefficients, and whether each CTU opens TALF filtering is judged according to 1-4, respectively, the optimal filter group number under each mode is calculated, whether each CTU uses TALF and which group of TALF filter is used.
[0523] Further, the optimal filter mode, filter set number, and CTU switch optimized by the usage rate distortion are used to filter the reconstructed image, and the filter mode, filter set number, and filter coefficient are encoded in the image header, CTU switch, and the like.
[0524] For example, in some embodiments, at the decoding end, the decoder parses the code stream to obtain the filter mode, filter number, filter coefficient, whether each CTU uses the TALF filter, and which filter set is used for filtering of the current image.
[0525] After ALF filtering, the CTU selected with the TALF in the current image is filtered using the corresponding filter.
[0526] For example, in some embodiments, when performing the temporal adaptive loop filtering, a sequence-level syntax element, such as a third syntax element identification information, can be parsed, and the parsing process is as follows:
[0527] The sequence identification sps_talf_enabled_flag is used to indicate whether the current sequence can use the TALF. When the syntax element does not exist in the code stream, the value of the syntax element is inferred to be 0. When the value of the syntax element is 1, the current sequence can use the TALF, and when the value of the syntax element is 0, the TALF cannot be used.
[0528] For example, in some embodiments, when performing the temporal adaptive loop filtering, a slice-level syntax element, such as a second syntax element identification information, can be parsed, and the parsing process is as follows:
[0529] The sh_talf_enabled_flag syntax element is a slice header TALF enable identification. When the syntax element does not exist in the code stream, the value of the syntax element is inferred to be 0. When the value of the syntax element is 1, the current slice can use the TALF, and when the value of the syntax element is 0, the TALF cannot be used.
[0530] The talf_filter_mode syntax element is a syntax element indicating which TALF mode is used for the current slice. When the value of the syntax element is 0, forward filtering is used under the RA configuration or forward filtering is used on the first frame before the LD. When the value of the syntax element is 1, backward filtering is used under the RA configuration or forward filtering is used on the second frame before the LD. When the value of the syntax element is 2, bidirectional filtering is used under the RA configuration or filtering is performed on the two frames before the LD. When the syntax element does not exist in the code stream, the value of the syntax element is 0.
[0531] The talf num filters signalled minusl syntax element is a syntax element indicating the number of TALF filters contained in the current slice minus one. In the present scheme, since a slice can have at most four TALF filters, the value of talf num filters signalled minusl can be 0, 1, 2 or 3. The value of 0 of this syntax element indicates that the current slice has one TALF filter, the value of 1 of this syntax element indicates that the current slice has two TALF filters, the value of 2 of this syntax element indicates that the current slice has three TALF filters, and the value of 3 of this syntax element indicates that the current slice has four TALF filters. When this syntax element is not present in the bitstream, its value is 0.
[0532] The numCoeff variable indicates the number of filter coefficients in the filter. Since the filter used in the forward and backward directions in the RA configuration and the first and second nearest frames in the LD configuration in the present scheme is a 13-coefficient 7x7 symmetric filter, numCoeff is equal to 13 in the corresponding case (i.e., talf_filter_mode is 0 or 1). The filter used in the bidirectional filtering in the RA configuration and the use of the two nearest frames in the LD configuration is two 5x5 7-coefficient filters, a total of 14 coefficients, so numCoeff is equal to 14 in the corresponding case (i.e., talf_filter_mode is 2).
[0533] The talf_coeff_abs[sfIdx][j] syntax element indicates the absolute value of the jth coefficient of the sfIdxth group of filters, which is represented using K-order exponential Golomb code, where K is 0. When this syntax element is not present in the bitstream, its value is 0.
[0534] The talf_coeff_sign[sfIdx][j] syntax element indicates the positive or negative sign of the jth coefficient of the sfIdxth group of filters. The value of 1 of this syntax element indicates that the coefficient is negative, and the value of 0 of this syntax element indicates that the coefficient is positive. When this syntax element is not present in the bitstream, its value is 0.
[0535] Exemplarily, in some embodiments, when performing time-domain adaptive loop filtering, a CTU-level syntax element, such as a first syntax element identification information, can be parsed, and the parsing process is as follows:
[0536] talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree block of the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses the TALF filter, and the value range thereof is 0-talf_num_filters_signalled_minus1. For example, when talf_num_filters_signalled_minus1 is 1, the value of talf_ctb_idc can be 0 or 1, and for example, when talf_num_filters_signalled_minus1 is 2, the value of talf_ctb_idc can be 0, 1 or 2. When talf_ctb_idc is 0, it indicates that the current coding tree block does not use the TALF filter, when talf_ctb_idc is 1, it indicates that the first group of filters is used, when talf_ctb_idc is 2, it indicates that the second group of filters is used, and so on. When the syntax element does not exist in the code stream, the value thereof is 0.
[0537] Further, in the embodiments of the present application, the filter process can be reconstructed according to the parsed filter number, filter type, filter coefficient absolute value and filter coefficient sign.
[0538] Further, in the embodiments of the present application, assuming that the reconstructed value of the luminance component is filtered by TALF, i.e. the current block is a luminance block (luminance coding tree block), when the talf_ctb_idc identifier of the current luminance coding tree block is non-zero, the TALF filter needs to be performed.
[0539] Exemplarily, in some embodiments, the input of the filter process includes:
[0540] 1. a reconstructed luminance image array rec filtered by the luminance adaptive loop filter,
[0541] 2. a corresponding time domain reconstructed luminance image array, for example, when the talf_filter_mode syntax element is 0, the forward nearest one frame time domain reconstructed image is used under the RA configuration or the first frame reconstructed image rec0 is used under the LD; when the talf_filter_mode syntax element is 1, the backward nearest one frame time domain reconstructed image is used under the RA configuration or the first frame reconstructed image rec1 is used under the LD; when the talf_filter_mode syntax element is 2, the two reconstructed image arrays rec0 and rec1 are used,
[0542] 3. the luminance coordinates (xCtb, yCtb) of the current luminance coding tree block in the current image,
[0543] 4. the width tAlfWidth and the height tAlfHeight of the luminance coding tree block,
[0544] 5. Coefficients of the time adaptive loop filter tAlfCoeff [ ][ ]
[0545] Correspondingly, the filtering calculation for each position in the luminance coding block is as follows:
[0546] When numCoeff is 14:
[0547] In the above filtering calculation, shift is a positive integer, shift is 6 in the present scheme, BitDepth is the bit depth of the luminance component, and x and y represent the horizontal and vertical coordinates of the reconstructed image array.
[0548] When numCoeff is 13 and talf_filter_mode is 0:
[0549] When numCoeff is 13 and talf_filter_mode is 1:
[0550] It should be noted that in the embodiments of the present application, in the filtering process, the same image edge padding method as ALF is used for the image boundary to obtain the TALF input values outside the image range that are needed.
[0551] For example, in some embodiments, the ALF filtering is padded at the edge of the coding tree block, and the filtering within one coding tree block does not use the reconstructed values of other coding tree blocks, in which case the TALF can also be padded at the edge of the coding tree block.
[0552] For example, in some embodiments, in the TALF, when the non-linear restriction flag information indicates that the TALF uses non-linear filtering, each input value of the filter is limited within a specified range.
[0553] If the TALF does not use non-linearity, for the one-way filtering in RA, or the 7x7 symmetric 13-tap filter in LD that uses the reconstructed value in one reconstructed image as input, the filtering formula is referred to formula (5).
[0554] If the TALF does not use non-linearity, for the two-way filtering in RA, or the two 5x5 symmetric 14-tap filters in LD that use the reconstructed values in two reconstructed images as input, the filtering formula is referred to formula (7).
[0555] Exemplarily, in some embodiments, a formula K(a, b) for limiting the value range can be defined as formula (1), b is an integer greater than or equal to zero, wherein min(i, j) is the smaller value of i and j, and max(i, j) is the larger value of i and j.
[0556] Correspondingly, after combining the filter coefficient corresponding to the limiting value, the nonlinear time domain adaptive loop filtering formula is as follows:
[0557] For the one-way filtering in RA, or the 7x7 symmetric 13-tap filter using the reconstructed value in one reconstructed image as input in LD, the filtering formula is referred to formula (2).
[0558] For the two-way filtering in RA, or two 5x5 symmetric 14-tap filters using the reconstructed values in two reconstructed images as input in LD, the filtering formula is referred to formula (3).
[0559] Wherein, in the above formula, rec (x,y) represents the reconstructed value of the current image at the (x, y) coordinate position before inputting TALF, rec′ (x,y) represents the reconstructed value of the current image at the (x, y) coordinate position after TALF filtering, c i represents the filter coefficient of the filter, represents the value on the reconstructed image corresponding to the c i filter coefficient position, and represents the reconstructed value on the reconstructed image when two-way filtering or two input reconstructed images, b i represents the value on the reconstructed image corresponding to the c i filter coefficient position, which is used to limit the range of filter input in the scheme and is determined by the syntax element coded in the code stream.
[0560] Exemplarily, in some embodiments, in the process of performing nonlinear time domain adaptive loop filtering, the slice-level syntax element can be parsed as follows:
[0561] Wherein, for each coded time domain adaptive filter, an additional talf_clip_flag[sfIdx] flag is coded to identify whether to decode a nonlinear index talf_clip_idx[sfIdx][j] for each non-zero coefficient of the filter, and the nonlinear index can take values of 0, 1, 2, and 3 in the scheme, wherein 0 represents not limiting the range of the filter coefficient input value at the corresponding position, and 1, 2, and 3 represent limiting the range to a certain extent.
[0562] Exemplarily, in some embodiments, when reconstructing the time domain filter coefficients, if the sh_talf_enabled_flag of the current slice is 1, the coefficient value, the shift value and the non-linear clipping value of the time domain adaptive loop filter need to be reconstructed.
[0563] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0564] The process of obtaining the non-linear clipping value tAlfClip of the current slice is as follows:
[0565] - Construct a non-linear clipping value table according to the pixel depth inputBitdepth of the luma component
[0566] - Obtain the non-linear clipping value of each coefficient of each filter of the current slice:
[0567] Exemplarily, in some embodiments, when performing TALF filtering in combination with the limiting value (non-linear clipping value), the talf_ctb_idc of the current luma coding tree block is identified as non-zero, which means that TALF filtering needs to be performed.
[0568] The input of the filtering process includes:
[0569] 1. A reconstructed luma image array rec filtered by luma adaptive loop filter,
[0570] 2. A corresponding time domain reconstructed luma image array, for example, if the talf_filter_mode syntax element is 0, the forward nearest one frame time domain reconstructed image is used under RA configuration or the first frame reconstructed image rec0 is used under LD; if it is 1, the backward nearest one frame time domain reconstructed image is used under RA configuration or the first frame reconstructed image rec1 is used under LD; if it is 2, two reconstructed image arrays rec0 and rec1 are used,
[0571] 3. The luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current image,
[0572] 4. The width tAlfWidth and the height tAlfHeight of the luma coding tree block,
[0573] 5. The coefficient tAlfCoeff of the time domain adaptive loop filter,
[0574] 6. The non-linear clipping value tAlfClip of the time domain adaptive loop filter.
[0575] The filtering calculation for each position in the luma coding tree block is as follows:
[0576] numCoeff is 14:
[0577] In the above filtering process, shift is a positive integer, in the present scheme, shift is 6, BitDepth is the bit depth of the luma component, and x and y represent the horizontal and vertical coordinates of the reconstructed image array.
[0578] K(a,b) = min(b,max(-b,a))
[0579] numCoeff is 13 and talf_filter_mode is 0:
[0580] numCoeff is 13 and talf_filter_mode is 1:
[0581] It should be noted that in the embodiments of the present application, in the filtering process, the present scheme uses the same image edge padding method as ALF to obtain the TALF input value outside the image range required.
[0582] The embodiment of the present application provides a coding and decoding method, which is a time domain adaptive loop filtering method. The method can realize TALF filtering processing on the reconstructed value of a current block based on the reconstructed samples of at least one inter-frame reference image and corresponding filter coefficients. In the TALF filtering process, the related information of the at least one inter-frame reference image is fully utilized, so that the filtering effect can be improved, and the coding and decoding performance is improved. Further, in the TALF filtering process, the limit value corresponding to the filter coefficient can be selected to perform nonlinear limiting on the input of the filter, so that the code word consumption can be reduced, and the coding and decoding performance is improved.
[0583] Based on the above embodiment, the embodiment of the present application proposes a time domain adaptive loop filtering technology, which is a technology of using the reconstructed image on the time domain as an information source to improve the adaptive loop filtering of the current frame reconstructed image. Further, in the TALF filtering process, on the one hand, the historical decoded time domain adaptive loop filter can be selected for multiplexing, on the other hand, the nonlinear time domain adaptive loop filter can be selected for use, on the other hand, the adaptive precision of the time domain loop filter can be introduced, and on the other hand, the time domain loop filtering based on vector information assistance can be selected. Thus, the coding and decoding performance can be improved to the greatest extent.
[0584] Below, the TALF filtering scheme proposed by the embodiments of the present application and the related schemes based on TALF are exemplarily described.
[0585] Exemplarily, 7x7 symmetrical filters and 2 5x5 symmetrical filters can be selected, but the present application is not limited thereto. Among them, 1 7x7, 13 coefficient symmetrical filter is used for filtering for TALF using one reconstructed image input; 2 5x5, 7 coefficient symmetrical filters are used for filtering for TALF using two reconstructed image inputs.
[0586] Exemplarily, the filter related parameters can be coded at the slice header, but the present application is not limited thereto.
[0587] Exemplarily, the TALF technology can be selected for use in the luminance component, and in some embodiments, the chrominance can also be improved by using the information of the reconstructed image in the time domain as auxiliary to improve the reconstruction quality of the current chrominance image, but the present application is not limited thereto.
[0588] In an embodiment, in the TALF filtering process, the historical decoded time domain adaptive loop filter can be selected to be multiplexed, a non-linear time domain adaptive loop filter is used at the same time, and the adaptive precision of the time domain loop filter is introduced. Among them, a maximum of four time domain adaptive loop filters are allowed to be used in one slice (strip), and TALF can be located after ALF for loop filtering.
[0589] The slice header syntax elements are parsed as follows:
[0590] Among them, when at least one of the following three conditions is true, the FIFO of the historical time domain filter needs to be emptied:
[0591] pcSlice->isIDRorBLA(): This condition indicates whether the current slice is IDR or BLA; both IDR and BLA are NAL types, indicating the beginning of a sequence; all slices in a picture should have the same NAL type.
[0592] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0593] pcSlice->isInterGDR(): This condition means whether it is GDR.
[0594] The tAlfParamPool.clear() operation indicates that the FIFO of the historical time domain filter is emptied.
[0595] The talf_reuse_flag syntax element is an identifier indicating whether the current slice is coded with the history temporal loop filter reused or not. The value of 1 indicates that the history temporal loop filter is reused, and the value of 0 indicates that the history temporal loop filter is not reused. When the identifier is not present in the bitstream, the value is 0.
[0596] The talf_reuse_index syntax element is an index indicating the history temporal loop filter FIFO reused by the current slice. Since the maximum length of the FIFO used in the present scheme is 8, the index can have the values of 0, 1, 2, 3, 4, 5, 6, or 7, and is represented by a fixed-length code with a length of 3 bins. When the syntax element is not present in the bitstream, the value is 0.
[0597] The talf_shift_minus5 syntax element indicates the variable precision used by one or more temporal loop filters coded in the current slice. The value of the syntax element is the shift value used in the filtering minus 5. The syntax element is represented by a fixed-length code with a length of 2 bins, and can have the values of 0, 1, 2, or 3. When the syntax element is not present in the bitstream, the value is 0.
[0598] The talf_k_order[sfIdx] syntax element indicates the order of the exponential Golomb used by the absolute value of the sfIdx-th filter coefficient coded in the current slice. The value of the syntax element is 0 or 1. The value of 0 indicates that the 0th order exponential Golomb code is used, and the value of 1 indicates that the 1st order exponential Golomb code is used. When the syntax element is not present in the bitstream, the value is 0.
[0599] The operation tAlfParamPool[talf_filter_mode][0].shift = talf_shift_minus5 + 5 indicates that the parsed talf_shift_minus5 is restored to the shift value and is updated at the head of the FIFO of the history temporal loop filter.
[0600] The talf_clip_flag[sfIdx] syntax element indicates whether the sfIdx-th temporal loop filter used in the current slice uses nonlinearity. The value of the syntax element is 0 or 1. The value of 1 indicates that the sfIdx-th temporal loop filter uses nonlinearity, and the value of 0 indicates that the sfIdx-th temporal loop filter does not use nonlinearity. When the syntax element is not present in the bitstream, the value is 0.
[0601] talf_clip_idx[ sfldx ][ j ] indicates the nonlinear index value used by the i-th coefficient of the sfldx-th temporal loop filter of the current slice, the value of this syntax element is 0, 1, 2 or 3. The value of 0 means that the input of the filter coefficient at this position does not use nonlinear, 1, 2, 3 means the index of the corresponding nonlinear clipping value, which is used to get the clipping value from the table of nonlinear clipping values. This syntax element is coded using a fixed length code with length of 2 bins. When this syntax element is not present in the bitstream, its value is 0.
[0602] tAlfParamPool[ talf_filter_mode ][ 0 ].clipIdx[ sfldx ][ j ] = talf_clip_idx[ sfldx ][ j ] operation means that the parsed talf_clip_idx value is assigned to the FIFO of the corresponding history temporal loop filter.
[0603] Further, when reconstructing the temporal filter coefficient, considering that the multiplexing mechanism is introduced, if the sh_talf_enabled_flag of the current slice is 1 and the talf_reuse_flag is 0, the coefficient value, the shift value and the nonlinear clipping value of the temporal adaptive loop filter need to be reconstructed.
[0604] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0605] The process of obtaining the nonlinear clipping value tAlfClip of the current slice is as follows:
[0606] - Construct a nonlinear clipping value table according to the pixel depth inputBitdepth of the luma component
[0607] - Obtain the nonlinear clipping value of each coefficient of each filter of the current slice:
[0608] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0609] shift = talf_shift_minus5 + 5
[0610] If the sh_talf_enabled_flag of the current slice is 1 and the talf_reuse_flag is 1, the coefficient value, the shift value and the nonlinear clipping value need to be obtained from the FIFO of the history temporal adaptive loop filter.
[0611] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0612] The process of obtaining the non-linear clipping value tAlfClip for the current slice is as follows:
[0613] - Construct a non-linear clipping value table according to the pixel depth inputBitdepth of the luma component
[0614] - Obtain the non-linear clipping value for each coefficient of each filter of the current slice:
[0615] The process of obtaining the shift value for the current slice of the ALF is as follows:
[0616] shift = tAlfParamPool[talf_filter_mode][talf_reuse_idx].shift
[0617] Further, when performing TALF filtering on a luma CTB, the talf_ctb_idc of the current luma CTB is set to non-zero, which means that TALF filtering is needed.
[0618] The input of the filtering process includes:
[0619] 1. A reconstructed luma image array rec that has been filtered by luma ALF,
[0620] 2. A corresponding temporal reconstructed luma image array, for example, when the talf_filter_mode syntax element is 0, the forward nearest one frame temporal reconstructed image rec0 is used under RA configuration or the first frame reconstructed image rec1 is used under LD; when it is 1, the backward nearest one frame temporal reconstructed image rec1 is used under RA configuration or the first frame reconstructed image rec0 is used under LD; when it is 2, two reconstructed image arrays rec0 and rec1 are used,
[0621] 3. The luma coordinates (xCtb, yCtb) of the current luma CTB in the current image,
[0622] 4. The width tAlfWidth and height tAlfHeight of the luma CTB,
[0623] 5. The coefficients tAlfCoeff of the temporal ALF,
[0624] 6. The non-linear clipping value tAlfClip of the temporal ALF,
[0625] 7. The shift value shift of the temporal ALF.
[0626] The filtering calculation for each position in the luma CTB is as follows:
[0627] numCoeff is 14:
[0628] BitDepth variable is the bit depth of the luma component, and x and y represent the horizontal and vertical coordinates of the reconstructed image array.
[0629] K(a, b) = min(b, max(-b, a))
[0630] numCoeff is 13 and talf_filter_mode is 0:
[0631] numCoeff is 13 and talf_filter_mode is 1:
[0632] In the process of filtering, the scheme uses the same image edge padding method as ALF to obtain the TALF input value outside the image range required.
[0633] It should be noted that through experiments, the coding and decoding method proposed in the present application improves the compression performance of the ECM reference software under RA and LD configurations. For example, implementing the above method on the ECM-13.0 reference software can obtain some BD-rates improvement under the RA configuration, and the performance improvement of the test sequences class-B, class-C, class-D and class-F is as shown in Table 2.
[0634] Table 2
[0635] At the same time, some BD-rates improvement can be obtained under the LD configuration, and the performance improvement of the test sequences class-C, class-D and class-E is as shown in Table 3.
[0636] Table 3
[0637] In another embodiment, in the TALF filtering process, a history-decoded temporal adaptive loop filter can be selected, a nonlinear temporal adaptive loop filter is used at the same time, the adaptive precision of the temporal loop filter is introduced, and the vector information assisted temporal loop filtering is based. Among them, a maximum of eight temporal adaptive loop filters are allowed to be used in one slice (strip), and TALF can be located between ALF and SAO for loop filtering.
[0638] The slice header syntax elements are parsed as follows:
[0639] Where at least one of the following three conditions is true, the FIFO of the history temporal filter needs to be emptied:
[0640] pcSlice->isIDRorBLA(): This condition indicates whether the current slice is an IDR or BLA; both IDR and BLA are NAL types, indicating the start of a sequence; all slices in an image should have the same NAL type.
[0641] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0642] pcSlice->isInterGDR(): This condition indicates whether it is GDR, as the name implies.
[0643] The tAlfParamPool.clear() operation indicates the emptying of the FIFO of the history temporal filter.
[0644] The talf_reuse_flag syntax element is an identifier indicating whether the history temporal loop filter is reused for the current slice coding, and the identifier is 1 to indicate that the history temporal loop filter is reused, and 0 to indicate that the history temporal loop filter is not reused. When the identifier does not exist in the code stream, the value is 0.
[0645] The talf_reuse_index syntax element is an index indicating the history temporal loop filter FIFO reused by the current slice. Since the maximum length of the FIFO used in the present scheme is 8, the index can be 0, 1, 2, 3, 4, 5, 6, or 7, and a fixed-length code with a length of 3 bins is used to represent. When the syntax element does not exist in the code stream, the value is 0.
[0646] The talf_mv_guided_flag is an identifier indicating whether the motion vector assisted TALF is used, and the identifier is 1 to indicate that the motion vector assisted TALF is used for the current slice; and the identifier is 0 to indicate that the motion vector assisted TALF is not used for the current slice. When the identifier does not exist in the code stream, the value is 0.
[0647] The talf_shift_minus6 indicates the variable precision used by one or more temporal loop filters coded in the current slice, and its meaning is that the shift value used in the filtering is reduced by 6. This syntax element uses a fixed-length code with a length of 2 bins in the present scheme, and the value is 0, 1, 2, or 3. When the syntax element does not exist in the code stream, the value is 0.
[0648] talf_k_order[ sfldx ] indicates the order of the exponential Golomb used for the absolute value of the filter coefficient of the current slice at sfldx. It has a value of 0 or 1. A value of 0 indicates that the 0th order exponential Golomb is used. A value of 1 indicates that the 1st order exponential Golomb is used. When the syntax element is not present in the bitstream, it has a value of 0.
[0649] tAlfParamPool[ talf mv guided flag ][ 0 ]. shift = talf shift minus 6 + 6 operation indicates that the parsed talf shift minus 6 is restored to the shift value and updated at the head of the FIFO of the history-based temporal loop filter.
[0650] talf clip flag[ sfldx ] indicates whether the non-linearity is used for the sfldx-th history-based temporal loop filter of the current slice. The value of this syntax element is 0 or 1. A value of 1 indicates that the non-linearity is used for the sfldx-th history-based temporal loop filter. A value of 0 indicates that the non-linearity is not used for the sfldx-th history-based temporal loop filter. When the syntax element is not present in the bitstream, it has a value of 0.
[0651] talf clip idx[ sfldx ][ j ] indicates the index of the non-linearity used for the j-th coefficient of the sfldx-th history-based temporal loop filter of the current slice. The value of this syntax element is 0, 1, 2 or 3. A value of 0 indicates that the input of the filter coefficient at this position does not use the non-linearity. Values of 1, 2 and 3 indicate the index of the non-linearity clipping value, respectively, which is used to obtain the clipping value from the table of non-linearity clipping values. This syntax element is coded using a fixed length code with a length of 2 bins. When the syntax element is not present in the bitstream, it has a value of 0.
[0652] tAlfParamPool[ talf mv guided flag ][ 0 ]. clip idx[ sfldx ][ j ] = talf clip idx[ sfldx ][ j ] operation indicates that the parsed talf clip idx value is assigned to the FIFO of the corresponding history-based temporal loop filter.
[0653] Further, when reconstructing the filter coefficients, considering that the multiplexing mechanism is introduced, if sh talf enabled flag of the current slice is 1 and talf reuse flag is 0, the filter coefficient value, the shift value and the non-linearity clipping value of the history-based temporal loop filter need to be reconstructed.
[0654] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0655] The process of obtaining the non-linear clipping value of the current slice is tAlfClip:
[0656] - Constructing a non-linear clipping value table according to the pixel depth inputBitdepth of the luminance component
[0657] - Obtaining the non-linear clipping value of each coefficient of each filter of the current slice:
[0658] The process of obtaining the shift value of the current slice of the adaptive loop filter is:
[0659] shift = talf_shift_minus6 + 6
[0660] If sh_talf_enabled_flag of the current slice is 1 and talf_reuse_flag is 1, the coefficient value, the shift value and the non-linear clipping value need to be obtained from the FIFO of the historical temporal adaptive loop filter.
[0661] The process of obtaining the filter coefficient of the current slice is tAlfCoeff:
[0662] The process of obtaining the non-linear clipping value of the current slice is tAlfClip:
[0663] - Constructing a non-linear clipping value table according to the pixel depth inputBitdepth of the luminance component
[0664] - Obtaining the non-linear clipping value of each coefficient of each filter of the current slice:
[0665] The process of obtaining the shift value of the current slice of the adaptive loop filter is:
[0666] shift = tAlfParamPool[talf_mv_guided_flag][talf_reuse_idx].shift
[0667] Further, when the TALF filter is applied to the luminance coding tree block, the talf_ctb_idc of the current luminance coding tree block is identified as non-zero, and the TALF filter is applied.
[0668] The input of the filtering process includes:
[0669] 1. A reconstructed luminance image array rec filtered by the luminance adaptive loop filter,
[0670] 2. The mode value of talf_filter_mode,
[0671] 3. the value of the identifier talf mv guided flag,
[0672] 4. the luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0673] 5. the width tAlfWidth and height tAlfHeight of the luma coding tree block,
[0674] 6. the coefficients tAlfCoeff[][] of the temporal adaptive loop filter.
[0675] For each position (x, y) in the current luma coding tree block, x takes values from xCtb to xCtb + tAlfWidth - 1, y takes values from yCtb to yCtb + tAlfHeight - 1
[0676] First, get the reconstructed picture and Mv:
[0677] Determine the input picture of the filter according to talf mv guided flag and talf filter mode
[0678] If talf filter mode is 0 and talf mv guided flag is 0, then the forward nearest reconstructed picture rec0 is used as the input;
[0679] If talf filter mode is 0 and talf mv guided flag is 1, then check whether the prediction block to which the current position belongs selects Mv0 pointing to the reference picture in the reference picture list 0, if yes, then use the reference picture rec0 pointed by Mv0 as the input, otherwise skip the filtering of the current position;
[0680] If talf filter mode is 1 and talf mv guided flag is 0, then use the backward nearest reconstructed picture rec1 as the input in RA and the forward second nearest reconstructed picture rec1 as the input in LD;
[0681] If talf filter mode is 1 and talf mv guided flag is 1, then check whether the prediction block to which the current position belongs selects Mv1 pointing to the reference picture in the reference picture list 1, if yes, then use the reference picture rec1 pointed by Mv1 as the input, otherwise skip the filtering of the current position;
[0682] If talf_filter_mode is equal to 2 and talf_mv_guided_flag is equal to 0, the forward nearest reconstructed picture recO and the backward nearest reconstructed picture rec1 are used as input for the RA and the forward nearest reconstructed picture recO and the second nearest reconstructed picture rec1 are used as input for the LD.
[0683] If talf_filter_mode is equal to 2 and talf_mv_guided_flag is equal to 1, it is checked whether the current position is selected by both MvO pointing to a reference picture in reference picture list 0 and Mv1 pointing to a reference picture in reference picture list 1. If yes, the reference picture recO pointed by MvO and the reference picture rec1 pointed by Mv1 are used as input, otherwise the filtering for the current position is skipped.
[0684] Second step, get the shift value:
[0685] If MvO and Mv1 are found in the first step, since sub-pixel precision Mv is used in inter prediction, here the position offset on the reconstructed picture pointed by Mv is obtained by rounding the positive pixel precision.
[0686] The horizontal integer pixel position offset of MvO is:
[0687] Offset0X = MvO.Hor < 0? - (( abs( MvO.Hor ) + 8 ) » 4 ) : ( ( abs( MvO.Hor ) + 8 ) » 4 )
[0688] The vertical integer pixel position offset of MvO is:
[0689] Offset0Y = MvO.Ver < 0? - (( abs( MvO.Ver ) + 8 ) » 4 ) : ( ( abs( MvO.Ver ) + 8 ) » 4 )
[0690] The horizontal integer pixel position offset of Mv1 is:
[0691] Offset1X = Mv1.Hor < 0? - (( abs( Mv1.Hor ) + 8 ) » 4 ) : ( ( abs( Mv1.Hor ) + 8 ) » 4 )
[0692] The vertical integer pixel position offset of Mv1 is:
[0693] Offset1Y = Mv1.Ver < 0? - (( abs( Mv1.Ver ) + 8 ) » 4 ) : ( ( abs( Mv1.Ver ) + 8 ) » 4 )
[0694] If talf mv guided flag is equal to 0 in the first step, Offset0X, Offset0Y, Offset1X and Offset1Y are set to 0. In the third step, the image is reconstructed according to the obtained position offsets, and the filter coefficients are filtered for the position (x, y), and numCoeff is 14:
[0695] In the above filtering process, shift is 6, BitDepth is the bit depth of the luma component, x and y represent the horizontal and vertical coordinates of the reconstructed image array. x0, y0, x1, y1 are the coordinates of the center positions of rec0 and rec1 after the offset, and when the reconstructed values in the coordinate positions rec0, rec1 array are obtained, the horizontal coordinate should be limited to 0 to picWidth-1 of the image width, and the vertical coordinate should be limited to 0 to picHeight-1 of the image height. Wherein, K(a, b) = min(b, max(-b, a)).
[0696] numCoeff is 13 and talf_filter_mode is 0:
[0697] numCoeff is 13 and talf_filter_mode is 1:
[0698] In the filtering process, the present scheme uses the same image edge padding method as ALF to obtain the TALF input values outside the image range required.
[0699] In some embodiments, ALF filtering can be edge padded in units of coding tree blocks, and filtering within a coding tree block does not use reconstructed values of other coding tree blocks, in which case TALF can also be edge padded in units of coding tree blocks.
[0700] In another embodiment, in the TALF filtering process, the history decoded temporal adaptive loop filter can be selected for reuse, and the nonlinear temporal adaptive loop filter can be used at the same time, and the adaptive precision of the temporal loop filter is introduced, and the vector information assisted temporal loop filter is based on. Among them, a maximum of eight temporal adaptive loop filters are allowed to be used in one slice (slice), and TALF can perform loop filtering on TALF and ALF at the same time.
[0701] Here, other shapes of filters can be used for TALF filtering. Fig. 26 is a schematic diagram of a filter according to an embodiment of the present application, as shown in Fig. 26, for unidirectional filtering, a 7x7 filter can be changed from 13 taps to 12 taps; Fig. 27 is a schematic diagram of a filter according to an embodiment of the present application, as shown in Fig. 27, for bidirectional filtering, two 5x5 filters are each changed from 7 taps to 6 taps, and the total number of taps is also 12.
[0702] Correspondingly, the filtering formula of the 7x7 filter is as follows:
[0703] Correspondingly, the filtering formula of the two 5x5 filters is as follows:
[0704] It should be noted that in the above formula, for the reconstructed pixels in the reference image, the reconstructed value at the filtering position of the current image is no longer subtracted, but instead the reconstructed value at the corresponding center position of the reference image is subtracted, which can reduce the number of taps of the filter, and at the same time make the number of taps of the unidirectional and bidirectional filters the same, and since the filter input no longer depends on the output of the ALF, the correction values of the TALF and the ALF can be calculated in parallel.
[0705] It should be noted that the MV-guided auxiliary displacement can be selected to be always used and filtered, and the talf mv guided flag is no longer used to indicate whether the auxiliary displacement is performed. Therefore, in the filtering formula, each position on the reference image as input should be after the MV offset.
[0706] Correspondingly, the filtering formula of the 7x7 filter is as follows:
[0707] Correspondingly, the filtering formula of the two 5x5 filters is as follows:
[0708] wherein x' and y' are x and y after the MV offset, respectively. In bidirectional filtering, x" and y" are x and y after the second MV offset, respectively.
[0709] The parsing of the slice header syntax elements is as follows:
[0710] Where talf_filter_mode has a value range of 0, 1 or 2, talf_filter_mode of 0 indicates that the current slice will use mode 0, i.e. unidirectional filtering using the mv offset indicated in the reference picture list 0; talf_filter_mode of 1 indicates that the current slice will use mode 1, i.e. unidirectional filtering using the mv offset indicated in the reference picture list 1; talf_filter_mode of 2 indicates that the current slice will use mode 2, i.e. bidirectional filtering using two mv offsets indicated in the reference picture list 0 and the reference picture list 1.
[0711] The FIFO of the history temporal filter needs to be emptied when at least one of the following three conditions in the above table is true:
[0712] pcSlice->isIDRorBLA(): This condition indicates whether the current slice is an IDR or BLA; both IDR and BLA are NAL types, indicating the beginning of a sequence; all slices in an image should have the same NAL type.
[0713] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0714] pcSlice->isInterGDR(): This condition indicates whether it is a GDR, as the name implies.
[0715] The tAlfParamPool.clear() operation indicates that the FIFO of the history temporal filter is emptied.
[0716] The talf_reuse_flag syntax element is an identifier indicating whether the history temporal loop filter is reused for the current slice coding, and the identifier is 1 to indicate that the history temporal loop filter is reused, and 0 to indicate that the history temporal loop filter is not reused. When the identifier does not exist in the code stream, its value is 0.
[0717] The talf_reuse_index syntax element is an index indicating the history temporal loop filter FIFO reused by the current slice. Since the maximum length of the FIFO used in the present scheme is 8, the index can have a value of 0, 1, 2, 3, 4, 5, 6 or 7, and is represented using a fixed-length code with a length of 3 bins. When the syntax element does not exist in the code stream, its value is 0.
[0718] poolIdx is an index variable indicating the reused FIFO, which is related to whether the current talf_filter_mode is bidirectional filtering. When talf_filter_mode indicates bidirectional filtering, poolIdx is 1, otherwise it is 0.
[0719] talf_shift_minus6 specifies the variable precision used by one or more temporal loop filters of the current slice, with the meaning that the shift value used in the filter is reduced by 6. This syntax element is coded using a fixed length code with length 2 bins, taking values in the set {0, 1, 2, 3}. When the syntax element is not present in the bitstream, its value is 0.
[0720] talf_k_order[ sfldx ] specifies the order of the exponential Golomb used by the absolute value of the sfldx-th filter coefficient of the current slice. It takes values in the set {0, 1}, where 0 means that the 0th order exponential Golomb is used, and 1 means that the 1st order exponential Golomb is used. When the syntax element is not present in the bitstream, its value is 0.
[0721] tAlfParamPool[ poolldx ][ 0 ]. shift = talf_shift_minus6 + 6 specifies that the parsed talf_shift_minus6 is restored to a shift value and updated at the head of the history-based temporal loop filter FIFO.
[0722] talf_clip_flag[ sfldx ] specifies whether the sfldx-th history-based temporal loop filter of the current slice uses non-linearity. It takes values in the set {0, 1}, where 1 means that the sfldx-th history-based temporal loop filter uses non-linearity, and 0 means that the sfldx-th history-based temporal loop filter does not use non-linearity. When the syntax element is not present in the bitstream, its value is 0.
[0723] talf_clip_idx[ sfldx ][ j ] specifies the non-linearity index value used by the j-th coefficient of the sfldx-th history-based temporal loop filter of the current slice. It takes values in the set {0, 1, 2, 3}, where 0 means that the input of the j-th coefficient of the sfldx-th history-based temporal loop filter does not use non-linearity, and 1, 2, 3 means the index of the corresponding non-linearity clipping value, which is used to obtain the clipping value from the table of non-linearity clipping values. The syntax element is coded using a fixed length code with length 2 bins. When the syntax element is not present in the bitstream, its value is 0.
[0724] tAlfParamPool[ poolldx ][ 0 ]. clipldx[ sfldx ][ j ] = talf_clip_idx[ sfldx ][ j ] specifies that the parsed talf_clip_idx value is assigned to the corresponding history-based temporal loop filter FIFO.
[0725] Further, when reconstructing the time domain filter coefficients, considering that the reuse mechanism is introduced, if sh talf enabled flag of the current slice is 1 and talf reuse flag is 0, the coefficient value, shift value and non-linear clipping value of the time domain adaptive loop filter need to be reconstructed.
[0726] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0727] The process of obtaining the non-linear clipping value tAlfClip of the current slice is as follows:
[0728] A non-linear clipping value table is constructed according to the pixel depth inputBitdepth of the luma component.
[0729] The non-linear clipping value of each coefficient of each filter of the current slice is obtained.
[0730] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0731] shift = talf shift minus 6 + 6
[0732] If sh talf enabled flag of the current slice is 1 and talf reuse flag is 1, the coefficient value, shift value and non-linear clipping value need to be obtained from the FIFO of the historical time domain adaptive loop filter.
[0733] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0734] The process of obtaining the non-linear clipping value tAlfClip of the current slice is as follows:
[0735] A non-linear clipping value table is constructed according to the pixel depth inputBitdepth of the luma component.
[0736] The non-linear clipping value of each coefficient of each filter of the current slice is obtained.
[0737] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0738] shift = tAlfParamPool[poolIdx][talf_reuse_idx].shift.
[0739] Further, when performing TALF filtering on a luma coding tree block, if the talf_ctb_idc of the current luma coding tree block is non-zero, then TALF filtering is needed.
[0740] The input of the filtering process includes:
[0741] 1. a reconstructed luma picture array rec that has been filtered by luma adaptive loop filtering,
[0742] 2. a mode value of talf_filter_mode,
[0743] 3. the luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0744] 4. the width tAlfWidth and height tAlfHeight of the luma coding tree block,
[0745] 5. the coefficients tAlfCoeff[][] of the temporal adaptive loop filter.
[0746] For each position (x, y) in the current luma coding tree block, x takes values from xCtb to xCtb + tAlfWidth - 1, and y takes values from yCtb to yCtb + tAlfHeight - 1
[0747] First, get the reconstructed picture and Mv:
[0748] Determine the input picture of the filter according to talf_filter_mode
[0749] If talf_filter_mode is 0, check whether the prediction block that the current position belongs to has selected Mv0 that points to a reference picture in reference picture list 0, if yes, use the reference picture rec0 pointed by Mv0 as the input, otherwise skip the filtering of the current position;
[0750] If talf_filter_mode is 1, check whether the prediction block that the current position belongs to has selected Mv1 that points to a reference picture in reference picture list 1, if yes, use the reference picture rec1 pointed by Mv1 as the input, otherwise skip the filtering of the current position;
[0751] If talf_filter_mode is 2, check whether the prediction block that the current position belongs to has selected both Mv0 that points to a reference picture in reference picture list 0 and Mv1 that points to a reference picture in reference picture list 1, if yes, use the reference picture rec0 pointed by Mv0 and the reference picture rec1 pointed by Mv1 as the input, otherwise skip the filtering of the current position.
[0752] Second step, get shift value:
[0753] If Mv0 and Mv1 are found in the first step, since the Mv used in inter prediction is sub-pixel accuracy, here the position offset on the reconstructed picture pointed by Mv is obtained by rounding to the positive pixel accuracy.
[0754] The horizontal integer pixel position offset of Mv0 is:
[0755] Offset0X = Mv0.Hor < 0? - (( abs ( Mv0.Hor ) + 8 ) » 4 ) : ( ( abs ( Mv0.Hor ) + 8 ) » 4 )
[0756] The vertical integer pixel position offset of Mv0 is:
[0757] Offset0Y = Mv0.Ver < 0? - (( abs ( Mv0.Ver ) + 8 ) » 4 ) : ( ( abs ( Mv0.Ver ) + 8 ) » 4 )
[0758] The horizontal integer pixel position offset of Mv1 is:
[0759] Offset1X = Mv1.Hor < 0? - (( abs ( Mv1.Hor ) + 8 ) » 4 ) : ( ( abs ( Mv1.Hor ) + 8 ) » 4 )
[0760] The vertical integer pixel position offset of Mv1 is:
[0761] Offset1Y = Mv1.Ver < 0? - (( abs ( Mv1.Ver ) + 8 ) » 4 ) : ( ( abs ( Mv1.Ver ) + 8 ) » 4 )
[0762] Third step, according to the obtained position offset, reconstruct the image, filter the position of filter coefficient (x, y), and talf_filter_mode is 2 and the current position is not skipped filtering:
[0763] In the above calculation process of filtering, shift is 6, BitDepth variable is the bit depth of the luminance component, x and y represent the horizontal and vertical coordinates of the reconstructed image array. x0, y0, x1, y1 are the coordinates of the center positions of rec0 and rec1 after offset, and when the reconstructed values in the coordinate positions rec0, rec1 array are obtained, the horizontal coordinate should be limited to 0 to picWidth-1 of the image width, and the vertical coordinate should be limited to 0 to picHeight-1 of the image height. Wherein, K (a, b) = min (b, max (-b, a)).
[0764] talf_filter_mode is 0 and the current position has no skip filter:
[0765] talf_filter_mode is 1 and the current position has no skip filter:
[0766] In the process of filtering, the present scheme uses the same image edge padding method as ALF to obtain the TALF input value outside the image range needed.
[0767] In some embodiments, the ALF filter performs edge padding in units of coding tree blocks, and the filter in a coding tree block does not use the reconstructed values of other coding tree blocks, in which case TALF can also perform edge padding in units of coding tree blocks.
[0768] In another embodiment, in the process of TALF filtering, the historical decoded temporal adaptive loop filter can be selected for reuse, and the nonlinear temporal adaptive loop filter is used at the same time, the adaptive precision of the temporal loop filter is introduced, and the vector information assisted temporal loop filtering is based on. Among them, a maximum of eight temporal adaptive loop filters are allowed for a slice (strip), and TALF can perform loop filtering of TALF and ALF side by side. Among them, a mode of exchanging the two inputs of the filter is introduced when bidirectional reuse.
[0769] The slice header syntax elements are parsed as follows:
[0770] Among them, talf_filter_mode takes a value range of 0, 1 or 2, talf_filter_mode is 0, indicating that the current slice will use mode 0, i.e. using a single-direction filter indicated by the offset of the mv in the reference image list 0; talf_filter_mode is 1, indicating that the current slice will use mode 1, i.e. using a single-direction filter indicated by the offset of the mv in the reference image list 1; talf_filter_mode is 2, indicating that the current slice will use mode 2, i.e. using a bidirectional filter indicated by the offset of two mvs in the reference image list 0 and the reference image list 1.
[0771] When at least one of the following three conditions is true, the FIFO of the historical temporal filter needs to be emptied
[0772] pcSlice->isIDRorBLA(): This condition indicates whether the current slice is IDR or BLA; IDR and BLA are both NAL types, indicating the beginning of a sequence; all slices in an image should have the same NAL type.
[0773] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0774] pcSlice->isInterGDR(): This condition indicates whether it is GDR as the name implies.
[0775] The tAlfParamPool.clear() operation indicates emptying the FIFO of the history temporal filter.
[0776] The talf_reuse_flag syntax element is an identifier indicating whether the history temporal loop filter is reused for the current slice coding. The identifier is 1 to indicate that the history temporal loop filter is reused, and is 0 to indicate that the history temporal loop filter is not reused. When the identifier is not present in the code stream, the value is 0.
[0777] The talf_reuse_index syntax element is an index indicating the history temporal loop filter FIFO reused by the current slice. Since the maximum length of the FIFO used in the present scheme is 8, the index can be 0, 1, 2, 3, 4, 5, 6, or 7, and is represented by a fixed-length code with a length of 3 bins. When the syntax element is not present in the code stream, the value is 0.
[0778] The value range of talf_filter_mode will vary depending on the value of talf_reuse_flag. When talf_reuse_flag is 0, the value range and meaning of talf_filter_mode are the same as in the background art. When talf_reuse_flag is 1, talf_filter_mode takes the values 0, 1, 2, or 3. When the value is 0, 1, or 2, the meaning remains unchanged, and when the value is 3, it indicates that the two inputs of the filter need to be exchanged in advance as inputs.
[0779] poolIdx is an index variable indicating the reused FIFO, which is related to whether the current talf_filter_mode is bidirectional filtering. When talf_filter_mode indicates bidirectional filtering, poolIdx is 1, and otherwise, it is 0.
[0780] talf_shift_minus6 indicates the variable precision used by one or more temporal loop filters of the current slice coding. The meaning is that the shift value used in the filtering is reduced by 6. This syntax element is represented by a fixed-length code with a length of 2 bins in the present scheme, and takes the values 0, 1, 2, or 3. When the syntax element is not present in the code stream, the value is 0.
[0781] talf_k_order[ sfldx ] specifies the order of the exponential Golomb used for the absolute value of the filter coefficients of the current slice at sfldx. It can take the value 0 or 1, where 0 means that the 0th order exponential Golomb is used and 1 means that the 1st order exponential Golomb is used. When the syntax element is not present in the bitstream, its value is 0.
[0782] tAlfParamPool[ poolldx ][ 0 ].shift = talf_shift_minus6 + 6 specifies the shift value for the history-based temporal anti-aliasing filter of the current slice. When the syntax element is not present in the bitstream, its value is 0.
[0783] talf_clip_flag[ sfldx ] specifies whether the non-linearity is used for the temporal anti-aliasing filter of the current slice at sfldx. It can take the value 0 or 1, where 1 means that the non-linearity is used for the temporal anti-aliasing filter of the current slice at sfldx and 0 means that the non-linearity is not used for the temporal anti-aliasing filter of the current slice at sfldx. When the syntax element is not present in the bitstream, its value is 0.
[0784] talf_clip_idx[ sfldx ][ j ] specifies the index of the non-linearity used for the jth coefficient of the temporal anti-aliasing filter of the current slice at sfldx. It can take the value 0, 1, 2 or 3, where 0 means that the non-linearity is not used for the jth coefficient of the temporal anti-aliasing filter of the current slice at sfldx, 1, 2, 3 means that the index of the non-linearity is used for the jth coefficient of the temporal anti-aliasing filter of the current slice at sfldx. The syntax element is coded using a fixed length code with a bin length of 2. When the syntax element is not present in the bitstream, its value is 0.
[0785] tAlfParamPool[ poolldx ][ 0 ].clipldx[ sfldx ][ j ] = talf_clip_idx[ sfldx ][ j ] specifies the index of the non-linearity used for the jth coefficient of the history-based temporal anti-aliasing filter of the current slice at sfldx.
[0786] Further, when the TALF filtering is applied to a luma coding tree block, the TALF filtering is applied to the luma coding tree block if the talf_ctb_idc of the luma coding tree block is not equal to 0.
[0787] The input of the filtering process includes:
[0788] 1. a reconstructed luma picture array rec that has been filtered by the luma adaptive loop filter,
[0789] 2. the value of talf_filter_mode,
[0790] 3. the luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0791] 4. the width tAlfWidth and height tAlfHeight of the luma coding tree block,
[0792] 5. the coefficients tAlfCoeff[][] of the temporal adaptive loop filter.
[0793] For each position (x, y) in the current luma coding tree block, x takes values from xCtb to xCtb + tAlfWidth - 1, and y takes values from yCtb to yCtb + tAlfHeight - 1
[0794] First, get the reconstructed picture and Mv:
[0795] Determine the input picture of the filter according to talf_filter_mode
[0796] If talf_filter_mode is 0, check whether the prediction block to which the current position belongs selects Mv0 pointing to a reference picture in reference picture list 0, if yes, use the reference picture rec0 pointed by Mv0 as input, otherwise skip the filtering of the current position;
[0797] If talf_filter_mode is 1, check whether the prediction block to which the current position belongs selects Mv1 pointing to a reference picture in reference picture list 1, if yes, use the reference picture rec1 pointed by Mv1 as input, otherwise skip the filtering of the current position;
[0798] If talf_filter_mode is 2, check whether the prediction block to which the current position belongs selects both Mv0 pointing to a reference picture in reference picture list 0 and Mv1 pointing to a reference picture in reference picture list 1, if yes, use the reference picture rec0 pointed by Mv0 and the reference picture rec1 pointed by Mv1 as input, otherwise skip the filtering of the current position.
[0799] If talf_filter_mode is 3, check whether the prediction block to which the current position belongs selects both Mv0 pointing to a reference picture in reference picture list 0 and Mv1 pointing to a reference picture in reference picture list 1, if yes, use the reference picture pointed by Mv0 as rec1 and the reference picture pointed by Mv1 as rec0 as input, otherwise skip the filtering of the current position.
[0800] Second, get the shift value:
[0801] If Mv0 and Mv1 are found in the first step, then since sub-pixel accuracy Mv is used in inter prediction, here the position offset on the reconstructed picture where Mv points to is obtained by rounding to the nearest pixel accuracy.
[0802] The horizontal integer pixel position offset of Mv0 is:
[0803] Offset0X = Mv0.Hor < 0? - (( abs(Mv0.Hor) + 8 ) » 4 ) : ( ( abs(Mv0.Hor) + 8 ) » 4 )
[0804] The vertical integer pixel position offset of Mv0 is:
[0805] Offset0Y = Mv0.Ver < 0? - (( abs(Mv0.Ver) + 8 ) » 4 ) : ( ( abs(Mv0.Ver) + 8 ) » 4 )
[0806] The horizontal integer pixel position offset of Mv1 is:
[0807] Offset1X = Mv1.Hor < 0? - (( abs(Mv1.Hor) + 8 ) » 4 ) : ( ( abs(Mv1.Hor) + 8 ) » 4 )
[0808] The vertical integer pixel position offset of Mv1 is:
[0809] Offset1Y = Mv1.Ver < 0? - (( abs(Mv1.Ver) + 8 ) » 4 ) : ( ( abs(Mv1.Ver) + 8 ) » 4 )
[0810] In the third step, according to the obtained position offset, the reconstructed image is reconstructed, the filter coefficient position (x, y) is filtered, talf_filter_mode is 2 or 3, and the current position is not skipped filtering:
[0811] In the above filtering calculation process, shift is 6, BitDepth is the bit depth of the luminance component, x and y represent the horizontal and vertical coordinates of the reconstructed image array. x0, y0, x1, y1 are the coordinates of the center positions of rec0 and rec1 after offset, and when the reconstructed values in the coordinate positions rec0, rec1 array are obtained, the horizontal coordinate should be limited to 0 to picWidth-1 of the image width, and the vertical coordinate should be limited to 0 to picHeight-1 of the image height.
[0812] K(a, b) = min(b, max(-b, a))
[0813] talf_filter_mode is 0 and the current position is not skip filtered:
[0814] talf_filter_mode is 1 and the current position is not skip filtered:
[0815] In the process of filtering, the present scheme uses the same image edge padding method as ALF to obtain the TALF input value outside the image range needed.
[0816] In some embodiments, the ALF filter performs edge padding in units of coding tree blocks, and the filtering in one coding tree block does not use the reconstructed values of other coding tree blocks. In this case, TALF can also perform edge padding in units of coding tree blocks.
[0817] It can be understood that in some embodiments, the ALF filter performs edge padding in units of coding tree blocks, and the filtering in one coding tree block does not use the reconstructed values of other coding tree blocks. In this case, TALF can also perform edge padding in units of coding tree blocks.
[0818] It can be understood that in some embodiments, the nonlinear clipping (nonlinear limiting) currently supports 4 index values talf_clip_idx, and also reuses the clipping value table used by ALF. More index values and different clipping value tables can also be used.
[0819] It can be understood that in some embodiments, the adaptive shift value shift in the present scheme allows 4 of 5, 6, 7, and 8, but other integer shift values can also be used. The K value talf_k_order of the exponential Golomb currently supports 0 and 1, and more M values can also be used in some schemes.
[0820] It can be understood that in some embodiments, the filter coefficient tAlfCoeff can be an integer, but in order to facilitate boundary calculation, tAlfCoeff can be limited to a value that is more convenient for calculation, for example, tAlfCoeff is only allowed to be a power of 2, so that shift calculation can be used instead of multiplication when calculating the filter.
[0821] It can be understood that in some embodiments, each image supports a maximum of 4 groups of TALF filter coding and filtering, and more maximum groups can also be supported to obtain better performance, or a smaller maximum group can also be supported to obtain the shortest encoding time.
[0822] It can be understood that, in some embodiments, the present application is described by taking a time domain adaptive filter method used in a luminance coding tree block as an example, and of course, there is also a corresponding implementation scheme for chrominance. When the implementation is performed on the chrominance, a corresponding method can be added to the practice of the luminance.
[0823] The embodiment of the present application provides a coding and decoding method, which is a time domain adaptive loop filter method. The TALF filter processing of the reconstructed value of a current block can be realized based on reconstructed samples of at least one inter-frame reference image and corresponding filter coefficients. In the TALF filter process, the related information of the at least one inter-frame reference image is fully utilized, so that the filter effect can be improved, and the coding and decoding performance is improved.
[0824] In another embodiment of the present application, based on the ...
Claims
1. A decoding method applied to a decoder, the method comprising: in a case where it is determined that a current block picture is filtered using temporal adaptive loop filtering (TALF), determining at least one inter-predicted picture corresponding to the current picture and filter coefficients corresponding to the current block; decoding a bitstream to determine non-linear restriction identification information; in a case where it is determined that an input to a filter is restricted based on the non-linear restriction identification information, decoding the bitstream to determine a non-linear index parameter corresponding to the filter coefficients, and determining a restriction value corresponding to the filter coefficients based on the non-linear index parameter; filtering the current block based on reconstructed samples of the at least one inter-predicted picture, the filter coefficients corresponding to the current block, and the restriction value corresponding to the filter coefficients, to determine filtered reconstructed values of the current block.
2. The method of claim 1, wherein, The determining of the restriction value corresponding to the filter coefficients based on the non-linear index parameter comprises: determining a list index based on the non-linear index parameter; determining a non-linear restriction list in a candidate list based on the list index; determining the restriction value corresponding to the filter coefficients based on the non-linear restriction list.
3. The method of claim 2, wherein, The method further comprises: determining a sample depth parameter; constructing the candidate list based on the sample depth parameter.
4. The method of any one of claims 1-3, the determining of the at least one inter-predicted picture corresponding to the current picture and the filter coefficients corresponding to the current block comprises: determining TALF parameters corresponding to the current block; wherein the TALF parameters comprise one or more of a mode parameter, a number parameter, a coefficient value parameter, and a coefficient sign parameter; determining a filter mode and a number of groups of filters based on the TALF parameters; determining the at least one inter-predicted picture based on the filter mode; determining the filter coefficients corresponding to the current block based on the number of groups of filters, the coefficient value parameter, the coefficient sign parameter, and the first syntax element identification information.
5. The method of claim 4, wherein, The filtering of the current block based on the reconstructed samples of the at least one inter-predicted picture, the filter coefficients corresponding to the current block, and the restriction value corresponding to the filter coefficients, to determine filtered reconstructed values of the current block comprises: for a current sample position in the current block, determining a reconstructed sample value of the current sample position based on the reconstructed values of the current block, and determining a reconstructed sample value of a reference sample position corresponding to the current sample position based on the reconstructed samples of the inter-predicted picture; determining a filtered reconstructed sample value of the current sample position based on the restriction value corresponding to the filter coefficients, the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, and the reconstructed sample value of the reference sample position; determining the filtered reconstructed values of the current block based on the filtered reconstructed sample value of the current sample position.
6. The method of claim 4, wherein, The filtering of the current block based on the reconstructed samples of the at least one inter-predicted picture, the filter coefficients corresponding to the current block, and the restriction value corresponding to the filter coefficients, to determine filtered reconstructed values of the current block comprises: For a current sample position in the current block, a reconstructed sample value of the current sample position is determined according to a reconstructed value of the current block, a reconstructed sample value of a first reference sample position corresponding to the current sample position is determined according to a reconstructed sample of a first inter-frame reference image, and a reconstructed sample value of a second reference sample position corresponding to the current sample position is determined according to a reconstructed sample of a second inter-frame reference image; The filtered reconstructed sample value of the current sample position is determined according to the limit value corresponding to the filter coefficient, the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position. The filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
7. The method of claim 1, wherein, The method further comprises: In a case where it is determined not to limit the input of the filter based on the nonlinear limit identification information, the current block is filtered based on the reconstructed samples of the at least one inter-frame reference image and the filter coefficient corresponding to the current block, and a filtered reconstructed value of the current block is determined.
8. An encoding method applied to an encoder, the method comprising: determining at least one inter-frame reference image corresponding to a current image and a filter coefficient corresponding to a current block; when filtering the current image using TALF, determining nonlinear limit identification information according to a Lagrangian value when limiting the input of the filter and a Lagrangian value when not limiting the input of the filter, and writing the nonlinear limit identification information into a bitstream; in a case where it is determined to limit the input of the filter, determining a limit value corresponding to the filter coefficient, and determining a nonlinear index parameter corresponding to the filter coefficient based on the limit value corresponding to the filter coefficient, and writing the nonlinear index parameter corresponding to the filter coefficient into the bitstream.
9. The method of claim 8, wherein, The determination of the limit value corresponding to the filter coefficient and the determination of the nonlinear index parameter corresponding to the filter coefficient based on the limit value corresponding to the filter coefficient comprise: determining a minimum Lagrangian value in the Lagrangian values corresponding to the candidate limit values; determining the candidate limit value corresponding to the minimum Lagrangian value as the limit value corresponding to the filter coefficient; determining a nonlinear limit list in which the limit value corresponding to the filter coefficient is located; determining a list index corresponding to the nonlinear limit list according to the nonlinear limit list and the candidate list; determining the nonlinear index parameter according to the list index.
10. The method of claim 9, wherein, The method further comprises: determining a sample depth parameter; constructing the candidate list according to the sample depth parameter.
11. The method of claim 10, wherein, The method further comprises: in a case where it is determined to limit the input of the filter, filtering the current block based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficient corresponding to the current block, and the limit value corresponding to the filter coefficient, and determining a filtered reconstructed value of the current block.
12. The method of any of claims 8-11, wherein, The method further comprises: In a case where it is determined that the input of the filter is not limited, the current block is filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine filtered reconstructed values of the current block.
13. A code stream, wherein the code stream is generated by bit-encoding information to be encoded; and wherein, The information to be encoded at least includes nonlinear limitation identification information and a nonlinear index parameter.
14. An encoder, comprising a first determining unit; wherein, The first determining unit is configured to determine at least one inter-frame reference picture corresponding to a current picture and filter coefficients corresponding to a current block; in a case where the current picture is filtered using TALF, determine the nonlinear limitation identification information according to the cost value in a case where the input of the filter is limited and the cost value in a case where the input of the filter is not limited, and write the nonlinear limitation identification information into a bitstream; in a case where it is determined that the input of the filter is limited, determine a limitation value corresponding to the filter coefficients, and determine a nonlinear index parameter corresponding to the filter coefficients based on the limitation value corresponding to the filter coefficients; and write the nonlinear index parameter corresponding to the filter coefficients into the bitstream.
15. An encoder, comprising a first memory and a first processor; wherein, The first memory is configured to store a computer program capable of running on the first processor; The first processor is configured to execute the method according to any one of claims 8 to 12 when the computer program is running.
16. A decoder, comprising a second determining unit; wherein, The second determining unit is configured to determine at least one inter-frame reference picture corresponding to a current picture and filter coefficients corresponding to a current block in a case where the current picture is filtered using TALF; decode the bitstream to determine the nonlinear limitation identification information; in a case where it is determined that the input of the filter is limited based on the nonlinear limitation identification information, decode the bitstream to determine a nonlinear index parameter corresponding to the filter coefficients, and determine a limitation value corresponding to the filter coefficients according to the nonlinear index parameter; and filter the current block based on the reconstructed samples of the at least one inter-frame reference picture, the filter coefficients corresponding to the current block, and the limitation value corresponding to the filter coefficients to determine filtered reconstructed values of the current block.
17. A decoder, comprising a second memory and a second processor; wherein, The second memory is configured to store a computer program capable of running on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 7 when the computer program is running.
18. A computer readable storage medium, storing a computer program, which is executed to implement the decoding method according to any one of claims 1 to 7, or implement the encoding method according to any one of claims 8 to 12.
19. A computer readable storage medium, configured to store a bitstream generated by the encoding method according to any one of claims 8 to 12.
Citation Information
Patent Citations
Methods and devices for loop filtering
CN111742552A
Nonlinear adaptive loop filtering in video processing
CN113632490A
Clipping indices coding for adaptive loop filter in video coding
CN113940067A
Adaptive loop filtering (ALF) with non-linear clipping
US20220078415A1
Adaptive loop filter-based video or image coding
US20220132115A1