Encoding method, decoding method, bitstream, encoder, decoder, and storage medium
By introducing variable-order exponential Golomb filter coefficients and variable shift values into video coding, the problem of unsatisfactory filtering effect in existing technologies is solved, and the encoding and decoding performance is improved.
Patent Information
- Application Number
- PCT/CN2024/103984
- 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, loop filters fail to fully utilize the relevant information of the reconstructed image in the temporal domain, resulting in less than ideal filtering effects and reduced encoding and decoding performance.
By transmitting order and shift identifier information during encoding and decoding, variable-order exponential Golomb filter coefficients and variable shift values are introduced to improve the filter's adaptability and achieve time-domain adaptive loop filtering.
It improves filtering performance and enhances encoding and decoding performance.
Smart Images

Figure CN2024103984_08012026_PF_FP_ABST
Abstract
Description
Coding 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 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 time domain reconstructed image, and the filtering effect is not ideal, which reduces the coding performance.
[0004] SUMMARY
[0005] Embodiments of the present application provide a coding method, a code stream, an encoder, a decoder and a storage medium, which can improve the filtering effect and improve the coding 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 image is filtered using the TALF, decoding the code stream, determining order identification information and shift identification information;
[0009] Determining at least one inter-frame reference image corresponding to the current image, determining filter coefficients according to the order identification information, and determining a shift parameter according to the shift identification information;
[0010] Filtering based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameter to determine the filtered reconstructed value of the current block.
[0011] In a second aspect, the embodiments of the present application provide an encoding method applied to an encoder, and the method comprises:
[0012] In filtering the current image using the TALF, a cost value corresponding to a candidate order is determined, order identification information is determined according to the cost value corresponding to the candidate order, and the order identification information is written into the bitstream;
[0013] In filtering the current image using the TALF, a cost value corresponding to a candidate shift parameter is determined, shift identification information is determined according to the cost value corresponding to the candidate shift parameter, and the shift identification information is written into the bitstream;
[0014] At least one inter-frame reference image corresponding to the current image is determined, filter coefficients and a shift parameter are determined.
[0015] Filtering is performed based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients, and the shift parameter, and a filtered reconstructed value of the current block is determined.
[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 includes one or more of first syntax element identification information, order identification information, shift identification information, coefficient value parameters, quantity parameters, and coefficient sign parameters.
[0017] In a fourth aspect, an embodiment of the present application provides an encoder, the encoder including a first determining unit; wherein
[0018] The first determining unit is configured to, in filtering the current image using the TALF, determine a cost value corresponding to a candidate order, determine order identification information according to the cost value corresponding to the candidate order, and write the order identification information into the bitstream; in filtering the current image using the TALF, determine a cost value corresponding to a candidate shift parameter, determine shift identification information according to the cost value corresponding to the candidate shift parameter, and write the shift identification information into the bitstream; determine at least one inter-frame reference image corresponding to the current image, determine filter coefficients and a shift parameter; and perform filtering based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients, and the shift parameter, and determine a filtered reconstructed value of the current block.
[0019] In a fifth aspect, an embodiment of the present application provides an encoder, the encoder including 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, when running the computer program, execute the encoding method as described above.
[0022] In a sixth aspect, an embodiment of the present application provides a decoder, the decoder comprising a second determining unit, and wherein
[0023] The second determining unit is configured to, in a case where it is determined that the current image is filtered using TALF, decode a code stream, determine order identification information and shift identification information, determine at least one inter-frame reference image corresponding to the current image, determine filter coefficients according to the order identification information, determine a shift parameter according to the shift identification information, filter based on reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameter, and determine a 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, and 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, perform 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] This application provides an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. At the decoding end, when it is determined that the current image is being filtered using TALF, the bitstream is decoded to determine order identifier information and shift identifier information; at least one inter-frame reference image corresponding to the current image is determined; filter coefficients are determined based on the order identifier information; and shift parameters are determined based on the shift identifier information. Filtering is performed based on reconstructed samples from at least one inter-frame reference image, filter coefficients, and shift parameters to determine the filtered reconstructed value of the current block. At the encoding end, when the current image is being filtered using TALF, the cost value corresponding to the candidate order is determined; order identifier information is determined based on the cost value corresponding to the candidate order; and the order identifier information is written into the bitstream. When the current image is being filtered using TALF, the cost value corresponding to the candidate shift parameter is determined; shift identifier information is determined based on the cost value corresponding to the candidate shift parameter; and the shift identifier information is written into the bitstream. At least one inter-frame reference image corresponding to the current image is determined; filter coefficients and shift parameters are determined. Filtering is performed based on reconstructed samples from at least one inter-frame reference image, filter coefficients, and shift parameters to determine the filtered reconstructed value of the current block. Therefore, the embodiments of this application propose a time-domain adaptive loop filtering method, which introduces a variable-order exponential Golomb to encode and decode filter coefficients by transmitting order identification information. At the same time, a variable shift value is introduced during the filtering process by transmitting shift identification information, thereby achieving better adaptability in TALF filtering and further improving the filtering effect of time-domain adaptive loop filtering. Attached Figure Description
[0030] Figure 1 is a schematic diagram of the application of a coding framework provided by related technologies;
[0031] Figure 2 is a schematic diagram of the application of a loop filter module provided by related technologies;
[0032] Figure 3 is a schematic diagram of the shape of a common brightness adaptive loop filter;
[0033] Figure 4 is a schematic diagram of the shape of a common chromaticity adaptive loop filter.
[0034] Figure 5 is a schematic diagram of the loop filtering implementation process;
[0035] Figure 6 is a schematic diagram of the shape of the cross-component adaptive filter;
[0036] Figure 7 shows the relationship between encoding / decoding and playback order under one RA configuration;
[0037] Figure 8 is a system block diagram of an encoder provided in an embodiment of this application;
[0038] Figure 9 is a system block diagram of a decoder provided in an embodiment of this application;
[0039] FIG. 10 is a schematic diagram of a decoding method according to an embodiment of the present application;
[0040] FIG. 11 is a schematic diagram of an implementation of TALF filtering according to an embodiment of the present application;
[0041] FIG. 12 is a schematic diagram of another implementation of TALF filtering according to an embodiment of the present application;
[0042] FIG. 13 is a schematic diagram of a third implementation of TALF filtering according to an embodiment of the present application;
[0043] FIG. 14 is a schematic diagram of a fourth implementation of TALF filtering according to an embodiment of the present application;
[0044] FIG. 15 is a schematic diagram of a fifth implementation of TALF filtering according to an embodiment of the present application;
[0045] FIG. 16 is a schematic diagram of a sixth implementation of TALF filtering according to an embodiment of the present application;
[0046] FIG. 17 is a schematic diagram of a seventh implementation of TALF filtering according to an embodiment of the present application;
[0047] FIG. 18 is a schematic diagram of a filter according to an embodiment of the present application;
[0048] FIG. 19 is a schematic diagram of another filter according to an embodiment of the present application;
[0049] FIG. 20 is a schematic diagram of a third filter according to an embodiment of the present application;
[0050] FIG. 21 is a schematic diagram of a fourth filter according to an embodiment of the present application;
[0051] FIG. 22 is a schematic diagram of a fifth filter according to an embodiment of the present application;
[0052] FIG. 23 is a schematic diagram of a sixth filter according to an embodiment of the present application;
[0053] FIG. 24 is a schematic diagram of a seventh filter according to an embodiment of the present application;
[0054] FIG. 25 is a schematic diagram of an encoding method according to an embodiment of the present application;
[0055] FIG. 26 is a schematic diagram of an eighth filter according to an embodiment of the present application;
[0056] FIG. 27 is a schematic diagram of a ninth filter according to an embodiment of the present application;
[0057] FIG. 28 is a schematic diagram of a composition structure of an encoder according to an embodiment of the present application;
[0058] FIG. 29 is a schematic diagram of a specific hardware structure of an encoder according to an embodiment of the present application;
[0059] Fig. 30 is a schematic diagram of the composition structure of a decoder according to an embodiment of the present application;
[0060] Fig. 31 is a schematic diagram of the specific hardware structure of a decoder according to an embodiment of the present application;
[0061] Fig. 32 is a schematic diagram of the composition structure of a codec system according to an 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 in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0064] Digital video compression technology mainly compresses large digital video data to facilitate transmission and storage. With the surge of Internet videos and the increasing demand for video clarity, although existing digital video compression standards 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; transformation converts the predicted image block to a frequency domain, energy is redistributed, and the 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 transformation 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 a schematic diagram of application 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 and use the filter to filter the reconstructed image after obtaining the filter coefficients, 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 schematic 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 schematic 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). In addition, the chroma ALF itself also performs filtering processing on 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.
[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 more likely to be compressed. 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. The variable order exponential Golomb is introduced by the transmission of the order identification information to code and decode the filter coefficient, and at the same time, the variable shift value is introduced in the filtering process by the transmission of the shift identification information, so that better adaptability is obtained in the TALF filtering, and the filtering effect of the time-domain adaptive loop filter is further improved.
[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 transformation unit 108, a quantization unit 109, a dequantization unit 110, an inverse transformation 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 a compressed version of the input video.
[0086] Among them, 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 an inter prediction block, and a rate-distortion optimized mode determination approach can be invoked by the intra prediction unit 106 to obtain an intra prediction block.
[0088] The prediction unit 102 outputs a prediction block for a CU, and the first adder 107 calculates a difference between the CU in the output of the partition unit 101 and the prediction block for 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 for 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 scenario 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, decoding a code stream to determine order identification information and shift identification information.
[0107] In the embodiments of the present application, if it is determined that the current image uses TALF for filtering, the order identification information and the shift identification information can be determined by decoding the code stream.
[0108] It should be noted that in the embodiments of the present application, the order identification information can be used to determine the exponential Golomb order. The exponential Golomb order can be used for coding and decoding of the filter coefficient, for example, the exponential Golomb order is used to code and decode the coefficient value parameter corresponding to the filter coefficient.
[0109] Further, in the embodiments of the present application, the exponential Golomb order of the coding and decoding filter coefficient can be determined by the value of the order identification information. The value of the order identification information can be in the form of a parameter or in the form of a number, which is not limited in the present application.
[0110] It should be noted that in the embodiments of the present application, the order identification information can be an image-level flag or a slice-level flag. In general, the order identification information can be a parameter written in the Slice header or the picture header, which is not limited herein.
[0111] Further, in the embodiments of the present application, the order identification information can correspond to a filter, or can correspond to an image level, a slice level, a block level, a sequence level, etc. That is, in addition to transmitting an order for each filter, in some embodiments, the order can also be transmitted in units of images, sequences, etc., which means that the same order of the exponential Golomb code or the same sequence of the exponential Golomb code is used for the coding and decoding of the time domain filter coefficient in an image.
[0112] Exemplarily, in some embodiments, if the value of the order identification information is 1, the exponential Golomb order can be determined as 1; if the value of the order identification information is 0, the exponential Golomb order can be determined as 0; if the value of the order identification information is M, the exponential Golomb order can be determined as M, wherein M is an integer greater than or equal to 0.
[0113] That is, in the embodiments of the present application, by setting the order identification information, a variable order Golomb code can be introduced to code and decode the filter coefficient. For example, a best order can be selected from 0, 1, …, M orders, and the best order is transmitted through the code stream, so that the coefficient coding of the filter can use the optimal exponential Golomb order.
[0114] Exemplarily, in some embodiments, if the value of the order identification information is true, the exponential Golomb order can be determined as 1; if the value of the order identification information is false, the exponential Golomb order can be determined as 0.
[0115] Exemplarily, in some embodiments, assuming that the order identification information is a flag of a slice level, the order identification information can be represented by a syntax element talf_k_order[sfldx], i.e., talf_k_order[sfldx] indicates the exponential Golomb order of the filter coefficients of the sfldx-th group of filters. If the value of talf_k_order[sfldx] is 0, it can be determined that the exponential Golomb order of the filter coefficients of the sfldx-th group of filters is 0, and if the value of talf_k_order[sfldx] is 1, it can be determined that the exponential Golomb order of the filter coefficients of the sfldx-th group of filters is 1.
[0116] Of course, the value of talf_k_order[sfldx] is not limited to 0 and 1, and the present application does not make specific limitations.
[0117] It should be noted that in the embodiments of the present application, the shift identification information can be used to determine the shift parameter, i.e., the shift identification information can determine the shift value shift in the filtering process. The shift parameter, i.e., the shift value shift, can be determined by the variable precision in the filtering process of the current image (or the current slice), and the value of the shift identification information can represent the variable precision.
[0118] It can be understood that, in the embodiments of the present application, compared with the fixed shift value shift, the variable shift value is introduced by the shift identification information, and a variable shift value is transmitted by the code stream, so that the filter coefficients can achieve better adaptability. A larger shift value makes the range of the filter coefficients large, the filtering effect good, and the code word more; a smaller shift value can make the range of the filter coefficients small, the filtering effect poor, and the code word less.
[0119] Further, in the embodiments of the present application, the shift identification information can correspond to a filter, or can correspond to an image level, a slice level, a block level, a sequence level, etc. That is, in addition to transmitting a variable shift for each filter, in some embodiments, the shift can also be transmitted in units of images, sequences, etc., i.e., the transmitted shift value can be transmitted for each time domain filter, or can be transmitted for each frame of image, or can be transmitted for each sequence.
[0120] Further, in the embodiments of the present application, the shift value shift in the filtering process can be determined by the value of the shift identification information. The value of the shift identification information can be in the form of a parameter or in the form of a number, and the present application does not make specific limitations.
[0121] It should be noted that in the embodiments of the present application, the shift identification information can be a picture-level flag or a slice-level flag. In general, the shift identification information can be a parameter written in a slice header or a picture header, which is not limited herein.
[0122] For example, in some embodiments, assuming that the shift identification information is a slice-level flag, the shift identification information can be represented by a syntax element talf_shift_minus5, for example, the value of talf_shift_minus5 is the shift value used in the filtering process of the current slice minus 5. Wherein, talf_shift_minus5 can be represented by a fixed-length code with a length of 2 bins, and the value is 0, 1, 2 or 3.
[0123] Of course, the value of the shift identification information can also represent the shift value used in the filtering process minus an arbitrary integer greater than 0, and is not limited to 5.
[0124] For example, in some embodiments, the slice header syntax elements are parsed as follows:
[0125] Wherein, talf_shift_minus5 represents the variable precision used by one or more time domain loop filters for coding of the current slice, and its meaning is that the shift value used in the filtering is minus 5. This syntax element is represented by 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, its value is 0.
[0126] talf_k_order[sfIdx] represents the exponential Golomb order used by the absolute value of the coding coefficient of the sfIdx-th filter of the current slice, and its value is 0 or 1, 0 represents that the 0-order exponential Golomb code is used; 1 represents that the 1-order exponential Golomb code is used. When the syntax element does not exist in the code stream, its value is 0.
[0127] Further, in the embodiments of the present application, the code stream can be decoded to determine the first syntax element identification information.
[0128] It can be understood that in the embodiments of the present application, the code stream is decoded to determine the first syntax element identification information. Wherein, the first syntax element identification information can be used to determine whether the current block in the current image uses TALF for filtering, that is, based on the first syntax element identification information, it can be determined whether to use the TALF filter to filter the reconstructed value of the image component of the current block.
[0129] 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 the current image, which can be a decoded and reconstructed image in the time domain. Wherein, the TALF filtering of the current block in the current image can be completed using the reconstructed sample values of the at least one inter-frame reference image.
[0130] 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 present application does not specifically limit the size and the obtaining manner of the current block in the current image.
[0131] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether to use TALF 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 image, the first syntax element identification information can be a CTU-level flag. If the current block is a CU corresponding to the current image, the first syntax element identification information can be a CU-level flag. Of course, for a sub-region of any size in the current image, the first syntax element identification information can also be a flag of other block levels. The present application does not specifically limit it.
[0132] Further, in the embodiments of the present application, whether to use TALF to filter the current block can be determined by the value of the first syntax element identification information.
[0133] For example, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that 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 TALF is used to filter the current block.
[0134] 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 current block uses TALF for filtering. 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.
[0135] For example, in some embodiments, if the first syntax element identification information is a block-level flag, 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 the embodiments of the present application is not limited.
[0136] Taking the first value 0 as an example, in the 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 does not use TALF for filtering. Otherwise, if the value of the first syntax element identification information is not 0, it can be determined that the current block uses TALF for filtering.
[0137] 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 identification 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 picture. 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.
[0138] Further, in the embodiments of the present application, the code stream can be decoded first to determine the second syntax element identification information; in the case that it is determined to allow the current picture to use TALF for filtering based on the second syntax element identification information, the determination process of the first syntax element identification information is performed, that is, the parsing process of the first syntax element identification information is performed.
[0139] 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 use TALF for filtering. The second syntax element identification information can be a flag.
[0140] 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 (slice-level) flag, a sub-picture-level flag, or a tile-level flag. The present application does not make specific limitations.
[0141] Exemplarily, in some embodiments, if the second syntax element identification information is a slice-level flag, the second syntax element identification information can be used to determine whether the current slice is allowed to use TALF for filtering.
[0142] Further, in embodiments of the present application, whether the current picture (and / or the current slice) is allowed to be filtered using TALF can be determined by the value of the second syntax element.
[0143] For example, in some embodiments, if the value of the second syntax element is a second value, it is determined that the current picture (and / or the current slice) is allowed to be filtered using TALF. If the value of the second syntax element is a third value, it is determined that the current picture (and / or the current slice) is not filtered using TALF.
[0144] It should be noted that in embodiments of the present application, the second syntax element can be used to indicate whether the current picture (and / or the current slice) is filtered using TALF. 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 can be a parameter written in a slice header or a picture header, which is not limited herein.
[0145] It should be further noted that if the second syntax element is an image-level flag or a slice-level flag, 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 be set to true and the third value can be set to false; or in yet another specific example, the second value can be set to 0 and the third value can be set to 1; or the second value can be set to false and the third value can be set to true. The second value and the third value in embodiments of the present application are not limited.
[0146] For example, assuming that the second syntax element is an image-level flag, 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 is 1, it is determined that the current picture is filtered using TALF. Otherwise, if the value of the second syntax element is 0, it is determined that the current picture is not filtered using TALF.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] Exemplarily, in some embodiments, an example of encoding a picture level TALF identifier (second syntax element identification information) in a picture header and a corresponding APS index can be as follows:
[0152] Wherein, 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.
[0153] 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 a case that it is determined based on the third syntax element identification information that the current sequence is filtered using the TALF, the determination process of the second syntax element identification information is performed.
[0154] 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 the TALF. The third syntax element identification information can be a flag, for example, a sequence-level flag.
[0155] Further, in the embodiments of the present application, whether the current sequence is filtered using the TALF can be determined by the value of the third syntax element identification information.
[0156] For example, in some embodiments, in a 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 the TALF. In a 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 the TALF.
[0157] 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 the 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 are not limited herein.
[0158] 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 as 1, and the fifth value can be set as 0; in another specific example, the fourth value can also be set as true, and the fifth value can also be set as false; or in yet another specific example, the fourth value can also be set as 0, and the fifth value can also be set as 1; or the fourth value can also be set as false, and the fifth value can also be set as true. The fourth value and the fifth value in the embodiments of the present application are not limited.
[0159] 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 the 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 the 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 the TALF.
[0160] 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.
[0161] 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.
[0162] 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.
[0163] 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:
[0164] Wherein, 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.
[0165] 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.
[0166] 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 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.
[0167] 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:
[0168] 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 to be used, i.e., sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, sps_talf_enabled_flag can be further parsed.
[0169] 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.
[0170] That is, 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.
[0171] 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; 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.
[0172] Exemplarily, in some embodiments, the TALF picture level indication (TALF indication at picture level) can depend on the ALF sequence level indication (ALF indication at sequence level), and the dependency relationship can be as follows:
[0173] 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, ph_talf_enabled_flag is used for indicating whether TALF is used for filtering the current picture, and ph_talf_aps_id can be used for indicating where the adaptive parameters (such as the number of filters, filter coefficients) of TALF are obtained in the APS parameter set when TALF is used.
[0174] Further, in the embodiments of the present application, the TALF indication at picture level (and / or slice level) can also depend on the ALF indication at picture level (and / or slice level).
[0175] That is, in the embodiments of the present application, the determination of the second syntax element indication information can also depend on the ALF indication at picture level (and / or slice level).
[0176] Exemplarily, in some embodiments, it is assumed that the ALF indication at picture level can be represented by a syntax element ph_alf_enabled_flag, i.e., ph_alf_enabled_flag indicates whether ALF is allowed to be used for filtering the current picture. If ph_alf_enabled_flag indicates that ALF is not used for filtering the current picture, then the determination of the second syntax element indication information can be selected not to be decoded; if ph_alf_enabled_flag indicates that ALF is allowed to be used for filtering the current picture, then the determination of the second syntax element indication information can be further performed.
[0177] Exemplarily, in some embodiments, the identification of the TALF picture level (TALF identification of the picture level) can depend on the identification of the ALF picture level (ALF identification of the picture level), and the dependency relationship can be as follows:
[0178] wherein 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 (such as the number of filters and filter coefficients) of TALF are obtained in the APS parameter set when TALF is used.
[0179] Exemplarily, in some embodiments, the TALF identification of the picture level (and / or the slice level) can also depend on some high-level syntax, for example, the high-level syntax element pps_alf_info_in_ph_flag is used to identify the control identification of the picture level or the slice level of ALF using the syntax elements of the picture level or the slice level, and the ALF identifier also exists in the slice header.
[0180] Exemplarily, in some embodiments, the identification of the TALF slice level (TALF identification of the slice level) can depend on the TALF control identification, and the dependency relationship can be as follows:
[0181] wherein 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 the slice level of ALF is parsed using the syntax elements of the picture level or the 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 (such as the number of filters and filter coefficients) of TALF are obtained in the APS parameter set when TALF is used.
[0182] Step 1002, determining at least one inter-frame reference picture corresponding to the current picture, determining filter coefficients according to order identification information, and determining shift parameters according to shift identification information.
[0183] In the embodiments of the present application, if it is determined to use TALF for filtering, at least one inter-frame reference image corresponding to the current image can be further determined, and after determining the order identification information and the shift identification information from the coded stream, the filter coefficients can be determined according to the order identification information, and the shift parameters can be determined according to the shift identification information.
[0184] Further, in the embodiments of the present application, when the filter coefficients are determined according to the order identification information, the exponential Golomb order can be determined according to the order identification information; then the filter coefficients corresponding to the coefficient value parameters can be determined by decoding the coded stream according to the exponential Golomb order; and finally the filter coefficients can be determined according to the coefficient value parameters.
[0185] It can be understood that in the embodiments of the present application, the exponential Golomb order can include 0 or 1, that is, the filter coefficients corresponding to the coefficient value parameters can be coded and decoded by using 0-order exponential Golomb code or 1-order exponential Golomb code. Of course, the exponential Golomb order can also be any other integer greater than 0, which is not specifically limited in the present application.
[0186] Further, in the embodiments of the present application, when at least one inter-frame reference image corresponding to the current image and the filter coefficients corresponding to the current block are determined, the TALF parameters corresponding to the current block can be determined first; wherein the TALF parameters include one or more of mode parameters, number parameters, coefficient value parameters and coefficient sign parameters; then the filtering mode and the number of filter groups can be determined according to the TALF parameters; at least one inter-frame reference image can be determined according to the filtering mode; and the filter coefficients corresponding to the current block can be determined according to the number of filter groups, the coefficient value parameters, the coefficient sign parameters and the first syntax element identification information.
[0187] It can be understood that in the embodiments of the present application, the mode parameters can be used to determine the filtering mode of TALF filtering, wherein the determined inter-frame reference image corresponding to the current image can be different for different filtering modes. The number parameters can be used to determine the number of filter groups corresponding to the current image. The coefficient value parameters can be used to determine the absolute value size of the filter coefficients. The coefficient sign parameters can be used to determine the sign of the filter coefficients, including positive and negative signs.
[0188] Further, in the embodiments of the present application, when the TALF parameters corresponding to the current block are determined, in the case that the current image uses TALF for filtering based on the second syntax element identification information, the APS index can be determined by decoding the coded stream; then the APS set can be determined according to the APS index, and the TALF parameters can be determined based on the APS set.
[0189] 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 image, that is, the APS set corresponding to the current image can be determined through the APS index.
[0190] Exemplarily, in some embodiments, in the case of determining that the current image is filtered using TALF based on the identification information of the second syntax element, the code stream can be further decoded to determine the corresponding APS index ph_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 image are obtained when TALF is used.
[0191] Exemplarily, in some embodiments, in the case of determining that the current slice is filtered using TALF based on the identification information of the second syntax element, 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.
[0192] 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.
[0193] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing the APS is as follows:
[0194] alf_data() is a function of parsing the ALF and the parameters of the related syntax elements of CCALF. The syntax elements and parameters of TALF can also be further parsed in alf_data().
[0195] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing alf_data() is as follows:
[0196] talf_filter_signal_flag is used to identify whether there are TALF parameters in the parameters of the current alf_data.
[0197] talf_filter_mode is a mode parameter, which is used to represent which mode the TALF belongs to among the forward / backward / bidirectional modes if there are TALF parameters.
[0198] talf num filters signalled minusl is a quantity parameter, used to indicate the number of filter groups. For example, if there is a TALF parameter, the value of talf num filters signalled minusl is the number of TALF filters coded in the current APS minus one;
[0199] talf coeff abs is a coefficient value parameter, used to indicate the absolute value of the coefficients in each filter coded.
[0200] talf coeff sign is a coefficient sign parameter, used to indicate the positive or negative of the non-zero coefficients in each filter coded.
[0201] numCoeff is a variable indicating the number of filter coefficients in the filter.
[0202] Further, in the embodiments of the present application, when determining the TALF parameter corresponding to the current block, the TALF parameter can be determined by decoding the code stream in the case that the second syntax element identification information determines that the current image is filtered using TALF.
[0203] That is, in the embodiments of the present application, the TALF parameter corresponding to the current image can be directly written into the code stream, so that the TALF parameter can be obtained by decoding the code stream. For example, the TALF parameter can be coded in the image header or slice header.
[0204] Exemplarily, in some embodiments, the method of coding the TALF identification and TALF parameter in the image header is as follows:
[0205] Further, in the embodiments of the present application, when determining the filter mode and the number of filter groups according to the TALF parameter, the current configuration can be determined first. In the case that the current configuration is a random access (RA) configuration, the filter mode is determined in a first candidate mode according to the mode parameter; 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 that the current configuration is a low delay (LD) configuration, the filter mode is determined in a second candidate mode according to the mode parameter; 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.
[0206] 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 parameter in the TALF parameter. Among them, the determination of the filter mode based on the first candidate mode or the second candidate mode can be determined according to the current configuration, and then the corresponding filter mode can be selected from the first candidate mode or the second candidate mode according to the mode parameter.
[0207] 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 reverse filter mode and the bidirectional filter mode. Among them, the forward filter mode can be understood as using the reconstruction information of the reconstructed image smaller than the POC of the current image as the input of the filter, the reverse filter mode can be understood as using the reconstruction 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 reconstruction information of the image smaller than the POC of the current image and the image larger than the POC of the current image as the input of the filter.
[0208] 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 filter mode, the second forward filter mode and the third forward filter mode. Among them, 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, that is, only the forward filter mode is supported. However, corresponding to different inter-frame reference images, the corresponding forward filter mode can be distinguished into the first forward filter mode, the second forward filter mode and the third forward filter mode.
[0209] Further, in the embodiments of the present application, after determining the filter mode corresponding to the current image, at least one inter-frame reference image can be further determined according to the filter mode.
[0210] It can be understood that in the embodiments of the present application, the determination of the inter-frame reference image depends on the filter mode, and the finally determined inter-frame reference image can be different for different filter modes.
[0211] Exemplarily, in some embodiments, if the POC value of the current image is N, for the RA configuration, if the determined filter mode is the forward filter 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 filter mode is the reverse filter 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 filter mode is the bidirectional filter mode, the image with the POC value of N-1 and the image with the POC value of N+1 can be selected as the inter-frame reference image of the current image.
[0212] Exemplarily, in some embodiments, if the POC value of the current image is N, for the LD configuration, the images with 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 filter mode is the first forward filter mode, the image with POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the second forward filter mode, the image with POC value of N-2 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the third forward filter mode, the images with POC values of N-1 and N-2 can be selected as the inter-frame reference images of the current image.
[0213] That is, in the embodiments of the present application, the POC values of the determined inter-frame reference images can be different based on different filter modes, 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), 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.
[0214] Therefore, for the temporal 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 temporal filter of the present scheme is applied to the inter-frame encoded image, for example, the inter-frame encoded image under the encoding types of the RA and LD configurations. For the encoding and decoding under the LD configuration, the encoding and decoding order is the same as the playing order, so when the temporal adaptive filter is used for the inter-frame encoded image, the reference image with a smaller POC value than the current image is always used as the input of the filter. For the encoding and decoding under the RA configuration, the encoding and decoding order can be different from the playing order, and when the temporal filter is used for the current inter-frame encoded image, the reference frame with a larger or smaller POC value than the current frame can be used as the input of the filter.
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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.
[0219] Bidirectional filtering is to use the reconstructed information of the image with smaller POC value than the current image and the image with larger POC value 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 value 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 image with 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 image with 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 image with TID of 2 can use the images with POC values of N+8 and N-8 as the input of the filter; the image with 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 image with 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.
[0220] It should be noted that in the embodiments of the present application, the POC values of the reference frames used in the bidirectional filtering will change due to the different coding configurations. In principle, in the RA configuration, the bidirectional filtering always uses the reconstructed values of the two reconstructed images with the closest forward and backward distances as the input of the filter.
[0221] Exemplarily, in some embodiments, assuming that the filtering mode is the forward filtering mode, the following forward filtering modes can be included but are not limited to:
[0222] 1. In the RA configuration, the reference image with the closest temporal distance and smaller POC value than the current image is used as the input of the temporal filtering;
[0223] 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 temporal filtering corresponding to the first forward filtering mode;
[0224] 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 temporal filtering corresponding to the second forward filtering mode;
[0225] 4. In the LD configuration, when the POC value of the current image is N, the two reference images with POC values of N-2 and N-1 are used as the input of the temporal filtering corresponding to the third forward filtering mode.
[0226] 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 number parameter. The number of groups of filters can be determined according to the number parameter and a preset value.
[0227] 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 value of the quantity parameter and the preset value can be mathematically operated to obtain the number of groups of filters.
[0228] 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). Wherein, it is assumed that a slice can have at most four TALF filters, so the value of talf_num_filters_signalled_minus1 can be 0, 1, 2 or 3. The syntax element is 0, which means that the current slice has one TALF filter, the syntax element is 1, which means that the current slice has two TALF filters, the syntax element is 2, which means that the current slice has three TALF filters, and the syntax element is 3, which means 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.
[0229] 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 determined according to the first syntax element identification information and the number of groups of filters first; 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.
[0230] 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 used to determine the candidate filter corresponding to the current block.
[0231] 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 TALF is not used to filter the current block. In the case that 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, and the candidate filter corresponding to the current block can be further determined according to the first syntax element identification information.
[0232] It can be understood that in the embodiments of the present application, in the case that the TALF is used to filter the current block based on the first syntax element identification information, the determination process of the filter coefficients corresponding to the current block can be performed.
[0233] It should be noted that in the embodiments of the present application, after the decoding of the bitstream according to the exponential Golomb order and the determination of the coefficient value parameter corresponding to the filter coefficient, when the filter coefficient is determined according to the coefficient value parameter, the number of groups of the filter can be determined according to the number parameter; and the filter coefficient is determined according to the number of groups of the filter, the coefficient value parameter, the coefficient sign parameter and the first syntax element identification information.
[0234] 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 number of groups of the filter, the number index of the group of the filter corresponding to the current block can be determined according to the first syntax element identification information first; and then the candidate filter corresponding to the current block is determined according to the number of groups of the filter and the number index of the group of the filter corresponding to the current block.
[0235] 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 number index of the group of the filter corresponding to the current block can be determined according to the value of the first syntax element identification information. The number index of the group of the filter can represent the index of the TALF filter used for the current block in the filter set coded in the current image, that is, the number index of the group of the filter can be used to select the candidate filter corresponding to the current block from the plurality of filters corresponding to the current image.
[0236] Exemplarily, 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 TALF is not used for filtering the current block, if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 1, 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, and if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 2, 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.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] 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.
[0241] 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.
[0242] 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.
[0243] 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.
[0244] 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].
[0245] 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
[0246] The process of reconstructing the filter coefficients according to the coefficient sign is as follows:
[0247] Wherein, the numCoeff variable represents the number of filter coefficients in the filter.
[0248] 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.
[0249] 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.
[0250] Further, in the embodiments of the present application, when the shift parameter is determined according to the shift identification information, the variable precision can be determined according to the shift identification information first, and then the shift parameter is determined according to the variable precision and the preset value.
[0251] For example, in some embodiments, assuming that the shift identification information is talf_shift_minus5 and the preset value is 5, the shift parameter shift, that is, the shift value shift can be determined by shift = talf_shift_minus5 + 5.
[0252] It can be understood that in the embodiments of the present application, the preset value can be any integer greater than 0, and is not limited to 5.
[0253] Step 1003, filtering based on the reconstructed samples of the at least one inter-frame reference picture, the filter coefficient and the shift parameter to determine the filtered reconstructed value of the current block.
[0254] In the embodiments of the present application, after it is determined that TALF is used for filtering, and the at least one inter-frame reference picture corresponding to the current picture, the filter coefficient and the shift parameter are determined, the filtered reconstructed value of the current block can be further determined by filtering based on the reconstructed samples of the at least one inter-frame reference picture, the filter coefficient and the shift parameter.
[0255] 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 filtering 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 process performed corresponding to different numbers of inter-frame reference pictures is also different.
[0256] Further, in the embodiments of the present application, when filtering based on the reconstructed samples of the at least one inter-frame reference picture, the filter coefficients and the shift parameters, the filtered reconstructed value of the current block is determined as follows: 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 shift coefficient, the filter coefficient, 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.
[0257] It can be understood that, in the embodiments of the present application, for 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, the current picture corresponds to one inter-frame reference picture, and when performing TALF filtering on the reconstructed value of the current block 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 respectively input into the TALF filter, combined with the determined filter coefficient and shift coefficient corresponding to the current block, to finally determine the filtered reconstructed sample value of the current sample position, and the above scheme is used to traverse any sample position of the current block to complete filtering on the current block and obtain the filtered reconstructed value of the current block.
[0258] Exemplarily, in some embodiments, assuming that the current picture corresponds to one inter-frame reference picture, 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 13 filter coefficients and a 7x7 symmetric filter is as follows:
[0259] rec′ (x,y) is the reconstructed sample value at the (x, y) position after 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 ) in the inter-frame reference picture, and c is the temporal adaptive filter coefficient.
[0260] 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.
[0261] That is, in the embodiments of the present application, 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 first sample difference value is taken as the input of the filter.
[0262] Exemplarily, in some embodiments, assuming that the current image corresponds to one inter-frame reference image, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current image using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0263] 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 filter position corresponding to the reference sample position in the current block can be determined, and the reconstructed sample value of the filter 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 filter position and the reconstructed sample value of the 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, and the second sample difference value.
[0264] That is, in the embodiments of the present application, the second sample difference value can be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the reference sample position for each filter position, and then the second sample difference value is taken as the input of the filter.
[0265] Exemplarily, in some embodiments, assuming that the current image corresponds to one inter-frame reference image, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current image using 13 filter coefficients and 7x7 symmetric filter is as follows:
[0266] Further, in the embodiments of the present application, when filtering based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameters, the filtered reconstructed value of the current block is determined as follows: 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, 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 shift coefficients, the filter coefficients, 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.
[0267] It can be understood that, in the embodiments of the present application, for the bi-directional 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 image corresponds to two inter-frame reference images, and thus 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, and then the reconstructed sample value of the current sample position and the reconstructed sample values of the two reference sample positions are input into the TALF filter, combined with the determined filter coefficients and shift coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value of the current sample position, and the above scheme is used to traverse any sample position of the current block to complete filtering on the current block and obtain the filtered reconstructed value of the current block.
[0268] Exemplarily, in some embodiments, assuming that the current image corresponds to two inter-frame reference images, the process of filtering the sample value at the (x, y) position (the current sample position) in the current image using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0269] wherein rec' (x,y) is the reconstructed sample value at the (x, y) position after time-domain adaptive filter correction, 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 image and the second inter-frame reference image respectively. and are the reconstructed sample values at the (x-u i , y-u i ) and (x+u i , y+u iReconstructed sample values on ) and It is in the second inter-frame reference image (xu) i ,yu i ) and (x+u i y+u i The reconstructed sample values on the time domain are c, which are the coefficients of the time-domain adaptive filter.
[0270] Furthermore, in the embodiments of this application, when determining the filtered reconstructed sample value of the current sample position based on 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, a third sample difference can be determined based on the reconstructed sample value of the current sample position and the reconstructed sample value of the first reference sample position; a fourth sample difference can be determined based on 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 based on the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, the third sample difference, and the fourth sample difference.
[0271] In other words, in the embodiments of this application, it is also possible to first determine the third sample difference and the fourth sample difference based on the reconstructed sample value at the current sample position and the reconstructed sample values at the two reference sample positions, and then use the third sample difference and the fourth sample difference as the input of the filter.
[0272] For example, in some embodiments, assuming that the current image corresponds to two inter-frame reference images, the process of filtering the sample value at coordinate (x, y) (the current sample position) in the current image using two 5x5 symmetrical filters with 7 filter coefficients is as follows:
[0273] For example, in some embodiments, based on the filtering process of formula (5), the filtering calculation at each position is as follows:
[0274] When numCoeff is 14:
[0275] Where shift is the shift value calculated based on the extracted talf_shift_minus5, BitDepth is the bit depth of the luminance component, and x and y represent the horizontal and vertical coordinates of the reconstructed image array.
[0276] 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: the filtering position corresponding to the reference sample position in the current block is determined according to the reconstructed value of the current block; the reconstructed sample value of the filtering position is determined according to the reconstructed value of the current block; the 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; the 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.
[0277] 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.
[0278] Exemplarily, in some embodiments, assuming that the current image corresponds to two inter-frame reference images, the process of filtering the sample value of the position (x, y) (current sample position) in the current image using 7 filter coefficients and 2 filters with 5x5 symmetry is as follows:
[0279] 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 process, if the adaptive filter does not have the symmetry of the above example, the adaptive filter coefficient and the input value corresponding to each coefficient should also be adjusted accordingly. That is, the filtering process should be a process in which the adaptive filter coefficient and the reconstructed value of the reference image at each relevant position act together.
[0280] 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.
[0281] 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 kind of image component of the current block. Wherein, the reconstructed value of the current block can be obtained after the current block in the current image is processed based on any kind of loop filtering method.
[0282] That is to say, 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, that is, the position of the temporal adaptive loop filtering can be at any position in the loop filtering.
[0283] 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.
[0284] 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, that is, the position of the TALF in the loop filtering can be parallel to the SAO.
[0285] 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.
[0286] 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.
[0287] 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, that is, the position of the TALF in the loop filtering can be after the Deblocking.
[0288] 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, that is, the position of the TALF in the loop filtering can be after the SAO.
[0289] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of an implementation example 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.
[0290] 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 decoded image and the reconstructed value on the reconstructed image of any loop in the current loop filtering.
[0291] 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.
[0292] 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.
[0293] 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.
[0294] 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 shape, cross shape, rectangle and square.
[0295] Exemplarily, in some embodiments, FIG. 18 is a schematic diagram of a filter according to the embodiments of the present application, as shown in FIG. 18, a 5x5 symmetric filter includes 7 filter coefficients.
[0296] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram of a filter according to the embodiments of the present application, as shown in FIG. 19, a 7x7 symmetric filter includes 13 filter coefficients.
[0297] 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.
[0298] 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.
[0299] 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.
[0300] 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.
[0301] 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.
[0302] Of course, the filter can also be asymmetric, which means that each filter input position has different coefficient values.
[0303] 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.
[0304] 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 containing 13 filter coefficients can be selected.
[0305] 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 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 as shown in FIG. 24 can be selected, which are used for the reconstructed value in the two reference images as input respectively.
[0306] It can be understood that the decoding method proposed in the embodiments 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 filtering the current image by extracting information from the reconstructed sample of the reconstructed image through the TALF filter.
[0307] It can be understood that the decoding method proposed in the embodiments of the present application can use pre-defined filter coefficients of the filter in the time domain or pass the filter coefficients through a code stream.
[0308] It can be understood that the decoding method proposed in the embodiments of the present application can propose different filtering modes according to different encoding configurations. In the RA configuration, the filtering mode can be divided into a forward filtering mode, a reverse filtering mode and a bidirectional filtering mode. In the LD configuration, the filtering mode can be divided into a first forward filtering mode, a second forward filtering mode and a third forward filtering mode.
[0309] It can be understood that the decoding method proposed in the embodiments of the present application can use the TALF for the luminance component or use the TALF for the chrominance component.
[0310] It can be understood that the decoding method proposed in the embodiments of the present application can use any level of switch identification of the TALF, such as using the image as a unit to switch the TALF, using the CTU as a unit to switch the TALF, using the CU as a unit to switch the TALF, or using other ways of dividing the image into sub-regions to switch the TALF.
[0311] 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 decide whether to perform the TALF filtering on the entire image through the image-level identifier. At this time, the current image corresponds to only one candidate filter.
[0312] The embodiments of the present application provide a decoding method, which introduces the variable-order exponential Golomb to code and decode the filter coefficients through the transmission of the order identifier information. Meanwhile, the variable shift value is introduced in the filtering process through the transmission of the shift identifier information, so that better adaptability is obtained in the TALF filtering, and the filtering effect of the time domain adaptive loop filter is further improved.
[0313] An embodiment of the present application proposes an encoding method, which is applied to an encoder and used in a scenario of performing filtering processing through a TALF filter. FIG. 27 is a schematic diagram of the encoding method proposed in the embodiments of the present application. As shown in FIG. 27, the method of the encoder for performing the encoding processing can include the following steps:
[0314] Step 2001, when filtering the current image using TALF, determining the generation value corresponding to the candidate order, determining the order identification information according to the generation value corresponding to the candidate order, and writing the order identification information into the code stream.
[0315] Step 2002, when filtering the current image using TALF, determining the generation value corresponding to the candidate shift parameter, determining the shift identification information according to the generation value corresponding to the candidate shift parameter, and writing the shift identification information into the code stream.
[0316] In the embodiment of the present application, if the current image is filtered using TALF, the generation value corresponding to the candidate order can be determined first, the order identification information is determined according to the generation value corresponding to the candidate order, and the order identification information is written into the code stream.
[0317] It should be noted that in the embodiment of the present application, the order identification information can be used to determine the exponential Golomb order. The exponential Golomb order can be used for the coding and decoding of the filter coefficient, for example, the exponential Golomb order is used for coding and decoding the coefficient value parameter corresponding to the filter coefficient.
[0318] Further, in the embodiment of the present application, the exponential Golomb order of the coded filter coefficient can be determined by the value of the order identification information. The value of the order identification information can be in the form of a parameter or in the form of a number, which is not limited in the present application.
[0319] It should be noted that in the embodiment of the present application, the order identification information can be an image-level flag or a slice-level flag. In general, the order identification information can be a parameter written in the Slice header or the picture header, which is not limited herein.
[0320] Further, in the embodiment of the present application, the order identification information can correspond to one filter, or can correspond to an image level, a slice level, a block level, a sequence level, etc. That is, in addition to transmitting an order for each filter, in some embodiments, the order can also be transmitted in units of images, sequences, etc., which means that the same order exponential Golomb code is used for the coded time domain filter coefficient in one image or the same order exponential Golomb code is used for the same sequence.
[0321] Further, in the embodiment of the present application, the candidate order can be traversed, and the generation value corresponding to each candidate order can be calculated respectively, so that the best candidate order can be further determined according to the generation value, and the order identification information can be set and transmitted.
[0322] It can be understood that in the embodiments of the present application, the candidate orders can include one or more exponential Golomb orders. For example, the candidate orders can include 0, 1, …, M orders, a total of M+1 orders, where M is an integer greater than or equal to 0.
[0323] Further, in the embodiments of the present application, when the order identification information is determined according to the generation value corresponding to the candidate order, the minimum generation value in the generation value corresponding to the candidate order can be determined first; then the candidate order corresponding to the minimum generation value is determined as the optimal exponential Golomb order; finally, the order identification information can be determined according to the optimal exponential Golomb order.
[0324] That is, in the embodiments of the present application, by setting the order identification information, a variable order Golomb code can be introduced to encode and decode the filter coefficients. For example, a best order can be selected from 0, 1, …, M orders, and the best order is transmitted through the code stream, so that the filter coefficient coding can use the optimal exponential Golomb order.
[0325] Exemplarily, in some embodiments, if the exponential Golomb order is determined to be 1, the value of the order identification information can be set to 1; if the exponential Golomb order is determined to be 0, the value of the order identification information can be set to 0; if the exponential Golomb order is determined to be M, the value of the order identification information can be set to M.
[0326] Exemplarily, in some embodiments, assuming that the order identification information is a slice-level flag, the order identification information can be represented by a syntax element talf_k_order[sfIdx], that is, talf_k_order[sfIdx] indicates the exponential Golomb order of the filter coefficients of the sfIdx-th group of filters. If the value of talf_k_order[sfIdx] is 0, it can be determined that the exponential Golomb order of the filter coefficients of the sfIdx-th group of filters is 0, and if the value of talf_k_order[sfIdx] is 1, it can be determined that the exponential Golomb order of the filter coefficients of the sfIdx-th group of filters is 1.
[0327] Of course, the value of talf_k_order[sfIdx] is not limited to 0 and 1, and the present application does not make specific limitations.
[0328] In the embodiments of the present application, if TALF is used to filter the current image, the generation value corresponding to the candidate shift parameter can be determined first, then the shift identification information is determined according to the generation value corresponding to the candidate shift parameter, and the shift identification information is written into the code stream.
[0329] Further, in the embodiments of the present application, when the shift identification information is determined according to the generation value corresponding to the candidate shift parameter, the minimum generation value in the generation values corresponding to the candidate shift parameters can be determined first; then the candidate shift parameter corresponding to the minimum generation value is determined as the optimal shift parameter; then the variable precision can be determined according to the optimal shift parameter and a preset value; finally, the shift identification information can be determined according to the variable precision.
[0330] It can be understood that in the embodiments of the present application, the candidate shift parameters can be traversed, and the generation value corresponding to each candidate shift parameter can be calculated respectively, so that the optimal shift parameter can be further determined according to the generation value, and the setting and transmission of the shift identification information can be performed.
[0331] It can be understood that in the embodiments of the present application, the candidate shift parameter can include one or more shift values shift, which is not limited in the present application.
[0332] It should be noted that in the embodiments of the present application, the shift identification information can be used to determine the shift parameter, that is, the shift identification information can determine the shift value shift in the filtering process. The shift parameter is the shift value shift, which can be determined by the variable precision in the filtering process of the current image (or current slice), and the value of the shift identification information can represent the variable precision.
[0333] It can be understood that in the embodiments of the present application, compared with the fixed shift value shift, the variable shift value is introduced by the shift identification information, and a variable shift value is transmitted through the code stream, so that the filter coefficient can realize better adaptability. A larger shift value makes the range of filter coefficient large, the filtering effect good, and the code word more; a smaller shift value can make the range of filter coefficient small, the filtering effect poor, and the code word less.
[0334] Further, in the embodiments of the present application, the shift identification information can correspond to one filter, or can correspond to an image level, a slice level, a block level, a sequence level, etc. That is, in addition to transmitting a variable shift for each filter, in some embodiments, the shift can also be transmitted in units of image, sequence, etc., that is, the transmitted shift value can be one for each time domain filter, one for each image, or one for each sequence.
[0335] Further, in the embodiments of the present application, the shift value shift in the filtering process can be determined by the value of the shift identification information. The value of the shift identification information can be in the form of a parameter or in the form of a number, which is not limited in the present application.
[0336] It should be noted that in the embodiments of the present application, the shift identification information can be a picture-level flag or a slice-level flag. In general, the shift identification information can be a parameter written in a slice header or a picture header, which is not limited herein.
[0337] For example, in some embodiments, assuming that the shift identification information is a slice-level flag, the shift identification information can be represented by a syntax element talf_shift_minus5, for example, the value of talf_shift_minus5 is the shift value used in the filtering process of the current slice minus 5. Wherein, talf_shift_minus5 can be represented by a fixed-length code with a length of 2 bins, and the value is 0, 1, 2 or 3.
[0338] Of course, the value of the shift identification information can also represent the shift value used in the filtering process minus an arbitrary integer greater than 0, and is not limited to 5.
[0339] For example, in some embodiments, the slice header syntax element is as follows:
[0340] Wherein, talf_shift_minus5 represents the variable precision used by one or more time domain loop filters for coding the current slice, and its meaning is that the shift value used in the filtering is minus 5. This syntax element is represented by 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, its value is 0.
[0341] talf_k_order[sfIdx] represents the exponential Golomb order used by the absolute value of the coding coefficient of the sfIdx-th filter of the current slice, and its value is 0 or 1, 0 represents that the 0-order exponential Golomb code is used; 1 represents that the 1-order exponential Golomb code is used. When the syntax element does not exist in the code stream, its value is 0.
[0342] It should be noted that in the embodiments of the present application, the value of the rate can be calculated in any way, including but not limited to the rate-distortion optimization (RDO) algorithm.
[0343] Step 2003, determining at least one inter-frame reference image corresponding to the current image, determining the filter coefficient and the shift parameter.
[0344] In the embodiments of the present application, at least one inter-frame reference image corresponding to the current image can be further determined, and the filter coefficient and the shift parameter are determined.
[0345] It can be understood that, in the embodiments of the present application, after the optimal exponential Golomb order is determined based on the generation value corresponding to the candidate order, the optimal exponential Golomb order can be used to code and decode the filter coefficient.
[0346] It can be understood that, in the embodiments of the present application, after the optimal shift parameter is determined based on the generation value corresponding to the candidate shift, the optimal shift parameter can be coded and decoded to determine the shift parameter used in the filtering process.
[0347] Further, in the embodiments of the present application, at least one inter-frame reference image corresponding to the current image and the filter coefficient corresponding to the current block can be determined first.
[0348] It can be understood that, in the embodiments of the present application, at least one inter-frame reference image corresponding to the current image and the filter coefficient corresponding to the current block can be determined respectively under the current configuration and each candidate mode corresponding to the current configuration.
[0349] 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 the current image, and the at least one inter-frame reference image can be a temporally coded reconstructed image. Wherein, the TALF filtering of the current block in the current image can be completed using the reconstructed sample value of the at least one inter-frame reference image.
[0350] 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, and the present application does not limit the size and the obtaining manner of the current block in the current image.
[0351] Further, in the embodiments of the present application, when determining at least one inter-frame reference image corresponding to the current image and the filter coefficient corresponding to the current block, the candidate mode can be determined according to the current configuration first; then under 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 coefficient corresponding to the current block is determined based on the candidate filter corresponding to the current block.
[0352] 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 an RA configuration, the candidate mode is determined as a first candidate mode; wherein the first candidate mode comprises one or more of a forward filtering mode, a backward filtering mode and a bidirectional filtering mode; in the case that the current configuration is an LD configuration, the candidate mode is determined as a second candidate mode; wherein the second candidate mode comprises one or more of a first forward filtering mode, a second forward filtering mode and a third forward filtering mode.
[0353] It can be understood that, in the embodiments of the present application, for the RA configuration, the corresponding first candidate mode can comprise one or more of a forward filtering mode, a backward filtering mode and a bidirectional filtering mode. Wherein the forward filtering mode can be understood as using the reconstruction information of the reconstructed image smaller than the POC of the current image as the input of the filter, the backward filtering mode can be understood as using the reconstruction 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 reconstruction information of the reconstructed image smaller than the POC of the current image and the reconstruction information of the reconstructed image larger than the POC of the current image as the input of the filter.
[0354] It can be understood that, in the embodiments of the present application, for the LD configuration, the corresponding second candidate mode can comprise one or more of a first forward filtering mode, a second forward filtering mode and a 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.
[0355] 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.
[0356] 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.
[0357] Exemplarily, in some embodiments, if the POC value of the current image is N, for the RA configuration, if the determined filter mode is the forward filter mode, the image with POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the backward filter mode, the image with POC value of N+1 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the bidirectional filter mode, the images with POC values of N-1 and N+1 can be selected as the inter-frame reference images of the current image.
[0358] Exemplarily, in some embodiments, if the POC value of the current image is N, for the LD configuration, the images with 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 filter mode is the first forward filter mode, the image with POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the second forward filter mode, the image with POC value of N-2 can be selected as the inter-frame reference image of the current image; if the determined filter mode is the third forward filter mode, the images with POC values of N-1 and N-2 can be selected as the inter-frame reference images of the current image.
[0359] That is, in the embodiments of the present application, the POC values of the determined inter-frame reference images can be different based on different filter modes, 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), 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.
[0360] Therefore, 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 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 image, the reference image with a smaller POC value than the current image 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 image, the reference frame with a larger or smaller POC value than the current frame can be used as the input of the filter.
[0361] 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.
[0362] 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.
[0363] 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.
[0364] 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.
[0365] 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.
[0366] 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.
[0367] 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:
[0368] 1. In the RA configuration, the reference image with the closest temporal distance and smaller POC than the current image is used as the input of the temporal filtering;
[0369] 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 temporal filtering corresponding to the first forward filtering mode;
[0370] 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 temporal filtering corresponding to the second forward filtering mode;
[0371] 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 temporal filtering corresponding to the third forward filtering mode.
[0372] It can be understood that in the embodiments of the present application, in the case of being configured as an RA configuration or an LD configuration according to the coding configuration, the mode allowed to be used by the TALF can be determined by traversing each candidate mode. Among them, 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 filter (forward filter mode) is mode 1, the backward filter (backward filter mode) is mode 2, and the bidirectional filter (bidirectional filter mode) is mode 3; for the LD configuration, in the corresponding second candidate mode, using the reference image POC N-1 as the TALF filter input (first forward filter mode) is mode 1, using the reference image POC N-2 as the TALF filter input (second forward filter mode) is mode 2, and using the reference images POC N-1 and N-2 as the TALF filter input (third forward filter mode) is mode 3.
[0373] 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.
[0374] It can be understood that in the embodiments of the present application, each filter mode (candidate mode) can be traversed, and the Wiener-Hopf equation can be constructed using the current image reconstruction value in the corresponding mode, the reconstruction 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. Among them, 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, that is, the filter coefficients corresponding to the current block can include the filter coefficients of each set of candidate filters.
[0375] Step 2004, filtering based on the reconstructed samples of at least one inter-frame reference image, the filter coefficients and the shift parameters to determine the filtered reconstruction value of the current block.
[0376] In the embodiments of the present application, after determining to use TALF for filtering and determining at least one inter-frame reference image corresponding to the current image, filter coefficients and shift parameters, the filtered reconstruction value of the current block can be further determined based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameters.
[0377] It can be understood that in the embodiments of the present application, since 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, therefore, when performing TALF filtering on the current block of the current image, the filtering process performed corresponding to different numbers of inter-frame reference images is also different.
[0378] Further, in the embodiments of the present application, when filtering based on the reconstructed samples of the at least one inter-frame reference picture, the filter coefficients and the shift parameters, the filtered reconstructed value of the current block is determined, 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, 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 picture; the filtered reconstructed sample value of the current sample position is determined according to the shift coefficients, the filter coefficients, 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.
[0379] 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 picture corresponds to one inter-frame reference picture, and when performing TALF filtering on the reconstructed value of the current block 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 respectively input into the TALF filter, combined with the determined filter coefficients and shift coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value of the current sample position, and the above scheme is used to traverse any sample position of the current block to complete filtering on the current block and obtain the filtered reconstructed value of the current block.
[0380] In some embodiments, assuming that the current picture corresponds to one inter-frame reference picture, the process of filtering the sample value at the (x, y) position (the current sample position) in the current picture using 13 filter coefficients and a 7x7 symmetric filter is as shown in formula (1).
[0381] Further, in the embodiments of the present application, when determining the filtered reconstructed sample value of the current sample position 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, 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 coefficients corresponding to the current block, the reconstructed sample value of the current sample position and the first sample difference value.
[0382] 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.
[0383] Exemplarily, in some embodiments, assuming that there is one inter- 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 formula (2).
[0384] Further, in the embodiments of the present application, when determining the filtered reconstructed sample value at the current sample position according to the filter coefficients 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 filtering position corresponding to the reference sample position in the current block can be determined, and the reconstructed sample value at 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 at the filtering position and the reconstructed sample value at the reference sample position; and the filtered reconstructed sample value at the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value at the current sample position, and the second sample difference value.
[0385] 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 at the filtering position and the reconstructed sample value at the reference sample position, and then the second sample difference value is taken as the input of the filter.
[0386] Exemplarily, in some embodiments, assuming that there is one inter- 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 formula (3).
[0387] Further, in the embodiments of the present application, when determining the filtered reconstructed value of the current block by filtering based on the reconstructed samples of the at least one inter-reference picture, the filter coefficients, and the shift parameter, for the current sample position in the current block, the reconstructed sample value at the current sample position is determined according to the reconstructed value of the current block, the reconstructed sample value at the first reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the first inter-reference picture, and the reconstructed sample value at the second reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the second inter-reference picture; the filtered reconstructed sample value at the current sample position is determined according to the shift coefficient, the filter coefficients, 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 the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value at the current sample position.
[0388] 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 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 and shift coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position. 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] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the filtering process of the sample value at the (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetric 2 filters is as formula (4).
[0390] 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.
[0391] 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 are used as the input of the filter.
[0392] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the filtering process of the sample value at the (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetric 2 filters is as formula (5).
[0393] Exemplarily, in some embodiments, based on the filtering process of formula (5), the filtering calculation of each position is as follows:
[0394] numCoeff is 14:
[0395] wherein shift is a shift value calculated according to talf_shift_minus5, BitDepth is a bit depth of the luma component, and x and y represent horizontal and vertical coordinates of the reconstructed image array.
[0396] 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 filtering position corresponding to the reference sample position in the current block can be determined, and the reconstructed sample value of the filtering position is determined according to the reconstructed value of the current block; the 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; the 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 coefficients 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.
[0397] 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.
[0398] Exemplarily, in some embodiments, assuming that the current image corresponds to two inter-frame reference images, at this time, the process of filtering the sample value of the position (x, y) (the current sample position) in the current image using 7 filter coefficients and 2 filters with 5x5 symmetry is as shown in formula (6).
[0399] 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 relevant position act together.
[0400] 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.
[0401] Further, in the embodiments of the present application, for the TALF filter, in addition to the at least one inter-frame 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 of the image components 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.
[0402] That is to say, in the embodiments of the present application, the determination manner 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.
[0403] 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 picture of the current picture before the ALF filtering and the reconstructed picture decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the ALF.
[0404] 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 picture of the current picture after the Deblocking and the reconstructed picture decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the SAO.
[0405] 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.
[0406] 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.
[0407] 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 picture of the current picture after the Deblocking and the reconstructed picture decoded in the time domain, that is, the position of the TALF in the loop filtering can be after the Deblocking.
[0408] Exemplarily, in some embodiments, FIG. 16 is a schematic diagram of an 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 the decoded reconstructed image in the time domain and SAO, i.e., the position of TALF in the loop filtering can be after SAO.
[0409] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of an 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 the decoded reconstructed image in the time domain and ALF, i.e., the position of TALF in the loop filtering can be after ALF.
[0410] Therefore, in some embodiments, TALF can be placed at any position in the series of loop filters, which means that the input of TALF includes the reconstructed value on the reconstructed image of the current image after any step in the current loop filtering.
[0411] Further, in the embodiments of the present application, the reconstructed value of the current block can be the reconstructed value of the luma component of the current block, or the reconstructed value of the chroma component of the current block, which is not limited specifically in the present application.
[0412] That is to say, in the embodiments of the present application, TALF filtering can be applied to any image component of the current image.
[0413] It should be noted that, in the embodiments of the present application, the image components of the current image in the video image can include a first image component, a second image component and a third image component. The three image components are a luma component, a blue color component and a red color component respectively. Specifically, the luma component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V. In this way, the video image can be represented in YCbCr format or YUV format.
[0414] 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 limited specifically, i.e., any shape and size of 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 shape, cross shape, rectangle and square.
[0415] 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 includes 7 filter coefficients.
[0416] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram II of a filter according to an embodiment of the present application, as shown in FIG. 19, a 7x7 symmetric filter, containing 13 filter coefficients.
[0417] Exemplarily, in some embodiments, FIG. 20 is a schematic diagram III of a filter according to an embodiment of the present application, as shown in FIG. 20, a 9x9 symmetric filter, containing 21 filter coefficients.
[0418] 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.
[0419] Exemplarily, in some embodiments, FIG. 21 is a schematic diagram IV of a filter according to an embodiment of the present application, as shown in FIG. 21, a 5x5 symmetric filter, containing 4 filter coefficients.
[0420] Exemplarily, in some embodiments, FIG. 22 is a schematic diagram V of a filter according to an embodiment of the present application, as shown in FIG. 22, a 7x7 symmetric filter, containing 6 filter coefficients.
[0421] 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.
[0422] Of course, the filter can also be asymmetric, which means that each filter input position has different coefficient values.
[0423] Exemplarily, in some embodiments, FIG. 23 is a schematic diagram VI of a filter according to an embodiment of the present application, as shown in FIG. 23, a 5x5 asymmetric filter, containing 13 filter coefficients.
[0424] 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.
[0425] 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 are used, and a total of 14 filter coefficients are included. For bidirectional filtering under RA configuration and forward filtering using the reconstructed values in the reference pictures with POC N-1 and N-2 as input under LD configuration, two filters as shown in FIG. 24 can be selected, which are respectively used for the reconstructed values in the two reference pictures as input.
[0426] Further, in an embodiment of the present application, after filtering the current block 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 values of the current block, a first generation value can be further determined according to the filtered reconstructed values of the current block, and a first syntax element identification information is determined based on the first generation value, and the first syntax element identification information is written into a bitstream; wherein the first syntax element identification information is used to determine whether the current block is filtered using TALF.
[0427] Further, in an embodiment of the present application, when the first generation value is determined according to the filtered reconstructed values of the current block, in each candidate mode, a second generation value of the filter coefficients corresponding to the current block is determined according to the filtered reconstructed values of the current block; and the smallest second generation value is determined as the first generation value corresponding to the case that the current block is filtered using TALF.
[0428] It can be understood that in an embodiment of the present application, each candidate filter can be traversed in each candidate mode, and a second generation value corresponding to the case that the current block is filtered using the filter coefficients corresponding to the current block is determined respectively, wherein the method for calculating the generation value includes but is not limited to rate-distortion optimization algorithm.
[0429] Correspondingly, in an embodiment of the present application, in each candidate mode, a plurality of second generation values can be calculated by traversing the candidate filters and a plurality of possible combinations of filter coefficients, and then the smallest generation value in the plurality of second generation values is determined as the first generation value corresponding to the case that the current block is filtered using TALF in the candidate mode.
[0430] Further, in an embodiment of the present application, when the first syntax element identification information is determined based on the first generation value, a third generation value corresponding to the case that the current block is not filtered 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 is not filtered using TALF; 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 is filtered using TALF.
[0431] It can be understood that in the embodiments of the present application, the optimal filter set number in each mode, whether each CTU uses TALF and which set of TALF filters is calculated by rate-distortion optimization when determining whether each CTU opens TALF filtering according to 1-4 respectively.
[0432] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether the current block in the current image is filtered by TALF, that is, 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 by the TALF filter.
[0433] Further, in the embodiments of the present application, the first syntax element identification information can be used to determine whether the current block is filtered by TALF. The first syntax element identification information can be a flag, wherein if the current block is a CTU corresponding to the current image, the first syntax element identification information can be a CTU-level flag, and if the current block is a CU corresponding to the current image, the first syntax element identification information can be a CU-level flag. Of course, corresponding to any size sub-region in the current image, the first syntax element identification information can also be a flag of other block level. The present application does not make specific limitation.
[0434] Further, in the embodiments of the present application, it can be determined whether the current block is filtered by TALF through the value of the first syntax element identification information.
[0435] 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 by 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 by TALF.
[0436] 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 current block is filtered by 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.
[0437] Exemplarily, in some embodiments, if the first syntax element identification information is a block-level flag, 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 the embodiments of the present application is not limited.
[0438] Taking the first value 0 as an example, in the 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 does not use TALF for filtering. Otherwise, if the value of the first syntax element identification information is not 0, it can be determined that the current block uses TALF for filtering.
[0439] 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 identification 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 picture. 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.
[0440] Further, in the embodiments of the present application, the fourth generation value corresponding to each candidate mode when the current picture uses TALF for filtering can also be determined according to the filtered reconstructed value of the current block under each candidate mode; and the smallest fourth generation value is determined as the fifth generation value corresponding to when the current picture uses TALF for filtering.
[0441] Further, in the embodiments of the present application, the sixth generation value corresponding to when the current picture does not use TALF for filtering 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 does not use TALF for filtering; 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 uses TALF for filtering.
[0442] Further, in the embodiments of the present application, in the case where the second syntax element identification information indicates that the current picture uses TALF for filtering, the first syntax element is written into the code stream.
[0443] 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 use TALF for filtering. The second syntax element identification information can be a flag.
[0444] 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 any specific limitation.
[0445] Exemplarily, in some embodiments, if the second syntax element identification information is a slice-level flag, the second syntax element identification information can be used to determine whether the current slice is allowed to use TALF for filtering.
[0446] Further, in the embodiments of the present application, whether the current picture (and / or the current slice) is allowed to use TALF for filtering can be determined according to the value of the second syntax element identification information.
[0447] Exemplarily, 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.
[0448] It should be noted that in the embodiments of the present application, the second syntax element identification information can be used to indicate whether the current picture (and / or the current slice) uses 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.
[0449] It should also be noted that if the second syntax element identification information is a picture-level flag or a slice-level flag, 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 the embodiments of the present application are not limited.
[0450] Assuming that the second syntax element identification information is a picture-level flag, and taking the second value as 1 and the third value as 0 as an example, in the embodiments of the present application, if the value of the second syntax element identification information is 1, it 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.
[0451] 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.
[0452] 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.
[0453] 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.
[0454] 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.
[0455] 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.
[0456] 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.
[0457] 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.
[0458] 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.
[0459] 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.
[0460] 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.
[0461] Assuming that the third syntax element identification information is a sequence level flag, and taking the fourth value as 1 and the fifth value as 0 as an example, 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.
[0462] 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.
[0463] 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.
[0464] 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 image level (and / or slice level) identification can be dependent on the sequence level identification. 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.
[0465] Further, in the embodiments of the present application, the sequence level TALF identification can be dependent on the sequence level ALF identification, 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.
[0466] Further, in the embodiments of the present application, the image level (and / or slice level) identification dependent on the sequence level identification can include that the image level (and / or slice level) TALF identification dependent on the sequence level TALF identification, and can also include that the image level (and / or slice level) TALF identification dependent on the sequence level ALF identification.
[0467] 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 sequence level ALF identification.
[0468] Further, in the embodiments of the present application, the image level (and / or slice level) TALF identification can also be dependent on the image level (and / or slice level) ALF identification.
[0469] That is, in the embodiments of the present application, the coding of the second syntax element identification information can also be dependent on the image level (and / or slice level) ALF identification.
[0470] 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.
[0471] 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.
[0472] 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.
[0473] 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.
[0474] Exemplarily, in some embodiments, the filter mode corresponding to the fifth generation value and the number of groups of candidate filters 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 candidate filters; 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.
[0475] 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.
[0476] 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.
[0477] 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.
[0478] Further, in the embodiments of the present application, the TALF parameters can also be directly written into the code stream.
[0479] 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.
[0480] 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 finally determined candidate filter corresponding to the current block.
[0481] 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 group number index of the candidate filter corresponding to the current block.
[0482] 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.
[0483] 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.
[0484] 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.
[0485] It can be understood that in the coding method proposed in the embodiments of the present application, the filter coefficient of the filter in the time domain can be predefined or transmitted through the code stream.
[0486] 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.
[0487] It can be understood that the encoding method proposed in the embodiments of the present application can be used for the luminance component or the chrominance component.
[0488] It can be understood that the encoding method proposed in the embodiments of the present application can be any level of switch identification of TALF, such as switching TALF as a unit of image, switching TALF as a unit of CTU, switching TALF as a unit of CU, or switching TALF in other ways of dividing the image into sub-regions.
[0489] 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.
[0490] The embodiments of the present application provide an encoding method, which introduces variable-order exponential Golomb for coding and decoding filter coefficients through the transmission of order identification information, and introduces a variable shift value in the filtering process through the transmission of shift identification information, so that better adaptability is obtained in TALF filtering, and the filtering effect of the time domain adaptive loop filter is further improved.
[0491] 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 on the time domain as an information source to improve the adaptive loop filtering of the current frame reconstructed image. Further, variable-order exponential Golomb is introduced for coding and decoding filter coefficients through the transmission of order identification information, and a variable shift value is introduced in the filtering process through the transmission of shift identification information, so that better adaptability is obtained in TALF filtering, and the filtering effect of the time domain adaptive loop filter is further improved.
[0492] Embodiments of the present application propose a technique of using reconstructed images in the time domain to improve the quality of a current image. The encoder can obtain one or more sets of filter coefficients for improving the quality of the current reconstructed image and transmit the filter coefficients through a bitstream. The decoder uses information including but not limited to reconstructed values in the time domain as input to filter the current image by using the filter coefficients parsed.
[0493] Embodiments of the present application propose a technique of using reconstructed images in the time domain to improve the quality of a current image. The encoder can select appropriate filters and coefficients from a predefined set of filters and coefficients, and transmit syntax elements related to whether the filters and coefficients are used through a bitstream. The decoder determines the filters and coefficients by parsing the syntax elements, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0494] Embodiments of the present application propose a technique of using reconstructed images in the time domain to improve the quality of a current image. The encoder can select predefined filters and coefficients and or obtain coefficients that need to be transmitted through a bitstream, and transmit corresponding syntax elements through a bitstream. The decoder determines to use the predefined filters and coefficients by parsing the syntax elements, and or parses the filters and coefficients from the bitstream, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0495] Exemplarily, in some embodiments, a block-level identifier (first syntax element identifier information) can be used to indicate whether the current block is filtered using TALF.
[0496] Exemplarily, in some embodiments, a CTU-level identifier is used to control whether TALF is enabled. In addition, since a frame of image can have multiple TALF (candidate filters) that can be selected for use, when the CTU-level TALF identifier is true, a related identifier indicating the selected TALF filter used to filter the current CTU should also be parsed.
[0497] Exemplarily, in some embodiments, the parsing process of the first syntax element identifier information talf_ctb_idc[CtbAddrX][CtbAddrY] is as follows:
[0498] 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.
[0499] 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-level flag, or a block-level flag of another size can be used.
[0500] 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.
[0501] 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 symmetric filter with 13 coefficients is used for filtering; for TALF using two reconstructed pictures as input, 2 5x5 symmetric filters with 7 coefficients are used for filtering.
[0502] 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, and at this time, the process of filtering the sample value at the position (x, y) (the current sample position) in the current picture using a 7x7 symmetric filter with 13 filter coefficients is as follows:
[0503] 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 symmetric 2 filters is as follows:
[0504] 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.
[0505] 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).
[0506] 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.
[0507] 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.
[0508] 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 for mode 1, the reference image POC N-2 is used as the TALF filter input for mode 2, and the reference images POC N-1 and N-2 are used as the TALF filter input for mode 3 under LD.
[0509] 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.
[0510] Further, the optimal filter mode, filter set number, and CTU switch optimized by the usage 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.
[0511] 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.
[0512] After ALF filtering, the CTU selected with TALF in the current image is filtered using the corresponding filter.
[0513] 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:
[0514] The sequence identification sps_talf_enabled_flag is used to indicate whether the current sequence can use 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 TALF, and when the value of the syntax element is 0, the current sequence cannot use TALF.
[0515] 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:
[0516] 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 TALF, and when the value of the syntax element is 0, the current slice cannot use TALF.
[0517] 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, it indicates that the forward filtering is used under the RA configuration or the forward filtering performed on the first frame before the LD is used. When the value of the syntax element is 1, it indicates that the backward filtering is used under the RA configuration or the forward filtering performed on the second frame before the LD is used. When the value of the syntax element is 2, it indicates that the bidirectional filtering is used under the RA configuration or the filtering performed on the two frames before the LD is used. When the syntax element does not exist in the code stream, the value of the syntax element is 0.
[0518] 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.
[0519] 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).
[0520] 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.
[0521] 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.
[0522] 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:
[0523] 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 for filtering, when talf_ctb_idc is 2, it indicates that the second group of filters is used for filtering, and so on. When the syntax element does not exist in the code stream, the value thereof is 0.
[0524] 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.
[0525] 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.
[0526] Exemplarily, in some embodiments, the input of the filter process includes:
[0527] 1. a reconstructed luminance image array rec filtered by the luminance adaptive loop filter,
[0528] 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, and when the talf_filter_mode syntax element is 2, the two reconstructed image arrays rec0 and rec1 are used,
[0529] 3. the luminance coordinates (xCtb, yCtb) of the current luminance coding tree block in the current image,
[0530] 4. the width tAlfWidth and the height tAlfHeight of the luminance coding tree block,
[0531] 5. Coefficients of the time-domain adaptive loop filter tAlfCoeff[][]
[0532] Correspondingly, the filtering calculation for each position in the luminance coding block is as follows:
[0533] numCoeff is 14:
[0534] 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.
[0535] numCoeff is 13 and talf_filter_mode is 0:
[0536] numCoeff is 13 and talf_filter_mode is 1:
[0537] It should be noted that in the embodiments of the present application, the same image edge padding method as ALF is used to obtain the TALF input values outside the image range required in the filtering process.
[0538] Exemplarily, in some embodiments, the ALF filtering is padded at the edge of the coding tree block, and the filtering in 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.
[0539] Further, in the embodiments of the present application, for the TALF filtering process, such as the above formula (2) or formula (5), the filter coefficient c should be a floating-point number in the ideal state, and in actual consideration of the coefficient representation and hardware implementation, the actual filter coefficient often uses an integer-precision coefficient, and the actual filtering should also have a biasing and shifting operation.
[0540] When the value range of the integer coefficient is large, more code words are needed to represent the coefficient, and at the same time, the reconstructed image after filtering is closer to the original image, and the distortion is small; when the value range of the integer coefficient is small, only a small number of code words are needed to represent the coefficient, but the reconstructed image after filtering is far from the original image, and the distortion is large. The process of obtaining better compression efficiency is to obtain the best balance between the code word and the distortion, so the time-domain loop filter needs a precision that can make the rate-distortion optimal, and this precision affects how many code words are consumed by the encoding and decoding, and also affects the quality of the reconstructed image.
[0541] Exemplarily, in some embodiments, for the bidirectional filtering under RA or the filtering at the (x, y) position using two reconstructed frames as input under LD, the filtering value is calculated as follows:
[0542] wherein shift takes a fixed value of 6. In fact, we can use a variable shift value, because a large shift value makes the range of filter coefficients large, the filtering effect good, and the code word more; a small shift value can make the range of filter coefficients small, the filtering effect poor, and the code word less. By transmitting a variable shift value through the code stream, the filter coefficients have better adaptability. The transmitted shift value can be transmitted for each time domain filter, or for each image, or for each sequence.
[0543] On the other hand, in the common technology, 0-order exponential Golomb code is used to represent the absolute value of each filter coefficient during encoding and decoding. Since the variable shift value is introduced, when the shift is large, the range of the coefficient value is larger, and the use of 0-order Golomb code cannot make the code word used in the encoding and decoding of the coefficient the least. Therefore, a variable-order Golomb code can also be introduced to encode and decode the coefficient when encoding and decoding each coefficient. For example, each filter can select a best order from 0, 1, …, N, and a code stream is used to transmit an order for each filter, so that the encoding of the coefficient of each filter can use the optimal exponential Golomb order. In addition to transmitting an order for each filter, in some embodiments, the order can also be transmitted in units of images, sequences, etc., which means that the time domain filter coefficients encoded and decoded in an image use the same order of exponential Golomb code, or the same sequence uses the same order of exponential Golomb code.
[0544] Exemplarily, in some embodiments, after parsing the slice header syntax element, the order identification information talf_k_order[sfIdx] and the shift identification information talf_shift_minus5 can be determined. Wherein talf_shift_minus5 represents the variable precision used by one or more time domain loop filters of the current slice for encoding and decoding, and its meaning is that the shift value used in filtering is reduced by 5. This syntax element is represented by a fixed-length code with a length of 2 bins in the present scheme, and takes values of 0, 1, 2 or 3. When the syntax element does not exist in the code stream, its value is 0. talf_k_order[sfIdx] represents the exponential Golomb order used when encoding and decoding the absolute value of the sfIdxth filter of the current slice, and its value is 0 or 1. When the value is 0, it means that 0-order exponential Golomb code is used; when the value is 1, it means that 1-order exponential Golomb code is used. When the syntax element does not exist in the code stream, its value is 0.
[0545] Exemplarily, in some embodiments, the shift value used in the further reconstruction is talf_shift_minus5+5, where the shift value for the current slice is obtained as follows: shift = talf_shift_minus5 + 5.
[0546] Exemplarily, in some embodiments, the TALF filtering is applied when the talf_ctb_idc of the current luma coding tree block is non-zero. The input of the filtering process includes:
[0547] 1. a reconstructed luma picture array rec,
[0548] 2. a corresponding temporal reconstructed luma picture array, for example, when the talf_filter_mode syntax element is 0, the forward nearest one frame temporal reconstructed picture rec0 is used in the RA configuration or the first frame reconstructed picture rec1 is used in the LD; when the talf_filter_mode syntax element is 1, the backward nearest one frame temporal reconstructed picture rec1 is used in the RA configuration or the first frame reconstructed picture rec0 is used in the LD; when the talf_filter_mode syntax element is 2, both of the reconstructed picture arrays rec0 and rec1 are used,
[0549] 3. the luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0550] 4. the width tAlfWidth and the height tAlfHeight of the luma coding tree block,
[0551] 5. the coefficients tAlfCoeff[][] of the temporal adaptive loop filter,
[0552] The filtering calculation for each position in the luma coding tree block is as follows:
[0553] numCoeff is 14:
[0554] where shift is the shift value calculated according to talf_shift_minus5, BitDepth is the bit depth of the luma component, and x and y represent the horizontal and vertical coordinates of the reconstructed picture array.
[0555] numCoeff is 13 and talf_filter_mode is 0:
[0556] numCoeff is 13 and talf_filter_mode is 1:
[0557] In the filtering process, the scheme uses the same image edge padding method as ALF to obtain the TALF input value outside the image range.
[0558] In some embodiments, the ALF filtering is edge padded 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, the TALF can also be edge padded in units of coding tree blocks.
[0559] 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, the filter coefficients are coded by introducing a variable-order exponential Golomb through the transmission of order identification information. Meanwhile, a variable shift value is introduced in the filtering process through the transmission of shift identification information, so that better adaptability is obtained in the TALF filtering, and the filtering effect of the time domain adaptive loop filtering is further improved.
[0560] 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 time domain adaptive loop filter of multiplexing historical decoding can be selected, on the other hand, the nonlinear time domain adaptive loop filter can be selected, 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. Therefore, the coding and decoding performance can be improved to the greatest extent.
[0561] In the following, the TALF filtering scheme proposed by the embodiment of the present application and the related scheme based on TALF are exemplarily described.
[0562] Exemplarily, 7x7 symmetric filters and 2 5x5 symmetric filters can be selected, but the present application is not limited thereto. For the TALF using one reconstructed image input, 1 7x7, 13 coefficient symmetric filter is used for filtering. For the TALF using two reconstructed image inputs, 2 5x5, 7 coefficient symmetric filters are used for filtering.
[0563] Exemplarily, the filter related parameters can be coded and decoded at the slice header, but the present application is not limited thereto.
[0564] Exemplarily, the TALF technology can be selected for 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 an auxiliary to improve the reconstruction quality of the current chrominance image, but the present application is not limited in this way.
[0565] In an embodiment, in the TALF filtering process, the historical decoded time domain adaptive loop filter can be selected to be multiplexed, while using a non-linear time domain adaptive loop filter, and introducing the adaptive precision of the time domain loop filter. Among them, one slice (strip) can use at most four time domain adaptive loop filters, and the TALF can be located after the ALF for loop filtering.
[0566] The slice header syntax elements are parsed as follows:
[0567] 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:
[0568] 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 an image should have the same NAL type.
[0569] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0570] pcSlice->isInterGDR(): This condition indicates whether it is GDR, as the name implies.
[0571] The tAlfParamPool.clear() operation indicates that the FIFO of the historical time domain filter is emptied.
[0572] The talf_reuse_flag syntax element is an identifier indicating whether the current slice is coded by reusing the historical time domain loop filter. This identifier is 1 to indicate that the historical time domain loop filter is reused, and 0 to indicate that the historical time domain loop filter is not reused. When the identifier does not exist in the code stream, its value is 0.
[0573] The talf_reuse_index syntax element is an index indicating that the current slice reuses the historical time domain loop filter FIFO. 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, its value is 0.
[0574] talf_shift_minus5 specifies the variable precision used by one or more of the temporal loop filters of the current slice, with the meaning that the shift value used in the filter is reduced by 5. This syntax element is coded using a fixed length code with a bin length of 2, and can take the values 0, 1, 2 or 3. When the syntax element is not present in the bitstream, its value is 0.
[0575] 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 can take the values 0 or 1, with 0 meaning that the 0th order exponential Golomb is used, and 1 meaning that the 1st order exponential Golomb is used. When the syntax element is not present in the bitstream, its value is 0.
[0576] tAlfParamPool[talf_filter_mode][0].shift = talf_shift_minus5 + 5 specifies that the parsed talf_shift_minus5 is restored to a shift value and updated at the head of the FIFO of the history-based temporal loop filter.
[0577] talf_clip_flag[sfIdx] specifies whether or not the sfldx-th history-based temporal loop filter of the current slice uses a non-linearity. It can take the values 0 or 1, with 1 meaning that the sfldx-th history-based temporal loop filter uses a non-linearity, and 0 meaning that it does not. When the syntax element is not present in the bitstream, its value is 0.
[0578] talf_clip_idx[sfIdx][j] specifies the index of the non-linearity used by the j-th coefficient of the sfldx-th history-based temporal loop filter of the current slice. It can take the values 0, 1, 2 or 3, with 0 meaning that the input to the j-th coefficient of the sfldx-th history-based temporal loop filter does not use a non-linearity, and 1, 2 or 3 meaning that the j-th coefficient uses the non-linearity corresponding to the index. 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.
[0579] tAlfParamPool[talf_filter_mode][0].clipIdx[sfIdx][j] = talf_clip_idx[sfIdx][j] specifies that the parsed talf_clip_idx value is assigned to the FIFO of the corresponding history-based temporal loop filter.
[0580] 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.
[0581] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0582] The process of obtaining the non-linear clipping value tAlfClip of the current slice is as follows:
[0583] A non-linear clipping value table is constructed according to the pixel depth inputBitdepth of the luma component.
[0584] The non-linear clipping value of each filter coefficient of the current slice is obtained.
[0585] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0586] shift = talf shift minus5 + 5
[0587] 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.
[0588] The process of obtaining the filter coefficient tAlfCoeff of the current slice is as follows:
[0589] The process of obtaining the non-linear clipping value tAlfClip of the current slice is as follows:
[0590] A non-linear clipping value table is constructed according to the pixel depth inputBitdepth of the luma component.
[0591] The non-linear clipping value of each filter coefficient of the current slice is obtained.
[0592] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0593] shift = tAlfParamPool[talf_filter_mode][talf_reuse_idx].shift
[0594] Further, when TALF filtering is applied to the luma Coded Tree Block, the talf_ctb_idc flag of the current luma Coded Tree Block is set to non-zero, which means that TALF filtering is needed.
[0595] The input of the filter process includes:
[0596] 1. a reconstructed luma picture array rec filtered by luma adaptive loop filter,
[0597] 2. a corresponding temporal reconstructed luma picture array, for example, the talf_filter_mode syntax element is 0, the forward nearest one frame temporal reconstructed picture is used in RA configuration or the first frame reconstructed picture recO is used in LD; is 1, the backward nearest one frame temporal reconstructed picture is used in RA configuration or the first frame reconstructed picture rec1 is used in LD; is 2, two reconstructed picture arrays recO and rec1 are used,
[0598] 3. the luma coordinates (xCtb, yCtb) of the current luma Coded Tree Block in the current picture,
[0599] 4. the width tAlfWidth and height tAlfHeight of the luma Coded Tree Block,
[0600] 5. the coefficients tAlfCoeff of the temporal adaptive loop filter,
[0601] 6. the non-linear clipping value tAlfClip of the temporal adaptive loop filter,
[0602] 7. the shift value shift of the temporal adaptive loop filter.
[0603] The filter calculation for each position in the luma Coded Tree Block is as follows:
[0604] numCoeff is 14:
[0605] BitDepth is the bit depth of the luma component, x and y represent the horizontal and vertical coordinates of the reconstructed picture array.
[0606] K(a, b) = min(b, max(-b, a))
[0607] numCoeff is 13 and talf_filter_mode is 0:
[0608] numCoeff is 13 and talf_filter_mode is 1:
[0609] In the filtering process, the same image edge padding method as ALF is used to obtain the TALF input value outside the image range required by the present application.
[0610] It should be noted that through experimental verification, 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 RA configuration, and the performance improvement of test sequences class-B, class-C, class-D and class-F is as shown in Table 2.
[0611] Table 2
[0612] At the same time, some BD-rates improvement can be obtained under LD configuration, and the performance improvement of test sequences class-C, class-D and class-E is as shown in Table 3.
[0613] Table 3
[0614] In another embodiment, in the TALF filtering process, the historical decoded time domain adaptive loop filter can be selected for multiplexing, and a nonlinear time domain adaptive loop filter is used at the same time, and the adaptive precision of the time domain loop filter is introduced, and the vector information assisted time domain loop filtering is based on. Among them, a maximum of eight time domain adaptive loop filters are allowed to be used in one slice (strip), and the TALF can be located between the ALF and the SAO for loop filtering.
[0615] The slice header syntax elements are parsed as follows:
[0616] 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:
[0617] 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.
[0618] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0619] pcSlice->isInterGDR(): This condition means whether it is GDR.
[0620] The tAlfParamPool. clear( ) operation represents clearing the FIFO of the history temporal filter.
[0621] The talf_reuse_flag syntax element is an identification of whether the current slice is coded with the history temporal loop filter reused, and the identification 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 identification is not present in the bitstream, the value is 0.
[0622] The talf_reuse_index syntax element is an index of 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 take the values 0, 1, 2, 3, 4, 5, 6 or 7, and is represented using a fixed length code of 3 bins. When the syntax element is not present in the bitstream, the value is 0.
[0623] The talf_mv_guided_flag is an identification of whether the motion vector aided TALF is used, and the identification is 1 to indicate that the motion vector aided TALF is used for the current slice, and is 0 to indicate that the motion vector aided TALF is not used for the current slice. When the identification is not present in the bitstream, the value is 0.
[0624] The talf_shift_minus6 represents the variable precision used by one or more temporal loop filters coded for the current slice, and its meaning is a shift value used in the filtering minus 6. The syntax element is represented using a fixed length code 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 bitstream, the value is 0.
[0625] The talf_k_order[ sfldx ] represents the order of the exponential Golomb used by the absolute value of the coding coefficient of the sfldx-th filter coded for the current slice, and takes the values 0 or 1, and 0 indicates that the 0th order exponential Golomb code is used, and 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.
[0626] The tAlfParamPool[ talf_mv_guided_flag ][ 0 ]. shift = talf_shift_minus6 + 6 operation represents restoring the talf_shift_minus6 parsed to a shift value and updating the head of the FIFO of the history temporal loop filter.
[0627] talf_clip_flag[ sfldx ] specifies whether the nonlinearity is used for the sfldx-th temporal loop filter of the current slice. The value of this syntax element is either 0 or 1, and is equal to 1 to specify that the sfldx-th temporal loop filter uses nonlinearity, and is equal to 0 to specify that the sfldx-th temporal loop filter does not use nonlinearity. When the syntax element is not present in the bitstream, the value of this syntax element is equal to 0.
[0628] talf_clip_idx[ sfldx ][ j ] specifies the nonlinearity index value used for the j-th coefficient of the sfldx-th temporal loop filter of the current slice. The value of this syntax element is equal to 0, 1, 2 or 3. The value of this syntax element is equal to 0 to specify that the input of the j-th coefficient of the sfldx-th temporal loop filter does not use nonlinearity, and is equal to 1, 2 or 3 to specify the index of the corresponding nonlinearity clipping value, which is used to obtain the clipping value from the table of nonlinearity 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, the value of this syntax element is equal to 0.
[0629] tAlfParamPool[ talf_mv_guided_flag ][ 0 ].clipIdx[ sfldx ][ j ] = talf_clip_idx[ sfldx ][ j ] specifies that the value of talf_clip_idx is assigned to the corresponding entry in the FIFO of the history-based temporal loop filter.
[0630] Further, when reconstructing the temporal filter coefficients, considering that the reuse mechanism is introduced, if sh_talf_enabled_flag of the current slice is equal to 1 and talf_reuse_flag is equal to 0, the values of the coefficients, the shift value and the nonlinearity clipping values of the temporal adaptive loop filter need to be reconstructed.
[0631] The process of obtaining the filter coefficients tAlfCoeff of the current slice is as follows:
[0632] The process of obtaining the nonlinearity clipping values tAlfClip of the current slice is as follows:
[0633] - constructing a table of nonlinearity clipping values according to the pixel depth inputBitdepth of the luma component
[0634] - obtaining the nonlinearity clipping value of each coefficient of each filter of the current slice:
[0635] The process of obtaining the shift value of the adaptive loop filter of the current slice is as follows:
[0636] shift = talf_shift_minus6 + 6
[0637] If sh talf enabled flag is equal to 1 and talf reuse flag is equal to 1, the coefficient value, the shift value and the non-linear clipping value are obtained from the history of the temporal adaptive loop filter.
[0638] The process of obtaining the filter coefficient tAlfCoeff for the current slice is:
[0639] The process of obtaining the non-linear clipping value tAlfClip for the current slice is:
[0640] - A non-linear clipping value table is constructed according to the pixel depth inputBitdepth of the luma component
[0641] - The non-linear clipping value for each coefficient of each filter of the current slice is obtained:
[0642] The process of obtaining the shift value for the adaptive loop filter of the current slice is:
[0643] shift = tAlfParamPool[talf mv guided flag][talf reuse idx].shift
[0644] Further, when performing TALF filtering on a luma coding tree block, the current luma coding tree block is identified by the talf ctb idc being non-zero.
[0645] The input of the filtering process includes:
[0646] 1. A reconstructed luma image array rec that has been filtered by the luma adaptive loop filter,
[0647] 2. The mode value of talf filter mode,
[0648] 3. The identification value of talf mv guided flag,
[0649] 4. The luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0650] 5. The width tAlfWidth and the height tAlfHeight of the luma coding tree block,
[0651] 6. The filter coefficient tAlfCoeff[][] of the temporal adaptive loop filter.
[0652] For each position (x, y) in the current luma coding tree block, x has a range of xCtb to xCtb + tAlfWidth - 1, y has a range of yCtb to yCtb + tAlfHeight - 1
[0653] First, get the reconstructed picture and Mv:
[0654] Determine the input picture of the filter according to talf_mv_guided_flag and talf_filter_mode
[0655] If talf_filter_mode is 0 and talf_mv_guided_flag is 0, the forward nearest reconstructed picture rec0 is used as the input;
[0656] If talf_filter_mode is 0 and talf_mv_guided_flag is 1, it is confirmed 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, the reference picture rec0 pointed by Mv0 is used as the input, otherwise the filtering of the current position is skipped;
[0657] If talf_filter_mode is 1 and talf_mv_guided_flag is 0, the backward nearest reconstructed picture rec1 is used as the input under RA, and the forward second nearest reconstructed picture rec1 is used as the input under LD;
[0658] If talf_filter_mode is 1 and talf_mv_guided_flag is 1, it is confirmed 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, the reference picture rec1 pointed by Mv1 is used as the input, otherwise the filtering of the current position is skipped;
[0659] If talf_filter_mode is 2 and talf_mv_guided_flag is 0, the forward nearest reconstructed picture rec0 and the backward nearest reconstructed picture rec1 are used as the input under RA, and the forward nearest reconstructed picture rec0 and the second nearest reconstructed picture rec1 are used as the input under LD; If talf_filter_mode is 2 and talf_mv_guided_flag is 1, it is confirmed whether the prediction block to which the current position belongs selects Mv0 pointing to the reference picture in the reference picture list 0 and Mv1 pointing to the reference picture in the reference picture list 1, if yes, the reference picture rec0 pointed by Mv0 and the reference picture rec1 pointed by Mv1 are used as the input, otherwise the filtering of the current position is skipped.
[0660] Second step, get the shift value:
[0661] If Mv0 and Mv1 are found in the first step, since the Mv used in inter prediction is sub-pixel level accuracy, here the position offset on the reconstructed image pointed by Mv is obtained by rounding the positive pixel accuracy.
[0662] The horizontal integer pixel position offset of Mv0 is:
[0663] Offset0X = Mv0.Hor < 0? - (( abs ( Mv0.Hor ) + 8 ) >> 4 ) : ( ( abs ( Mv0.Hor ) + 8 ) >> 4 )
[0664] The vertical integer pixel position offset of Mv0 is:
[0665] Offset0Y = Mv0.Ver < 0? - (( abs ( Mv0.Ver ) + 8 ) >> 4 ) : ( ( abs ( Mv0.Ver ) + 8 ) >> 4 )
[0666] The horizontal integer pixel position offset of Mv1 is:
[0667] Offset1X = Mv1.Hor < 0? - (( abs ( Mv1.Hor ) + 8 ) >> 4 ) : ( ( abs ( Mv1.Hor ) + 8 ) >> 4 )
[0668] The vertical integer pixel position offset of Mv1 is:
[0669] Offset1Y = Mv1.Ver < 0? - (( abs ( Mv1.Ver ) + 8 ) >> 4 ) : ( ( abs ( Mv1.Ver ) + 8 ) >> 4 )
[0670] If talf_mv_guided_flag is 0 in the first step, Offset0X, Offset0Y, Offset1X and Offset1Y are set to 0.
[0671] Third step, according to the obtained position offset, reconstruct the image, filter the filter coefficient pair (x, y) position, and when numCoeff is 14:
[0672] 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 the offset rec0 and rec1, and when the reconstructed values in the coordinate positions rec0, rec1 array are obtained, the horizontal coordinate should be limited to 0 to the image width picWidth-1, and the vertical coordinate should be limited to 0 to the image height picHeight-1. Wherein, K(a, b) = m□n(b, max(-b, a)).
[0673] numCoeff is 13 and talf_filter_mode is 0:
[0674] numCoeff is 13 and talf_filter_mode is 1:
[0675] 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.
[0676] 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.
[0677] In another embodiment, in the TALF filtering process, a history-decoded temporal adaptive loop filter can be selected for reuse, and a 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 filtering is based on. Among them, a maximum of eight temporal adaptive loop filters can be used for one slice (slice), and TALF can perform loop filtering on TALF and ALF.
[0678] Here, other shapes of filters can be used for TALF filtering. Among them, Figure 26 is a schematic diagram of a filter according to an embodiment of the present application, as shown in Figure 26, for unidirectional filtering, the 7x7 filter can be changed from the original 13 taps to 12 taps; Figure 27 is a schematic diagram of a filter according to an embodiment of the present application, as shown in Figure 27, for bidirectional filtering, two 5x5 filters are each changed from the original 7 taps to 6 taps, and the total is also 12 taps.
[0679] Correspondingly, the filter formula of the 7x7 filter is as follows:
[0680] Accordingly, the filter formula of the two 5x5 filters is as follows:
[0681] It should be noted that in the above formula, for the reconstructed pixel in the reference picture, the reconstructed value of the current picture filter position is no longer subtracted, but instead the reconstructed value of the corresponding center position of the reference picture is subtracted, which can reduce the number of taps of the filter, while keeping the number of taps of the single-direction and bi-directional 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.
[0682] It should be noted that the MV-guided auxiliary displacement can be selected to be always used and filtered, and whether the auxiliary displacement is performed is no longer indicated by talf_mv_guided_flag. Therefore, in the filter formula, the position on each reference picture as input should be after the MV offset.
[0683] Accordingly, the filter formula of the 7x7 filter is as follows:
[0684] Accordingly, the filter formula of the two 5x5 filters is as follows:
[0685] wherein x' and y' are the x and y after the MV offset, respectively. In the bi-directional filtering, x" and y" are the x and y after the second MV offset, respectively.
[0686] The analysis slice header syntax elements are as follows:
[0687] wherein talf_filter_mode takes a value of 0, 1 or 2, talf_filter_mode of 0 indicates that the current slice will use mode 0, i.e., single-direction filtering using the mv indicating offset pointing to the reference picture list 0; talf_filter_mode of 1 indicates that the current slice will use mode 1, i.e., single-direction filtering using the mv indicating offset pointing to the reference picture list 1; talf_filter_mode of 2 indicates that the current slice will use mode 2, i.e., bi-directional filtering using two mvs indicating offset pointing to the reference picture list 0 and the reference picture list 1.
[0688] In the above table, when at least one of the following three conditions is true, the FIFO of the history temporal filter needs to be emptied:
[0689] 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 an image should have the same NAL type.
[0690] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0691] pcSlice->isInterGDR(): This condition indicates whether it is GDR by name.
[0692] The tAlfParamPool.clear() operation indicates emptying the FIFO of the history temporal filter.
[0693] 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.
[0694] 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. When the syntax element does not exist in the code stream, the value is 0.
[0695] 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.
[0696] talf_shift_minus6 indicates the variable precision used by one or more temporal loop filters in the current slice coding, and its meaning is that the shift value used in filtering is reduced by 6. The syntax element is represented by 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.
[0697] talf_k_order[sfIdx] indicates the exponential Golomb order used by the absolute value of the coding coefficient of the sfIdx-th filter in the current slice, and the value is 0 or 1, 0 indicating that the 0-order exponential Golomb code is used, and 1 indicating that the 1-order exponential Golomb code is used. When the syntax element does not exist in the code stream, the value is 0.
[0698] tAlfParamPool[poolIdx][0].shift = talf_shift_minus6 + 6 operation indicates to restore the parsed talf_shift_minus6 to shift value and update the FIFO head of the history temporal loop filter.
[0699] talf_clip_flag[sfldx] indicates whether the sfldx-th temporal loop filter of the current slice uses nonlinearity. The value of this syntax element is 0 or 1, and 1 means that the sfldx-th temporal loop filter uses nonlinearity, and 0 means that the sfldx-th temporal loop filter does not use nonlinearity. When the syntax element is not present in the bitstream, its value is 0.
[0700] talf_clip_idx[sfIdx][j] indicates the nonlinearity index value used by the j-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 of this syntax element means that the input of the filter coefficient at this position does not use nonlinearity, and the values of 1, 2 and 3 respectively represent the indexes of the corresponding nonlinearity clipping values, which are used to obtain the clipping values from the table of nonlinearity 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, its value is 0.
[0701] tAlfParamPool[poolIdx][0].clipIdx[sfIdx][j] = talf_clip_idx[sfIdx][j] operation indicates to assign the parsed talf_clip_idx value to the FIFO of the corresponding history temporal loop filter.
[0702] Further, when reconstructing the temporal 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 coefficient values, the shift value and the nonlinearity clipping value of the temporal adaptive loop filter need to be reconstructed.
[0703] The process of obtaining the filter coefficients tAlfCoeff of the current slice is as follows:
[0704] The process of obtaining the nonlinearity clipping value tAlfClip of the current slice is as follows:
[0705] - constructing a nonlinearity clipping value table according to the pixel depth inputBitdepth of the luma component
[0706] - obtaining the nonlinearity clipping value of each coefficient of each filter of the current slice:
[0707] The process of obtaining the shift value of the current slice's adaptive loop filter is:
[0708] shift = talf_shift_minus6 + 6
[0709] 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 history temporal adaptive loop filter.
[0710] The process of obtaining the filter coefficient tAlfCoeff of the current slice is:
[0711] The process of obtaining the non-linear clipping value tAlfClip of the current slice is:
[0712] - Construct a non-linear clipping value table according to the pixel depth inputBitdepth of the luma component
[0713] - Obtain the non-linear clipping value of each coefficient of each filter of the current slice:
[0714] The process of obtaining the shift value of the current slice's adaptive loop filter is:
[0715] shift = tAlfParamPool[poolIdx][talf_reuse_idx].shift.
[0716] 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 performed.
[0717] The input of the filtering process includes:
[0718] 1. A reconstructed luma image array rec that has been filtered by luma adaptive loop filtering,
[0719] 2. The mode value of talf_filter_mode,
[0720] 3. The luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current image,
[0721] 4. The width tAlfWidth and height tAlfHeight of the luma coding tree block,
[0722] 5. Coefficients of the time-domain adaptive loop filter tAlfCoeff[][]
[0723] For each position (x, y) in the current luma coding tree block, x has a value in the range xCtb to xCtb + tAlfWidth - 1, and y has a value in the range yCtb to yCtb + tAlfHeight - 1
[0724] First, get the reconstructed picture and Mv:
[0725] Determine the input picture of the filter according to talf_filter_mode
[0726] If talf_filter_mode is 0, check whether the prediction block to which the current position belongs selects Mv0 pointing to the reference picture in the reference picture list 0, and if so, use the reference picture rec0 pointed to by Mv0 as the input, otherwise skip the filtering of the current position;
[0727] If talf_filter_mode is 1, check whether the prediction block to which the current position belongs selects Mv1 pointing to the reference picture in the reference picture list 1, and if so, use the reference picture rec1 pointed to by Mv1 as the input, otherwise skip the filtering of the current position;
[0728] If talf_filter_mode is 2, check whether the prediction block to which the current position belongs selects both Mv0 pointing to the reference picture in the reference picture list 0 and Mv1 pointing to the reference picture in the reference picture list 1, and if so, use the reference picture rec0 pointed to by Mv0 and the reference picture rec1 pointed to by Mv1 as the input, otherwise skip the filtering of the current position.
[0729] Second, get the shift value:
[0730] If Mv0 and Mv1 are found in the first step, since the Mv used in inter prediction is of sub-pixel level accuracy, here the position offset on the reconstructed picture pointed to by the Mv is obtained by rounding the positive pixel accuracy.
[0731] The horizontal integer pixel position offset of Mv0 is:
[0732] Offset0X = Mv0.Hor < 0? - ((abs(Mv0.Hor) + 8) >> 4) : ((abs(Mv0.Hor) + 8) >> 4)
[0733] The vertical integer pixel position offset of Mv0 is:
[0734] Offset0Y = Mv0. Ver < 0? - (( abs( Mv0. Ver ) + 8 ) » 4 ) : ( ( abs( Mv0. Ver ) + 8 ) » 4 )
[0735] The horizontal integer pixel position offset of Mv1 is:
[0736] Offset1X = Mv1. Hor < 0? - (( abs( Mv1. Hor ) + 8 ) » 4 ) : ( ( abs( Mv1. Hor ) + 8 ) » 4 )
[0737] The vertical integer pixel position offset of Mv1 is:
[0738] Offset1Y = Mv1. Ver < 0? - (( abs( Mv1. Ver ) + 8 ) » 4 ) : ( ( abs( Mv1. Ver ) + 8 ) » 4 )
[0739] In the third step, according to the obtained position offset, the image is reconstructed, the filter coefficient is filtered according to the position (x, y), and when talf_filter_mode is 2 and the current position is not skipped filtering:
[0740] In the above filtering 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, and y1 are the coordinates of the center positions of rec0 and rec1 after offsetting. When the reconstructed values in the coordinate positions rec0 and rec1 are obtained, the horizontal coordinate should be limited to 0 to picWidth-1, and the vertical coordinate should be limited to 0 to picHeight-1. Wherein, K(a, b) = min(b, max(-b, a)).
[0741] When talf_filter_mode is 0 and the current position is not skipped filtering:
[0742] When talf_filter_mode is 1 and the current position is not skipped filtering:
[0743] 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.
[0744] In some embodiments, ALF filtering can be edge padded in units of CTB, and filtering within one CTB does not use reconstructed values from other CTBs. In this case, TALF can also be edge padded in units of CTB.
[0745] In another embodiment, in the TALF filtering process, a history-decoded temporal adaptive loop filter can be selected for multiplexing, while using a non-linear temporal adaptive loop filter, while introducing adaptive precision of the temporal loop filter, and based on vector information assisted temporal loop filtering. Among them, a maximum of eight temporal adaptive loop filters can be used for one slice (strip), and TALF can perform loop filtering on TALF and ALF side by side. Among them, a mode of swapping the two inputs of the filter is introduced when bidirectional multiplexing.
[0746] The slice header syntax elements are parsed as follows:
[0747] Among them, the value range of talf_filter_mode is 0, 1 or 2, talf_filter_mode is 0, indicating that the current slice will use mode 0, that is, 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, that is, 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, that is, using a bidirectional filter indicated by the offset of two mvs in the reference image list 0 and the reference image list 1.
[0748] When at least one of the following three conditions is true, the FIFO of the history temporal filter needs to be emptied
[0749] 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.
[0750] pcSlice->getPendingRasInit(): This condition indicates whether the POC is accumulated to the maximum allowed value and reset to 0.
[0751] pcSlice->isInterGDR(): This condition means whether it is GDR.
[0752] The tAlfParamPool.clear() operation indicates that the FIFO of the history temporal filter is emptied.
[0753] The talf_reuse_flag syntax element is an identifier indicating whether the current slice is coded with or without reusing the history temporal loop filter, and the identifier is 1 for reusing the history temporal loop filter and 0 for not reusing the history temporal loop filter. When the identifier is not present in the bitstream, its value is 0.
[0754] The talf_reuse_index syntax element is an index indicating the history temporal loop filter FIFO reused by the current slice. Since the FIFO length used in the present scheme is at most 8, the index can take the values 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 is not present in the bitstream, its value is 0.
[0755] 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, and when it takes the values 0, 1 or 2, the meaning remains unchanged, and when it takes the value 3, it indicates that the two inputs of the filter need to be exchanged in advance before being used as inputs.
[0756] poolIdx is an index variable indicating the reused FIFO, and it 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.
[0757] 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 filter is reduced by 6. This syntax element is represented using 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 bitstream, its value is 0.
[0758] talf_k_order[sfIdx] indicates the exponential Golomb order used by the absolute value of the sfIdx-th filter coefficient coded in the current slice, and it takes the values 0 or 1, with 0 indicating that a 0th order exponential Golomb code is used, and 1 indicating that a 1st order exponential Golomb code is used. When the syntax element is not present in the bitstream, its value is 0.
[0759] tAlfParamPool[poolIdx][0].shift = talf_shift_minus6 + 6 operation indicates to restore the parsed talf_shift_minus6 to a shift value and update the head of the FIFO of the history temporal loop filter.
[0760] talf_clip_flag[sfIdx] indicates whether the sfIdx-th history temporal loop filter of the current slice uses nonlinearity. The value of this syntax element is 0 or 1, and 1 means that the sfIdx-th history temporal loop filter uses nonlinearity, and 0 means that the sfIdx-th history temporal loop filter does not use nonlinearity. When the syntax element is not present in the bitstream, its value is 0.
[0761] talf_clip_idx[sfIdx][j] indicates the index value of the nonlinearity used by the j-th coefficient of the sfIdx-th history 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 nonlinearity, and the values of 1, 2 and 3 respectively represent the index of the corresponding nonlinearity clipping value, which is used to obtain the clipping value from the table of nonlinearity 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, its value is 0.
[0762] tAlfParamPool[poolIdx][0].clipIdx[sfIdx][j] = talf_clip_idx[sfIdx][j] operation indicates to assign the parsed talf_clip_idx value to the corresponding FIFO of the history temporal loop filter.
[0763] 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.
[0764] The input of the filtering process includes:
[0765] 1. a reconstructed luma image array rec filtered by luma adaptive loop filter,
[0766] 2. the mode value of talf_filter_mode,
[0767] 3. the luma coordinates (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0768] 4. the width tAlfWidth and the height tAlfHeight of the luma coding tree block,
[0769] 5. the coefficients tAlfCoeff[][] of the history temporal adaptive loop filter.
[0770] For each position (x, y) in the current luma coding tree block, x has a value in the range xCtb to xCtb + tAlfWidth - 1, and y has a value in the range yCtb to yCtb + tAlfHeight - 1
[0771] First, get the reconstructed picture and Mv:
[0772] Determine the input picture of the filter according to talf_filter_mode
[0773] If talf_filter_mode is 0, check whether the prediction block to which the current position belongs selects Mv0 pointing to the reference picture in reference picture list 0, and if so, use the reference picture rec0 pointed to by Mv0 as the input, otherwise skip the filtering of the current position;
[0774] If talf_filter_mode is 1, check whether the prediction block to which the current position belongs selects Mv1 pointing to the reference picture in reference picture list 1, and if so, use the reference picture rec1 pointed to by Mv1 as the input, otherwise skip the filtering of the current position;
[0775] If talf_filter_mode is 2, check whether the prediction block to which the current position belongs selects both Mv0 pointing to the reference picture in reference picture list 0 and Mv1 pointing to the reference picture in reference picture list 1, and if so, use the reference picture rec0 pointed to by Mv0 and the reference picture rec1 pointed to by Mv1 as the input, otherwise skip the filtering of the current position.
[0776] If talf_filter_mode is 3, check whether the prediction block to which the current position belongs selects both Mv0 pointing to the reference picture in reference picture list 0 and Mv1 pointing to the reference picture in reference picture list 1, and if so, use the reference picture pointed to by Mv0 as rec1 and the reference picture pointed to by Mv1 as rec0 as the input, otherwise skip the filtering of the current position.
[0777] Second, get the shift value:
[0778] If Mv0 and Mv1 are found in the first step, since the Mv used in inter prediction is of sub-pixel level accuracy, here the position offset on the reconstructed picture pointed to by the Mv is obtained by rounding the positive pixel accuracy.
[0779] The horizontal integer pixel position offset of Mv0 is:
[0780] Offset0X = Mv0.Hor < 0? - (( abs( Mv0.Hor ) + 8 ) » 4 ) : ( ( abs( Mv0.Hor ) + 8 ) » 4 )
[0781] The vertical integer-pel position offset of Mv0 is:
[0782] Offset0Y = Mv0.Ver < 0? - (( abs( Mv0.Ver ) + 8 ) » 4 ) : ( ( abs( Mv0.Ver ) + 8 ) » 4 )
[0783] The horizontal integer-pel position offset of Mv1 is:
[0784] Offset1X = Mv1.Hor < 0? - (( abs( Mv1.Hor ) + 8 ) » 4 ) : ( ( abs( Mv1.Hor ) + 8 ) » 4 )
[0785] The vertical integer-pel position offset of Mv1 is:
[0786] Offset1Y = Mv1.Ver < 0? - (( abs( Mv1.Ver ) + 8 ) » 4 ) : ( ( abs( Mv1.Ver ) + 8 ) » 4 )
[0787] In the third step, according to the obtained position offset, the image is reconstructed, the filter coefficient is filtered at the position (x, y), talf_filter_mode is 2 or 3, and the current position is not skipped filtering:
[0788] In the above filtering 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.
[0789] K(a, b) = min(b, max(-b, a))
[0790] When talf_filter_mode is 0 and the current position is not skipped filtering:
[0791] When talf_filter_mode is 1 and the current position is not skipped filtering:
[0792] In the filtering process, the same image edge padding method as ALF is used to obtain the TALF input value outside the image range.
[0793] In some embodiments, the ALF filter is padded in units of coding tree blocks, and the filter in one coding tree block does not use the reconstructed values of other coding tree blocks. In this case, the TALF can also be padded in units of coding tree blocks.
[0794] It can be understood that in some embodiments, the ALF filter is padded in units of coding tree blocks, and the filter in one coding tree block does not use the reconstructed values of other coding tree blocks. In this case, the TALF can also be padded in units of coding tree blocks.
[0795] It can be understood that in some embodiments, the nonlinear clipping (nonlinear limiting) currently supports four index values talf_clip_idx, and the clipping value table used by the multiplexed ALF can also use more index values and different clipping value tables.
[0796] It can be understood that in some embodiments, the adaptive shift value shift in the present scheme allows 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.
[0797] 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.
[0798] 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.
[0799] 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. Of course, there can also be a corresponding implementation scheme for chroma. When implemented in chroma, a corresponding method can be added to the practice of luminance.
[0800] The embodiment of the present application provides a coding and decoding method, which is a time domain adaptive loop filtering method, can realize TALF filtering processing on a reconstructed value of a current block based on reconstructed samples of at least one inter-frame reference image and corresponding filter coefficients, and fully utilizes the related information of the at least one inter-frame reference image in the TALF filtering process, thereby improving the filtering effect and improving the coding and decoding performance.
[0801] In still another embodiment of the present application, based on the same inventive concept as the foregoing embodiments, referring to FIG. 28, a constituent structure schematic diagram of an encoder 210 provided by the embodiment of the present application is shown. As shown in FIG. 28, the encoder 210 can include: a first determining unit 2101; wherein,
[0802] The first determining unit 2101 is configured to, when filtering a current image using TALF, determine a cost value corresponding to a candidate order, determine order identification information according to the cost value corresponding to the candidate order, and write the order identification information into a bitstream; when filtering the current image using TALF, determine a cost value corresponding to a candidate shift parameter, determine shift identification information according to the cost value corresponding to the candidate shift parameter, and write the shift identification information into the bitstream; determine at least one inter-frame reference image corresponding to the current image, determine a filter coefficient and a shift parameter; perform filtering based on reconstructed samples of the at least one inter-frame reference image, the filter coefficient and the shift parameter, and determine a filtered reconstructed value of the current block.
[0803] It should be noted that in the embodiment of the present application, the encoder 210 can also be regarded as a data processing mode (or "entropy encoder") for encoding processing of a value of a to-be-encoded syntax element.
[0804] It can be understood that in the embodiment of the present application, the "unit" can be a part of circuit, a part of processor, a part of program or software and the like, and of course can be a module, and can also be non-modular. Moreover, the constituent parts in the embodiment can be integrated in a processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0805] The integrated unit, if implemented in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium based on such understanding. The technical solutions of the embodiments essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiments. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0806] Therefore, the embodiments of the present application provide a computer readable storage medium applied to the encoder 210, and the computer readable storage medium stores a computer program. When the computer program is executed by the first processor, the encoding method in any one of the foregoing embodiments is implemented.
[0807] Based on the composition of the encoder 210 and the computer readable storage medium, referring to FIG. 29, a specific hardware structure schematic diagram of the encoder 210 provided by the embodiments of the present application is shown. As shown in FIG. 29, the encoder 210 can include a first communication interface 2102, a first memory 2103 and a first processor 2104; each component is coupled together through a first bus system 2105. It can be understood that the first bus system 2105 is used to realize the connection communication between the components. The first bus system 2105 includes a data bus, a power bus, a control bus and a state signal bus. However, in order to clearly illustrate, various buses are marked as the first bus system 2105 in the figure. Among them,
[0808] The first communication interface 2102 is used for receiving and sending signals in the process of transceiving information with other external network elements;
[0809] The first memory 2103 is used for storing a computer program capable of running on the first processor 2104;
[0810] The first processor 2104 is configured to, when the computer program is executed, perform the following: determining a cost value corresponding to a candidate order when performing filtering on a current image using TALF, determining order identification information according to the cost value corresponding to the candidate order, and writing the order identification information into a bitstream; determining a cost value corresponding to a candidate shift parameter when performing filtering on the current image using TALF, determining shift identification information according to the cost value corresponding to the candidate shift parameter, and writing the shift identification information into the bitstream; determining at least one inter-frame reference image corresponding to the current image, determining a filter coefficient and a shift parameter; performing filtering based on reconstructed samples of the at least one inter-frame reference image, the filter coefficient, and the shift parameter, and determining a filtered reconstructed value of the current block.
[0811] It can be understood that the first memory 2103 in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 2103 of the system and method described herein is intended to include, without being limited to, these and any other suitable types of memory.
[0812] The first processor 2104 can be an integrated circuit chip, which has the processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the first processor 2104. The first processor 2104 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiment of the present application can be directly embodied as hardware code processor execution completion, or executed by hardware and software module combination in code processor. The software module can be located in random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, register and other mature storage medium in the art. The storage medium is located in the first memory 2103, and the first processor 2104 reads the information in the first memory 2103, and combines the hardware to complete the steps of the above method.
[0813] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or their combination. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or their combination. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.
[0814] Optionally, as another embodiment, the first processor 2104 is further configured to, when running the computer program, perform the encoding method in any one of the preceding embodiments.
[0815] The embodiment provides an encoder, which encodes and decodes filter coefficients by introducing variable-order exponential Golomb through transmission of order identification information, and introduces a variable shift value in a filtering process through transmission of shift identification information, so that better adaptability is obtained in TALF filtering, and the filtering effect of the time domain adaptive loop filter is further improved.
[0816] In another embodiment of the present application, based on the same inventive concept as in the preceding embodiments, referring to FIG. 30, a composition structure schematic diagram of a decoder 230 proposed in the embodiment of the present application is shown. As shown in FIG. 30, the decoder 230 can include: a second determining unit 2301; wherein,
[0817] The second determining unit 2301 is configured to, in a case where it is determined that the current image is filtered using TALF, decode a code stream, determine order identification information and shift identification information; determine at least one inter-frame reference image corresponding to the current image, determine filter coefficients according to the order identification information, and determine a shift parameter according to the shift identification information; and perform filtering based on reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameter, to determine filtered reconstructed values of the current block.
[0818] It should be noted that in the embodiment of the present application, the decoder 230 can also be regarded as a data processing mode (or an "entropy decoder") for decoding the value of a to-be-decoded syntax element.
[0819] It can be understood that in the embodiment, the "unit" can be a part of circuit, a part of processor, a part of program or software, and the like, and of course can also be a module, and can also be non-modular. Moreover, the components in the embodiment can be integrated in a processing unit, or can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function module.
[0820] The integrated unit, if realized in the form of a software function module and not sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the embodiment provides a computer readable storage medium applied to the decoder 230, and the computer readable storage medium stores a computer program. The computer program is executed by the second processor to implement the method in any one of the preceding embodiments.
[0821] Based on the components of the decoder 230 and the computer readable storage medium, referring to FIG. 31, a specific hardware structure diagram of the decoder 230 provided by the embodiments of the present application is shown. As shown in FIG. 31, the decoder 230 can include a second communication interface 2302, a second memory 2303 and a second processor 2304; and the various components are coupled together through a second bus system 2305. It can be understood that the second bus system 2305 is used to realize the connection communication between the components. The second bus system 2305 includes not only a data bus, but also a power supply bus, a control bus and a state signal bus. However, for the purpose of clear illustration, all the buses are marked as the second bus system 2305 in the figure. Among them,
[0822] The second communication interface 2302 is configured to receive and send signals in the process of transceiving information with other external network elements.
[0823] The second memory 2303 is configured to store a computer program capable of running on the second processor 2304.
[0824] The second processor 2304 is configured to, when running the computer program, perform: decoding a code stream, determining order identification information and shift identification information in a case where it is determined that the current image is filtered using TALF; determining at least one inter-frame reference image corresponding to the current image, determining a filter coefficient according to the order identification information, and determining a shift parameter according to the shift identification information; and filtering based on a reconstructed sample of the at least one inter-frame reference image, the filter coefficient and the shift parameter to determine a filtered reconstructed value of the current block.
[0825] Optionally, as another embodiment, the second processor 2304 is further configured to, when running the computer program, perform the method in any one of the preceding embodiments.
[0826] It can be understood that the hardware function of the second memory 2303 is similar to that of the first memory 2103, and the hardware function of the second processor 2304 is similar to that of the first processor 2104; and details are not described here.
[0827] The embodiments provide a decoder, which introduces variable-order exponential Golomb to code and decode filter coefficients through the transmission of order identification information, and introduces a variable shift value in the filtering process through the transmission of shift identification information, so that better adaptability is obtained in TALF filtering, and the filtering effect of the time domain adaptive loop filter is further improved.
[0828] In still another embodiment of the present application, referring to FIG. 32, a component structure diagram of a coding system provided by the embodiments of the present application is shown. As shown in FIG. 32, the coding system 300 can include an encoder 210 and a decoder 230.
[0829] In embodiments of the present application, the encoder 210 can be an encoder as described in any of the foregoing embodiments, and the decoder 230 can be a decoder as described in any of the foregoing embodiments.
[0830] Further, the embodiments of the present application also provide a bitstream, wherein the bitstream is generated by bit-encoding to-be-encoded information; and the to-be-encoded information comprises one or more of first syntax element identification information, order identification information, shift identification information, coefficient value parameters, quantity parameters, and coeff...
Claims
1. A decoding method applied to a decoder, the method comprising: in a case where it is determined that the current picture is filtered using temporal adaptive loop filtering (TALF), decoding a bitstream to determine order identification information and shift identification information; determining at least one inter-predicted reference picture corresponding to the current picture, determining a filter coefficient according to the order identification information, and determining a shift parameter according to the shift identification information; filtering based on reconstructed samples of the at least one inter-predicted reference picture, the filter coefficient, and the shift parameter to determine a filtered reconstructed value of the current block.
2. The method of claim 1, wherein, The determining the filter coefficient according to the order identification information comprises: determining an exponential Golomb order according to the order identification information; decoding a bitstream to determine a coefficient value parameter corresponding to the filter coefficient according to the exponential Golomb order; and determining the filter coefficient according to the coefficient value parameter.
3. The method of claim 2, wherein, The method further comprises: decoding a bitstream to determine first syntax element identification information; and in a case where it is determined that the current block is filtered using TALF based on the first syntax element identification information, performing the determining process of the filter coefficient corresponding to the current block.
4. The method of claim 3, wherein, The determining the filter coefficient according to the coefficient value parameter comprises: determining a number parameter and a coefficient sign parameter corresponding to the filter coefficient; determining a number of groups of filters according to the number parameter; determining the filter coefficient according to 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 determining the filter coefficient according to the number of groups of filters, the coefficient value parameter, the coefficient sign parameter, and the first syntax element identification information comprises: determining a candidate filter corresponding to the current block according to the first syntax element identification information and the number of groups of filters; and determining the filter coefficient according to the candidate filter corresponding to the current block, the coefficient value parameter, and the coefficient sign parameter.
6. The method of claim 5, wherein, The determining the filter coefficient according to the candidate filter corresponding to the current block, the coefficient value parameter, and the coefficient sign parameter comprises: determining a value of the filter coefficient corresponding to the candidate filter according to the coefficient value parameter; determining a sign of the filter coefficient corresponding to the candidate filter according to the coefficient sign parameter; and determining the filter coefficient corresponding to the candidate filter according to the value of the filter coefficient corresponding to the candidate filter and the sign of the filter coefficient corresponding to the candidate filter.
7. The method of any one of claims 1-6, wherein, The determining the shift parameter according to the shift identification information comprises: determining a variable precision according to the shift identification information; and determining the shift parameter according to the variable precision and a preset value.
8. The method of claim 7, wherein, The filtering based on the reconstructed samples of the at least one inter-predicted reference picture, the filter coefficient, and the shift parameter to determine the filtered reconstructed value 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 reconstructed values of the current block, and a reconstructed sample value of a reference sample position corresponding to the current sample position is determined according to reconstructed samples of the inter-frame reference image; A filtered reconstructed sample value of the current sample position is determined according to the shift coefficient, the filter coefficient, the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position; A filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
9. The method of claim 7, wherein, The filtering based on the reconstructed samples of the at least one inter-frame reference image, the filter coefficient and the shift parameter determines a filtered reconstructed value of the current block. For a current sample position in the current block, a reconstructed sample value of the current sample position is determined according to reconstructed values of the current block, a reconstructed sample value of a first reference sample position corresponding to the current sample position is determined according to reconstructed samples of the 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 reconstructed samples of the second inter-frame reference image; A filtered reconstructed sample value of the current sample position is determined according to the shift coefficient, the filter coefficient, 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; A filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
10. An encoding method applied to an encoder, the method comprising: When filtering a current image using TALF, determining a cost value corresponding to a candidate order, determining order identification information according to the cost value corresponding to the candidate order, and writing the order identification information into a bitstream; When filtering a current image using TALF, determining a cost value corresponding to a candidate shift parameter, determining shift identification information according to the cost value corresponding to the candidate shift parameter, and writing the shift identification information into a bitstream; Determining at least one inter-frame reference image corresponding to the current image, determining a filter coefficient and a shift parameter; Filtering based on reconstructed samples of the at least one inter-frame reference image, the filter coefficient and the shift parameter determines a filtered reconstructed value of the current block. The determination of the order identification information according to the cost value corresponding to the candidate order comprises:
11. The method of claim 10, wherein, Determining a minimum cost value in the cost value corresponding to the candidate order; Determining the candidate order corresponding to the minimum cost value as an optimal exponential-Golomb order; Determining the order identification information according to the optimal exponential-Golomb order. The method further comprises:
12. The method of claim 11, wherein, Encoding a coefficient value parameter corresponding to the filter coefficient according to the exponential-Golomb order. The determination of the shift identification information according to the cost value corresponding to the candidate shift parameter comprises:
13. The method of claim 10, wherein, Determining a minimum cost value in the cost value corresponding to the candidate shift parameter; Determining the candidate shift parameter corresponding to the minimum cost value as an optimal shift parameter; determining a variable precision according to the optimal shift parameter and a preset value; determining the shift identification information according to the variable precision.
14. The method of claim 10, wherein, The method further comprises: determining a first generation value corresponding to filtering of the current picture using TALF, and determining first syntax element identification information based on the first generation value, and writing the first syntax element identification information into a bitstream; wherein the first syntax element identification information is used to determine whether the current block is filtered using TALF.
15. The method of claim 14, wherein, The determining of the first generation value corresponding to filtering of the current picture using TALF comprises: determining a candidate mode according to a current configuration; in each candidate mode, determining a candidate filter corresponding to the current block, and determining the filter coefficient based on the candidate filter corresponding to the current block; determining a second generation value of the filter coefficient; determining the smallest second generation value as the first generation value corresponding to filtering of the current block using TALF.
16. The method of claim 15, wherein, The determining of the first syntax element identification information based on the first generation value comprises: determining a third generation value corresponding to filtering of the current block without using TALF; in a case where the first generation value is greater than or equal to the third generation value, setting the first syntax element identification information to indicate that the current block is not filtered using TALF; in a case where the first generation value is less than the third generation value, setting the first syntax element identification information to indicate that the current block is filtered using TALF.
17. A code stream, the code stream being generated by bit-encoding according to information to be encoded; wherein, The to-be-encoded information comprises at least one or more of a first syntax element identification information, an order identification information, a shift identification information, a coefficient value parameter, a number parameter, and a coefficient sign parameter.
18. An encoder, comprising a first determining unit; wherein the first determining unit is configured to, when filtering of a current picture using TALF, determine a generation value corresponding to a candidate order, determine an order identification information according to the generation value corresponding to the candidate order, and write the order identification information into a bitstream; when filtering of a current picture using TALF, determine a generation value corresponding to a candidate shift parameter, determine a shift identification information according to the generation value corresponding to the candidate shift parameter, and write the shift identification information into a bitstream; determine at least one inter-frame reference picture corresponding to the current picture, determine a filter coefficient and a shift parameter, filter based on a reconstructed sample of the at least one inter-frame reference picture, the filter coefficient and the shift parameter, and determine a filtered reconstructed value of the current block.
19. 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, when running the computer program, execute the method according to any one of claims 10 to 16.
20. A decoder, comprising a second determining unit; wherein the second determining unit is configured to, when filtering of a current picture using TALF, determine a generation value corresponding to a candidate order, determine an order identification information according to the generation value corresponding to the candidate order, and write the order identification information into a bitstream; The second determining unit is configured to, in a case where it is determined that the current image is filtered using TALF, decode a code stream, determine order identification information and shift identification information, determine at least one inter-frame reference image corresponding to the current image, determine filter coefficients according to the order identification information, determine a shift parameter according to the shift identification information, perform filtering based on reconstructed samples of the at least one inter-frame reference image, the filter coefficients and the shift parameter, and determine a filtered reconstructed value of the current block.
21. 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, when running the computer program, perform the method according to any one of claims 1 to 9.
22. A computer readable storage medium, storing a computer program, which, when executed, implements the decoding method according to any one of claims 1 to 9, or implements the encoding method according to any one of claims 10 to 16.
23. A computer readable storage medium, configured to store a code stream generated by the encoding method according to any one of claims 10 to 16.
Citation Information
Patent Citations
Clipping parameter derivation in adaptive loop filter
CN113678462A
On adaptive loop filtering for video coding
CN113767623A
Video or image coding using adaptive loop filter
CN114402597A
Encoding and decoding method, code stream, encoder, decoder and storage medium
CN117461315A