Coding method, decoding method, bitstream, coders, decoders and storage medium
By employing the Temporal Adaptive Loop Filtering (TALF) method in video coding and utilizing inter-frame reference image information, the problem of poor filtering effect in existing technologies is solved, achieving more efficient encoding and decoding performance.
Patent Information
- Application Number
- PCT/CN2024/103966
- 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 do not fully utilize the relevant information of the temporally reconstructed image, resulting in less than ideal filtering effects and reduced encoding and decoding performance.
The time-domain adaptive loop filter (TALF) method is adopted to select and reuse relevant information of historical TALF filters during the filtering process, thereby reducing codeword consumption and improving encoding and decoding performance.
The TALF method effectively utilizes relevant information from inter-frame reference images, improving filtering performance, reducing codeword consumption, and enhancing encoding and decoding performance.
Smart Images

Figure CN2024103966_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 reduce the consumption of code words 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 multiplexing identification information;
[0009] In a case where it is determined that the historical TALF information is multiplexed for filtering based on the multiplexing identification information, decoding the code stream, determining a multiplexing index parameter, and determining the historical TALF information according to the multiplexing index parameter;
[0010] Filtering the current image based on the historical TALF information to determine a reconstructed value of the current image after filtering.
[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 using the TALF for the current image, a cost value when the historical TALF information is reused for filtering and a cost value when the historical TALF information is not reused for filtering are determined;
[0013] According to the cost value when the historical TALF information is reused for filtering and the cost value when the historical TALF information is not reused for filtering, reuse identification information is determined, and the reuse identification information is written into a bitstream; wherein the reuse identification information is used to determine whether the historical TALF information is reused for filtering;
[0014] In a case where the historical TALF information is reused for filtering, a reuse index parameter is determined, and the reuse index parameter is written into the bitstream.
[0015] In a third aspect, an embodiment of the present application provides a bitstream, wherein the bitstream is generated by bit encoding to-be-encoded information; wherein the to-be-encoded information at least includes one or more of a first syntax element identification information, reuse identification information, a reuse index parameter, a filtering mode, a number of filter groups, and filter coefficients of a candidate filter.
[0016] In a fourth aspect, an embodiment of the present application provides an encoder, wherein the encoder includes a first determining unit;
[0017] The first determining unit is configured to, in filtering using the TALF for the current image, determine a cost value when the historical TALF information is reused for filtering and a cost value when the historical TALF information is not reused for filtering; according to the cost value when the historical TALF information is reused for filtering and the cost value when the historical TALF information is not reused for filtering, determine reuse identification information, and write the reuse identification information into a bitstream; wherein the reuse identification information is used to determine whether the historical TALF information is reused for filtering; in a case where the historical TALF information is reused for filtering, determine a reuse index parameter, and write the reuse index parameter into the bitstream.
[0018] In a fifth aspect, an embodiment of the present application provides an encoder, wherein the encoder includes a first memory and a first processor;
[0019] The first memory is configured to store a computer program capable of running on the first processor;
[0020] The first processor is configured to, when the computer program is run, perform the encoding method as described above.
[0021] In a sixth aspect, an embodiment of the present application provides a decoder, wherein the decoder includes a second determining unit;
[0022] The second determining unit is configured to, in a case where it is determined that the current image is filtered using TALF, decode the code stream to determine multiplexing identification information; in a case where it is determined that the current image is filtered using multiplexed historical TALF information based on the multiplexing identification information, decode the code stream to determine multiplexing index parameters and determine historical TALF information according to the multiplexing index parameters; and filter the current image based on the historical TALF information to determine a filtered reconstruction value of the current image.
[0023] In a seventh aspect, an embodiment of the present application provides a decoder, the decoder comprising a second memory and a second processor; wherein,
[0024] The second memory is configured to store a computer program capable of running on the second processor.
[0025] The second processor is configured to, when running the computer program, execute the decoding method as described above.
[0026] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed to implement the decoding method as described in the first aspect, or to implement the encoding method as described in the second aspect.
[0027] 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.
[0028] 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 will be filtered using TALF, the bitstream is decoded to determine multiplexing identifier information. When it is determined that historical TALF information will be reused for filtering based on the multiplexing identifier information, the bitstream is decoded to determine multiplexing index parameters, and historical TALF information is determined based on the multiplexing index parameters. The current image is then filtered based on the historical TALF information to determine the reconstructed value of the current image after filtering. At the encoding end, when the current image is filtered using TALF, the cost of using historical TALF information for filtering and the cost of not using historical TALF information for filtering are determined. Multiplexing identifier information is determined based on the cost of using historical TALF information for filtering and the cost of not using historical TALF information for filtering, and the multiplexing identifier information is written into the bitstream. The multiplexing identifier information is used to determine whether historical TALF information is reused for filtering. When it is determined that historical TALF information is reused for filtering, the multiplexing index parameters are determined and written into the bitstream. Therefore, the embodiments of this application propose a time-domain adaptive loop filtering method. In the TALF filtering process, relevant information of recorded and stored historical TALF filters can be reused, thereby reducing codeword consumption and improving encoding and decoding performance. Attached Figure Description
[0029] Figure 1 is a schematic diagram of the application of a coding framework provided by related technologies;
[0030] Figure 2 is a schematic diagram of the application of a loop filter module provided by related technologies;
[0031] Figure 3 is a schematic diagram of the shape of a common brightness adaptive loop filter;
[0032] Figure 4 is a schematic diagram of the shape of a common chromaticity adaptive loop filter.
[0033] Figure 5 is a schematic diagram of the loop filtering implementation process;
[0034] Figure 6 is a schematic diagram of the shape of the cross-component adaptive filter;
[0035] Figure 7 shows the relationship between encoding / decoding and playback order under one RA configuration;
[0036] Figure 8 is a system block diagram of an encoder provided in an embodiment of this application;
[0037] Figure 9 is a system block diagram of a decoder provided in an embodiment of this application;
[0038] Figure 10 is a schematic diagram of the decoding method proposed in the embodiments of this application;
[0039] Figure 11 is a schematic diagram of an implementation of the TALF filtering according to an embodiment of the application;
[0040] Figure 12 is a schematic diagram of another implementation of the TALF filtering according to an embodiment of the application;
[0041] Figure 13 is a schematic diagram of a third implementation of the TALF filtering according to an embodiment of the application;
[0042] Figure 14 is a schematic diagram of a fourth implementation of the TALF filtering according to an embodiment of the application;
[0043] Figure 15 is a schematic diagram of a fifth implementation of the TALF filtering according to an embodiment of the application;
[0044] Figure 16 is a schematic diagram of a sixth implementation of the TALF filtering according to an embodiment of the application;
[0045] Figure 17 is a schematic diagram of a seventh implementation of the TALF filtering according to an embodiment of the application;
[0046] Figure 18 is a schematic diagram of a first implementation of the filter according to an embodiment of the application;
[0047] Figure 19 is a schematic diagram of a second implementation of the filter according to an embodiment of the application;
[0048] Figure 20 is a schematic diagram of a third implementation of the filter according to an embodiment of the application;
[0049] Figure 21 is a schematic diagram of a fourth implementation of the filter according to an embodiment of the application;
[0050] Figure 22 is a schematic diagram of a fifth implementation of the filter according to an embodiment of the application;
[0051] Figure 23 is a schematic diagram of a sixth implementation of the filter according to an embodiment of the application;
[0052] Figure 24 is a schematic diagram of a seventh implementation of the filter according to an embodiment of the application;
[0053] Figure 25 is a schematic diagram of an encoding method according to an embodiment of the application;
[0054] Figure 26 is a schematic diagram of a first implementation of the time domain adaptive loop filter storing history according to an embodiment of the application;
[0055] Figure 27 is a schematic diagram of a second implementation of the time domain adaptive loop filter storing history according to an embodiment of the application;
[0056] Figure 28 is a schematic diagram of a third implementation of the time domain adaptive loop filter storing history according to an embodiment of the application;
[0057] Figure 29 is a schematic diagram of an eighth implementation of the filter according to an embodiment of the application;
[0058] Fig. 30 is a schematic diagram of a filter according to an embodiment of the present application;
[0059] Fig. 31 is a schematic diagram of a structure of an encoder according to an embodiment of the present application;
[0060] Fig. 32 is a schematic diagram of a specific hardware structure of an encoder according to an embodiment of the present application;
[0061] Fig. 33 is a schematic diagram of a structure of a decoder according to an embodiment of the present application;
[0062] Fig. 34 is a schematic diagram of a specific hardware structure of a decoder according to an embodiment of the present application;
[0063] Fig. 35 is a schematic diagram of a structure of a codec system according to an embodiment of the present application. DETAILED DESCRIPTION
[0064] 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.
[0065] 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 subsets of all possible embodiments, and can be combined with each other without conflict. It should be noted that the terms "first", "second", "third" 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.
[0066] Digital video compression technology is mainly to compress large digital video data for transmission and storage. With the surge of Internet video and people's increasing demand for video clarity, although the existing digital video compression standard can save a lot of video data, better digital video compression technology is still needed to reduce the bandwidth and traffic pressure of digital video transmission.
[0067] 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 transmitted to the encoder for encoding.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] Loop filtering is generally present in existing video coding standards, which greatly improves the subjective and objective quality of reconstructed video. In VVC, loop filtering includes a DeBlocking Filter (DBF), a Sample adaptive Offset (SAO), an Adaptive loop filter (ALF), and a 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 a Cross component sample adaptive offset (CCSAO) and a Bilateral filter (BIF). For example, FIG. 2 is an application schematic diagram of a loop filtering module provided by the related art, and a block diagram of ECM loop filtering is shown in FIG. 2.
[0072] The principle of adaptive loop filtering and cross component adaptive loop filtering is to calculate one or more sets of filter coefficients through the relationship between reconstructed values and original sample values. The filter coefficients are transmitted through a code stream, and the decoder can construct a filter after obtaining the filter coefficients, and use the filter to filter the reconstructed image, so that the reconstructed image is closer to the original image after filtering.
[0073] The adaptive loop filtering in VVC can be applied to luminance and chrominance components. FIG. 3 is a shape diagram of a common luminance adaptive loop filter, as shown in FIG. 3, the filter on the luminance component is a 7x7 diamond-shaped coefficient symmetric filter. FIG. 4 is a shape diagram of a common chrominance adaptive loop filter, as shown in FIG. 4, the filter on the chrominance component is a 5x5 diamond-shaped coefficient symmetric filter.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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:
[0081] Table 1
[0082] 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 is likely to be.
[0083] 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:
[0084] 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.
[0085] 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.
[0086] Further, the embodiments of the present application provide a coding and decoding method, a bitstream, an encoder, a decoder and a storage medium. In the TALF filtering process, the related information of the multiplexed recorded and stored historical TALF filter can be selected, thereby reducing the consumption of codewords and improving the coding and decoding performance.
[0087] 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 the compressed version of the input video.
[0088] 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 one tile into one or more bricks. Here, one tile or one brick can include one or more complete and / or partial CTUs. In addition, the partition unit 101 can form one or more slices, wherein one 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 one sub-picture can include one or more slices, tiles or bricks.
[0089] In the encoding process of the encoder 10, the partition unit 101 delivers a CTU to the prediction unit 102. Generally, the prediction unit 102 can be composed of a block partition unit 103, a motion estimation (ME) unit 104, a motion compensation (MC) unit 105, and an intra prediction unit 106. Specifically, the block partition unit 103 iteratively partitions an input CTU into smaller coding units (CUs) using quad-tree partitioning, binary-tree partitioning, and ternary-tree partitioning. The prediction unit 102 can obtain an inter prediction block for a CU using the ME unit 104 and the MC unit 105. The intra prediction unit 106 can obtain an intra prediction block for a CU using various intra prediction modes including the MIP mode. In an example, a rate-distortion optimized motion estimation approach can be invoked by the ME unit 104 and the MC unit 105 to obtain the inter prediction block, and a rate-distortion optimized mode determination approach can be invoked by the intra prediction unit 106 to obtain the intra prediction block.
[0090] The prediction unit 102 outputs the prediction block of a CU, and the first adder 107 calculates the difference between the CU in the output of the partition unit 101 and the prediction block of the CU, i.e., a residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs quantized coefficients (i.e., levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in the transform unit 108 and outputs a reconstructed residual. The second adder 112 calculates a reconstructed CU by adding the reconstructed residual and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 to be used as an intra prediction reference. After all CUs in a picture or sub-picture are reconstructed, the filter unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filter unit 113 contains one or more filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, an adaptive loop filter (ALF), a luma mapping with chroma scaling (LMCS) filter, and a neural network based filter, etc. Alternatively, when the filter unit 113 determines that a CU is not to be used as a reference for encoding of other CUs, the filter unit 113 performs loop filtering on one or more target samples in the CU.
[0091] 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.
[0092] 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.
[0093] Referring to FIG. 9, an example of a system composition block diagram of a decoder provided by an embodiment of the present application is shown. 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 representing 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.
[0094] 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 numerical values and sends the numerical 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.
[0095] 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.
[0096] 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.
[0097] 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.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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.
[0102] 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).
[0103] 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.
[0104] 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.
[0105] That is, the coding 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.
[0106] 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.
[0107] An embodiment of the present application provides a decoding method, which is applied to a decoder and used in a scene of performing filtering processing through a TALF filter. FIG. 10 is a schematic diagram of the decoding method provided by the embodiment of the present application. As shown in FIG. 10, the method of the decoder performing decoding processing can include the following steps.
[0108] Step 1001: In a case where it is determined that a current image is filtered using TALF, decoding a code stream to determine multiplexing identification information.
[0109] In the embodiment of the present application, if the current image is filtered using TALF, the multiplexing identification information can be determined by decoding the code stream. The multiplexing identification information is used to determine whether to multiplex historical TALF information for filtering.
[0110] It should be noted that in the embodiment of the present application, the historical TALF information is used to determine the historical filter, including but not limited to one or more of a filtering mode, a number of filter groups, and filter coefficients.
[0111] Further, in embodiments of the present application, the multiplexing identification information can be used to determine whether the current picture is allowed to use the history TALF information to perform TALF filtering. The multiplexing identification information can be a flag.
[0112] It should be noted that in embodiments of the present application, the multiplexing identification information can be a picture-level flag, a slice-level (or slice-level) flag, a sub-picture-level flag, or a tile-level flag. The present application does not make specific limitations.
[0113] For example, in some embodiments, if the multiplexing identification information is a slice-level flag, the multiplexing identification information can be used to determine whether the current slice is allowed to multiplex the history TALF information for filtering.
[0114] Further, in embodiments of the present application, the value of the multiplexing identification information can be used to determine whether the current picture (and / or the current slice) is allowed to multiplex the history TALF information for filtering. The value of the multiplexing identification information can be in the form of a parameter or a number.
[0115] For example, in some embodiments, when the value of the multiplexing identification information is 1, it is determined that the current picture (and / or the current slice) is allowed to multiplex the history TALF information for filtering. When the value of the multiplexing identification information is 0, it is determined that the history TALF information is not multiplexed for filtering. In general, the multiplexing identification information can be a parameter written in the Slice header or picture header, which is not limited here.
[0116] For example, in some embodiments, when the value of the multiplexing identification information is 1, it is determined that the current picture (and / or the current slice) is allowed to multiplex the history TALF information for filtering. When the value of the multiplexing identification information is 0, it is determined that the history TALF information is not multiplexed for filtering.
[0117] For example, in some embodiments, when the value of the multiplexing identification information is true, it is determined that the current picture (and / or the current slice) is allowed to multiplex the history TALF information for filtering. When the value of the multiplexing identification information is false, it is determined that the history TALF information is not multiplexed for filtering.
[0118] Exemplarily, in some embodiments, assuming that the reuse identification information is a picture level flag, the reuse identification information can be represented by a syntax element talf_reuse_flag, i.e., talf_reuse_flag indicates whether the current picture is allowed to reuse the TALF information for filtering. If the value of talf_reuse_flag is 0, it is determined that the TALF information is not reused for filtering, and if the value of talf_reuse_flag is 1, it is determined that the current picture is allowed to reuse the TALF information for filtering.
[0119] Exemplarily, in some embodiments, assuming that the reuse identification information is a slice level flag, the reuse identification information can be represented by a syntax element talf_reuse_flag, i.e., talf_reuse_flag indicates whether the current slice is allowed to use the TALF for filtering. If the value of talf_reuse_flag is 0, it is determined that the TALF is not used for filtering in the current slice, and if the value of talf_reuse_flag is 1, it is determined that the current slice is allowed to use the TALF for filtering.
[0120] Of course, the value of talf_reuse_flag is not limited to 0 and 1, and the present application does not make specific limitations.
[0121] Exemplarily, in some embodiments, the slice level syntax element is parsed as follows:
[0122] Wherein, talf_reuse_flag is used to indicate whether to reuse the historical TALF information, for example, to reuse the recorded historical adaptive loop filter. If the identification is 1, it indicates that the recorded historical adaptive loop filter is reused, and if the identification is 0, it indicates that it is not reused. When the syntax element does not exist in the code stream, its value can be defaulted to 0.
[0123] As can be seen, in the embodiments of the present application, for the TALF filtering processing, the adaptive loop filter of the history can be introduced by the reuse identification information, so that the extra code consumption caused by coding and decoding new filter coefficients (filter coefficients) can be saved.
[0124] Further, in the embodiments of the present application, the code stream can also be decoded to determine the first syntax element identification information.
[0125] In the embodiments of the present application, the code stream is decoded, and the first syntax element identification information can be determined. Wherein, the first syntax element identification information can be used to determine whether the current block in the current picture uses the TALF for filtering, i.e., 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.
[0126] 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 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.
[0127] 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 size and the obtaining manner of the current block in the current image are not limited in the present application.
[0128] 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, 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, 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 make specific limitations.
[0129] 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.
[0130] 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.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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 based on the second syntax element identification information that the current picture is allowed to use TALF for filtering, 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.
[0136] 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. Wherein, the second syntax element identification information can be a flag.
[0137] It should be noted that, in the embodiments of the present application, the second syntax element identification information can be a picture-level flag, a slice-level flag, a sub-picture-level flag, or a tile-level flag. The present application does not make specific limitations.
[0138] 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.
[0139] 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.
[0140] For example, in some embodiments, if the value of the second syntax element is the 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 the third value, it is determined that the current picture (and / or the current slice) is not filtered using TALF.
[0141] 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 the Slice header or the picture header, which is not limited herein.
[0142] 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.
[0143] 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.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] Exemplarily, in some embodiments, an example of encoding picture level TALF identifier (second syntax element identification information) in picture header and corresponding APS index can be as follows:
[0149] 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.
[0150] Further, in the embodiments of the present application, the code stream can be decoded first to determine the third syntax element identification information; and in the case that it is determined based on the third syntax element identification information that the current sequence is filtered using TALF, the determination process of the second syntax element identification information is performed.
[0151] Further, in the embodiments of the present application, the third syntax element identification information can be used to determine whether the current sequence is filtered using TALF. The third syntax element identification information can be a flag, for example, a sequence-level flag.
[0152] Further, in the embodiments of the present application, whether the current sequence is filtered using TALF can be determined by the value of the third syntax element identification information.
[0153] For example, in some embodiments, in the case that the value of the third syntax element identification information is a fourth value, it is determined that the current sequence is filtered using TALF. In the case that the value of the third syntax element identification information is a fifth value, it is determined that the current sequence is not filtered using TALF.
[0154] It should be noted that in the embodiments of the present application, the third syntax element identification information can be used to indicate whether the current sequence is filtered using TALF. In addition, the fourth value and the fifth value are different, and the fourth value and the fifth value can be in the form of a parameter or in the form of a number, which is not limited herein.
[0155] 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 the embodiments of the present application are not limited.
[0156] 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 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.
[0157] 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.
[0158] 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.
[0159] 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.
[0160] 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:
[0161] 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.
[0162] 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.
[0163] Exemplarily, in some embodiments, it is assumed that the sequence level ALF indication can be represented by a syntax element sps_alf_enabled_flag, i.e., sps_alf_enabled_flag indicates whether ALF is used for filtering the current sequence. If sps_alf_enabled_flag indicates that ALF is not used for filtering the current sequence, then the determination of the third syntax element indication information can be selected not to be decoded any more; if sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, then the determination of the third syntax element indication information can be further performed.
[0164] 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:
[0165] Wherein, sps_talf_enabled_flag is used for indicating whether TALF is used for filtering the current sequence, sps_alf_enabled_flag is used for indicating whether ALF is used for filtering the current sequence, and only when the current sequence allows ALF, i.e., sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, sps_talf_enabled_flag can be further parsed.
[0166] 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.
[0167] That is to say, in the embodiments of the present application, the parsing of the second syntax element indication information can depend on the third syntax element indication information, or can depend on the sequence level ALF indication.
[0168] Exemplarily, in some embodiments, it is assumed that the sequence level ALF indication can be represented by a syntax element sps_alf_enabled_flag, i.e., sps_alf_enabled_flag indicates whether ALF is used for filtering the current sequence. If sps_alf_enabled_flag indicates that ALF is not used for filtering the current sequence, then the determination of the second syntax element indication information can be selected not to be decoded any more; if sps_alf_enabled_flag indicates that ALF is used for filtering the current sequence, then the determination of the second syntax element indication information can be further performed.
[0169] Exemplarily, in some embodiments, the TALF picture level identification (TALF picture level identification) can depend on the ALF sequence level identification (ALF sequence level identification), and the dependency relationship can be as follows:
[0170] Wherein, sps_talf_enabled_flag is used to indicate whether the current sequence is filtered by TALF, sps_alf_enabled_flag is used to indicate whether the current sequence is filtered by ALF, ph_talf_enabled_flag is used to indicate whether the current picture is filtered by TALF, and ph_talf_aps_id can be used to indicate where the adaptive parameters (such as the number of filters, filter coefficients) of TALF and other information are obtained in the APS parameter set when TALF is used.
[0171] Further, in the embodiments of the present application, the TALF identification at the picture level (and / or slice level) can also depend on the ALF identification at the picture level (and / or slice level).
[0172] That is, in the embodiments of the present application, the parsing of the second syntax element identification information can also depend on the ALF identification at the picture level (and / or slice level).
[0173] Exemplarily, in some embodiments, it is assumed that the ALF identification at the picture level can be represented by the syntax element ph_alf_enabled_flag, that is, ph_alf_enabled_flag indicates whether the current picture is allowed to be filtered by ALF. If ph_alf_enabled_flag indicates that the current picture is not filtered by ALF, then the decoding of the second syntax element identification information can be selected to be stopped; if ph_alf_enabled_flag indicates that the current picture is allowed to be filtered by ALF, then the determination of the second syntax element identification information can be further performed.
[0174] Exemplarily, in some embodiments, the TALF picture level identification (TALF picture level identification) can depend on the ALF picture level identification (ALF picture level identification), and the dependency relationship can be as follows:
[0175] 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 from the APS parameter set when TALF is used.
[0176] Exemplarily, in some embodiments, the image-level (and / or slice-level) TALF identification 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 image-level or slice-level of the image-level or slice-level syntax element parsing ALF, and the ALF identifier also exists in the slice header.
[0177] Exemplarily, in some embodiments, the slice-level TALF identification (slice-level TALF identification) can depend on the TALF control identification, and the dependency relationship can be as follows:
[0178] 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 image-level or slice-level is parsed by the image-level or slice-level syntax element of ALF, 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 from the APS parameter set when TALF is used.
[0179] Step 1002, in a case where the multiplexing history TALF information is determined to be filtered based on the multiplexing identification information, the code stream is decoded, the multiplexing index parameter is determined, and the history TALF information is determined according to the multiplexing index parameter.
[0180] Step 1003, filtering the current picture based on the history TALF information to determine the filtered reconstruction value of the current picture.
[0181] In the embodiments of the present application, if the history TALF information is determined to be filtered based on the multiplexing identification information, after the multiplexing index parameter is determined and the history TALF information is determined according to the multiplexing index parameter, the current picture can be further filtered based on the history TALF information to determine the filtered reconstruction value of the current picture.
[0182] In the embodiments of the present application, after determining the multiplexing identification information, if it is determined to multiplex the history TALF information for filtering based on the multiplexing identification information, the code stream can be further decoded to determine the multiplexing index parameter, and then the history TALF information can be determined according to the multiplexing index parameter, and finally the current image can be filtered based on the history TALF information to determine the filtered reconstruction value of the current image.
[0183] It can be understood that in the embodiments of the present application, the multiplexing index parameter can be used to determine the data unit recording and storing the history TALF information. The data unit recording and storing the history TALF information can be one storage structure or storage element in the candidate history data set, which is not specifically limited in the present application.
[0184] That is to say, in the embodiments of the present application, the history TALF information to be multiplexed can be indicated by the multiplexing index parameter.
[0185] It can be understood that in the embodiments of the present application, whether to multiplex the history temporal adaptive loop filter (history TALF information) is determined by analyzing the obtained multiplexing identification information. If multiplexing, a multiplexing index (multiplexing index parameter) can be analyzed to indicate which history TALF information is multiplexed.
[0186] Further, in the embodiments of the present application, after determining the multiplexing identification information, if it is determined not to multiplex the history TALF information for filtering based on the multiplexing identification information, the analysis of the multiplexing index parameter can be skipped, and the TALF information corresponding to the current image (or current slice) can be directly determined; and then the candidate history data set is updated based on the TALF information corresponding to the current image (or current slice).
[0187] It can be understood that in the embodiments of the present application, whether to multiplex the history temporal adaptive loop filter (history TALF information) is determined by analyzing the obtained multiplexing identification information. If not multiplexing, the filter and its coefficients of the current image are further analyzed, i.e. the TALF information corresponding to the current image is determined, and then the candidate history data set can be updated using the TALF information corresponding to the current image, for example, the TALF information corresponding to the current image is stored to the candidate history data set.
[0188] It should be noted that in the embodiments of the present application, the candidate history data set can include one or more history data sets. That is, the number of data sets recording and storing the history TALF information is not specifically limited in the present application.
[0189] Exemplarily, in some embodiments, the candidate history data set can be a First Input First Output (FIFO), that is, a FIFO for storing history filters can be saved and updated in units of a slice (or an image), and in the case of determining a multiplexing history filter, a corresponding history filter can be selected from the FIFO.
[0190] It can be understood that, in the embodiments of the present application, assuming that the candidate history data set is a FIFO, the method of updating the FIFO is to move each element in the FIFO one position backward and store one or more sets of filters parsed from the current slice at the first position of the FIFO.
[0191] It should be noted that, in the embodiments of the present application, if the number of elements in the FIFO reaches the maximum value of the length of the FIFO, the tail elements of the FIFO are removed first, and then the elements are shifted and the filters are stored.
[0192] Exemplarily, in some embodiments, a FIFO with a length of 8 is used to store time domain adaptive loop filters, at this time, there are 2 TALFs in the FIFO, and each TALF is one or more filters contained in a slice of history decoding.
[0193] Exemplarily, in some embodiments, when updating the FIFO, since the number of TALFs in the FIFO does not reach the maximum number, the existing two TALFs are all moved backward, and the TALFs parsed from the current slice are stored at the first position.
[0194] Exemplarily, in some embodiments, a FIFO with a length of 8 is used to store time domain adaptive loop filters, at this time, there are 8 TALFs in the FIFO, and each TALF is one or more filters contained in a slice of history decoding, since the number of TALFs in the FIFO has reached the maximum number, the tail TALF elements should be removed first, then each TALF is moved one position backward, and finally the TALFs parsed from the current slice are stored at the first position of the FIFO.
[0195] Of course, the length of the FIFO can be any integer value greater than 0, and is not limited to 8.
[0196] As can be seen, in the embodiments of the present application, when the current image (or the current slice) uses a TALF, an additional identifier needs to be encoded and decoded to indicate whether to multiplex the TALFs (history TALF information) of other images (or slices) in the FIFO, if multiplexing, the index of the FIFO is further encoded and decoded to determine the TALFs to be multiplexed, otherwise, the adaptive time domain filter parameters obtained by encoding and decoding the current image are encoded and decoded, and the FIFO is updated.
[0197] It can be understood that in the embodiments of the present application, the multiplexing index parameter can be represented as talf_reuse_idx, where talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO, and the value of talf_reuse_idx can be determined based on the storage length of the candidate history data set. For example, assuming that the maximum FIFO length is 8, the value range of talf_reuse_idx can be 0 to 7, which respectively represents which set of historical time domain adaptive loop filters in the multiplexed FIFO.
[0198] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0199] Where talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO. Since the maximum FIFO length in this example is 8, talf_reuse_idx is coded using a 3-bit fixed-length code at this time, and in other cases, a variable-length code or other length coding method can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which set of historical time domain adaptive loop filters in the multiplexed FIFO. When the syntax element does not exist in the bitstream, its value can be defaulted to 0.
[0200] Further, in the embodiments of the present application, after determining the multiplexing index parameter, the history TALF information can be determined according to the multiplexing index parameter.
[0201] In one implementation, when determining the history TALF information according to the multiplexing index parameter, the data unit index can be determined according to the multiplexing index parameter; then the data unit corresponding to the data unit index is determined in a history data set; so that the history TALF information can be determined based on the data unit corresponding to the data unit index; wherein the history TALF information includes: filter mode, number of filter groups and filter coefficients of candidate filters.
[0202] That is, in the embodiments of the present application, a way of multiplexing history TALF information includes determining the data unit corresponding to the data unit index, such as the element in the FIFO, from a history data set, and then obtaining the recorded filter mode, number of filter groups and filter coefficients of candidate filters.
[0203] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0204] Wherein, talf_reuse_flag is used to indicate whether to reuse the time domain adaptive filter in the FIFO, if the identifier is 1, it means to reuse the history adaptive loop filter recorded in the FIFO, and if the identifier is 0, it means not to reuse. When the syntax element does not exist in the code stream, its value can be defaulted as 0.
[0205] talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO, since the maximum length of the FIFO in this example is 8, so talf_reuse_idx uses 3-bit fixed length code to code, in other cases, variable length code or other length coding method can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which group of history time domain adaptive loop filter in the reuse FIFO. When the syntax element does not exist in the code stream, its value can be defaulted as 0.
[0206] updateFIFO() is a step of updating the FIFO using the TALFs decoded from the current slice, and the update process is as follows:
[0207] Wherein, tAlfParamPool is a FIFO recording history adaptive loop filter information, wherein each element can store one or more groups of time domain adaptive filters parsed from the current slice.
[0208] It can be seen that if the history TALF information recorded and stored in the history data set includes the filter mode, the number of filter groups and the filter coefficients of the candidate filter, when updating the history data set, the corresponding TALF information including the filter mode, the number of filter groups and the filter coefficients of the candidate filter also needs to be stored in the history data set.
[0209] Further, in the embodiments of the present application, after decoding the code stream and determining the first syntax element identifier information, in the case of determining that the current block reuses the history TALF information for filtering based on the first syntax element identifier information, the filter coefficients corresponding to the current block can be determined according to the first syntax element identifier information and the history TALF information.
[0210] Further, in the embodiments of the present application, when determining the filter coefficients corresponding to the current block according to the first syntax element identifier information and the history TALF information, the candidate filter corresponding to the current block can be first determined according to the first syntax element identifier information and the number of filter groups; and then the filter coefficients corresponding to the candidate filter are determined as the filter coefficients corresponding to the current block.
[0211] It can be understood that, in the embodiments of the present application, when multiplexing the historical TALF information, if the filter coefficients corresponding to the candidate filter are included in the historical TALF information, the filter coefficients corresponding to the filter of the current block (filter coefficients) can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0212] It can be understood that, in the embodiments of the present application, when multiplexing the historical TALF information, if the filter coefficients corresponding to the candidate filter are included in the historical TALF information, the filter coefficients corresponding to the filter of the current block (filter coefficients) can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0213] If the current slice does not multiplex the historical adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above-mentioned embodiments.
[0214] If the current slice uses the multiplexed historical adaptive loop filter, the number of multiplexed filters filterCount is first obtained:
[0215] filterCount = tAlfParamPool[talf_reuse_idx].filterCount
[0216] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0217] The first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY] can indicate whether the coding tree luma block at the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses the TALF filter. If talf_reuse_flag is 0, i.e., the historical adaptive loop filter is not multiplexed, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-talf_num_filters_signalled_minus1. If talf_reuse_flag is 1, i.e., the historical adaptive loop filter is multiplexed, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-filterCount-1. When the syntax element does not exist in the bitstream, the value thereof can be defaulted as 0.
[0218] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are obtained respectively:
[0219] numCoeff can be determined according to whether the tAlfMode indicates unidirectional filtering or bidirectional filtering when talf_reuse_flag is 1. For example, numCoeff is 13 when unidirectional filtering is indicated, and numCoeff is 14 when bidirectional filtering is indicated.
[0220] In an implementation, the filter mode corresponding to the current picture can be determined when it is determined that the current picture is filtered using TALF. Then, when the history TALF information is determined according to the reuse index parameter, a first history data set can be determined from the multiple history data sets according to the filter mode corresponding to the current picture; a data unit index can be determined according to the reuse index parameter, and a data unit corresponding to the data unit index in the first history data set can be determined; the history TALF information can be determined based on the data unit corresponding to the data unit index; and the history TALF information includes the number of filter groups and the filter coefficients of the candidate filters.
[0221] It can be understood that, in the embodiments of the present application, considering that there are three filter modes for temporal filtering in the RA and LD configurations respectively, different types of filter modes can be stored and updated using different FIFOs. For example, the filters for forward filtering of RA use one FIFO to record the history filters, the filters for backward filtering of RA use one FIFO to record the history filters, and the filters for bidirectional filtering of RA use one FIFO to record the history filters; the filters using POC N-1 of LD use one FIFO to record the history filters, the filters using POC N-2 of LD use one FIFO to record the history filters, and the filters using POC N-1 and POC N-2 of LD use one FIFO to record the history filters.
[0222] It should be noted that, in the embodiments of the present application, the first history data set can be one history data set corresponding to the filter mode from the multiple candidate history data sets.
[0223] Accordingly, in the embodiments of the present application, a talf_filter_mode needs to be coded and decoded to represent the selected filter mode (filter mode). That is, the talf_filter_mode indicating the filter mode needs to be transmitted regardless of whether the history filter is reused or not as indicated by the multiplexing identifier talf_reuse_flag.
[0224] That is, in the embodiments of the present application, a manner of multiplexing the history TALF information includes selecting one history data set corresponding to the filter mode from a plurality of history data sets, then determining a data unit corresponding to the data unit index in the history data set, and then obtaining the filter coefficients of the data unit record and the stored filter group and candidate filter.
[0225] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0226] The talf_reuse_flag is used to indicate whether the time-domain adaptive filter in the FIFO is reused or not. If the identifier is 1, it indicates that the history adaptive loop filter recorded in the FIFO is reused, and if the identifier is 0, it indicates that the history adaptive loop filter is not reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be defaulted to 0.
[0227] The talf_reuse_idx can be used to indicate the index of the time-domain adaptive filter in the FIFO. Since the length of the FIFO is maximally 8 in this example, the talf_reuse_idx is coded using a 3-bit fixed-length code at this time, and in other cases, a variable-length code or other length coding manner can also be used. The value range of the talf_reuse_idx is 0 to 7, which respectively represents which history time-domain adaptive loop filter in the FIFO is reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be defaulted to 0.
[0228] The updateFIFO() is a step of updating the FIFO using the TALFs decoded in the current slice, and the update process is as follows:
[0229] The tAlfParamPool is a FIFO recording the history adaptive loop filter information, and each element can store one or more groups of time-domain adaptive filters parsed in the current slice.
[0230] It can be seen that if the history TALF information recorded and stored in the history data set includes the filter group number and the filter coefficients of the candidate filter, when the history data set is updated, the corresponding TALF information including the filter group number and the filter coefficients of the candidate filter also needs to be stored in the history data set.
[0231] Further, in the embodiments of the present application, after decoding the code stream and determining the first syntax element identification information, in the case of determining the current block multiplexing history TALF information for filtering based on the first syntax element identification information, the filter coefficients corresponding to the current block can be determined according to the first syntax element identification information and the history TALF information.
[0232] Further, in the embodiments of the present application, when determining the filter coefficients corresponding to the current block according to the first syntax element identification information and the history TALF information, the candidate filter corresponding to the current block can be first determined according to the first syntax element identification information and the number of filter groups of the filter; and then the filter coefficients corresponding to the candidate filter are determined as the filter coefficients corresponding to the current block.
[0233] It can be understood that, in the embodiments of the present application, when multiplexing the history TALF information, if the filter coefficients corresponding to the candidate filter are included in the history TALF information, the filter coefficients (filter coefficients) corresponding to the current block can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0234] It can be understood that, in the embodiments of the present application, when multiplexing the history temporal adaptive loop filter, since the FIFO can contain greater than or equal to one temporal adaptive filter at talf_reuse_idx, when encoding the CTU identifier, the corresponding identifier should also be used to represent whether the history temporal adaptive loop filter is selected and which filter in the TALF is selected.
[0235] If the current slice does not multiplex the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above embodiments.
[0236] If the current slice uses the multiplexed history adaptive loop filter, the number of multiplexed filters filterCount is first obtained:
[0237] filterCount = tAlfParamPool[talf_filter_mode][talf_reuse_idx].filterCount
[0238] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0239] Wherein, the talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree block of the CtbAddrX horizontal direction and the CtbAddrY vertical direction uses the TALF filter. If the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the talf_ctb_idc[CtbAddrX][CtbAddrY] has a value range of 0-talf_num_filters_signalled_minus1. If the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the talf_ctb_idc[CtbAddrX][CtbAddrY] has a value range of 0-filterCount-1. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0240] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments. If the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are obtained respectively:
[0241] In an embodiment, for TALF, the filter mode always uses one 7x7 filter or two 5x5 filters, corresponding to using one reconstructed value in one reconstructed picture as input and two reconstructed values in two reconstructed pictures as input respectively. Wherein, the update FIFO can be mainly divided into forward, backward and bidirectional TALF filters which can be updated in different FIFOs or always in the same FIFO, or the update of the FIFO can be divided into two categories of using one reconstructed picture and using two reconstructed pictures.
[0242] That is, in the embodiments of the present application, considering that the input of TALF can include two cases of one inter-frame reference picture and two inter-frame reference pictures, the data amount of different input pictures can be stored and updated using different FIFOs. For example, one inter-frame reference picture input uses one of the FIFOs to record the history filter, and two inter-frame reference picture input uses another FIFO to record the history filter.
[0243] It should be noted that in the embodiments of the present application, the first historical data set can be one historical data set corresponding to the filtering mode in the plurality of candidate historical data sets. Specifically, the number of inter-frame reference images of the input of the TALF is determined according to the filtering mode first, and then the corresponding one historical data set is determined from the plurality of candidate historical data sets according to the number of inter-frame reference images of the input.
[0244] Correspondingly, in the embodiments of the present application, a talf_filter_mode needs to be coded and decoded to represent the selected filter mode (filtering mode). That is, whether the historical filter is reused or not is indicated by the multiplexing identifier talf_reuse_flag, and the talf_filter_mode indicating the filtering mode needs to be transmitted.
[0245] That is, in the embodiments of the present application, a manner of reusing the historical TALF information includes selecting one historical data set corresponding to the filtering mode (the number of inter-frame reference images of the input) from a plurality of historical data sets, then determining a data unit corresponding to a data unit index in the historical data set, and then obtaining the filter coefficients of the group of stored filters and the candidate filters recorded in the data unit.
[0246] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0247] Wherein, talf_reuse_flag is used to indicate whether to reuse the time domain adaptive filter in the FIFO, if this identifier is 1, it indicates that the historical adaptive loop filter recorded in the FIFO is reused, and if the identifier is 0, it indicates that it is not reused. When the syntax element does not exist in the code stream, its value can be defaulted to 0.
[0248] talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO, since the maximum length of the FIFO in this example is 8, so talf_reuse_idx is coded using a 3-bit fixed-length code at this time, and in other cases, variable-length code or other length coding methods can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which group of historical time domain adaptive loop filters in the FIFO is reused. When the syntax element does not exist in the code stream, its value can be defaulted to 0.
[0249] updateFIFO() is a step of updating the FIFO using the TALF decoded by the current slice, and the update process is as follows:
[0250] It can be seen that if the update of the FIFO is divided into two categories of using one reconstructed image and using two reconstructed images, then the number of FIFOs is only two, and the updated FIFO will be determined according to FIFOType, when the filter to be updated in the FIFO is a 13-coefficient filter (one reconstructed image input, 7x7 shape), FIFOType is set to 0; when the filter to be updated in the FIFO is a 14-coefficient filter (two reconstructed image inputs, two 5x5 shapes), FIFOType is set to 1.
[0251] It can be seen that if the historical TALF information recorded and stored in the historical data set includes the number of filter groups and the filter coefficients of the candidate filter, then when updating the historical data set, the corresponding TALF information including the number of filter groups and the filter coefficients of the candidate filter also needs to be stored in the historical data set.
[0252] Further, in the embodiments of the present application, after decoding the code stream and determining the first syntax element identification information, in the case of determining that the current block multiplexes historical TALF information for filtering based on the first syntax element identification information, the filter coefficients corresponding to the current block can be determined according to the first syntax element identification information and the historical TALF information.
[0253] Further, in the embodiments of the present application, when determining the filter coefficients corresponding to the current block according to the first syntax element identification information and the historical TALF information, the candidate filter corresponding to the current block can be first determined according to the first syntax element identification information and the number of filter groups, and then the filter coefficients corresponding to the candidate filter are determined as the filter coefficients corresponding to the current block.
[0254] It can be understood that in the embodiments of the present application, when multiplexing historical TALF information, if the filter coefficients corresponding to the candidate filter are included in the historical TALF information, then the filter coefficients (filter coefficients) corresponding to the current block can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0255] It can be understood that in the embodiments of the present application, when multiplexing historical temporal adaptive loop filters, since the FIFO can contain greater than or equal to one temporal adaptive filter at talf_reuse_idx, when coding the CTU identifier, the corresponding identifier should also be used to represent whether the historical temporal adaptive loop filter is selected and which filter in the TALF is selected.
[0256] If the current slice does not reuse the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the regular TALF method in the above embodiments.
[0257] If the current slice reuses the history adaptive loop filter, first get the number of reused filters filterCount:
[0258] filterCount = tAlfParamPool[FIFOType][talf_reuse_idx].filterCount
[0259] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0260] Wherein, the talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree luma block at the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses TALF filtering. If talf_reuse_flag is 0, i.e. not reusing the history adaptive loop filter, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-talf_num_filters_signalled_minus1. If talf_reuse_flag is 1, i.e. reusing the history adaptive loop filter, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-filterCount-1. When the syntax element does not exist in the bitstream, its value can be defaulted as 0.
[0261] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e. not reusing the history adaptive loop filter, the filter coefficient reconstruction process is the same as the regular TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e. reusing the history adaptive loop filter, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are respectively obtained:
[0262] numCoeff can be determined according to talf_filter_mode indicating whether it is single-direction filtering or double-direction filtering when talf_reuse_flag is 1. It is 13 when single-direction filtering, and 14 when double-direction filtering.
[0263] In one embodiment, when it is determined that the current picture is filtered using TALF, the bitstream is decoded, and the filter mode corresponding to the current picture and the number of filter groups are determined. Then, when the history TALF information is determined according to the multiplexing index parameter, the data unit index is determined according to the multiplexing index parameter, and the data unit corresponding to the data unit index is determined in the one history data set; wherein the number of data unit indexes and the number of data units corresponding to the data unit indexes are determined based on the number of filter groups; the history TALF information is determined based on the data units corresponding to the data unit indexes; wherein the history TALF information includes the filter coefficients of the candidate filter.
[0264] It can be understood that in the embodiments of the present application, the time domain adaptive filter of different slices (or different pictures) can be combined. In the embodiments of the present application, the time domain adaptive filter of all filter modes is updated in the same FIFO, and each element in the FIFO can only store one group of filters. If one group of filters is parsed in the current slice (or the current picture), one group of filters is updated in the FIFO; if multiple groups of filters are parsed in the current slice (or the current picture), multiple groups of filters are updated in the FIFO. Each index corresponds to one group of filters. When multiplexing, one or more indexes of the FIFO can be used to obtain one or more groups of filters for the current slice (or the current picture).
[0265] That is, in the embodiments of the present application, since each element in the FIFO can only store one group of filters, that is, one group of history TALF information is stored in each data unit, the number of data unit indexes and the number of data units corresponding to the data unit indexes are determined based on the number of filter groups.
[0266] Correspondingly, in the embodiments of the present application, talf_filter_mode needs to be coded and decoded to represent the selected filter mode (filter mode), and talf_num_filters_signalled_minus1 needs to be coded and decoded to indicate the number of coded filters minus one. That is, whether the history filter is reused or not is indicated by the multiplexing identifier talf_reuse_flag, talf_filter_mode indicating the filter mode and talf_num_filters_signalled_minus1 indicating the number of filter groups need to be transmitted.
[0267] That is, in the embodiments of the present application, a way of multiplexing history TALF information includes determining the data unit corresponding to the data unit index from the one history data set, and then obtaining the filter coefficients of the candidate filter recorded and stored in the data unit.
[0268] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0269] wherein talf_reuse_flag is used to indicate whether to reuse the time-domain adaptive filter in the FIFO, if the flag is 1, it means to reuse the history adaptive loop filter recorded in the FIFO, and if the flag is 0, it means not to reuse. When the syntax element is not present in the bitstream, it can be inferred to be equal to 0 by default.
[0270] talf_reuse_idx can be used to indicate the index of the time-domain adaptive filter in the FIFO, since the length of the FIFO is 8 in this example, talf_reuse_idx is coded using a 3-bit fixed length code in this case, and in other cases, variable length code or other length coding method can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which group of history time-domain adaptive loop filter in the FIFO is reused. When the syntax element is not present in the bitstream, it can be inferred to be equal to 0 by default.
[0271] It should be noted that in the embodiments of the present application, in the process of reusing the history time-domain adaptive loop filter, a plurality of talf_reuse_idx can be further decoded to indicate the index of each reused filter in the FIFO.
[0272] updateFIFO() is a step of updating the FIFO using the TALFs decoded from the current slice, and the update process is as follows:
[0273] wherein tAlfParamPool is a FIFO recording the history adaptive loop filter information, and each element can store a group of time-domain adaptive filters parsed from the current slice.
[0274] It can be seen that if the history TALF information recorded and stored in the history data set includes the filter coefficients of the candidate filter, when the history data set is updated, the TALF information including the filter coefficients of the candidate filter also needs to be stored in the history data set.
[0275] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e. not to reuse the history adaptive loop filter, the process of reconstructing the filter coefficients is the same as the conventional TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e. to reuse the history adaptive loop filter, the filter coefficients are obtained as follows:
[0276] In one embodiment, the bitstream can be decoded in the case that the current picture is determined to be filtered using TALF, and the number of filter sets corresponding to the current picture is determined. Then, in the case that the history TALF information is determined according to the multiplexing index parameter, the data unit index can be determined according to the multiplexing index parameter, the data unit corresponding to the data unit index is determined in the one history data set, the history TALF information is determined based on the data unit corresponding to the data unit index, and the history TALF information includes the filter mode and the filter coefficients of the candidate filter.
[0277] It can be understood that, in the embodiments of the present application, the history temporal loop filter is allowed to be combined, but the filters in each filter mode are updated in the same FIFO.
[0278] Correspondingly, in the embodiments of the present application, talf_num_filters_signalled_minus1 needs to be coded and decoded to indicate the number of coded filters minus one. That is, no matter whether the history filter is reused or not, which is indicated by the multiplexing identifier talf_reuse_flag, talf_num_filters_signalled_minus1 indicating the number of filters needs to be transmitted.
[0279] That is, in the embodiments of the present application, a manner of multiplexing the history TALF information includes determining the data unit corresponding to the data unit index from the one history data set, and then obtaining the recorded filter mode and the filter coefficients of the candidate filter.
[0280] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0281] talf_reuse_flag is used to indicate whether the temporal adaptive filter in the FIFO is reused or not. If the identifier is 1, it indicates that the history adaptive loop filter recorded in the FIFO is reused, and if the identifier is 0, it indicates that the history adaptive loop filter recorded in the FIFO is not reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0282] talf_reuse_idx can be used to indicate the index of the temporal adaptive filter in the FIFO. Since the length of the FIFO is 8 in this example, talf_reuse_idx is coded using a 3-bit fixed-length code in this case, and in other cases, a variable-length code or other length coding manner can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which group of history temporal adaptive loop filter in the FIFO is reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0283] It should be noted that in the embodiments of the present application, each filter should be assigned the type of the corresponding filter mode in the process of updating the FIFO.
[0284] updateFIFO() is a step of updating the FIFO using the TALFs decoded by the current slice, and the update process is as follows:
[0285] tAlfParamPool is a FIFO recording the historical adaptive loop filtering information, and each element can store one or more sets of time domain adaptive filters parsed from the current slice.
[0286] It can be seen that if the historical TALF information recorded and stored in the historical data set includes the filter mode and the filter coefficients of the candidate filter, the corresponding TALF information including the filter mode and the filter coefficients of the candidate filter also needs to be stored in the historical data set when the historical data set is updated.
[0287] Further, in the embodiments of the present application, when the filter coefficients are reconstructed, if talf_reuse_flag is 0, i.e. the historical adaptive loop filter is not reused, the process of reconstructing the filter coefficients is the same as the conventional TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e. the historical adaptive loop filter is reused, the filter coefficients are obtained as follows:
[0288] numCoeff can be determined according to whether talf_reuse_flag indicates unidirectional filtering or bidirectional filtering. When it is unidirectional filtering, numCoeff is 13, and when it is bidirectional filtering, numCoeff is 14.
[0289] Further, in the embodiments of the present application, in the case of determining not to reuse the historical TALF information for filtering, at least one inter-frame reference image corresponding to the current image and the filter coefficients corresponding to the current block can be further determined. That is, in the case of determining not to reuse the historical TALF information for filtering based on the reuse identification information, the TALF information corresponding to the current image can be determined.
[0290] Further, in the embodiments of the present application, when determining the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block, the TALF parameters corresponding to the current block can be determined first, wherein the TALF parameters include one or more of a mode parameter, a number parameter, a coefficient value parameter and a coefficient sign parameter; then the filter mode and the number of filter groups are determined according to the TALF parameters; the at least one inter-frame reference picture can be determined according to the filter mode; and the filter coefficients corresponding to the current block can be determined according to the number of filter groups, the coefficient value parameter, the coefficient sign parameter and the first syntax element identification information.
[0291] It can be understood that, in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filtering, wherein the determined inter-frame reference picture corresponding to the current picture can be different for different filter modes. The number parameter can be used to determine the number of filter groups corresponding to the current picture. The coefficient value parameter can be used to determine the absolute value of the filter coefficient. The coefficient sign parameter can be used to determine the sign of the filter coefficient, including positive and negative.
[0292] Further, in the embodiments of the present application, when determining the TALF parameters corresponding to the current block, in the case of determining that the current picture uses TALF filtering based on the second syntax element identification information, the code stream can be decoded to determine the APS index; then the APS set can be determined according to the APS index, and the TALF parameters are determined based on the APS set.
[0293] 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.
[0294] Exemplarily, in some embodiments, in the case of determining that the current slice uses TALF filtering based on the second syntax element identification information, the code stream can be further decoded to determine the corresponding APS index sh_talf_aps_id, which can be used to indicate in which APS parameter set the adaptive parameters (TALF parameters) of the TALF corresponding to the current slice are obtained when TALF is used.
[0295] Exemplarily, in some embodiments, in the case of determining that the current slice uses TALF filtering based on the second syntax element identification information, the code stream can be further decoded to determine the corresponding APS index sh_talf_aps_id, which can be used to indicate in which APS parameter set the adaptive parameters (TALF parameters) of the TALF corresponding to the current slice are obtained when TALF is used. It can be understood that, in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filtering, wherein the determined inter-frame reference picture corresponding to the current picture can be different for different filter modes. The number parameter can be used to determine the number of filter groups corresponding to the current picture. The coefficient value parameter can be used to determine the absolute value of the filter coefficient. The coefficient sign parameter can be used to determine the sign of the filter coefficient, including positive and negative.
[0296] 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.
[0297] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing the APS is as follows:
[0298] Wherein, alf_data() is a function of parsing ALF, CCALF related syntax elements, parameters. The scheme can further add the syntax elements and parameters of TALF in alf_data() for parsing.
[0299] Exemplarily, in some embodiments, the implementation of determining the TALF parameters by parsing alf_data() is as follows:
[0300] Wherein, talf_filter_signal_flag is used to identify whether there is a TALF parameter in the parameters of the current alf_data.
[0301] talf_filter_mode is a mode parameter, which is used to indicate which mode the TALF belongs to among the forward / backward / bidirectional modes if there is a TALF parameter.
[0302] talf_num_filters_signalled_minus1 is a number parameter, which is used to indicate the number of filter groups. For example, if there is a TALF parameter, the value of talf_num_filters_signalled_minus1 is the number of TALF filters in the current APS minus one.
[0303] talf_coeff_abs is a coefficient value parameter, which is used to indicate the absolute value of the coefficient in each filter.
[0304] talf_coeff_sign is a coefficient sign parameter, which is used to indicate the positive and negative of the non-zero coefficient in each filter.
[0305] numCoeff variable represents the number of filter coefficients in the filter.
[0306] Further, in the embodiments of the present application, when determining the TALF parameters corresponding to the current block, in the case of determining that the current image uses TALF for filtering based on the second syntax element identification information, the TALF parameters can be determined by decoding the code stream.
[0307] That is, in the embodiments of the present application, the TALF parameters corresponding to the current image can be directly written into the code stream, so that the TALF parameters can be obtained by decoding the code stream. For example, the TALF parameters can be coded in the image header or the slice header.
[0308] Exemplarily, in some embodiments, the method of coding the TALF identifier and the TALF parameters in the image header is as follows:
[0309] Further, in the embodiments of the present application, when determining the filter mode and the number of filter groups according to the TALF parameters, the current configuration can be determined first; in the case of a random access (RA) configuration, the filter mode is determined in a first candidate mode according to the mode parameters; wherein the first candidate mode includes one or more of a forward filter mode, a backward filter mode and a bidirectional filter mode; in the case of a low delay (LD) configuration, the filter mode is determined in a second candidate mode according to the mode parameters; wherein the second candidate mode includes one or more of a first forward filter mode, a second forward filter mode and a third forward filter mode.
[0310] It should be noted that, in the embodiments of the present application, the filter mode corresponding to the current image can be determined in combination with the current configuration and the mode parameters in the TALF parameters. Wherein, according to the current configuration, the determination of the filter mode based on the first candidate mode or the second candidate mode can be determined, and then the corresponding filter mode can be selected from the first candidate mode or the second candidate mode according to the mode parameters.
[0311] It can be understood that, in the embodiments of the present application, for the RA configuration, the corresponding first candidate mode can include one or more of the forward filter mode, the backward filter mode and the bidirectional filter mode. Wherein, the forward filter mode can be understood as using the reconstructed information of the reconstructed image smaller than the POC of the current image as the input of the filter, the backward filter mode can be understood as using the reconstructed information of the reconstructed image larger than the POC of the current image as the input of the filter, and the bidirectional filter mode can be understood as using the reconstructed information of the reconstructed image smaller than the POC of the current image and the reconstructed information of the reconstructed image larger than the POC of the current image as the input of the filter.
[0312] It can be understood that, in the embodiments of the present application, for the LD configuration, the corresponding second candidate mode can include one or more of the first forward filtering mode, the second forward filtering mode and the third forward filtering mode. Wherein, for the coding under the LD configuration, the coding order is the same as the playing order, so only the reference image smaller than the current image POC can be used as the input of the filter, that is, only the forward filtering mode is supported. However, corresponding to different inter-frame reference images, the corresponding forward filtering mode can be distinguished into the first forward filtering mode, the second forward filtering mode and the third forward filtering mode.
[0313] 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.
[0314] 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.
[0315] Exemplarily, in some embodiments, if the POC value of the current image is N, for the RA configuration, if the determined filtering mode is the forward filtering mode, the image with the POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the reverse filtering mode, the image with the POC value of N+1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the bidirectional filtering mode, the images with the POC values of N-1 and N+1 can be selected as the inter-frame reference images of the current image.
[0316] Exemplarily, in some embodiments, if the POC value of the current image is N, for the LD configuration, the images with the POC values of N-1, N-2… can be used as the inter-frame reference images of the current image. For example, if the determined filtering mode is the first forward filtering mode, the image with the POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the second forward filtering mode, the image with the POC value of N-2 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the third forward filtering mode, the images with the POC values of N-1 and N-2 can be selected as the inter-frame reference images of the current image.
[0317] That is, in the embodiments of the present application, the POC values of the inter-frame reference images determined based on different filter modes can be different, and the number of the determined inter-frame reference images can also be different. For example, for the forward filter mode, the backward filter mode in the RA configuration, and the first forward filter mode (the nearest first frame) and the second forward filter mode (the nearest second frame) in the LD configuration, the current image corresponds to one inter-frame reference image; for the bidirectional filter mode in the RA configuration and the third forward filter mode (the nearest first frame and the nearest second frame) in the LD configuration, the current image corresponds to two inter-frame reference images.
[0318] It can be seen that, for the time-domain adaptive loop filter type, the intra-frame encoded image has no reference image, and the inter-frame encoded image has a reference image, so the time-domain filter of the present scheme is applied to the inter-frame encoded image, for example, the inter-frame encoded image under the encoding type of the RA and LD configurations. For the coding under the LD configuration, the coding sequence is the same as the playing sequence, so when the time-domain adaptive filter is used for the inter-frame encoded image, the reference image with a smaller POC than the current image is always used as the input of the filter. For the coding under the RA configuration, the coding sequence can be different from the playing sequence, and when the time-domain filter is used for the current inter-frame encoded image, the reference frame with a larger or smaller POC than the current frame can be used as the input of the filter.
[0319] The forward filter uses the reconstructed information of the reconstructed image with a smaller POC than the current image as the input of the filter to generate the filter value acting on the current reconstructed image. For example, under the LD configuration, the POC of the current image is N, N is a non-negative integer, and the reconstructed values of the reconstructed images with POC values of N-1, N-2, … can be used as the input of the filter; for example, under the RA configuration, under the coding sequence, when the POC of the current image is N, the inter-frame encoded image with a TID of 5 can use the reconstructed value of the image with a POC value of N-1 as the input of the filter; the inter-frame encoded image with a TID of 4 can use the reconstructed value of the image with a POC value of N-2 as the input of the filter; the inter-frame encoded image with a TID of 3 can use the reconstructed value of the image with a POC value of N-4 as the input of the filter; the inter-frame encoded image with a TID of 2 can use the reconstructed value of the image with a POC value of N-8 as the input of the filter; the inter-frame encoded image with a TID of 1 can use the reconstructed value of the image with a POC value of N-16 as the input of the filter; and the inter-frame encoded image with a TID of 0 can use the reconstructed value of the image with a POC value of N-32 as the input of the filter.
[0320] It should be noted that, in the embodiments of the present application, the POC value of the reference frame used in the forward filter also changes due to different encoding configurations.
[0321] Reverse filtering is to use the reconstructed information of the reconstructed image with a larger POC than the current image as the input of the filter to generate the filtered value acting on the current reconstructed image. In the current various coding configurations, reverse filtering is only used in the RA configuration. For example, in the RA configuration, when the POC of the current image is N in the coding order, the inter-coded image with TID of 5 can use the reconstructed value of the image with POC value of N+1 as the input of the filter; the inter-coded image with TID of 4 can use the reconstructed value of the image with POC value of N+2 as the input of the filter; the inter-coded image with TID of 3 can use the reconstructed value of the image with POC value of N+4 as the input of the filter; the inter-coded image with TID of 2 can use the image with POC value of N+8 as the input of the filter; the inter-coded image with TID of 1 can use the reconstructed value of the image with POC value of N+16 as the input of the filter; and the inter-coded image with TID of 0 can use the reconstructed value of the image with POC value of N+32 as the input of the filter.
[0322] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in reverse filtering will change due to different coding configurations.
[0323] Bidirectional filtering is to use the reconstructed information of the image with a smaller POC than the current image and the reconstructed information of the image with a larger POC than the current image as the input of the filter to generate the filtered value acting on the current reconstructed image. In the current various coding configurations, bidirectional filtering is only used in the RA configuration. For example, in the RA configuration, when the POC of the current image is N in the coding order, the inter-coded image with TID of 5 can use the reconstructed value of the image with POC value of N+1 and N-1 as the input of the filter; the inter-coded image with TID of 4 can use the reconstructed value of the image with POC value of N+2 and N-2 as the input of the filter; the inter-coded image with TID of 3 can use the reconstructed value of the image with POC value of N+4 and N-4 as the input of the filter; the inter-coded image with TID of 2 can use the image with POC value of N+8 and N-8 as the input of the filter; the inter-coded image with TID of 1 can use the reconstructed value of the image with POC value of N+16 and N-16 as the input of the filter; and the inter-coded image with TID of 0 can use the reconstructed value of the image with POC value of N+32 and N-32 as the input of the filter.
[0324] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in bidirectional filtering will change due to different coding configurations. In principle, in the RA configuration, bidirectional filtering always uses the reconstructed value of the two reconstructed images with the closest forward and backward distances as the input of the filter.
[0325] 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 the following:
[0326] 1. When in the RA configuration, use the reference picture with the closest temporal distance and smaller POC than the current picture as the input of the temporal filter;
[0327] 2. When in the LD configuration, use the reference picture with POC value N-1 as the input of the temporal filter corresponding to the first forward filter mode when the POC value of the current picture is N;
[0328] 3. When in the LD configuration, use the reference picture with POC value N-2 as the input of the temporal filter corresponding to the second forward filter mode when the POC value of the current picture is N;
[0329] 4. When in the LD configuration, use the reference pictures with POC values N-2 and N-1 as the inputs of the temporal filter corresponding to the third forward filter mode when the POC value of the current picture is N.
[0330] Further, in the embodiments of the present application, when the number of groups of filters is determined according to the TALF parameter, the number of groups of filters can be determined according to the quantity parameter. The number of groups of filters can be determined according to the quantity parameter and a preset value.
[0331] It can be understood that, in the embodiments of the present application, when the number of groups of filters is determined according to the quantity parameter and the preset value, the quantity parameter and the preset value can be mathematically operated to obtain the number of groups of filters.
[0332] Exemplarily, in some embodiments, the quantity parameter can be represented by a syntax element talf_num_filters_signalled_minus1, which is a syntax element indicating the number of TALF filters contained in the current slice minus 1 (i.e., the preset value is 1). The value of talf_num_filters_signalled_minus1 can be 0, 1, 2 or 3, assuming that a slice can have at most four TALF filters. The syntax element is 0, indicating that the current slice has one TALF filter; the syntax element is 1, indicating that the current slice has two TALF filters; the syntax element is 2, indicating that the current slice has three TALF filters; and the syntax element is 3, indicating that the current slice has four TALF filters. When the syntax element does not exist in the code stream, its value can be 0 by default.
[0333] Further, in the embodiments of the present application, when the filter coefficients corresponding to the current block are determined according to the number of groups of filters, the coefficient value parameter, the coefficient sign parameter and the first syntax element identification information, the candidate filter corresponding to the current block can be first determined according to the first syntax element identification information and the number of groups of filters; and then the filter coefficients corresponding to the current block are determined according to the candidate filter corresponding to the current block, the coefficient value parameter and the coefficient sign parameter.
[0334] It can be understood that in the embodiments of the present application, the first syntax element identification information can also be used to determine the TALF information used by the current block, for example, the candidate filter corresponding to the current block can be determined through the value of the first syntax element identification information.
[0335] For example, in some embodiments, when the value of the first syntax element identification information is a first value, it is determined that the current block is not filtered using TALF. When the value of the first syntax element identification information is not the first value, it is determined that the current block is filtered using TALF, and the candidate filter corresponding to the current block can be further determined according to the first syntax element identification information.
[0336] Further, in the embodiments of the present application, when the candidate filter corresponding to the current block is determined according to the first syntax element identification information and the group number of the filter, the group number index of the filter corresponding to the current block can be first determined according to the first syntax element identification information; then the candidate filter corresponding to the current block is determined according to the group number of the filter and the group number index of the filter corresponding to the current block.
[0337] It can be understood that in the embodiments of the present application, when it is determined that the current block is filtered using TALF, the group number index of the filter corresponding to the current block can be determined according to the value of the first syntax element identification information. The group number index of the filter can represent the index of the TALF filter used by the current block in the filter set coded in the current image, that is, the group number index of the filter can be used to select the candidate filter corresponding to the current block from the multiple filters corresponding to the current image.
[0338] For example, in some embodiments, if the current block of the current image is a CTU, assuming that the first syntax element identification information is represented by the syntax element control talf_ctb_idc[CtbAddrX][CtbAddrY], if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0, it is determined that the current block is not filtered using TALF, if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 1, then it can be determined that the candidate filter corresponding to the current block can be the first group of filters in the at least one group of filters, if the value of talf_ctb_idc[CtbAddrX][CtbAddrY] is 2, then it can be determined that the candidate filter corresponding to the current block can be the second group of filters in the at least one group of filters.
[0339] 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.
[0340] 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.
[0341] 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.
[0342] 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 using K-order exponential Golomb code, and K is 0.
[0343] 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.
[0344] 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.
[0345] 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.
[0346] 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].
[0347] 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
[0348] The process of reconstructing the filter coefficients according to the coefficient sign is as follows:
[0349] Wherein, the numCoeff variable represents the number of filter coefficients in the filter.
[0350] 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.
[0351] 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.
[0352] Further, in the embodiments of the present application, after determining the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block, the current block can be further filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block.
[0353] It can be understood that in the embodiments of the present application, since the POC values of the inter-frame reference pictures determined based on different filter modes can be different, and the number of the determined inter-frame reference pictures can also be different, when the TALF filtering is performed on the current block of the current picture, the filtering processes performed corresponding to different numbers of inter-frame reference pictures are also different.
[0354] Further, in the embodiments of the present application, when the current block is filtered based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block, for a current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, and the reconstructed sample value of a reference sample position corresponding to the current sample position is determined according to the reconstructed samples of the inter-frame reference picture; the filtered reconstructed sample value of the current sample position is determined according to the filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0355] It can be understood that, in the embodiments of the present application, for the forward filtering mode in the RA configuration, the backward filtering mode, and the first forward filtering mode (the nearest first frame) and the second forward filtering mode (the nearest second frame) in the LD configuration, the current image corresponds to one inter-frame reference image, and when the TALF filter is used to filter the reconstructed value of the current block based on the reconstructed sample of the one inter-frame reference image, the reference sample position corresponding to the current sample position can be determined in the one inter-frame reference image, and then the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position are input into the TALF filter, and finally the filtered reconstructed sample value of the current sample position is determined according to the determined filter coefficient corresponding to the current block, and 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.
[0356] Exemplarily, in some embodiments, it is assumed that the current image corresponds to one inter-frame reference image, and at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current image using 13 filter coefficients and a 7x7 symmetric filter is as follows:
[0357] wherein rec' (x,y) is the reconstructed sample value at the (x, y) position after the correction by the temporal adaptive filter, rec (x,y) is the reconstructed sample value at the (x, y) position to be corrected, and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) in the inter-frame reference image, and c is the filter coefficient of the temporal adaptive filter.
[0358] 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.
[0359] 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 used as the input of the filter.
[0360] 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 follows:
[0361] 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 can be determined according to the reconstructed value of the current block; the second sample difference value can be 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 can be 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.
[0362] 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 can be taken as the input of the filter.
[0363] 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 follows:
[0364] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of at least one inter- reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block, for the current sample position in the current block, the reconstructed sample value at the current sample position can be 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 can be 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 can be determined according to the reconstructed samples of the second inter- reference picture; the filtered reconstructed sample value at the current sample position can be determined according to the filter coefficients corresponding to the current block, the reconstructed sample value at the current sample position, the reconstructed sample value at the first reference sample position, and the reconstructed sample value at the second reference sample position; and the filtered reconstructed value of the current block can be determined according to the filtered reconstructed sample value at the current sample position.
[0365] It can be understood that, in the embodiments of the present application, for the bidirectional filtering mode in the RA configuration, and the third forward filtering mode (the nearest first frame and the nearest second frame) in the LD configuration, the current picture corresponds to two inter-frame reference pictures, and when the TALF filtering is performed on the reconstructed values of the current block based on the reconstructed samples of the two inter-frame reference pictures, the reference sample positions corresponding to the current sample position can be determined in the two inter-frame reference pictures respectively, and then the reconstructed sample value corresponding to the current sample position, the reconstructed sample values corresponding to the two reference sample positions are input into the TALF filter respectively, combined with the determined filter coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0366] Exemplarily, in some embodiments, assuming that the current picture corresponds to two inter-frame reference pictures, at this time, the process of filtering the sample value at the coordinate (x, y) position (the current sample position) in the current picture using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0367] Wherein, rec' (x,y) is the reconstructed sample value at the (x, y) position after the correction by the temporal adaptive filter, rec (x,y) is the reconstructed sample value at the (x, y) position to be corrected, ref0 and ref1 are the reconstructed values of the first inter-frame reference picture and the second inter-frame reference picture respectively. and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the first inter-frame reference picture, and are the reconstructed sample values at (x-u i , y-u i ) and (x+u i , y+u i ) of the second inter-frame reference picture, and c is the temporal adaptive filter coefficient.
[0368] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position, the third sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the first reference sample position; the fourth sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position can be determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the third sample difference value, and the fourth sample difference value.
[0369] That is, in the embodiments of the present application, the third sample difference value and the fourth sample difference value can also be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the two reference sample positions respectively, and then the third sample difference value and the fourth sample difference value can be taken as the input of the filter.
[0370] 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 coordinate (x, y) position (the current sample position) in the current image using 7 filter coefficients and 2 filters of 5x5 symmetry is as follows:
[0371] Further, in the embodiments of the present application, when the filtered reconstructed sample value of the current sample position is determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position, the filter position corresponding to the reference sample position in the current block can be determined, and the reconstructed sample value of the filter position can be determined according to the reconstructed value of the current block; the fifth sample difference value can be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the first reference sample position; the sixth sample difference value can be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position can be determined according to the filter coefficient corresponding to the current block, the reconstructed sample value of the current sample position, the fifth sample difference value, and the sixth sample difference value.
[0372] That is, in the embodiments of the present application, for each filter position, the fifth sample difference value and the sixth sample difference value can also be determined according to the reconstructed sample value of the filter position and the reconstructed sample value of the two reference sample positions respectively, and then the fifth sample difference value and the sixth sample difference value can be taken as the input of the filter.
[0373] Exemplarily, in some embodiments, assuming that there are two inter- reference pictures corresponding to the current picture, the filtering process of the sample value at the coordinate (x, y) position (current sample position) in the current picture using 7 filter coefficients and 5x5 symmetrical 2 filters is as follows:
[0374] It should be noted that in the embodiments of the present application, the filtering process shown in the above formula is an exemplary description of the TALF filtering proposed in the present application, and of course, in the actual application process, if the adaptive filter does not have the symmetry of the above example, the adaptive filter coefficients and the input values corresponding to each coefficient should also be adjusted accordingly. That is, the filtering process should be a process in which the adaptive filter coefficients and the reconstructed values of the reference picture at each related position act together.
[0375] 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.
[0376] Further, in the embodiments of the present application, for the TALF filter, in addition to the at least one inter-reference picture decoded in the time domain, the corresponding input information can also include the reconstructed value of the current block, for example, the reconstructed value of any one image component of the current block. Wherein, the reconstructed value of the current block can be obtained after processing the current block in the current picture based on any loop filtering method.
[0377] That is, in the embodiments of the present application, for the determination method of the reconstructed value of the current block, the present application does not make specific limitation, and correspondingly, for the specific position of the TALF filtering in the loop filtering process, the present application does not make specific limitation, that is, the position of the temporal adaptive loop filtering can be at any place in the loop filtering.
[0378] Exemplarily, in some embodiments, FIG. 11 is an implementation schematic diagram one of the TALF filtering proposed in the embodiments of the present application, as shown in FIG. 11, the input of the TALF can include the reconstructed value on the reconstructed image of the current image before the ALF filtering and the reconstructed image decoded in the time domain.
[0379] Exemplarily, in some embodiments, FIG. 12 is an implementation schematic diagram two of the TALF filtering proposed in the embodiments of the present application, as shown in FIG. 12, the input of the TALF can include the reconstructed value on the reconstructed image of the current image after the Deblocking and the reconstructed image decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the SAO.
[0380] Exemplarily, in some embodiments, FIG. 13 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application, as shown in FIG. 13, the position of TALF in loop filtering can be parallel to Deblocking.
[0381] Exemplarily, in some embodiments, FIG. 14 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application, as shown in FIG. 14, the position of TALF in loop filtering can be before Deblocking.
[0382] Exemplarily, in some embodiments, FIG. 15 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application, as shown in FIG. 15, the input of TALF can include the reconstructed value on the reconstructed image of the current image after Deblocking and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after Deblocking.
[0383] Exemplarily, in some embodiments, FIG. 16 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application, as shown in FIG. 16, the input of TALF can include the reconstructed value on the reconstructed image of the current image after SAO and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after SAO.
[0384] Exemplarily, in some embodiments, FIG. 17 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application, as shown in FIG. 17, the input of TALF can also include the reconstructed value on the reconstructed image of the current image after ALF filtering and the decoded reconstructed image in time domain, that is, the position of TALF in loop filtering can be after ALF.
[0385] Therefore, in some embodiments, TALF can also be placed in any position in a series of loop filters, which means that the input of TALF includes the decoded image and the reconstructed value on the reconstructed image of any link in the current loop filtering.
[0386] 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.
[0387] That is, in the embodiments of the present application, TALF filtering can be applied to any image component of the current image.
[0388] It should be noted that in the embodiments of the present application, in the video image, the image components of the current image can include a first image component, a second image component and a third image component. Among them, the three image components are a luminance component, a blue color component and a red color component respectively, specifically, the luminance component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0389] Further, in the embodiments of the present application, the shape, size and tap number of the filter used in the TALF filtering process are not specifically limited, that is, 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, square.
[0390] Exemplarily, in some embodiments, FIG. 18 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 18, a 5x5 symmetric filter contains 7 filter coefficients.
[0391] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 19, a 7x7 symmetric filter contains 13 filter coefficients.
[0392] Exemplarily, in some embodiments, FIG. 20 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 20, a 9x9 symmetric filter contains 21 filter coefficients.
[0393] Among them, the above several are symmetric filters, each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to two filter input values in the symmetric position except the filter center point.
[0394] Exemplarily, in some embodiments, FIG. 21 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 21, a 5x5 symmetric filter contains 4 filter coefficients.
[0395] Exemplarily, in some embodiments, FIG. 22 is a schematic diagram of a filter according to an embodiment of the present application, as shown in FIG. 22, a 7x7 symmetric filter contains 6 filter coefficients.
[0396] Among them, the symmetric filter can also be that each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to filter input values in multiple directions except the filter center point.
[0397] Of course, the filter can also be asymmetric, meaning that each filter input position has a different coefficient value.
[0398] Exemplarily, in some embodiments, Fig. 23 is a schematic diagram of a filter six according to an embodiment of the present application. As shown in Fig. 23, a 5x5 asymmetric filter includes 13 filter coefficients.
[0399] Exemplarily, in some embodiments, for the forward filtering and backward filtering under the RA configuration, and the forward filtering using the reconstructed value in the POC N-1 reference image as input and the forward filtering using the reconstructed value in the POC N-2 reference image as input under the LD configuration, a 7x7 symmetric filter including 13 filter coefficients can be selected.
[0400] Exemplarily, in some embodiments, Fig. 24 is a schematic diagram of a filter seven according to an embodiment of the present application. As shown in Fig. 24, two 5x5 symmetric filters include 14 filter coefficients. Among them, for the bidirectional filtering under the RA configuration and the forward filtering using the reconstructed value in the POC N-1 and N-2 reference images as input under the LD configuration, two filters shown in Fig. 24 can be selected, which are respectively used for the reconstructed value in the two reference images as input.
[0401] It can be understood that the decoding method according to an embodiment of the present application is a method for improving the current image reconstruction quality by using the reconstructed sample value in the time domain as an information source and extracting information from the reconstructed sample of the reconstructed image by the TALF filter to filter the current image.
[0402] It can be understood that the decoding method according to an embodiment of the present application can be pre-defined or transmitted through a code stream.
[0403] It can be understood that the decoding method according to an embodiment of the present application can refer to different encoding configurations, and different filtering modes are proposed under different filtering modes. Among them, under the RA configuration, the filtering mode can be divided into forward filtering mode, backward filtering mode and bidirectional filtering mode; under the LD configuration, the filtering mode can be divided into first forward filtering mode, second forward filtering mode and third forward filtering mode.
[0404] It can be understood that the decoding method according to an embodiment of the present application can be used for the luminance component or the chrominance component.
[0405] It can be understood that the decoding method proposed in the embodiments of the present application can be any level of TALF switch identification, such as TALF switching in image units, TALF switching in CTU units, TALF switching in CU units, or other ways of dividing an image into sub-regions.
[0406] 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 TALF filtering on the entire image through the image-level identifier. At this time, the current image corresponds to only one candidate filter.
[0407] The embodiments of the present application provide a decoding method, which can select to multiplex the recorded and stored historical TALF filter related information in the TALF filtering process, thereby reducing the consumption of code words and improving the coding and decoding performance.
[0408] An embodiment of the present application provides an encoding method, which is applied to an encoder and used in a scenario of performing filtering processing through a TALF filter. FIG. 25 is a schematic diagram of the encoding method proposed in the embodiments of the present application. As shown in FIG. 25, the method of the encoder performing encoding processing can include the following steps.
[0409] Step 2001: When filtering a current image using TALF, determining a generation value when multiplexing historical TALF information for filtering and a generation value when not multiplexing historical TALF information for filtering.
[0410] In the embodiments of the present application, when filtering a current image using TALF, a generation value when multiplexing historical TALF information for filtering and a generation value when not multiplexing historical TALF information for filtering can be determined.
[0411] It should be noted that in the embodiments of the present application, the historical TALF information is used to determine the historical filter, including but not limited to one or more of the filtering mode, the number of filter groups, and the filter coefficients of the filter.
[0412] It can be understood that in the embodiments of the present application, for different multiplexing modes, the specific information included in the multiplexed historical TALF information can be different.
[0413] In one implementation, a multiplexing manner of historical TALF information includes determining a data unit corresponding to a data unit index from a historical data set, such as an element in a FIFO, and then obtaining the recorded and stored filtering mode, the number of filter groups, and the filter coefficients of the candidate filter of the data unit.
[0414] In an embodiment, considering that there are three filtering modes for time domain filtering under the RA and LD configurations respectively, different types of filtering modes can be stored and updated using different FIFOs. One way of multiplexing the historical TALF information includes selecting one historical data set corresponding to the filtering mode from multiple historical data sets, then determining the data unit corresponding to the data unit index in the historical data set, and then obtaining the data unit record and the number of stored filter groups and the filter coefficients of the candidate filter.
[0415] In an embodiment, considering that the input of TALF can include two cases of one inter-frame reference image and two inter-frame reference images, the data amount of different input images can be stored and updated using different FIFOs. One way of multiplexing the historical TALF information includes selecting one historical data set corresponding to the filtering mode (the number of inter-frame reference images of the input) from multiple historical data sets, then determining the data unit corresponding to the data unit index in the historical data set, and then obtaining the data unit record and the number of stored filter groups and the filter coefficients of the candidate filter.
[0416] In an embodiment, the time domain adaptive filters of different slices (or different images) can be combined. One way of multiplexing the historical TALF information includes determining the data unit corresponding to the data unit index from one historical data set, and then obtaining the data unit record and the filter coefficients of the stored candidate filter.
[0417] In an embodiment, the historical time domain loop filters are allowed to be combined, but the filters under each filtering mode are updated in the same FIFO. One way of multiplexing the historical TALF information includes determining the data unit corresponding to the data unit index from one historical data set, and then obtaining the data unit record and the filtering mode and the filter coefficients of the stored candidate filter.
[0418] It should be noted that in the embodiments of the present application, the calculation of the cost value can be performed in any manner, including but not limited to the rate-distortion optimization (RDO) algorithm.
[0419] Step 2002, determining the multiplexing identification information according to the cost value when filtering the multiplexed historical TALF information and the cost value when filtering without multiplexing the historical TALF information, and writing the multiplexing identification information into the bitstream; wherein the multiplexing identification information is used to determine whether to multiplex the historical TALF information for filtering.
[0420] In the embodiments of the present application, after the cost value when multiplexing the history TALF information for filtering and the cost value when not multiplexing the history TALF information for filtering are determined, the multiplexing identification information can be further determined according to the cost value when multiplexing the history TALF information for filtering and the cost value when not multiplexing the history TALF information for filtering, and the multiplexing identification information is written into the bitstream; wherein the multiplexing identification information is used to determine whether to multiplex the history TALF information for filtering.
[0421] Further, in the embodiments of the present application, the multiplexing identification information can be used to determine whether to allow the current image to use the history TALF information to perform the TALF filtering. Wherein the multiplexing identification information can be a flag.
[0422] It should be noted that in the embodiments of the present application, the multiplexing 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.
[0423] Exemplarily, in some embodiments, if the multiplexing identification information is a slice-level flag, the multiplexing identification information can be used to determine whether to allow the current slice to multiplex the history TALF information for filtering.
[0424] Further, in the embodiments of the present application, whether to allow the current image (and / or the current slice) to multiplex the history TALF information for filtering can be determined by the value of the multiplexing identification information. Wherein the value of the multiplexing identification information can be in the form of a parameter or in the form of a number.
[0425] Exemplarily, in some embodiments, when the value of the multiplexing identification information is 1, it is determined to allow the current image (and / or the current slice) to multiplex the history TALF information for filtering. When the value of the multiplexing identification information is 0, it is determined not to multiplex the history TALF information for filtering. In general, the multiplexing identification information can be a parameter written in the Slice header or the picture header, which is not limited here.
[0426] Exemplarily, in some embodiments, when the value of the multiplexing identification information is 1, it is determined to allow the current image (and / or the current slice) to multiplex the history TALF information for filtering. When the value of the multiplexing identification information is 0, it is determined not to multiplex the history TALF information for filtering.
[0427] Exemplarily, in some embodiments, in the case that the value of the multiplexing identification information is true, it is determined that the current picture (and / or the current slice) is allowed to multiplex the historical TALF information for filtering. In the case that the value of the multiplexing identification information is false, it is determined that the historical TALF information is not multiplexed for filtering.
[0428] Exemplarily, in some embodiments, assuming that the multiplexing identification information is a picture-level flag, the multiplexing identification information can be represented by a syntax element talf_reuse_flag, i.e., talf_reuse_flag indicates whether the current picture is allowed to multiplex the TALF information for filtering. If the value of talf_reuse_flag is 0, it is determined that the TALF information is not multiplexed for filtering, and if the value of talf_reuse_flag is 1, it is determined that the current picture is allowed to multiplex the TALF information for filtering.
[0429] Exemplarily, in some embodiments, assuming that the multiplexing identification information is a slice-level flag, the multiplexing identification information can be represented by a syntax element talf_reuse_flag, i.e., talf_reuse_flag indicates whether the current slice is allowed to use the TALF for filtering. If the value of talf_reuse_flag is 0, it is determined that the current slice is not allowed to use the TALF for filtering, and if the value of talf_reuse_flag is 1, it is determined that the current slice is allowed to use the TALF for filtering.
[0430] Of course, the value of talf_reuse_flag is not limited to 0 and 1, and the present application does not make a specific limitation.
[0431] Exemplarily, in some embodiments, the slice-level syntax elements are as follows:
[0432] talf_reuse_flag is used to indicate whether the historical TALF information is multiplexed, for example, the historical domain adaptive filter is multiplexed. If the value of talf_reuse_flag is 1, it indicates that the historical adaptive loop filter is multiplexed, and if the value of talf_reuse_flag is 0, it indicates that the multiplexing is not performed. When the syntax element does not exist in the code stream, the value of talf_reuse_flag can be 0 by default.
[0433] As can be seen, in the embodiments of the present application, for the TALF filtering processing, the historical adaptive loop filter can be introduced through the multiplexing identification information, so that the extra code consumption caused by encoding and decoding new filter coefficients (filter coefficients) can be saved.
[0434] Further, in the embodiments of the present application, when determining the multiplexing identification information, in the case that the cost value when filtering according to the multiplexing history TALF information is greater than or equal to the cost value when filtering without multiplexing history TALF information, the multiplexing identification information is set to indicate filtering without multiplexing history TALF information; in the case that the cost value when filtering according to the multiplexing history TALF information is less than the cost value when filtering without multiplexing history TALF information, the multiplexing identification information is set to indicate filtering according to the multiplexing history TALF information.
[0435] Step 2003, in the case of determining to filter according to the multiplexing history TALF information, a multiplexing index parameter is determined, and the multiplexing index parameter is written into the bitstream.
[0436] In the embodiments of the present application, if it is determined to filter according to the multiplexing history TALF information, then the multiplexing index parameter can be further determined, and the multiplexing index parameter is written into the bitstream.
[0437] Further, in the embodiments of the present application, when determining the multiplexing index parameter, in the case of determining to filter according to the multiplexing history TALF information, the minimum cost value in the cost value when filtering according to the multiplexing history TALF information is determined; the history TALF information corresponding to the minimum cost value is determined, and the data unit storing the history TALF information corresponding to the minimum cost value is determined; the multiplexing index parameter is determined according to the data unit.
[0438] It can be understood that, in the embodiments of the present application, the multiplexing index parameter can be used to determine the data unit recording and storing the history TALF information. The data unit recording and storing the history TALF information can be one storage structure or storage element in the candidate history data set, which is not specifically limited in the present application.
[0439] That is, in the embodiments of the present application, the history TALF information to be multiplexed can be indicated by the multiplexing index parameter. For example, one multiplexing index (multiplexing index parameter) can be used to indicate which history TALF information is multiplexed.
[0440] It should be noted that, in the embodiments of the present application, the candidate history data set can include one or more history data sets. That is, the number of data sets recording and storing the history TALF information is not specifically limited in the present application.
[0441] Exemplarily, in some embodiments, the candidate history data set can be FIFO, that is, a FIFO for storing history filters can be saved and updated in units of slices (or images), and in the case of determining a multiplexed history filter, a corresponding history filter can be selected from the FIFO.
[0442] It can be understood that, in the embodiments of the present application, assuming that the candidate history data set is FIFO, the method of updating the FIFO is to move each element in the FIFO one position backward and store one or more sets of filters parsed from the current slice at the first position of the FIFO.
[0443] It should be noted that, in the embodiments of the present application, if the number of elements in the FIFO reaches the maximum value of the length of the FIFO, the tail elements of the FIFO are removed first, and then the elements are shifted and the filters are stored.
[0444] Exemplarily, in some embodiments, a FIFO with a length of 8 is used to store time domain adaptive loop filters, at this time, there are 2 TALFs in the FIFO, and each TALF is one or more filters contained in a slice of history decoding.
[0445] Exemplarily, in some embodiments, when updating the FIFO, since the number of TALFs in the FIFO does not reach the maximum number, the existing two TALFs are all moved backward, and the TALFs parsed from the current slice are stored at the first position.
[0446] Exemplarily, in some embodiments, a FIFO with a length of 8 is used to store time domain adaptive loop filters, at this time, there are 8 TALFs in the FIFO, and each TALF is one or more filters contained in a slice of history decoding, since the number of TALFs in the FIFO has reached the maximum number, the tail TALF elements should be removed first, then each TALF is moved one position backward, and finally the TALFs parsed from the current slice are stored at the first position of the FIFO.
[0447] Of course, the length of the FIFO can be any integer value greater than 0, and is not limited to 8.
[0448] As can be seen, in the embodiments of the present application, when the current image (or current slice) uses a TALF, an additional identifier needs to be encoded and decoded to indicate whether to multiplex the TALFs (history TALF information) of other images (or slices) in the FIFO, if multiplexing, the index of the FIFO is further encoded and decoded to determine the TALFs to be multiplexed, otherwise, the adaptive time domain filter parameters obtained from the current image are encoded and decoded, and the FIFO is updated.
[0449] It can be understood that in the embodiments of the present application, the reuse index parameter can be represented as talf_reuse_idx, wherein talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO, and the value of talf_reuse_idx can be determined based on the storage length of the candidate history data set. For example, assuming that the FIFO length is maximally 8, the value range of talf_reuse_idx can be 0 to 7, which respectively represent which set of historical time domain adaptive loop filters in the multiplexed FIFO.
[0450] Exemplarily, in some embodiments, the slice-level syntax elements are as follows:
[0451] talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO. Since the FIFO length is maximally 8 in this example, talf_reuse_idx is coded using a 3-bit fixed-length code in this case, and in other cases, a variable-length code or other length coding mode can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represent which set of historical time domain adaptive loop filters in the multiplexed FIFO. When the syntax element does not exist in the bitstream, its value can be defaulted to 0.
[0452] Further, in the embodiments of the present application, in the case of determining not to multiplex the historical TALF information for filtering, the TALF information corresponding to the current image can be first determined; and then the candidate history data set corresponding to the current image is updated based on the TALF information corresponding to the current image; wherein the candidate history data set includes at least one history data set.
[0453] Further, in the embodiments of the present application, after the multiplexing identification information is determined, if it is determined based on the multiplexing identification information that the historical TALF information is not multiplexed for filtering, the determination and coding of the multiplexing index parameter can be skipped, and the TALF information corresponding to the current image (or current slice) is directly determined; and then the candidate history data set is updated based on the TALF information corresponding to the current image (or current slice).
[0454] It can be understood that in the embodiments of the present application, whether to multiplex the historical time domain adaptive loop filter (historical TALF information) is determined by comparing the values of the substitutes. If not, the filter and its coefficients of the current image are further determined, i.e., the TALF information corresponding to the current image is determined, and then the candidate history data set can be updated using the TALF information corresponding to the current image, e.g., the TALF information corresponding to the current image is stored to the candidate history data set.
[0455] Further, in the embodiments of the present application, after determining not to multiplex the history TALF information, the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block can be determined first.
[0456] It can be understood that in the embodiments of the present application, the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block can be determined respectively in the current configuration and each candidate mode corresponding to the current configuration.
[0457] Further, in the embodiments of the present application, for the TALF filter, the corresponding input information can include the at least one inter-frame reference picture corresponding to the current picture, which can be a temporally coded reconstructed picture. Wherein, the TALF filtering of the current block in the current picture can be completed using the reconstructed sample values of the at least one inter-frame reference picture.
[0458] It can be understood that in the embodiments of the present application, the current block can be a CTU determined after the current picture is divided, the current block can also be a coding unit CU obtained after the CTU is divided, and the current block can also be a sub-region of any size obtained after the current picture is divided, and the size and the obtaining manner of the current block in the current picture are not limited in the present application.
[0459] Further, in the embodiments of the present application, when the at least one inter-frame reference picture corresponding to the current picture and the filter coefficients corresponding to the current block are determined, the candidate mode can be determined according to the current configuration first; then in each candidate mode, the at least one inter-frame reference picture is determined, the candidate filter corresponding to the current block is determined, and the filter coefficients corresponding to the current block are determined based on the candidate filter corresponding to the current block.
[0460] Further, in the embodiments of the present application, when the candidate mode is determined according to the current configuration, in the case that the current configuration is the RA configuration, the candidate mode is determined as the first candidate mode; wherein the first candidate mode includes one or more of the forward filtering mode, the reverse filtering mode and the bidirectional filtering mode; in the case that the current configuration is the LD configuration, the candidate mode is determined as the second candidate mode; wherein the second candidate mode includes one or more of the first forward filtering mode, the second forward filtering mode and the third forward filtering mode.
[0461] 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 a forward filtering mode, a backward filtering mode and a bidirectional filtering mode. Among them, 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 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.
[0462] 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 a first forward filtering mode, a second forward filtering mode and a third forward filtering 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 filtering mode is supported. However, corresponding to different inter-frame reference images, the corresponding forward filtering mode can be distinguished into the first forward filtering mode, the second forward filtering mode and the third forward filtering mode.
[0463] 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.
[0464] It can be understood that in the embodiments of the present application, the determination of the inter-frame reference image depends on the filtering mode, and for different filtering modes, the finally determined inter-frame reference image can be different.
[0465] Exemplarily, in some embodiments, if the POC value of the current image is N, for the RA configuration, if the determined filtering mode is the forward filtering mode, the image with the POC value of N-1 can be selected as the inter-frame reference image of the current image; if the determined filtering mode is the backward filtering mode, the image with the POC value of N+1 can be selected as the inter-frame reference image of the current image; and if the determined filtering mode is the bidirectional filtering mode, the images with the POC values of N-1 and N+1 can be selected as the inter-frame reference images of the current image.
[0466] 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.
[0467] 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.
[0468] 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.
[0469] 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; when the TID is 4, the reconstructed value of the picture with the POC value of N-2 can be used as the input of the filter; when the TID is 3, the reconstructed value of the picture with the POC value of N-4 can be used as the input of the filter; when the TID is 2, the picture with the POC value of N-8 can be used as the input of the filter; when the TID is 1, the reconstructed value of the picture with the POC value of N-16 can be used as the input of the filter; and when the TID is 0, the reconstructed value of the picture with the POC value of N-32 can be used as the input of the filter.
[0470] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in the forward filtering changes due to different coding configurations.
[0471] 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; when the TID is 4, the reconstructed value of the picture with the POC value of N+2 can be used as the input of the filter; when the TID is 3, the reconstructed value of the picture with the POC value of N+4 can be used as the input of the filter; when the TID is 2, the picture with the POC value of N+8 can be used as the input of the filter; when the TID is 1, the reconstructed value of the picture with the POC value of N+16 can be used as the input of the filter; and when the TID is 0, the reconstructed value of the picture with the POC value of N+32 can be used as the input of the filter.
[0472] It should be noted that in the embodiments of the present application, the POC value of the reference frame used in the backward filtering changes due to different coding configurations.
[0473] 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.
[0474] 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.
[0475] 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:
[0476] 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;
[0477] 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;
[0478] 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;
[0479] 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.
[0480] 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 filtering (forward filtering mode) is mode 1, the backward filtering (backward filtering mode) is mode 2, and the bidirectional filtering (bidirectional filtering mode) is mode 3; for the LD configuration, in the corresponding second candidate mode, using the reference image POC N-1 as the TALF filter input (first forward filtering mode) is mode 1, using the reference image POC N-2 as the TALF filter input (second forward filtering mode) is mode 2, and using the reference images POC N-1 and N-2 as the TALF filter input (third forward filtering mode) is mode 3.
[0481] 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 coefficients corresponding to the current block are determined based on the candidate filter corresponding to the current block.
[0482] It can be understood that in the embodiments of the present application, each filtering mode (candidate mode) can be traversed, and the Wiener-Hopf equation can be constructed using the 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 groups of filter coefficients can be solved out. Among them, for each group of candidate filters that can be used for the current block, the filter coefficients corresponding to the candidate filter can be obtained, that is, the filter coefficients corresponding to the current block can include the filter coefficients of each group of candidate filters.
[0483] Further, in the embodiments of the present application, after determining the at least one inter-frame reference image corresponding to the current image and the filter coefficients corresponding to the current block, the current block can be further filtered based on the reconstructed samples of the at least one inter-frame reference image and the filter coefficients corresponding to the current block to determine the filtered reconstruction value of the current block.
[0484] It can be understood that in the embodiments of the present application, in each candidate mode, each group of candidate filters can be used respectively, the filter coefficients corresponding to the current block under the candidate filter, and the reconstructed samples of the at least one inter-frame reference image corresponding to the candidate mode are used to filter the reconstruction value of the current block, so as to determine the filtered reconstruction value of the current block.
[0485] It can be understood that in the embodiments of the present application, since the POC values of the inter-frame reference pictures determined based on different filter modes can be different, and the number of the determined inter-frame reference pictures can also be different, when performing TALF filtering on the current block of the current picture, the filtering processes performed corresponding to different numbers of inter-frame reference pictures are also different.
[0486] Further, in the embodiments of the present application, when filtering the current block based on the reconstructed samples of the at least one inter-frame reference picture and the filter coefficients corresponding to the current block to determine the filtered reconstructed value of the current block, for a current sample position in the current block, the reconstructed sample value of the current sample position is determined according to the reconstructed value of the current block, 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 filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position and the reconstructed sample value of the reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0487] 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 corresponding to the current sample position and the reconstructed sample value corresponding to the reference sample position are respectively input into the TALF filter, combined with the determined filter coefficients corresponding to the current block, to finally determine the filtered reconstructed sample value corresponding to the current sample position, and the above scheme is traversed for any sample position of the current block to complete the filtering of the current block and obtain the filtered reconstructed value of the current block.
[0488] 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 of the position (x, y) (the current sample position) in the current picture using 13 filter coefficients and 7x7 symmetric filter is as formula (1).
[0489] 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.
[0490] 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.
[0491] 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 a 7x7 symmetric filter is as shown in formula (2).
[0492] 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.
[0493] That is, in the embodiments of the present application, for each filter position, 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, and then the second sample difference value is taken as the input of the filter.
[0494] 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 a 7x7 symmetric filter is as shown in formula (3).
[0495] Further, in the embodiments of the present application, when the current block is filtered based on the filter coefficients corresponding to the current block and the reconstructed samples of the at least one inter-frame reference image, 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 filter coefficients corresponding to the current block, the reconstructed sample value of the current sample position, the reconstructed sample value of the first reference sample position, and the reconstructed sample value of the second reference sample position; and the filtered reconstructed value of the current block is determined according to the filtered reconstructed sample value of the current sample position.
[0496] 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 the TALF filtering is performed 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, and finally the filtered reconstructed sample value of the current sample position is determined according to the determined filter coefficients corresponding to the current block, and the filtering of the current block is completed by traversing any sample position of the current block according to the above scheme to obtain the filtered reconstructed value of the current block.
[0497] 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) (the current sample position) in the current image using 7 filter coefficients and 5x5 symmetrical 2 filters is as shown in formula (4).
[0498] 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, and the reconstructed sample value of the second reference sample position, the third sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the first reference sample position; the fourth sample difference value can be determined according to the reconstructed sample value of the current sample position and the reconstructed sample value of the second reference sample position; and the filtered reconstructed sample value of the current sample position 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.
[0499] That is, in the embodiments of the present application, the third sample difference value and the fourth sample difference value can also be determined according to the reconstructed sample value of the current sample position and the reconstructed sample values of the two reference sample positions respectively, and then the third sample difference value and the fourth sample difference value are taken as the input of the filter.
[0500] 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 coordinate (x, y) position (current sample position) in the current image using 7 filter coefficients and 2 filters of 5x5 symmetry is as formula (5).
[0501] 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; 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.
[0502] 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.
[0503] 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 coordinate (x, y) position (current sample position) in the current image using 7 filter coefficients and 2 filters of 5x5 symmetry is as formula (6).
[0504] 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 coefficients 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 coefficients and the reconstructed values of the reference image at each related position act together.
[0505] 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.
[0506] Further, in the embodiments of the present application, for the TALF filter, in addition to the at least one inter-frame reference image 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. The reconstructed value of the current block can be obtained after processing the current block in the current image based on any loop filtering method.
[0507] That is, 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.
[0508] 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 reconstructed image decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the ALF.
[0509] 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 reconstructed image decoded in the time domain, that is, the position of the TALF in the loop filtering can be parallel to the SAO.
[0510] 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.
[0511] 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.
[0512] 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 reconstructed image decoded in the time domain, that is, the position of the TALF in the loop filtering can be after the Deblocking.
[0513] Exemplarily, in some embodiments, Fig. 16 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in Fig. 16, the input of TALF can include the reconstructed value on the reconstructed image of the current image after SAO in the time domain, i.e., the position of TALF in the loop filtering can be after SAO.
[0514] Exemplarily, in some embodiments, Fig. 17 is a schematic diagram of implementation of TALF filtering according to an embodiment of the present application. As shown in Fig. 17, the input of TALF can also include the reconstructed value on the reconstructed image of the current image after ALF in the time domain, i.e., the position of TALF in the loop filtering can be after ALF.
[0515] 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 block in any step of the current loop filtering.
[0516] 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.
[0517] That is to say, in the embodiments of the present application, TALF filtering can be applied to any image component of the current image.
[0518] 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 respectively a luma component, a blue color component and a red color component, specifically, the luma component is usually represented by the symbol Y, the blue color component is usually represented by the symbol Cb or U, and the red color component is usually represented by the symbol Cr or V; in this way, the video image can be represented in YCbCr format or YUV format.
[0519] 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.
[0520] 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.
[0521] Exemplarily, in some embodiments, FIG. 19 is a schematic diagram II of the filter proposed in embodiments of the present application, as shown in FIG. 19, a 7x7 symmetric filter, containing 13 filter coefficients.
[0522] Exemplarily, in some embodiments, FIG. 20 is a schematic diagram III of the filter proposed in embodiments of the present application, as shown in FIG. 20, a 9x9 symmetric filter, containing 21 filter coefficients.
[0523] Among the above, each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to two filter input values in the symmetric position, except for the filter center point.
[0524] Exemplarily, in some embodiments, FIG. 21 is a schematic diagram IV of the filter proposed in embodiments of the present application, as shown in FIG. 21, a 5x5 symmetric filter, containing 4 filter coefficients.
[0525] Exemplarily, in some embodiments, FIG. 22 is a schematic diagram V of the filter proposed in embodiments of the present application, as shown in FIG. 22, a 7x7 symmetric filter, containing 6 filter coefficients.
[0526] Among the above, each index value corresponds to a filter coefficient value, and each filter coefficient corresponds to multiple filter input values in multiple directions, except for the filter center point.
[0527] Of course, the filter can also be asymmetric, which means that each filter input position has different coefficient values.
[0528] Exemplarily, in some embodiments, FIG. 23 is a schematic diagram VI of the filter proposed in embodiments of the present application, as shown in FIG. 23, a 5x5 asymmetric filter, containing 13 filter coefficients.
[0529] 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.
[0530] 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.
[0531] 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.
[0532] 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.
[0533] 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.
[0534] 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.
[0535] 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.
[0536] 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.
[0537] 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.
[0538] 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 of 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.
[0539] 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.
[0540] 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.
[0541] 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.
[0542] 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.
[0543] 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.
[0544] 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.
[0545] 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.
[0546] 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.
[0547] 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.
[0548] 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.
[0549] 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.
[0550] 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.
[0551] 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.
[0552] 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.
[0553] 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.
[0554] 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.
[0555] Suppose the second syntax element identification information is a picture-level flag, and the second value is 1 and the third value is 0, 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.
[0556] 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.
[0557] 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.
[0558] 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.
[0559] 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.
[0560] 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.
[0561] 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.
[0562] 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.
[0563] 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.
[0564] 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.
[0565] 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.
[0566] 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.
[0567] 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.
[0568] 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.
[0569] 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.
[0570] 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.
[0571] 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 is dependent on the sequence level TALF identification, and can also include that the image level (and / or slice level) TALF identification is dependent on the sequence level ALF identification.
[0572] 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, and can also be dependent on the sequence level ALF identification.
[0573] 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.
[0574] 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.
[0575] 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.
[0576] 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.
[0577] It can be understood that in the embodiments of the present application, the mode parameter can be used to determine the filter mode of the TALF filtering, wherein 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.
[0578] 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.
[0579] 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.
[0580] 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.
[0581] 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.
[0582] 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.
[0583] Further, in the embodiments of the present application, the TALF parameters can also be directly written into the code stream.
[0584] 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.
[0585] 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.
[0586] For example, in some embodiments, when the value of the first syntax element identification information is a first value, it indicates that the current block is not filtered using TALF. When the value of the first syntax element identification information is not the first value, it indicates that the current block is filtered using TALF, 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.
[0587] It can be understood that in the embodiments of the present application, when it is determined that the current block is filtered using TALF, the 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.
[0588] 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.
[0589] It can be understood that the coding method proposed in the embodiments of the present application is a method of using the reconstructed sample values 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 samples of the reconstructed image by the TALF filter to filter the current image.
[0590] It can be understood that in the coding method proposed in the embodiments of the present application, the filter coefficients of the filter in the time domain can be predefined or transmitted through the code stream.
[0591] 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.
[0592] 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.
[0593] 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 TALF which can be switched as a unit of image, or as a unit of CTU, or as a unit of CU, or as other ways of dividing the image into sub-regions.
[0594] 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 only corresponds to one candidate filter.
[0595] The embodiments of the present application provide an encoding method, which can select to multiplex the recorded and stored related information of the historical TALF filter in the TALF filtering process, so as to reduce the consumption of code words and improve the coding and decoding performance.
[0596] Based on the above embodiments, the embodiments of the present application propose a time domain adaptive loop filtering technology, which is a technology of using the reconstructed image in the time domain as an information source to improve the adaptive loop filtering of the current frame reconstructed image. Further, in the TALF filtering process, the recorded and stored related information of the historical TALF filter can be selected to be multiplexed, so as to reduce the consumption of code words and improve the coding and decoding performance.
[0597] The embodiments of the present application propose a technology of using the reconstructed image in the time domain to improve the quality of the current image, which can be that the encoder obtains one or more sets of filter coefficients for improving the quality of the current reconstructed image and transmits through the code stream; the decoder uses the information including but not limited to the reconstructed value in the time domain as input to filter the current image through the parsed filter coefficients.
[0598] The embodiments of the present application propose a technique of improving the quality of a current image by using a reconstructed image in the time domain, and the encoder can select appropriate filters and coefficients from a predefined set of one or more filters and coefficients, and transmit syntax elements related to whether to use the filters and coefficients through a bitstream; the decoder determines the filters and coefficients by analyzing the syntax elements, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0599] The embodiments of the present application propose a technique of improving the quality of a current image by using a reconstructed image in the time domain, and the encoder can select appropriate filters and coefficients from a predefined set of one or more filters and coefficients, and transmit syntax elements related to whether to use the filters and coefficients through a bitstream; the decoder determines the filters and coefficients by analyzing the syntax elements, and uses information including but not limited to reconstructed values in the time domain as input to filter the current image.
[0600] Exemplarily, in some embodiments, a block-level identifier (first syntax element identifier information) can be used to indicate whether the current block is filtered by TALF.
[0601] Exemplarily, in some embodiments, taking a CTU level as an example, there is an identifier to control whether to start TALF at the CTU level. In addition, since a frame image can have multiple TALFs (candidate filters) for selection, when the TALF identifier of a CTU level is true, the relevant identifier representing the selected TALF filter for filtering the current CTU should also be parsed.
[0602] Exemplarily, in some embodiments, the parsing process of the first syntax element identifier information talf_ctb_idc[CtbAddrX][CtbAddrY] is as follows:
[0603] 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.
[0604] Of course, the CTU flag can also be discarded, and a decision can be made directly on whether to perform TALF filtering on the entire picture, or a CU-level flag can be used instead of the CTU, or a block-level flag of another size.
[0605] 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.
[0606] Exemplarily, in some embodiments, a 7x7 symmetric filter and a 5x5 symmetric filter can be used. For TALF using one reconstructed picture (inter-frame reference picture) as input, 1 7x7, 13-coefficient symmetric filter is used for filtering; for TALF using two reconstructed pictures as input, 2 5x5, 7-coefficient symmetric filters are used for filtering.
[0607] Exemplarily, in some embodiments, the difference between the reconstructed value of the reconstructed picture and the reconstructed value of the current picture can be selected as the input of the TALF filter, assuming that the current picture corresponds to an inter-frame reference picture, at this time, the process of filtering the sample value at the coordinate (x, y) position (current sample position) in the current picture using a 13-filter coefficient, 7x7 symmetric filter is as follows:
[0608] Exemplarily, in some embodiments, the difference between the reconstructed value of the reconstructed image and the current image reconstructed value can be selected as the TALF filter input, assuming that the current image corresponds to two inter-frame reference images, at this time, the process of filtering the sample value of the coordinate (x, y) position (current sample position) in the current image using 7 filter coefficients, 5x5 symmetrical 2 filters is as follows:
[0609] 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.
[0610] 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).
[0611] 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.
[0612] 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.
[0613] First, according to the encoding configuration RA or LD, the mode allowed to be used by TALF is judged, and the TALF mode is three under RA and LD. The forward filtering is mode 1, the backward filtering is mode 2, and the bidirectional filtering is mode 3 under RA. The reference image POC N-1 is used as the TALF filter input as mode 1, the reference image POC N-2 is used as the TALF filter input as mode 2, and the reference images POC N-1 and N-2 are used as the TALF filter input as mode 3 under LD.
[0614] 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.
[0615] 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.
[0616] 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.
[0617] After ALF filtering, the CTU selected with TALF in the current image is filtered using the corresponding filter.
[0618] 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:
[0619] 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.
[0620] 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:
[0621] 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.
[0622] 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.
[0623] 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.
[0624] 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).
[0625] 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.
[0626] 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.
[0627] 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:
[0628] talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree block of the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses the TALF filter, and the value range thereof is 0-talf_num_filters_signalled_minus1. For example, when talf_num_filters_signalled_minus1 is 1, the value of talf_ctb_idc can be 0 or 1, and for example, when talf_num_filters_signalled_minus1 is 2, the value of talf_ctb_idc can be 0, 1 or 2. When talf_ctb_idc is 0, it indicates that the current coding tree block does not use the TALF filter, when talf_ctb_idc is 1, it indicates that the first group of filters is used, when talf_ctb_idc is 2, it indicates that the second group of filters is used, and so on. When the syntax element does not exist in the code stream, the value thereof is 0.
[0629] 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.
[0630] 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.
[0631] Exemplarily, in some embodiments, the input of the filter process includes:
[0632] 1. a reconstructed luminance image array rec filtered by the luminance adaptive loop filter,
[0633] 2. a corresponding time domain reconstructed luminance image array, for example, when the talf_filter_mode syntax element is 0, the forward nearest one frame time domain reconstructed image is used under the RA configuration or the first frame reconstructed image rec0 is used under the LD; when the talf_filter_mode syntax element is 1, the backward nearest one frame time domain reconstructed image is used under the RA configuration or the first frame reconstructed image rec1 is used under the LD; when the talf_filter_mode syntax element is 2, the two reconstructed image arrays rec0 and rec1 are used,
[0634] 3. the luminance coordinates (xCtb, yCtb) of the current luminance coding tree block in the current image,
[0635] 4. the width tAlfWidth and the height tAlfHeight of the luminance coding tree block,
[0636] 5. Coefficients of the time-domain adaptive loop filter tAlfCoeff [ ][ ]
[0637] Correspondingly, the filtering calculation for each position in the luminance coding block is as follows:
[0638] numCoeff is 14:
[0639] Wherein, in the above filtering calculation process, 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.
[0640] numCoeff is 13 and talf_filter_mode is 0:
[0641] numCoeff is 13 and talf_filter_mode is 1:
[0642] It should be noted that in the embodiments of the present application, in the filtering process, the same image edge padding method as ALF is used to obtain the TALF input values outside the image range that need to be used.
[0643] Exemplarily, in some embodiments, the ALF filtering is padded with edges in units of coding tree blocks, and the filtering within one coding tree block does not use the reconstructed values of other coding tree blocks, in which case the TALF can also be padded with edges in units of coding tree blocks.
[0644] Further, in the embodiments of the present application, a scheme of multiplexing history decoding time-domain adaptive loop filter is also included, that is, the TALF can introduce a multiplexing history adaptive loop filter, so that the extra code word consumption generated by coding and decoding new filter coefficients (filter coefficients) can be saved.
[0645] In one embodiment, the FIFO for storing the history filter can be saved and updated in units of slices (or pictures). The current slice is parsed to determine whether the current slice uses the time domain adaptive filter by parsing a slice level control flag. If the current slice uses the time domain adaptive filter, a flag is further parsed to indicate whether to reuse the history time domain adaptive loop filter. If not, the filter and its coefficients of the current frame (current picture) are further parsed and used to update the FIFO; otherwise, a reuse index is parsed to indicate which set of filters in the FIFO is reused. The method of updating the FIFO is to move each element in the FIFO one position back, and store the set or sets of filters parsed from the current slice at the first position of the FIFO. If the number of elements in the FIFO reaches the maximum length of the FIFO, the last element of the FIFO is removed first, and then the elements are shifted and the filters are stored.
[0646] For example, in some embodiments, FIG. 26 is a schematic diagram of storing the history time domain adaptive loop filter according to an embodiment of the present application. As shown in FIG. 26, a FIFO with a length of 8 is used to store the time domain adaptive loop filter. At this time, there are 2 TALFs in the FIFO, each of which is one or more filters contained in a slice decoded in the history.
[0647] For example, in some embodiments, FIG. 27 is a schematic diagram of storing the history time domain adaptive loop filter according to an embodiment of the present application. As shown in FIG. 27, when updating the FIFO, since the number of TALFs in the FIFO does not reach the maximum number, the existing two TALFs are moved back and the TALFs parsed from the current slice are stored at the first position.
[0648] For example, in some embodiments, FIG. 28 is a schematic diagram of storing the history time domain adaptive loop filter according to an embodiment of the present application. As shown in FIG. 28, a FIFO with a length of 8 is used to store the time domain adaptive loop filter. At this time, there are 8 TALFs in the FIFO, each of which is one or more filters contained in a slice decoded in the history. Since the number of TALFs in the FIFO has reached the maximum number, the last TALF element should be removed first, then each TALF is moved back one position, and finally the TALFs parsed from the current slice are stored at the first position of the FIFO.
[0649] When the current picture (or current slice) uses the TALF, an additional flag needs to be coded and decoded to indicate whether to reuse the TALF of another picture (or slice) in the FIFO. If the TALF is reused, the index of the FIFO is further coded and decoded to determine the TALF to be reused. Otherwise, the adaptive time domain filter parameters obtained from the current picture are coded and decoded, and the FIFO is updated.
[0650] Exemplarily, in some embodiments, talf_reuse_flag is used to indicate whether to reuse the time domain adaptive filter in the FIFO. If the flag is 1, it indicates that the history adaptive loop filter recorded in the FIFO is reused, and if the flag is 0, it indicates that the history adaptive loop filter recorded in the FIFO is not reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0651] Exemplarily, in some embodiments, talf_reuse_idx can be used to indicate the index of the time domain adaptive filter in the FIFO. Since the length of the FIFO in this example is 8 at most, talf_reuse_idx is coded using a 3-bit fixed length code in this example, and in other cases, a variable length code or other length coding method can also be used. The value range of talf_reuse_idx is 0 to 7, which respectively represents which set of history time domain adaptive loop filters in the FIFO is reused. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0652] That is, in the embodiments of the present application, a way of reusing history TALF information includes determining a data unit corresponding to a data unit index, such as an element in the FIFO, from a history data set, and then obtaining the filter mode, the number of filter groups, and the filter coefficients of the candidate filter recorded and stored in the data unit.
[0653] Exemplarily, in some embodiments, updateFIFO() is a step of updating the FIFO using the TALFs decoded from the current slice, where tAlfParamPool is a FIFO recording history adaptive loop filter information, and each element can store one or more sets of time domain adaptive filters parsed from the current slice.
[0654] If the history TALF information recorded and stored in the history data set includes the filter mode, the number of filter groups, and the filter coefficients of the candidate filter, when updating the history data set, the corresponding TALF information including the filter mode, the number of filter groups, and the filter coefficients of the candidate filter also needs to be stored in the history data set.
[0655] It can be understood that, in the embodiments of the present application, when reusing history TALF information, if the history TALF information includes filter coefficients corresponding to the candidate filter, the filter coefficients corresponding to the current block can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0656] It can be understood that in the embodiments of the present application, when the history temporal adaptive loop filter is reused, since the FIFO at the talf_reuse_idx can contain more than or equal to one temporal adaptive filter, when the CTU identifier is coded, the corresponding identifier should also be used to represent whether the history temporal adaptive loop filter is selected and which filter in the TALFs is selected.
[0657] If the current slice does not reuse the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above embodiments.
[0658] If the current slice uses the reused history adaptive loop filter, the number of reused filters filterCount is first obtained:
[0659] filterCount = tAlfParamPool[talf_reuse_idx].filterCount
[0660] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0661] Wherein, the first syntax element talf_ctb_idc[CtbAddrX][CtbAddrY] can indicate whether the coding tree block at the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses the TALF filter. If talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-talf_num_filters_signalled_minus1. If talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-filterCount-1. When the syntax element does not exist in the bitstream, the value thereof can be 0 by default.
[0662] Further, in the embodiments of the present application, when the filter coefficients are reconstructed, if talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments, if talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are obtained respectively:
[0663] numCoeff can be determined according to whether the tAlfMode indicates a unidirectional filter or a bidirectional filter when the talf_reuse_flag is 1. For example, 13 for a unidirectional filter and 14 for a bidirectional filter.
[0664] In an embodiment, considering that there are three filter modes for time domain filtering in the RA and LD configurations respectively, different types of filter modes can be stored and updated using different FIFOs. For example, a forward filter of the RA uses a FIFO to record a history filter, a backward filter uses a FIFO to record a history filter, and a bidirectional filter uses a FIFO to record a history filter; a filter using POC N-1 of the LD uses a FIFO to record a history filter, a filter using POC N-2 uses a FIFO to record a history filter, and a filter using POC N-1 and POC N-2 uses a FIFO to record a history filter.
[0665] Correspondingly, in the embodiments of the present application, a talf_filter_mode needs to be coded to represent the selected filter mode (filter mode). That is, whether the multiplexing flag talf_reuse_flag indicates whether to multiplex the history filter, the talf_filter_mode indicating the filter mode needs to be transmitted.
[0666] That is, in the embodiments of the present application, a manner of multiplexing history TALF information includes selecting a history data set corresponding to the filter mode from a plurality of history data sets, then determining a data unit corresponding to the data unit index in the history data set, and then obtaining the filter coefficients of the filter group and the candidate filter recorded and stored in the data unit.
[0667] If the history TALF information recorded and stored in the history data set includes the filter coefficients of the filter group and the candidate filter, when updating the history data set, the corresponding TALF information including the filter coefficients of the filter group and the candidate filter also needs to be stored in the history data set.
[0668] It can be understood that in the embodiments of the present application, when multiplexing the history TALF information, if the history TALF information includes the filter coefficients corresponding to the candidate filter, the filter coefficients corresponding to the current block (filter coefficients) can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0669] It can be understood that in the embodiments of the present application, when the history temporal adaptive loop filter is reused, since the FIFO at the talf_reuse_idx can contain more than or equal to one temporal adaptive filter, when the CTU identifier is coded, the corresponding identifier should also be used to represent whether the history temporal adaptive loop filter is selected and which filter in the TALFs is selected.
[0670] If the current slice does not reuse the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above embodiments.
[0671] If the current slice uses the reused history adaptive loop filter, the number of reused filters filterCount is first obtained:
[0672] filterCount = tAlfParamPool[talf_filter_mode][talf_reuse_idx].filterCount
[0673] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0674] Wherein, the talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree luma block at the horizontal direction number CtbAddrX and the vertical direction number CtbAddrY uses the TALF filter. If the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-talf_num_filters_signalled_minus1. If the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-filterCount-1. When the syntax element does not exist in the bitstream, the value thereof can be defaulted as 0.
[0675] Further, in the embodiments of the present application, when the filter coefficients are reconstructed, if the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments, and if the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are respectively obtained:
[0676] In an embodiment, considering that the input of TALF can include both one inter- reference picture and two inter-reference pictures, the data amount of different input pictures can be stored and updated using different FIFOs. For example, the input of one inter- reference picture uses one FIFO to record the history filter, and the input of two inter- reference pictures uses another FIFO to record the history filter.
[0677] That is, for TALF, the filter mode always uses one 7x7 filter or two 5x5 filters, corresponding to using the reconstructed value in one reconstructed picture as input and using the reconstructed value in two reconstructed pictures as input, respectively. Among them, the update FIFO can be mainly divided into forward, backward and bidirectional TALF filters, which can be updated separately in different FIFOs and always updated in the same FIFO, or the update of the FIFO can be divided into two categories using one reconstructed picture and using two reconstructed pictures.
[0678] Correspondingly, in the embodiment of the present application, a talf_filter_mode needs to be coded and decoded to represent the selected filter mode. That is, whether the history filter is reused or not indicated by the multiplexing flag talf_reuse_flag, the talf_filter_mode indicating the filter mode needs to be transmitted.
[0679] That is, in the embodiment of the present application, a way of multiplexing history TALF information includes selecting one history data set corresponding to the filter mode (the number of inter-reference pictures of input) from a plurality of history data sets, then determining a data unit corresponding to the data unit index in the history data set, and then obtaining the filter coefficients of the data unit recorded and stored filter group and candidate filter.
[0680] If the update of the FIFO is divided into two categories using one reconstructed picture and using two reconstructed pictures, then the number of FIFOs is only two, and the updated FIFO is determined according to FIFOType. When the filter to be updated in the FIFO is a 13-coefficient filter (one reconstructed picture input, 7x7 shape), FIFOType is set to 0; when the filter to be updated in the FIFO is a 14-coefficient filter (two reconstructed picture inputs, two 5x5 shapes), FIFOType is set to 1.
[0681] If the history TALF information recorded and stored in the history data set includes the filter group number and the filter coefficients of the candidate filter, then when updating the history data set, the corresponding TALF information including the filter group number and the filter coefficients of the candidate filter also needs to be stored in the history data set.
[0682] It can be understood that, in the embodiments of the present application, when multiplexing the history TALF information, if the filter coefficients corresponding to the candidate filter are included in the history TALF information, the filter coefficients corresponding to the filter of the current block (filter coefficients) can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0683] It can be understood that, in the embodiments of the present application, when multiplexing the history TALF information, if the filter coefficients corresponding to the candidate filter are included in the history TALF information, the filter coefficients corresponding to the filter of the current block (filter coefficients) can be determined from the filter coefficients corresponding to the candidate filter in combination with the first syntax element identification information talf_ctb_idc[CtbAddrX][CtbAddrY].
[0684] If the current slice does not multiplex the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above-mentioned embodiments.
[0685] If the current slice uses the multiplexed history adaptive loop filter, the number of multiplexed filters filterCount is first obtained:
[0686] filterCount = tAlfParamPool[FIFOType][talf_reuse_idx].filterCount
[0687] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0688] Wherein, the talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree luma block numbered CtbAddrX in the horizontal direction and CtbAddrY in the vertical direction uses the TALF filter. If talf_reuse_flag is 0, i.e. the history adaptive loop filter is not multiplexed, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-talf_num_filters_signalled_minus1. If talf_reuse_flag is 1, i.e. the history adaptive loop filter is multiplexed, the value range of talf_ctb_idc[CtbAddrX][CtbAddrY] is 0-filterCount-1. When the syntax element does not exist in the bitstream, its value can be defaulted to 0.
[0689] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments, if talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are obtained respectively:
[0690] numCoeff can be determined according to whether talf_filter_mode indicates unidirectional filtering or bidirectional filtering when talf_reuse_flag is 1. numCoeff is 13 when unidirectional filtering is indicated, and numCoeff is 14 when bidirectional filtering is indicated.
[0691] It can be understood that in the embodiments of the present application, when the history temporal adaptive loop filter is reused, since the FIFO at the talf_reuse_idx can contain one or more temporal adaptive filters, when the CTU is encoded, the corresponding identifier should also be used to indicate whether the history temporal adaptive loop filter is selected and which filter in the TALFs is selected.
[0692] If the current slice does not reuse the history adaptive loop filter, the coding tree block level syntax element parsing method is the same as the conventional TALF method in the above embodiments.
[0693] If the current slice uses the reused history adaptive loop filter, the number of filters filterCount is first obtained:
[0694] filterCount = tAlfParamPool[talf_filter_mode][talf_reuse_idx].filterCount
[0695] Exemplarily, in some embodiments, the coding tree block level syntax elements are parsed as follows:
[0696] Wherein, the talf_ctb_idc[CtbAddrX][CtbAddrY] syntax element indicates whether the coding tree block of the CtbAddrX horizontal direction and the CtbAddrY vertical direction uses the TALF filter. If the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the talf_ctb_idc[CtbAddrX][CtbAddrY] has a value range of 0-talf_num_filters_signalled_minus1. If the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the talf_ctb_idc[CtbAddrX][CtbAddrY] has a value range of 0-filterCount-1. When the syntax element does not exist in the bitstream, the value of the syntax element can be 0 by default.
[0697] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if the talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments. If the talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the reused filter mode, the number of filters (the number of filter groups) and the filter coefficients are obtained respectively:
[0698] In an implementation, the time domain adaptive filters of different slices (or different pictures) can be combined. Wherein, the time domain adaptive filters of all filter modes are updated in the same FIFO, and each element in the FIFO can only store 1 group of filters. If 1 group of filters is parsed in the current slice (or the current picture), 1 group of filters is updated in the FIFO. If multiple groups of filters are parsed in the current slice (or the current picture), multiple groups of filters are updated in the FIFO. Each index corresponds to 1 group of filters. When reused, one or more indexes of the FIFO can be used to obtain one or more groups of filters for the current slice (or the current picture).
[0699] Correspondingly, in the embodiments of the present application, a talf_filter_mode needs to be coded and decoded to represent the selected filter mode, and a talf_num_filters_signalled_minus1 also needs to be coded and decoded to indicate the number of coded filters minus 1. That is, whether the reuse flag talf_reuse_flag indicates whether to reuse the history filter, the talf_filter_mode indicating the filter mode and the talf_num_filters_signalled_minus1 indicating the number of filter groups need to be transmitted.
[0700] That is, in the embodiments of the present application, a way of reusing the historical TALF information includes determining a data unit corresponding to a data unit index from a historical data set, and then obtaining the filter coefficients of the recorded and stored candidate filter of the data unit.
[0701] If the historical TALF information recorded and stored in the historical data set includes the filter coefficients of the candidate filter, when updating the historical data set, the corresponding TALF information including the filter coefficients of the candidate filter also needs to be stored in the historical data set.
[0702] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e., not to reuse the historical adaptive loop filter, the process of reconstructing the filter coefficients is the same as the conventional TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e., to reuse the historical adaptive loop filter, the filter coefficients are obtained as follows:
[0703] In an implementation, the historical temporal loop filter is allowed to be combined, but the filters in each filter mode are updated in the same FIFO.
[0704] Correspondingly, in the embodiments of the present application, a talf_num_filters_signalled_minus1 needs to be coded and decoded to indicate the number of coded filters minus 1. That is, whether the reuse flag talf_reuse_flag indicates whether to reuse the historical filter or not, the talf_num_filters_signalled_minus1 indicating the number of filter groups needs to be transmitted.
[0705] That is, in the embodiments of the present application, a way of reusing the historical TALF information includes determining a data unit corresponding to a data unit index from a historical data set, and then obtaining the filter coefficients of the recorded and stored filter mode and candidate filter of the data unit.
[0706] It should be noted that in the embodiments of the present application, in the process of updating the FIFO, each filter should be assigned a corresponding filter mode type.
[0707] If the historical TALF information recorded and stored in the historical data set includes the filter coefficients of the candidate filter, when updating the historical data set, the corresponding TALF information including the filter coefficients of the candidate filter also needs to be stored in the historical data set.
[0708] Further, in the embodiments of the present application, when reconstructing the filter coefficients, if talf_reuse_flag is 0, i.e. the history adaptive loop filter is not reused, the filter coefficient reconstruction process is the same as the conventional TALF method in the above embodiments, and if talf_reuse_flag is 1, i.e. the history adaptive loop filter is reused, the filter coefficients are obtained as follows:
[0709] numCoeff can be determined according to whether tAlfMode indicates unidirectional filtering or bidirectional filtering when talf_reuse_flag is 1. numCoeff is 13 when unidirectional filtering is indicated, and numCoeff is 14 when bidirectional filtering is indicated.
[0710] In an embodiment, an improvement is proposed for bidirectional filtering or a filtering mode using reconstructed values in two reference pictures as inputs. When bidirectional filtering is reused, an additional mode is introduced in which the two inputs of the original bidirectional filter are swapped before being input into the filter.
[0711] Correspondingly, in the embodiments of the present application, a talf_filter_mode is coded and decoded to represent the selected filter mode. That is, whether the history filter is reused or not is indicated by talf_reuse_flag, talf_filter_mode indicating the filter mode (filtering mode) needs to be transmitted.
[0712] Exemplarily, in some embodiments, the slice-level syntax elements are parsed as follows:
[0713] talf_reuse_flag is used to indicate whether the history adaptive loop filter recorded in the FIFO is reused. When talf_reuse_flag is 1, the history adaptive loop filter recorded in the FIFO is reused, and when talf_reuse_flag is 0, the history adaptive loop filter recorded in the FIFO is not reused. When the syntax element does not exist in the bitstream, talf_reuse_flag is 0.
[0714] talf_reuse_idx is used to indicate the index of the history adaptive loop filter in the FIFO. Since the length of the FIFO is 8 in this example, talf_reuse_idx is coded using a 3-bit fixed-length code. In other cases, a variable-length code or other length coding method can also be used. The value of talf_reuse_idx ranges from 0 to 7, representing which set of history adaptive loop filters in the FIFO is reused. When the syntax element does not exist in the bitstream, talf_reuse_idx is 0.
[0715] The value range of talf_filter_mode will change according to 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 values of 0, 1, 2 or 3. When the value is 0, 1 or 2, the meaning remains unchanged. When the value is 3, it means that the two inputs of the filter need to be exchanged before being used as inputs.
[0716] updateFIFO() is a step of updating the FIFO using the TALF decoded by the current slice. The update process is as follows:
[0717] Among them, the number of FIFOs is only two. The FIFO to be updated is determined according to FIFOType. When the filter to be updated in the FIFO is a 13-coefficient filter (one reconstructed image input, 7x7 shape), FIFOType is set to 0. When the filter to be updated in the FIFO is a 14-coefficient filter (two reconstructed image inputs, two 5x5 shapes).
[0718] Further, in the embodiments of the present application, it is assumed 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 talf_filter_mode takes values of 0, 1 or 2, the TALF filtering process of the luminance coding tree block is the same as in the above embodiments.
[0719] When talf_filter_mode takes a value of 3, the current luminance coding tree block has a non-zero talf_ctb_idc, and then TALF filtering is needed.
[0720] Exemplarily, in some embodiments, the input of the filtering process includes:
[0721] 1. An array rec of a reconstructed luminance image filtered by a luminance adaptive loop filter,
[0722] 2. a corresponding temporal reconstructed luma picture array, for example, the talf_filter_mode syntax element is 0, then the forward nearest one frame temporal reconstructed picture is used under the RA configuration or the first frame reconstructed picture rec0 is used under the LD; is 1, then the backward nearest one frame temporal reconstructed picture is used under the RA configuration or the first frame reconstructed picture rec1 is used under the LD; is 2, then the two reconstructed picture arrays rec0 and rec1 are used, and is 3, then rec0 and rec1 are swapped, that is, rec0 is the original rec1, and rec1 is the original rec0.
[0723] 3. a luma coordinate (xCtb, yCtb) of the current luma coding tree block in the current picture,
[0724] 4. a width tAlfWidth and a height tAlfHeight of the luma coding tree block,
[0725] 5. a coefficient tAlfCoeff[][] of the temporal adaptive loop filter,
[0726] The filtering calculation for each position in the luma coding tree block is as follows:
[0727] When numCoeff is 14:
[0728] The rest of the unidirectional prediction part is the same.
[0729] In the above filtering calculation process, shift is a positive integer, shift is 6 in the present scheme, BitDepth is the bit depth of the luma component, and x and y represent the horizontal and vertical coordinates of the reconstructed picture array.
[0730] The embodiment of the present application provides a coding and decoding method, which is a temporal adaptive loop filtering method. The TALF filtering processing of the reconstructed value of the current block can be realized based on the reconstructed sample of at least one inter-frame reference picture and the corresponding filter coefficient. In the TALF filtering process, the related information of the at least one inter-frame reference picture is fully utilized, so that the filtering effect can be improved, and the coding and decoding performance is improved. Further, in the TALF filtering process, the related information of the historical TALF filter recorded and stored can be selected for reuse, so that the code word consumption can be reduced, and the coding and decoding performance is improved.
[0731] 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 a time domain completed reconstructed image as an information source to perform improved adaptive loop filtering on a current frame reconstructed image. Further, in the TALF filtering process, on one hand, a history decoded time domain adaptive loop filter can be selected, on the other hand, a nonlinear time domain adaptive loop filter can be selected, on the other hand, an adaptive precision of the time domain loop filter can be introduced, and on the other hand, a time domain loop filter based on vector information auxiliary can be selected. Thus, the coding and decoding performance can be improved to the greatest extent.
[0732] Next, the TALF filtering scheme proposed by the embodiments of the present application and the related schemes based on TALF are exemplarily described.
[0733] Exemplarily, a 7x7 symmetric filter and two 5x5 symmetric filters can be selected, but the present application is not specifically limit...
Claims
1. A decoding method applied to a decoder, the method comprising: decoding a bitstream in a case where it is determined that a current picture is filtered using temporal adaptive loop filtering (TALF), and determining multiplexing identification information; decoding the bitstream in a case where it is determined that the current picture is filtered using multiplexed history TALF information based on the multiplexing identification information, and determining a multiplexing index parameter and history TALF information according to the multiplexing index parameter; filtering the current picture based on the history TALF information, and determining a filtered reconstruction value of the current picture.
2. The method of claim 1, wherein, The method further comprises: in a case where it is determined that the current picture is filtered without multiplexing history TALF information based on the multiplexing identification information, determining TALF information corresponding to the current picture; updating a candidate history dataset based on the TALF information corresponding to the current picture; wherein the candidate history dataset comprises one or more history datasets.
3. The method of claim 2, wherein, The determining the history TALF information according to the multiplexing index parameter comprises: determining a data unit index according to the multiplexing index parameter; determining a data unit corresponding to the data unit index in the one history dataset; and determining the history TALF information based on the data unit corresponding to the data unit index; wherein the history TALF information comprises a filter mode, a number of filter groups, and filter coefficients of a candidate filter.
4. The method of claim 2, wherein, The method further comprises: in a case where it is determined that the current picture is filtered using TALF, decoding the bitstream, and determining a filter mode corresponding to the current picture.
5. The method of claim 4, wherein, The determining the history TALF information according to the multiplexing index parameter comprises: determining a first history dataset in the plurality of history datasets according to the filter mode corresponding to the current picture; determining a data unit index according to the multiplexing index parameter, and determining a data unit corresponding to the data unit index in the first history dataset; and determining the history TALF information based on the data unit corresponding to the data unit index; wherein the history TALF information comprises a number of filter groups and filter coefficients of a candidate filter.
6. The method of claim 2, wherein, The method further comprises: in a case where it is determined that the current picture is filtered using TALF, decoding the bitstream, and determining a filter mode corresponding to the current picture and a number of filter groups.
7. The method of claim 6, wherein, The determining the history TALF information according to the multiplexing index parameter comprises: determining a data unit index according to the multiplexing index parameter, and determining a data unit corresponding to the data unit index in the one history dataset; wherein a number of the data unit indexes and a number of the data units corresponding to the data unit indexes are determined based on the number of filter groups; and determining the history TALF information based on the data unit corresponding to the data unit index; wherein the history TALF information comprises filter coefficients of a candidate filter.
8. The method of claim 2, wherein, The method further comprises: in a case where it is determined that the current picture is filtered using TALF, decoding the bitstream, and determining a number of filter groups corresponding to the current picture.
9. The method of claim 8, wherein, The determining the history TALF information according to the multiplexing index parameter comprises: determining a data unit index according to the multiplexing index parameter; determining a data unit corresponding to the data unit index in the one history data set; determining the history TALF information based on the data unit corresponding to the data unit index; wherein the history TALF information comprises a filter mode and filter coefficients of a candidate filter.
10. The method of any one of claims 3-5, wherein, The method further comprises: decoding a bitstream to determine first syntax element identification information; in a case where it is determined that the current block is filtered using the history TALF information, determining filter coefficients corresponding to the current block according to the first syntax element identification information and the history TALF information.
11. The method of claim 10, wherein, The determining filter coefficients corresponding to the current block according to the first syntax element identification information and the history TALF 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 the filter; determining filter coefficients corresponding to the candidate filter as filter coefficients corresponding to the current block.
12. An encoding method applied to an encoder, the method comprising: when filtering a current image using TALF, determining a cost value when filtering using multiplexed history TALF information and a cost value when filtering without multiplexing history TALF information; determining multiplexing identification information according to the cost value when filtering using multiplexed history TALF information and the cost value when filtering without multiplexing history TALF information, and writing the multiplexing identification information into a bitstream; wherein the multiplexing identification information is used to determine whether to filter using multiplexed history TALF information; in a case where it is determined to filter using multiplexed history TALF information, determining a multiplexing index parameter and writing the multiplexing index parameter into the bitstream.
13. The method of claim 12, wherein, The determining multiplexing identification information according to the cost value when filtering using multiplexed history TALF information and the cost value when filtering without multiplexing history TALF information comprises: in a case where the cost value when filtering using multiplexed history TALF information is greater than or equal to the cost value when filtering without multiplexing history TALF information, setting the multiplexing identification information to indicate that history TALF information is not multiplexed for filtering; in a case where the cost value when filtering using multiplexed history TALF information is less than the cost value when filtering without multiplexing history TALF information, setting the multiplexing identification information to indicate that history TALF information is multiplexed for filtering.
14. The method of claim 12 or 13, wherein, The method further comprises: in a case where it is determined that history TALF information is not multiplexed for filtering, determining TALF information corresponding to the current image; updating a candidate history data set corresponding to the current image based on the TALF information corresponding to the current image; wherein the candidate history data set comprises at least one history data set.
15. The method of claim 12 or 13, wherein, The determining a multiplexing index parameter comprises: in a case where it is determined that history TALF information is multiplexed for filtering, determining a minimum cost value in the cost value when filtering using multiplexed history TALF information. determine historical TALF information corresponding to the minimum cost value, and determine a data unit storing the historical TALF information corresponding to the minimum cost value; determine the multiplexing index parameter according to the data unit.
16. The method of claim 12, wherein, The method further includes: determine a first cost value corresponding to filtering of the current picture using TALF, and determine first syntax element identification information based on the first cost value, and write 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.
17. The method of claim 16, wherein, The determination of the first cost value corresponding to filtering of the current picture using TALF includes: determine candidate modes according to a current configuration; in each candidate mode, determine a candidate filter corresponding to the current block, and determine filter coefficients corresponding to the current block based on the candidate filter corresponding to the current block; determine a second cost value of the filter coefficients corresponding to the current block; determine the minimum second cost value as the first cost value corresponding to filtering of the current block using TALF.
18. The method of claim 17, wherein, The determination of the first syntax element identification information based on the first cost value includes: determine a third cost value corresponding to filtering of the current block without using TALF; in a case where the first cost value is greater than or equal to the third cost value, set the first syntax element identification information to indicate that the current block is not filtered using TALF; in a case where the first cost value is less than the third cost value, set the first syntax element identification information to indicate that the current block is filtered using TALF.
19. A code stream, wherein the code stream is generated by bit-encoding information to be encoded; and wherein, The to-be-encoded information includes at least one or more of the following: first syntax element identification information, multiplexing identification information, multiplexing index parameter, filter mode, number of filter groups, and filter coefficients of candidate filters.
20. An encoder, the encoder comprising a first determining unit; wherein the first determining unit is configured to, when filtering of a current picture using TALF, determine a cost value when filtering using multiplexed historical TALF information and a cost value when filtering without multiplexing historical TALF information, determine multiplexing identification information according to the cost value when filtering using multiplexed historical TALF information and the cost value when filtering without multiplexing historical TALF information, and write the multiplexing identification information into a bitstream; wherein the multiplexing identification information is used to determine whether to filter using multiplexed historical TALF information; in a case where it is determined to filter using multiplexed historical TALF information, determine a multiplexing index parameter and write the multiplexing index parameter into the bitstream.
21. An encoder, the 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, perform the method of any one of claims 12 to 18.
22. A decoder, the decoder comprising a second determining unit; wherein 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 to determine multiplexing identification information; in a case where it is determined that the current image is filtered using multiplexed historical TALF information based on the multiplexing identification information, decode the code stream to determine a multiplexing index parameter and determine historical TALF information according to the multiplexing index parameter; and filter the current image based on the historical TALF information to determine a filtered reconstruction value of the current image.
23. A decoder, comprising a second memory and a second processor; wherein, the second memory is configured to store a computer program capable of running on the second processor; the second processor is configured to execute the method according to any one of claims 1 to 11 when running the computer program.
24. A computer readable storage medium, storing a computer program, which is executed to implement the decoding method according to any one of claims 1 to 11, or to implement the encoding method according to any one of claims 12 to 18.
25. A computer readable storage medium, configured to store a code stream generated by the encoding method according to any one of claims 12 to 18.
Citation Information
Patent Citations
On adaptive loop filtering for video coding
CN113767623A
Filtering method, device and equipment
CN114640858A
Encoder, decoder and corresponding methods
CN114868392A
Adaptive Loop Filter With Adaptive Parameter Set
US20200329239A1