Coding method, decoder, decoding chip

By calculating and sorting the distortion of SBT modes and using syntax elements to indicate the target mode, the problem of high signaling overhead is solved, and more efficient encoding and decoding is achieved.

CN122349008APending Publication Date: 2026-07-07HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510026343.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

The existing encoding method requires 4 flags to identify 16 SBT modes, resulting in a large signaling overhead.

Method used

By determining the estimated residual of the current block, the distortion size and partition ratio of the SBT modes of multiple sub-blocks are calculated, sorted according to the distortion size, a first SBT mode list is generated, and the index of the target SBT mode is indicated by the first syntax element to reduce signaling overhead.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122349008A_ABST
    Figure CN122349008A_ABST
Patent Text Reader

Abstract

The application provides a coding and decoding method, a decoder and a decoding chip, which can reduce signaling overhead. The decoding method comprises the following steps: determining an estimated residual of a current block; calculating distortion sizes corresponding to multiple SBT (Sub-Block Transform) modes in a first category based on the estimated residual, wherein the SBT modes in the first category have the same division proportion and division shape; sorting the multiple SBT modes according to the distortion sizes to obtain a first SBT mode list; parsing a first syntax element, wherein the first syntax element is used to indicate an index of a target SBT mode in the first SBT mode list, and the target SBT mode is an SBT mode used by the current block; and determining the target SBT mode based on the first syntax element.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video encoding and decoding, and in particular to an encoding and decoding method, a decoder, and a decoding chip. Background Technology

[0002] Some relevant standards have introduced sub-block transform (SBT) modes, which include 8 SBT modes. Combined with the original 8 SBT modes for regular rectangles, there are a total of 16 SBT modes. If the original encoding method is used, 4 flags are needed to identify these 16 SBT modes, resulting in significant signaling overhead. Summary of the Invention

[0003] This application provides an encoding / decoding method, an encoding / decoding chip, and an encoding / decoding chip that can reduce signaling overhead.

[0004] In a first aspect, a decoding method is provided, applied to a decoder, comprising: determining the estimated residual of the current block; calculating, based on the estimated residual, the distortion magnitudes corresponding to multiple sub-block transform SBT modes in a first category, wherein the SBT modes in the first category have the same partitioning ratio and partitioning shape; sorting the multiple SBT modes according to the distortion magnitude to obtain a first SBT mode list; parsing a first syntax element, wherein the first syntax element is used to indicate the index of a target SBT mode in the first SBT mode list, wherein the target SBT mode is the SBT mode used by the current block; and determining the target SBT mode based on the first syntax element.

[0005] Secondly, an encoding method is provided, comprising: determining the estimated residual of the current block; calculating, based on the estimated residual, the distortion magnitudes corresponding to multiple sub-block transform SBT modes in a first category, wherein the SBT modes in the first category have the same partitioning ratio and partitioning shape; sorting the multiple SBT modes according to the distortion magnitude to obtain a first SBT mode list; and encoding a first syntax element, wherein the first syntax element is used to indicate the index of a target SBT mode in the first SBT mode list, wherein the target SBT mode is the SBT mode used by the current block.

[0006] Thirdly, a decoder is provided, comprising: a first determining unit configured to determine the estimated residual of a current block; a calculation unit configured to calculate, based on the estimated residual, the distortion magnitudes corresponding to multiple sub-block transform SBT modes in a first category, wherein the SBT modes in the first category have the same partitioning ratio and partitioning shape; a sorting unit configured to sort the multiple SBT modes according to the distortion magnitude to obtain a first SBT mode list; a parsing unit configured to parse a first syntax element, wherein the first syntax element is used to indicate the index of a target SBT mode in the first SBT mode list, wherein the target SBT mode is the SBT mode used by the current block; and a second determining unit configured to determine the target SBT mode based on the first syntax element.

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

[0008] Fifthly, an encoder is provided, comprising: a first determining unit configured to determine an estimated residual of a current block; a calculation unit configured to calculate, based on the estimated residual, the distortion magnitudes corresponding to multiple sub-block transform SBT modes in a first category, wherein the SBT modes in the first category have the same partitioning ratio and partitioning shape; a sorting unit configured to sort the multiple SBT modes according to the distortion magnitude to obtain a first SBT mode list; and an encoding unit configured to encode a first syntax element, wherein the first syntax element is used to indicate the index of a target SBT mode in the first SBT mode list, wherein the target SBT mode is the SBT mode used by the current block.

[0009] In a sixth aspect, an encoder is provided, comprising: a memory for storing a computer program; and a processor for executing the method of the first aspect when running the computer program.

[0010] In a seventh aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program that, when executed, implements the method as described in the first or second aspect.

[0011] Eighthly, a computer program product is provided, including a computer program that, when executed, implements the method as described in the first or second aspect.

[0012] A ninth aspect provides a non-volatile computer-readable storage medium for storing bit streams, the bit streams being generated by an encoding method using an encoder, or the bit streams being decoded by a decoding method using a decoder, wherein the decoding method is the method described in the first aspect and the encoding method is the method described in the second aspect.

[0013] A tenth aspect is provided: a computer-readable storage medium storing a computer program that, when executed, implements the method as described in the first aspect or the second aspect.

[0014] In an eleventh aspect, a bitstream is provided, including a bitstream generated according to the method described in the second aspect.

[0015] In a twelfth aspect, a decoding chip is provided, the chip including a memory and a processor, the processor being configured to retrieve and execute a program or instructions from the memory to implement some or all of the steps described in the first aspect above.

[0016] In a thirteenth aspect, an encoding chip is provided, the chip including a memory and a processor, the processor being used to call and run a program or instructions from the memory to implement some or all of the steps described in the second aspect above.

[0017] Some embodiments of this application utilize the principle of conditional entropy reduction, using information that the decoder can obtain before the inverse transform as conditions, such as using the estimated residual of the current block as the basis for inferring the SBT mode. By analyzing the estimated residual block, the distribution characteristics of the actual residual block can be predicted. The decoder can determine the distortion magnitude of multiple SBT modes based on the estimated residual, sort the multiple SBT modes according to the distortion magnitude, and indicate the index of the target SBT mode among the multiple SBT modes based on the first syntax element. Since the decoder can use information before the inverse transform to sort the multiple SBT modes, the target SBT mode can be indicated through the first syntax element, which helps to reduce signaling overhead. Attached Figure Description

[0018] Figure 1 Here are some structural example diagrams of video encoders that can be applied to some embodiments of this application;

[0019] Figure 2 Here are some structural example diagrams of video decoders that can be applied to some embodiments of this application;

[0020] Figure 3 This is a schematic diagram illustrating the transformation using the SBT partitioning technique.

[0021] Figure 4 This illustrates the relevant steps of the SBT technology;

[0022] Figure 5 The diagram shows the structure of eight SBT modes;

[0023] Figure 6 This shows the structure of the corner SBT pattern;

[0024] Figure 7This shows the structure of the central SBT pattern;

[0025] Figure 8 This is a schematic diagram illustrating the encoding of 16 SBT modes according to the original encoding mode provided in some embodiments of this application;

[0026] Figure 9 This is a schematic diagram illustrating the determination of sub-block positions based on ASBT technology.

[0027] Figure 10 A schematic flowchart illustrating a decoding method provided in some embodiments of this application;

[0028] Figure 10 (a) A schematic flowchart illustrating another decoding method provided in some embodiments of this application;

[0029] Figure 10 (b) A schematic flowchart illustrating yet another decoding method provided in some embodiments of this application;

[0030] Figure 10 (c) A schematic flowchart of yet another decoding method provided in some embodiments of this application;

[0031] Figure 11 This is a schematic diagram of a two-way prediction method;

[0032] Figure 12 A schematic flowchart illustrating an encoding method provided for some embodiments of this application;

[0033] Figure 13 A flowchart illustrating the process of determining the SBT mode based on a sorting method, provided for some embodiments of this application;

[0034] Figure 14 For some embodiments of this application, the following are provided: Figure 13 Further refinement of step S1320;

[0035] Figure 15 The encoding end provided for some embodiments of this application is for Figure 13 Further refinement of step S1330;

[0036] Figure 16 The decoding end provided for some embodiments of this application is for Figure 13 Further refinement of step S1330;

[0037] Figure 17 A flowchart illustrating the process of determining the SBT mode based on a preferred method, provided for some embodiments of this application;

[0038] Figure 18 The encoding end provided for some embodiments of this application is for Figure 17 Further refinement of step S1730;

[0039] Figure 19 The decoding end provided for some embodiments of this application is for Figure 17 Further refinement of step S1730;

[0040] Figure 20 A flowchart illustrating the process of determining the SBT mode based on a screening method, provided for some embodiments of this application;

[0041] Figure 21 The encoding end provided for some embodiments of this application is for Figure 20 Further refinement of step S2030;

[0042] Figure 22 The decoding end provided for some embodiments of this application is for Figure 20 Further refinement of step S2030;

[0043] Figure 23 A schematic diagram illustrating two sub-block partitioning methods provided in the embodiments of this application;

[0044] Figure 24 This is a schematic diagram of the decoder structure provided in one embodiment of this application;

[0045] Figure 25 A schematic diagram of the decoder provided in another embodiment of this application;

[0046] Figure 26 This is a schematic diagram of the encoder structure provided in one embodiment of this application;

[0047] Figure 27 This is a schematic diagram of the encoder provided in another embodiment of this application. Detailed Implementation

[0048] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0049] Figure 1 This is a schematic block diagram of a video encoder involved in some embodiments of this application.

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

[0051] This video encoder 100 can be applied to image data in luminance / chrominance (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents luminance (Luma), Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) used to describe color and saturation. For example, in color format, 4:2:0 means that there are 4 luminance components and 2 chrominance components (YYYYCbCr) per 4 pixels; 4:2:2 means that there are 4 luminance components and 4 chrominance components (YYYYCbCrCbCr) per 4 pixels; and 4:4:4 means full pixel display (YYYYCbCrCbCrCbCrCbCr).

[0052] For example, the video encoder 100 reads video data and, for each image in the video data, divides the image into several coding tree units (CTUs). In some examples, CTUs may be called "tree blocks," "largest coding units" (LCUs), or "coding tree blocks" (CTBs). Each CTU can be associated with a pixel block of equal size within the image. Each pixel can correspond to one luminance (luma) sample and two chrominance (chroma) samples. Therefore, each CTU can be associated with one luminance sample block and two chrominance sample blocks. The size of a CTU is, for example, 128×128, 64×64, 32×32, etc. A CTU can be further divided into several coding units (CUs) for encoding. CUs can be rectangular or square blocks. CUs can correspond to prediction units (PUs) and transform units (TUs).

[0053] In some embodiments, the current block may be referred to as the current coding unit (CU). A prediction block may also be referred to as a prediction image block or image prediction block, and a reconstructed image block may also be referred to as a reconstruction block or image reconstruction block. Due to the need for parallel processing, an image can be divided into slices. Slices within the same image can be processed in parallel, meaning they have no data dependency on each other. A "frame" is a commonly used term, generally understood as one image. In this document, "frame" can also be replaced with "image" or "slice," etc.

[0054] The following is combined with Figure 1 The video encoder 100 in some embodiments of this application will be described.

[0055] In some embodiments, the video encoder 100 may include a prediction module 110. The prediction module 110 includes an inter-frame prediction module 111 and an intra-frame prediction module 112. Because there is a strong correlation between adjacent pixels in an image of a video, intra-frame prediction is used in video encoding and decoding techniques to eliminate spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent images in a video, inter-frame prediction is used in video encoding and decoding techniques to eliminate temporal redundancy between adjacent images, thereby improving encoding efficiency.

[0056] The inter-frame prediction module 111 can be used for inter-frame prediction, which can include motion estimation and motion compensation. It can reference image information from different images. Inter-frame prediction uses motion information to find reference blocks in the reference images and generates prediction blocks based on these reference blocks to eliminate temporal redundancy. Motion information includes a list of reference images, the reference image index, and motion vectors. Motion vectors can be integer-pixel or fractional-pixel. If the motion vector is fractional-pixel, interpolation filtering needs to be used in the reference images to create the required fractional-pixel blocks. Here, the integer-pixel or fractional-pixel blocks in the reference images found based on the motion vectors are called reference blocks. Some techniques use reference blocks as prediction blocks, while others process the reference blocks further to generate prediction blocks. Processing the reference blocks further to generate prediction blocks can also be understood as using the reference blocks as prediction blocks and then processing them to generate new prediction blocks.

[0057] The intra-frame prediction module 112 refers only to information from the same image to predict pixel information within the current image block, thereby eliminating spatial redundancy.

[0058] Intra-frame prediction has multiple prediction modes. Taking the international digital video coding standards H-series as an example, the H.264 / AVC standard has 8 angular prediction modes and 1 non-angular prediction mode, while H.265 / HEVC extends this to 33 angular prediction modes and 2 non-angular prediction modes. High Efficiency Video Coding (HEVC) uses Planar, DC, and 33 angular modes, for a total of 35 prediction modes. Versatile Video Coding (VVC) uses Planar, DC, and 65 angular modes, for a total of 67 prediction modes.

[0059] It should be noted that with the increase in angle modes, intra-frame prediction will be more accurate and better meet the needs of the development of high-definition and ultra-high-definition digital video.

[0060] In some embodiments, the video encoder 100 may include a residual module 120. The residual module 120 may generate a residual block of the CU based on pixel blocks of the CU and prediction blocks of the CU. For example, the residual module 120 may generate a residual block of the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel block of the CU and the corresponding sample in the prediction block of the CU. The residual block can also be understood as residual information.

[0061] In some embodiments, the video encoder 100 may include a transformation module 125. The transformation module 125 can transform the residual information generated by the residual module 120 to obtain transformation coefficients.

[0062] In some embodiments, the video encoder 100 may include a quantization module 130. The quantization module 130 quantizes transform coefficients. The quantization module 130 quantizes the transform coefficients associated with the CU based on a quantization parameter (QP) value associated with the CU. The video encoder 100 can adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.

[0063] In some embodiments, the video encoder 100 may include an inverse quantization module 135. The inverse quantization module 135 can apply inverse quantization to the quantized transform coefficients to obtain the transform coefficients.

[0064] In some embodiments, the video encoder 100 may include an inverse transform module 140. The inverse transform module 140 applies an inverse transform to the transform coefficients, which can be used to reconstruct the residual block.

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

[0066] In some embodiments, the video encoder 100 may include a loop filter module 160. The loop filter module 160 is used to process the pixels after inverse transform and inverse quantization to compensate for distortion information and provide a better reference for subsequent encoded pixels. For example, it may perform deblocking filtering operations to reduce the block effect of pixel blocks associated with the CU.

[0067] In some embodiments, the loop filtering module 160 includes a deblocking filtering module. The deblocking filtering module is used to remove block artifacts. Block artifacts refer to the discontinuities at the boundaries of coded blocks in an image. The deblocking filtering module can smooth the block boundaries to effectively reduce or remove block artifacts.

[0068] In some embodiments, the loop filtering module 160 includes a sample adaptive offset (SAO) module. The SAO module can be used to remove ringing effects. For strong edges in an image, due to quantization distortion of the high-frequency AC coefficients, a ripple effect will be generated around the edges after decoding; this distortion can be called ringing. The SAO module can suppress ringing effects from the pixel domain perspective.

[0069] In some embodiments, the loop filtering module 160 includes an adaptive loop filter (ALF) module, which is used to remove ringing effects. ALF technology can include luma ALF, chroma ALF, and inter-component ALF. ALF can be based on the Wiener filtering principle, using the original image information and reconstructed image information to establish the Wiener-Hough equation and solve for a series of filter coefficients with the minimum mean square error to remove ringing effects.

[0070] In some embodiments, the video encoder 100 may include a decoded image buffer 170. The decoded image buffer 170 may store reconstructed pixel blocks. The inter-frame prediction module 111 may use a reference image containing the reconstructed pixel blocks to perform inter-frame prediction on PUs of other images. In addition, the intra-frame prediction module 112 may use the reconstructed pixel blocks in the decoded image buffer 170 to perform intra-frame prediction on other PUs in the same image as the CU.

[0071] In some embodiments, the video encoder 100 may include an entropy coding module 180. The entropy coding module 180 may receive quantized transform coefficients from the quantization module 130. The entropy coding module 180 may perform one or more entropy coding operations on the quantized transform coefficients to produce entropy-coded data.

[0072] Figure 2 This is a schematic block diagram of a video decoder involved in some embodiments of this application.

[0073] Video decoder 200 can receive a bitstream. In some embodiments, video decoder 200 may include an entropy decoding module 210. Entropy decoding module 210 can parse the bitstream to extract syntax elements from it. As part of parsing the bitstream, entropy decoding module 210 can parse the entropy-encoded syntax elements in the bitstream. Prediction module 220, inverse quantization module 230, inverse transform module 235, reconstruction module 240, and loop filtering module 250 can decode video data based on the syntax elements extracted from the bitstream, i.e., generate decoded video data.

[0074] In some embodiments, the video decoder 200 may include a prediction module 220. The prediction module 220 includes an intra-frame prediction module 222 and an inter-frame prediction module 221.

[0075] Intra-prediction module 222 can perform intra-prediction to generate prediction blocks for PUs. Intra-prediction module 222 can use intra-prediction modes to generate prediction blocks for PUs based on pixel blocks of spatially adjacent PUs. Intra-prediction module 222 can also determine the intra-prediction mode of PUs based on one or more syntax elements parsed from the bitstream.

[0076] Inter-frame prediction module 221 can construct a first reference image list (list 0) and a second reference image list (list 1) based on the syntax elements parsed from the bitstream. Furthermore, if the PU uses inter-frame prediction coding, entropy decoding module 210 can parse the motion information of the PU. Inter-frame prediction module 221 can determine one or more reference blocks of the PU based on the motion information of the PU. Inter-frame prediction module 221 can generate prediction blocks for the PU based on one or more reference blocks of the PU.

[0077] In some embodiments, the video decoder 200 may include an inverse quantization module 230. The inverse quantization module 230 applies inverse quantization to the quantized transform coefficients to obtain the transform coefficients. The inverse quantization module 230 may use the QP value associated with the CU of the TU to determine the degree of quantization.

[0078] In some embodiments, the video decoder 200 may include an inverse transform module 235. The inverse transform module 235 can inversely transform the transform coefficients associated with the TU. After performing the inverse transform on the transform coefficients, the inverse transform module 235 can generate a residual block associated with the TU.

[0079] In some embodiments, the video decoder 200 may include a reconstruction module 240. The reconstruction module 240 uses a residual block associated with the TU of the CU and a prediction block of the PU of the CU to reconstruct pixel blocks of the CU. For example, the reconstruction module 240 may add samples of the residual block to the corresponding samples of the prediction block to reconstruct pixel blocks of the CU, thereby obtaining reconstructed image blocks.

[0080] In some embodiments, the video decoder 200 may include a loop filter module 250. The loop filter module 250 may perform deblocking filtering operations to reduce the block artifacts of pixel blocks associated with the CU.

[0081] In some embodiments, the video decoder 200 may include a decoded image buffer 260. The video decoder 200 may store the reconstructed image of the CU in the decoded image buffer 260. The video decoder 200 may use the reconstructed image in the decoded image buffer 260 as a reference image for subsequent prediction, or transmit the reconstructed image to a display device for presentation.

[0082] The basic process of video encoding and decoding is as follows: At the encoding end, an image is divided into blocks. For the current block, the prediction module 110 uses intra-frame prediction or inter-frame prediction to generate a prediction block for the current block. The residual module 120 can calculate a residual block based on the prediction block and the original block of the current block, that is, the difference between the prediction block and the original block of the current block. This residual block can also be called residual information. Through the transformation process of the transformation module 125 and the quantization process of the quantization module 130, the residual block can remove information that is not sensitive to the human eye, thereby eliminating visual redundancy. In some embodiments, the residual block before transformation by the transformation module 125 can be called a temporal residual block, and the temporal residual block after quantization by the quantization module 130 can be called a frequency residual block or a frequency domain residual block. The entropy coding module 180 receives the quantized transformation coefficients output by the quantization module 130 and can perform entropy coding on the quantized transformation coefficients to output a bitstream. For example, the entropy coding module 180 can eliminate character redundancy based on the target context model and the probability information of the binary bitstream.

[0083] At the decoding end, the entropy decoding module 210 parses the bitstream to obtain the prediction information and quantization coefficient matrix of the current block. The prediction module 220 uses the prediction information to generate a prediction block for the current block using intra-frame prediction or inter-frame prediction. The inverse quantization module 230 uses the quantization coefficient matrix obtained from the bitstream to inverse quantize the quantization coefficient matrix to obtain transform coefficients; the inverse transform module 235 performs an inverse transform on the transform coefficients to obtain a residual block. The reconstruction module 240 adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed blocks form a reconstructed image. The loop filtering module 250 performs loop filtering on the reconstructed image based on the image or based on the blocks to obtain a decoded image. The encoding end also requires similar operations to the decoding end to obtain a decoded image. This decoded image can also be called a reconstructed image, which can be used as a reference image for inter-frame prediction of subsequent images.

[0084] It should be noted that the block partitioning information determined at the encoding end, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, are carried in the bitstream when necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, and loop filtering mode information or parameter information as the encoding end by parsing the bitstream and analyzing existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.

[0085] It is understandable that the "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in the standard text. In some embodiments of this application, "transformation" and "inverse transformation" correspond to two opposite processes. For example, "transformation" converts the spatial domain values ​​to frequency domain coefficients, while "inverse transformation" converts the frequency domain coefficients back to spatial domain values. If the standard only specifies decoding, then "transformation" in the standard text refers to the decoding part, specifically the "inverse transformation" in this document. The "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in the standard text.

[0086] The above describes the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. This application is applicable to the basic flow of a video codec under this block-based hybrid coding framework, but is not limited to this framework and flow.

[0087] The preceding text has described in detail the encoding and decoding frameworks provided by some embodiments of this application. As mentioned above, during encoding, prediction is usually performed first. Prediction refers to obtaining a predicted block that is the same as or similar to the current block based on the spatial or temporal correlation properties of the image. There are many prediction methods, such as intra-frame prediction and inter-frame prediction.

[0088] It's possible for a predicted block and the original block to be completely identical for a given coded block. However, it's difficult to guarantee that the predicted blocks of all coded blocks in a video will be identical to the original blocks. Especially for natural videos, or videos captured by a camera, the predicted blocks and original blocks usually differ. Irregular motion, distortion, occlusion, brightness variations, and other changes in the video are difficult to predict completely. Therefore, hybrid coding frameworks subtract the predicted block from the original block of the current block to obtain a residual block. The residual block is usually much simpler than the original block, thus using prediction can significantly improve compression efficiency. After obtaining the residual block, the encoder typically doesn't encode it but first performs a transform. The transform converts the residual block from the spatial domain to the frequency domain. After the residual block is transformed to the frequency domain, most of the residual energy is concentrated in certain regions, rather than all regions of the current block.

[0089] For inter-frame prediction, residual energy increases from the center of the prediction block towards the boundary. In many cases, the inter-frame prediction residual is concentrated at a certain edge of the block, rather than distributed around the entire block boundary. Therefore, based on the characteristics of the inter-frame prediction residual, the H.266 / VVC transform coding module allows the use of SBT (Single-Bit Transform) technique for CUs employing inter-frame prediction, i.e., transforming only the prediction residual of a portion of the CU.

[0090] The basic principles of SBT are as follows: Figure 3As shown. The SBT technique considers a portion of the residuals in the current block to be very small and can be treated as zero. Therefore, the CU can be divided into two TUs. Only the prediction residuals of one TU are transformed and quantized, while the prediction residuals of the other TU are set to zero and not processed. For the selected TU, a transformation kernel can be determined based on its partitioning method and the information of the selected location. A TU can also be called a sub-block.

[0091] See Figure 3 TU can be divided into TU1 and TU2. During the transformation, only the prediction residual of TU1 can be transformed, while the prediction residual of TU2 can be set to 0.

[0092] SBT technology involves three steps: TU partitioning (step S410), mode encoding (step S420), and transformation kernel determination (step S430), such as... Figure 4 As shown. The transform kernel here can also be called an implicit transform kernel. The two steps mentioned above will be described in detail below.

[0093] TU division

[0094] In H.266 / VVC, SBT has two partitioning methods, each with two partitioning ratios and two positions, resulting in a total of eight SBT patterns, such as... Figure 5 As shown.

[0095] The two division methods are vertical division (SBT-V) and horizontal division (SBT-H). Figure 5 The division shown in Figures (a) and (c) is a vertical division. Figure 5 The division shown in Figures (b) and (d) is a horizontal division.

[0096] The two partitioning ratios are 2:2 and 1:3 (or 3:1). A 2:2 partition means that the width (or height) of the partitioned TU may be equal to half the width (or height) of the partitioned CU. A 1:3 or 3:1 partition means that the width (or height) of the partitioned TU may be equal to one-quarter the width (or height) of the partitioned CU. In a 1:3 or 3:1 partition, only the residuals of the smaller regions are retained, while the residuals of the larger regions are set to 0.

[0097] The divided TU has two positions: position 0 and position 1. Position 0 indicates that the TU is the left or top piece, and position 1 indicates that the TU is the right or bottom piece.

[0098] SBT partitioning imposes certain constraints on the dimensions of the CU. For example, for a 2:2 vertical (or horizontal) partition, the CU's width (or height) must be greater than or equal to 8. Similarly, for a 1:3 or 3:1 vertical (or horizontal) partition, the CU's width (or height) must be greater than or equal to 16. Therefore, the basic condition for performing SBT is that the CU's width or height must be greater than or equal to 8.

[0099] Pattern Encoding

[0100] In relevant standards (such as H.266 / VVC), the SPS layer defines the Subblock Transform (SBT) enable flag (sps_sbt_enabled_flag). When the SPS layer enables SBT, the CU layer's cu_sbt_flag indicates whether the current CU is performing SBT. If SBT is performed, the CU layer will further indicate the SBT partitioning method and the selected position of the TU.

[0101] The eight modes of SBT can be distinguished by three flags: cu_sbt_quad_flag, cu_sbt_pos_flag, and cu_sbt_horizontal_flag.

[0102] `cu_sbt_quad_flag` is used to identify the partitioning method of the current sub-block. A value of 1 indicates a 1:3 or 3:1 partitioning method; a value of 0 indicates a 2:2 partitioning method.

[0103] `cu_sbt_pos_flag` is used to identify the position of the currently selected sub-block. A value of 1 for `cu_sbt_pos_flag` indicates that the second sub-block (i.e., the right block or the bottom block) is selected; a value of 0 for `cu_sbt_pos_flag` indicates that the first sub-block (i.e., the left block or the top block) is selected.

[0104] `cu_sbt_horizontal_flag` is used to identify the partitioning method of the current sub-block. A value of 1 indicates a horizontal partition; a value of 0 indicates a vertical partition.

[0105] The specific process of SBT mode encoding can be shown in Figure 1.

[0106] Table 1

[0107]

[0108] Determining the implicit transformation kernel

[0109] Currently, commonly used transformation methods include the discrete cosine transform (DCT) and the discrete sine transform (DST).

[0110] The DCT transform includes eight types of transforms, namely DCT-1 to DCT-8. The transform formulas involved in DCT-1 to DCT-8 are introduced below.

[0111] The transformation formula corresponding to DCT-1 is:

[0112]

[0113] The transformation formula corresponding to DCT-2 is:

[0114]

[0115] The transformation formula corresponding to DCT-3 is:

[0116]

[0117] The transformation formula corresponding to DCT-4 is:

[0118]

[0119] The transformation formula corresponding to DCT-5 is:

[0120]

[0121] The transformation formula corresponding to DCT-6 is:

[0122]

[0123] The transformation formula corresponding to DCT-7 is:

[0124]

[0125] The transformation formula corresponding to DCT-8 is:

[0126]

[0127] Wherein, ε and η in the above formula satisfy the following formula:

[0128]

[0129] Of the eight types of DCTs mentioned above, the first four correspond to even-order real-even discrete Fourier transforms (DFTs), while the latter four correspond to odd-order real-even DFTs. A real-even DFT indicates that the input signal is a real number and is an even function.

[0130] Similar to DCT, DST also has eight types of transformations, namely DST1 to DST8. The transformation formulas involved in DST-1 to DST-8 are introduced below.

[0131] The transformation formula corresponding to DST-1 is:

[0132]

[0133] The transformation formula corresponding to DST-2 is:

[0134]

[0135] The transformation formula corresponding to DST-3 is:

[0136]

[0137] The transformation formula corresponding to DST-4 is:

[0138]

[0139] The transformation formula corresponding to DST-5 is:

[0140]

[0141] The transformation formula corresponding to DST-6 is:

[0142]

[0143] The transformation formula corresponding to DST-7 is:

[0144]

[0145] The transformation formula corresponding to DST-8 is:

[0146]

[0147] Wherein, ε and η in the above formula satisfy the following formula:

[0148]

[0149] Of the eight types of DSTs mentioned above, the first four correspond to even-order real odd DFTs, and the latter four correspond to odd-order real odd DFTs. A real odd DFT indicates that the input signal is a real number and is an odd function.

[0150] Images are generally two-dimensional. Performing two-dimensional transformations on an image results in extremely high computational and memory overhead, which current hardware cannot support. Therefore, current standards employ one-dimensional transformations. This means splitting the two-dimensional transformation into two one-dimensional transformations in the horizontal and vertical directions, performing them in two steps. For example, the horizontal transformation can be performed first, followed by the vertical transformation. Alternatively, the vertical transformation can be performed first, followed by the horizontal transformation.

[0151] Each transform scheme can include multiple transform kernels. A transform kernel can be applied individually to the horizontal or vertical transform. For a code block, the encoder can select a suitable transform kernel and transmit its index to the bitstream; the decoder can then determine the inverse transform kernel based on the index. Different transform kernels can be selected for horizontal and vertical transforms. For example, DCT8 can be used for the horizontal transform, while DST7 can be used for the vertical transform. The technique of selecting a suitable transform scheme from the multiple transform schemes mentioned above is commonly referred to as multiple transform selection (MTS).

[0152] The SBT transform kernel of the luma block is implicitly determined by the sub-block partitioning method and the position of the selected sub-block, as shown in Table 2. Furthermore, when the width or height of the TU after SBT partitioning is greater than 32, DCT-2 transform is used in both the vertical and horizontal directions, because DST-7 and DCT-8 only support a maximum of 32-point transform.

[0153] Table 2

[0154] Division method Select position level vertical SBT-V Position0 DCT-8 DST-7 SBT-V Position1 DST-7 DST-7 SBT-H Position0 DST-7 DCT-8 SBT-H Position1 DST-7 DST-7

[0155] When performing SBT on chroma blocks, only the DCT-2 transform kernel can be used.

[0156] As shown in Table 2, if the SBT-V partitioning method is used and the selected sub-block is at Position 0, the horizontal transform kernel is DCT-8 and the vertical transform kernel is DST-7. If the SBT-V partitioning method is used and the selected sub-block is at Position 1, the horizontal transform kernel is DST-7 and the vertical transform kernel is DST-7. If the SBT-H partitioning method is used and the selected sub-block is at Position 0, the horizontal transform kernel is DST-7 and the vertical transform kernel is DCT-8. If the SBT-H partitioning method is used and the selected sub-block is at Position 1, the horizontal transform kernel is DST-7 and the vertical transform kernel is DST-7.

[0157] Corner and center subblock transformations for SBT

[0158] At the 35th (AI) meeting of the Joint Video Experts Team (JEVT), proposal JVET-AI0282 proposed incorporating corner and center block partitioning into SBT technology. The corner and center block partitioning technology is described in detail below.

[0159] TU division

[0160] Proposal JVET-AI0282 adds corner and center block partitioning modes to the original eight modes of SBT technology, such as... Figure 6 and Figure 7 As shown.

[0161] For corner mode, the size of the child block can be 1 / 2 CU width × 1 / 2 CU height, or 1 / 4 CU width × 1 / 4 CU height. There are four positions for the child block: top left (position 0), top right (position 1), bottom left (position 2), and bottom right (position 3), as shown below. Figure 6 As shown.

[0162] For center block mode, the size of the sub-block can be 1 / 2 CU width × 1 / 2 CU height, such as... Figure 7 As shown. Non-zero residual sub-blocks can only be located at the center position, so there is no need to encode the position of the sub-blocks.

[0163] SBT partitioning imposes some restrictions on the size of the CU. When the size of the sub-block is 1 / 2 CU width × 1 / 2 CU height, the width and height of the CU must be greater than or equal to 8; when the size of the sub-block is 1 / 4 CU width × 1 / 4 CU height, the width and height of the CU must be greater than or equal to 16.

[0164] As mentioned above, nine new modes have been added to SBT, namely a center mode and a 4×2 corner mode.

[0165] At the thirty-sixth (AJ) meeting, the proposal in Test 4.3a of JVET-AJ0260 was accepted, which only incorporates corner block partitioning into the SBT technology.

[0166] Test 4.3a adds eight corner partitioning modes to the original eight modes, such as... Figure 6 As shown. Test 4.3b adds nine more partitioning patterns for corners and center blocks to the original eight patterns, such as... Figure 7As shown. The meeting ultimately accepted the Test 4.3a proposal, which adds 8 corner partitioning patterns to the original 8 SBT patterns, for a total of 16 patterns.

[0167] Pattern Encoding

[0168] The SPS layer defines the Subblock Transform (SBT) enable flag (sps_sbt_enabled_flag); when the SPS layer enables SBT, the CU layer's cu_sbt_flag indicates whether the current CU is performing SBT. If SBT is performed, the CU layer will further identify the SBT partitioning method and the selected position of the TU. The total of 16 encoding modes are as follows: Figure 8 As shown.

[0169] For the 16 SBT patterns mentioned above, four flags are needed for identification. If cu_sbt_flag = 1, then the encoding cu_sbt_rect_flag identifies the current sub-block partition shape. cu_sbt_rect_flag = 1 means using the original 8 regular rectangular partition shapes of SBT; cu_sbt_rect_flag = 0 means using the 8 newly added corner partition shapes.

[0170] If cu_sbt_rect_flag = 1, then the encoding cu_sbt_quad_flag identifies the partition ratio of the current sub-block. cu_sbt_quad_flag = 1 represents a partition ratio of 1:3 or 3:1; cu_sbt_quad_flag = 0 represents a partition ratio of 2:2.

[0171] `cu_sbt_horizontal_flag` identifies the current sub-block partitioning method. `cu_sbt_horizontal_flag = 1` represents horizontal partitioning; `cu_sbt_horizontal_flag = 0` represents vertical partitioning.

[0172] `cu_sbt_pos_flag` identifies the position of the currently selected sub-block. `cu_sbt_pos_flag = 1` represents the second sub-block transformation; `cu_sbt_pos_flag = 0` represents the first sub-block transformation.

[0173] If cu_sbt_rect_flag = 0, then the encoding cu_sbt_quad_flag identifies the division ratio of the current sub-block. cu_sbt_quad_flag = 1 means the sub-block size is 1 / 4 CU width × 1 / 4 CU height; cu_sbt_quad_flag = 0 means the sub-block size is 1 / 2 CU width × 1 / 2 CU height.

[0174] `cu_sbt_hor_idx` identifies the horizontal coordinate of the sub-block's position. `cu_sbt_hor_idx = 1` means the sub-block's horizontal coordinate is 1; `cu_sbt_hor_idx = 0` means the sub-block's horizontal coordinate is 0.

[0175] `cu_sbt_ver_idx` identifies the vertical coordinates of the sub-block's position. `cu_sbt_ver_idx = 1` means the sub-block's vertical coordinate is 1; `cu_sbt_ver_idx = 0` means the sub-block's vertical coordinate is 0. The positions of the four corners can be located using the horizontal and vertical coordinates.

[0176] Determining the implicit transformation kernel

[0177] The transform kernel corresponding to the newly added SBT mode of the luma block is still implicitly determined by the sub-block division method and the selected position, and the correspondence is shown in Table 3.

[0178] Table 3

[0179] Division method Select position level vertical Corner Position0 DCT-8 DCT-8 Corner Position1 DST-7 DCT-8 Corner Position2 DCT-8 DST-7 Corner Position3 DST-7 DST-7

[0180] When performing SBT on chroma blocks, only the DCT-2 transform kernel is used.

[0181] As shown above, with the addition of the corner partitioning mode, SBT technology now has 16 modes, increasing the total number of modes that need to be encoded. Without improvements to the encoding method, these 16 modes require four flags for identification, meaning that transmitting one SBT mode consumes four bits, resulting in significant signaling overhead.

[0182] Some relevant standards have proposed an advanced SBT (on advanced SBT with position and direction inference, ASBT) technique, which is a new mode independent of the SBT mode.

[0183] The ASBT's TU partitioning is the same as the original SBT's eight partitioning methods, and the ASBT's transform core selection scheme is also the same as the original SBT's transform core selection scheme. However, the ASBT's mode coding method differs from the original SBT's mode coding method. The ASBT's coding method aims to infer position and direction using the predicted values ​​of the current prediction block, thereby saving signaling overhead.

[0184] ASBT uses maximizing the sum of gradients in sub-blocks as its criterion. Figure 9 The principle of the encoder end is illustrated. For each sub-block's size and orientation, the encoder can evaluate the optimal position of the transformed section. Figure 9In Figure (a), for a sub-block with a CU height × 1 / 2 CU width, the encoder can find the optimal position along the horizontal direction. The selected position is the sub-block that maximizes the sum of gradients obtained on the corresponding prediction block. For Figure 9 In Figure (b), for a sub-block with a height of 1 / 2 CU × width, the encoder can find the optimal position along the vertical direction. The selected position is the sub-block that maximizes the sum of gradients obtained on the corresponding prediction block. For Figure 9 In diagram (c), for 1 / 4 CU height × CU width, the encoder can find the optimal position along the vertical direction. The selected position is the sub-block that maximizes the sum of gradients obtained on the corresponding prediction block. For Figure 9 In Figure (d), for a sub-block with a height of 1 / 4 CU × width of CU, the encoder can find the optimal position in the horizontal direction. The selected position is the sub-block that maximizes the sum of gradients obtained on the corresponding prediction block.

[0185] In obtaining Figure 9 After determining the positions shown in Figures (a), (b), (c), and (d), the orientation (vertical or horizontal) of each sub-region is further determined. The chosen orientation maximizes the sum of gradients at each optimal position. For example, the encoder can determine the orientation based on the sum of gradients from... Figure 9 In the diagrams (a) and (b), the position of the sub-block with the smallest gradient sum is selected to obtain... Figure 9 The sub-block shown in diagram (e) is from Figure 9 In diagrams (c) and (d), the position of the sub-block with the smallest gradient sum is selected to obtain... Figure 9 The sub-block shown in figure (f) is shown in the diagram. Finally, the encoder can be based on the rate-distortion optimization (RDO) criterion from... Figure 9 Select one sub-block from the sub-blocks shown in diagrams (e) and (f) to obtain the optimal sub-region division.

[0186] Although the position and orientation inference of sub-blocks are based on inter-frame prediction blocks, the implementation of this ASBT mode will not encounter resolution problems.

[0187] ASBT technology transmits a flag at the TU level to indicate whether the technology is being used, and also transmits a flag indicating the TU partition ratio to indicate whether it is a 1:3, 3:1, or 2:2 partition.

[0188] The use of ASBT technology has some limitations. It is not allowed for intra-frame slices or inter-frame blocks using combined inter-intra-prediction (CIIP) and partition geometry mode (GPM). This mode is also not used when using LFNST and MTS, and is disabled in the screen content sequence via the SPS flag. ASBT mode is only used for the luma component.

[0189] ASBT technology uses the predicted value of the current predicted block to infer the position and orientation of sub-blocks, thus saving signaling overhead. However, this method has some drawbacks and cannot be directly used in SBT technology.

[0190] For example, ASBT inference for sub-blocks is based on maximizing the sum of sub-block gradients as the criterion. However, sub-block gradients do not perfectly reflect the residual distribution. Therefore, the inferred location of non-zero residual blocks may differ from the actual location, and the orientation of the inferred non-zero residual blocks may also differ from the actual orientation, resulting in significant distortion when using this mode. Since the consistency between the sub-block gradients and residual distribution characteristics of GPM is not high, this mode performs poorly, which is the main reason why ASBT is not used when employing GPM.

[0191] Secondly, ASBT technology directly infers the position and orientation of sub-blocks, which has a relatively high probability of being wrong.

[0192] In addition, SBT is a mode independent of SBT, and it also requires transmitting a bit at the TU level to indicate whether the mode is used, which will incur additional signaling overhead.

[0193] Finally, the current ASBT technology's TU partitioning mode only considers the original 8 SBT modes and does not consider the newly added 8 corner partitioning modes.

[0194] To address the aforementioned issues, some embodiments of this application provide a decoding method, including: determining the estimated residual of the current block; calculating the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in a first category based on the estimated residual, wherein the SBT modes in the first category have the same division ratio and division shape; and determining the target SBT mode based on the distortion magnitude corresponding to the multiple SBT modes.

[0195] Furthermore, some embodiments of this application also provide an encoding method, including: determining the estimated residual of the current block; calculating the distortion size corresponding to multiple SBT modes in a first category based on the estimated residual, wherein the SBT modes in the first category have the same division ratio and division shape; and determining the target SBT mode based on the distortion size corresponding to the multiple SBT modes.

[0196] Some embodiments of this application utilize the principle of conditional entropy reduction, using information that the decoder can obtain before the inverse transform as conditions, such as using the estimated residual of the current block as the basis for inferring the SBT mode. Since the decoder can infer the SBT mode in advance, the encoder can save some coding bits, thereby reducing signaling overhead.

[0197] The following section will first provide detailed examples of the decoding methods of some embodiments of this application.

[0198] Figure 10 This is a flowchart illustrating a decoding method provided in some embodiments of this application. Figure 10 The method can be applied to the decoder.

[0199] See Figure 10 In step S1010, the estimated residual of the current block is determined. The estimated residual of the current block can be determined based on the predicted block of the current block.

[0200] The current block can refer to the current block to be decoded. In some implementations, the current block is the luma block. In other implementations, the current block can be the chroma block. The current block can be an inter-frame reference block. The current block can be a CU (Cubic Array).

[0201] In some implementations, the estimated residual of the current block can be determined based on a reference block. The decoder can determine the predicted value of the current block based on the reference block, and calculate the gradient of the predicted value of the current block to obtain the estimated residual of the current block.

[0202] In some implementations, the estimated residual of the current block can be determined based on multiple reference blocks. These reference blocks can include two or more. The following section uses two reference blocks as an example to illustrate how the estimated residual is determined.

[0203] The decoder determines a first predicted value for the current block based on a first reference block, and a second predicted value for the current block based on a second reference block. The decoder then determines the estimated residual for the current block based on the first and second predicted values.

[0204] The first reference block can be either the forward reference block of the current block or the backward reference block of the current block.

[0205] The second reference block can be either the forward reference block of the current block or the backward reference block of the current block.

[0206] In some implementations, if the current block has multiple reference blocks, the first reference block and the second reference block are any two of those reference blocks.

[0207] In some implementations, one of the first reference block and the second reference block is a forward reference block, and the other is a backward reference block. For example, the first reference block is the forward reference block of the current block, and the second reference block is the backward reference block of the current block.

[0208] Figure 11 A schematic diagram of bidirectional prediction is shown. Reference block 1102 is the forward reference block of the current block 1106, and reference block 1104 is the backward reference block of the current block. The forward motion vector is MV0, and the backward motion vector is MV1. Based on MV0 and MV1, the decoder can determine the forward reference block and the backward reference block, and based on the forward reference block and the backward reference block, determine the first prediction value and the second prediction value.

[0209] In some implementations, calculations can be performed on the first and second predicted values ​​to obtain the estimated residual for the current block. For example, the estimated residual can be obtained by subtracting the first and second predicted values, i.e., estimated residual = first predicted value - second predicted value. Alternatively, different weighting coefficients can be applied to the first and second predicted values, and then the difference can be taken to obtain the estimated residual, i.e., estimated residual = w1 first predicted value - w2 second predicted value, where w1 and w2 are weighting coefficients.

[0210] The difference between the first and second predicted values ​​is closer to the residual distribution of the current block. Therefore, the SBT mode selected using this difference result will be more accurate, and the distortion of using the SBT mode will be reduced accordingly.

[0211] In step S1020, based on the estimated residuals, the distortion magnitudes corresponding to the multiple SBT modes in the first category are calculated respectively.

[0212] Multiple SBT patterns refer to some of the 16 SBT patterns mentioned above. In some implementations, multiple SBT patterns have the same partition shape and the same partition ratio. In other words, multiple SBT patterns belong to the first category of SBT patterns, and the partition ratio and partition shape of SBT patterns in the first category are the same.

[0213] The following section will provide a detailed explanation of how to determine multiple SBT modes.

[0214] In some implementations, the decoder can calculate the sum of gradients for multiple SBT modes separately and use this sum as the distortion magnitude for each SBT mode. In this case, the distortion magnitude can also be understood as the magnitude of the gradient sum.

[0215] In some implementations, the decoder can calculate the minimum distortion estimate for each SBT mode and use that value as the distortion size corresponding to the SBT mode.

[0216] In step S1030, the target SBT mode is determined based on the distortion magnitudes corresponding to multiple SBT modes.

[0217] The decoder determines the target SBT mode based on the distortion magnitude in several ways, which will be discussed below. Figure 10 (a) Figure 10 (b) and Figure 10 (c) Provide a detailed introduction.

[0218] Multiple SBT patterns can be determined based on prior information, suggesting the SBT patterns the current block might use. For example, multiple SBT patterns can be determined based on the size of the current block. Alternatively, multiple SBT patterns can be determined based on the size of the current block, the third syntax element, and the fourth syntax element. (This is repeated three times in the original text.)

[0219] The third syntax element indicates the partition shape of the target SBT pattern, or in other words, whether the target SBT pattern is a regular rectangular partition or whether the target SBT pattern is a corner partition; the fourth syntax element indicates the partition ratio of the target SBT pattern, or in other words, whether the target SBT pattern is a quarter partition ratio or a bipartition ratio.

[0220] Dividing shapes can include rectangular dividing shapes and corner dividing shapes. Rectangular dividing shapes correspond to the regular rectangular dividing shape mentioned above, or the original eight dividing patterns. A rectangular dividing pattern indicates that the sub-block is located on the edge of the CU (Cubic Cutout). Corner dividing shapes correspond to the eight newly added dividing patterns mentioned above. A corner dividing pattern indicates that the sub-block is located in a corner of the current block.

[0221] The partitioning ratio includes two-part ratios and four-part ratios. A two-part ratio represents a partitioning ratio of 1:1; a four-part ratio represents a partitioning ratio of 1:3 or 3:1. Each SBT pattern can contain a maximum of 4 allowed SBT patterns. For rectangular partitioning patterns, a two-part ratio means that the width (or height) of the child block is equal to 1 / 2 of the width (or height) of the current block, that is, the size of the child block is 1 / 2 the width × height of the current block, or the width × 1 / 2 the height of the current block; a four-part ratio means that the width (or height) of the child block is equal to 1 / 4 of the width (or height) of the current block, that is, the size of the child block is 1 / 4 the width × height of the current block, or the width × 1 / 4 the height of the current block.

[0222] For corner partitioning mode, a two-part ratio means the size of the child block is 1 / 2 the width of the current block × 1 / 2 the height of the current block, and a four-part ratio means the size of the child block is 1 / 4 the width of the current block × 1 / 4 the height of the current block.

[0223] As mentioned earlier, different SBT modes have different requirements for the size of the current block. For the rectangular partitioning mode, if the width of the current block is ≥8, vertical bisector is allowed; if the height of the current block is ≥8, horizontal bisector is allowed; if the width of the current block is ≥16, vertical quartile is allowed; and if the height of the current block is ≥16, horizontal quartile is allowed. The rectangular partitioning mode corresponds to the regular rectangular partitioning mode described above.

[0224] For corner partitioning mode, if the width and height of the current block are both greater than or equal to 8, the child block is allowed to be divided into 1 / 2 block width × 1 / 2 block height; if the width and height of the current block are both greater than or equal to 16, the child block is allowed to be divided into 1 / 4 block width × 1 / 4 block height.

[0225] Therefore, the decoder can determine the allowed SBT modes for the current block based on the current block size.

[0226] If the allowed SBT patterns of the current block have only one partition shape and only one partition ratio, then the aforementioned multiple SBT patterns are considered allowed SBT patterns. In other words, the decoder can directly determine multiple SBT patterns based on the size of the current block. In this case, the encoder does not need to send the third and fourth syntax elements, thus significantly reducing signaling overhead.

[0227] If the partition shape of the SBT pattern allowed in the current block includes both rectangular partition shapes and corner partition shapes, the decoder decodes the third syntax element to determine the partition shape of the target SBT pattern.

[0228] If the SBT modes allowed for the current block include only one partition shape (such as a rectangular partition shape), the decoder may not need to decode the third syntax element. The encoder may not need to encode or transmit the third syntax element, thus reducing signaling overhead.

[0229] If the decoder does not decode the third syntax element, its value can be the default value. The default value of the third syntax element is 1, indicating that the partition shape of the target SBT pattern is a rectangular partition shape.

[0230] If the SBT mode partitioning ratio allowed in the current block includes both a two-part ratio and a four-part ratio, the decoder decodes the fourth syntax element to determine the partitioning ratio of the target SBT mode.

[0231] If the current block allows only one SBT mode partitioning ratio (such as a bipartite partitioning ratio), the decoder may not need to decode the fourth syntax element. The encoder may not need to encode or transmit the fourth syntax element, thus reducing signaling overhead.

[0232] If the decoder does not decode the fourth syntax element, its value can be the default value. The default value of the fourth syntax element is 0, indicating that the target SBT pattern is divided into two parts.

[0233] If the allowed SBT patterns of the current block include rectangular and corner partition shapes, and the allowed SBT patterns of the current block include bipartition and quartet ratios, then the decoder can determine multiple SBT patterns from the allowed SBT patterns based on the third and fourth syntax elements.

[0234] If the partition shapes of the allowed SBT modes in the current block include both rectangular and corner partition shapes, and the partition ratios of the allowed SBT modes in the current block include only one partition ratio, then the decoder can determine multiple SBT modes from the allowed SBT modes based on the third syntax element.

[0235] If the partition shape of the SBT modes allowed in the current block includes only one partition shape, and the partition ratio of the SBT modes allowed in the current block includes a bipartition ratio and a quartet ratio, then the decoder can determine multiple SBT modes from the allowed SBT modes based on the fourth syntax element.

[0236] In some implementations, the third syntax element can be represented by sbtRectFlag (of course, the third syntax element can also be represented by any other letters and / or numbers).

[0237] The third syntax element can take the value 0 or 1, and only occupies 1 bit.

[0238] In some implementations, the fourth syntax element can be represented by sbtQuadFlag (of course, the fourth syntax element can also be represented by any other letters and / or numbers).

[0239] The fourth syntax element can take the value 0 or 1, and it only needs to occupy 1 bit.

[0240] In some implementations, after the decoder decodes the third and fourth syntax elements, it can determine the mode type of the target SBT mode according to Table 4.

[0241] Table 4

[0242] Third syntax element Fourth grammatical element mode type 0 0 Quad (corner bisection ratio) 0 1 Quarter (dividing a corner into quarters) 1 0 RectHalf (Rectangular Bisection) 1 1 RectQuad (Rectangle Quartering)

[0243] As shown in Table 4, if the values ​​of the third and fourth syntax elements are both 0, it indicates that the target SBT pattern is of the corner bisection ratio; if the value of the third syntax element is 0 and the value of the fourth syntax element is 1, it indicates that the target SBT pattern is of the corner quartile ratio; if the value of the third syntax element is 1 and the value of the fourth syntax element is 0, it indicates that the target SBT pattern is of the rectangular bisection ratio; if the values ​​of the fourth syntax elements are both 1, it indicates that the target SBT pattern is of the rectangular quartile ratio.

[0244] After obtaining multiple SBT modes, the decoder can calculate the distortion of each SBT mode. The distortion can be calculated using any method.

[0245] For example, the decoder can calculate the minimum distortion estimate for each of the multiple SBT modes. The minimum distortion estimate is calculated as: minDist = zero residual distortion + non-zero residual distortion / 16. Here, minDist represents the minimum distortion estimate, the zero residual distortion is the estimated residual of the zero residual portion, and the non-zero residual distortion is the estimated residual of the non-zero residual portion.

[0246] The decoder determines the target SBT mode based on the distortion magnitudes corresponding to multiple SBT modes. The distortion magnitude of an SBT mode reflects the probability of its occurrence; therefore, using the distortion magnitude to determine the target SBT mode makes the determination more accurate.

[0247] The following is combined with Figure 10 (a) Figure 10 (b) and Figure 10 (c) provides a detailed explanation of how the decoder determines the target SBT mode based on the distortion magnitudes corresponding to multiple SBT modes.

[0248] Figure 10 (a) illustrates a scheme for determining the target SBT pattern based on a sorting method. Step S1030 includes steps S1031 to S1033.

[0249] In step S1031, the multiple SBT modes are sorted according to the distortion magnitude to obtain the first SBT mode list.

[0250] The decoder can sort multiple SBT modes in ascending order of distortion to obtain the first SBT mode list.

[0251] In step S1032, the first syntax element is parsed. The first syntax element is used to indicate the index of the target SBT pattern in the first SBT pattern list.

[0252] In step S1033, the target SBT mode is determined based on the first syntax element. In this way, a more suitable SBT mode for the current block can be selected, which helps to reduce image distortion.

[0253] The first syntax element can be represented by sbt_idx (of course, the first syntax element can also be represented by any other letters and / or numbers).

[0254] As mentioned earlier, the number of SBT patterns can be 2 or 4, meaning the first SBT pattern list can include 2 or 4 SBT patterns. If the first SBT pattern list includes 4 SBT patterns, the index range is [0,3]. If the first SBT pattern list includes 2 SBT patterns, the index range is [0,1].

[0255] In some implementations, the binary representation of the first syntax element can be done using variable-length code encoding to improve encoding efficiency. After sorting by distortion from smallest to largest, the encoder is more likely to select the SBT mode with the smallest distortion (such as the SBT mode with the lowest distortion). Since using variable-length code encoding requires fewer bits to encode the index of the SBT mode with the smallest distortion, encoding efficiency can be improved.

[0256] In some implementations, variable-length code encoding methods can be truncated Rice codes.

[0257] Figure 10 (b) illustrates a scheme for determining the target SBT mode based on a preferred method. Step S1030 includes steps S1034 to S1036.

[0258] In step S1034, the two SBT patterns with the smallest and second smallest distortion are selected from multiple SBT patterns to obtain a second SBT pattern list. That is, the second SBT pattern list includes two SBT patterns. These two SBT patterns can be sorted either in ascending order of distortion or in descending order of distortion.

[0259] In step S1035, the second syntax element is parsed. This second syntax element indicates the index of the target SBT mode in the second SBT mode list. Since the second SBT mode list only includes two SBT modes, the value of the second syntax element is either 0 or 1, and it only occupies one bit. In this way, image distortion can be reduced to some extent while lowering signaling overhead.

[0260] In step S1036, the target SBT pattern is determined based on the second syntax element.

[0261] The second syntax element can be represented by sbt_idx (of course, the second syntax element can also be represented by any other letters and / or numbers).

[0262] Figure 10 (c) illustrates a scheme for determining the target SBT pattern based on a screening method. Step S1030 includes step S1037.

[0263] In step S1037, the SBT mode with the least distortion is determined as the target SBT mode used by the current block.

[0264] In this case, the encoder does not need to transmit the index information of the target SBT mode, which can minimize signaling overhead.

[0265] In some implementations, the decoder can determine the first sub-block in the current block based on the target SBT pattern. The first sub-block can also be called the non-zero residual block. The decoder performs an inverse transform on the transform coefficients of the first sub-block to obtain the residual information corresponding to the current block.

[0266] The decoder parses the information of non-zero residual blocks from the bitstream and assigns this information to the corresponding non-zero residual sub-blocks. The decoder determines the implicit transform kernel based on the target SBT mode and uses this kernel to perform an inverse transform on the non-zero residual sub-blocks to obtain the residual of the current block. The information of the non-zero residual blocks can refer to the transform coefficients of the non-zero residual blocks.

[0267] In some embodiments of this application, for CU blocks using bidirectional prediction and SBT mode, the difference between the predicted values ​​of corresponding blocks in two consecutive frames is used to obtain a residual block as an estimated residual block. By analyzing this estimated residual block, the residual distribution characteristics of the actual residual block are predicted. Compared with ASBT, which uses predicted values ​​to derive sub-block gradients to reflect the residual distribution, this method more accurately reflects the distribution characteristics of the residuals.

[0268] As mentioned earlier, ASBT technology is independent of SBT mode and requires transmitting a bit at the TU level to indicate whether the mode is used, resulting in additional signaling overhead. Some embodiments of this application are applied to SBT, eliminating the need for additional identification of whether the technology is used, thus saving coding bits.

[0269] In addition, the solutions provided in some embodiments of this application can not only be implemented in the original 8 SBT modes, but also applied to the newly added 8 corner modes.

[0270] The solutions provided in some embodiments of this application improve the original SBT encoding mode and can save encoding bits. Encoding the SBT mode using the proposed encoding method improves encoding performance.

[0271] The above text combined Figures 10-11 The following describes in detail the decoding methods provided by some embodiments of this application. Figure 12 This application describes in detail some of the encoding methods provided in its embodiments. It should be noted that the process at the encoding end basically corresponds to the process at the decoding end; for any content not described in detail, please refer to the description at the decoding end.

[0272] Figure 12 This is a flowchart illustrating the encoding method provided in some embodiments of this application. Figure 12 The method can be applied to encoders.

[0273] See Figure 12 In step S1210, the estimated residual of the current block is determined. The estimated residual of the current block can be determined based on the predicted block of the current block.

[0274] The current block can refer to the current block to be encoded. In some implementations, the current block is a luma block. In other implementations, the current block can be a chroma block. The current block can be an inter-frame reference block. The current block can be a CU (Cubic Array).

[0275] In some implementations, the estimated residual of the current block can be determined based on a reference block. The encoder can determine the predicted value of the current block based on the reference block and calculate the gradient of the predicted value to obtain the estimated residual of the current block.

[0276] In some implementations, the estimated residual of the current block can be determined based on multiple reference blocks. These reference blocks can include two or more. The following section uses two reference blocks as an example to illustrate how the estimated residual is determined.

[0277] The encoder determines a first predicted value for the current block based on a first reference block, and a second predicted value for the current block based on a second reference block. The encoder then determines the estimated residual for the current block based on the first and second predicted values.

[0278] The first reference block can be either the forward reference block of the current block or the backward reference block of the current block.

[0279] The second reference block can be either the forward reference block of the current block or the backward reference block of the current block.

[0280] In some implementations, if the current block has multiple reference blocks, the first reference block and the second reference block are any two of those reference blocks.

[0281] In some implementations, one of the first reference block and the second reference block is a forward reference block, and the other is a backward reference block. For example, the first reference block is the forward reference block of the current block, and the second reference block is the backward reference block of the current block.

[0282] Figure 11 A schematic diagram of bidirectional prediction is shown. Reference block 1102 is the forward reference block of the current block 1106, and reference block 1104 is the backward reference block of the current block. The forward motion vector is MV0, and the backward motion vector is MV1. The encoder determines MV0 and MV1 based on the positions of the forward and backward reference blocks. The encoder can determine a first predicted value and a second predicted value based on the forward and backward reference blocks.

[0283] In some implementations, calculations can be performed on the first and second predicted values ​​to obtain the estimated residual for the current block. For example, the estimated residual can be obtained by subtracting the first and second predicted values, i.e., estimated residual = first predicted value - second predicted value. Alternatively, different weighting coefficients can be applied to the first and second predicted values, and then the difference can be taken to obtain the estimated residual, i.e., estimated residual = w1 first predicted value - w2 second predicted value, where w1 and w2 are weighting coefficients.

[0284] The difference between the first and second predicted values ​​is closer to the residual distribution of the current block. Therefore, the SBT mode selected using this difference result will be more accurate, and the distortion of using the SBT mode will be reduced accordingly.

[0285] In step S1220, based on the estimated residuals, the distortion magnitudes corresponding to the multiple SBT modes in the first category are calculated respectively.

[0286] Multiple SBT patterns refer to some of the 16 SBT patterns mentioned above. In some implementations, multiple SBT patterns have the same partition shape and the same partition ratio. In other words, multiple SBT patterns belong to the first category of SBT patterns, and the partition ratio and partition shape of SBT patterns in the first category are the same.

[0287] The following section will provide a detailed explanation of how to determine multiple SBT modes.

[0288] In some implementations, the encoder can calculate the sum of gradients for multiple SBT modes separately and use this sum as the distortion magnitude for each SBT mode. In this case, the distortion magnitude can also be understood as the magnitude of the gradient sum.

[0289] In some implementations, the encoder can calculate the minimum distortion estimate for each SBT mode and use that value as the distortion size corresponding to the SBT mode.

[0290] In step S1230, the target SBT mode is determined based on the distortion magnitudes corresponding to multiple SBT modes.

[0291] There are several ways an encoder can determine the target SBT mode based on the distortion magnitude. These will be discussed in detail below.

[0292] Multiple SBT patterns are SBT patterns included in a pattern class. The encoder can first determine the allowed SBT patterns based on the size of the current block, then classify the allowed SBT patterns, and build a sorted pattern list for each pattern class.

[0293] In some implementations, the encoder can sort the allowed SBT patterns based on distortion magnitude. For example, the encoder can sort the four patterns in ascending order of distortion magnitude, resulting in four sorted lists: list0 for patterns divided into two parts of a regular rectangle, list1 for patterns divided into four parts of a regular rectangle, list2 for patterns divided into two parts of a corner rectangle, and list3 for patterns divided into four parts of a corner rectangle. If none of the four patterns in a certain pattern category are allowed, then no list for that pattern is constructed. The length of each of the two lists for the regular rectangle pattern can be either 2 or 4, depending on whether horizontal or vertical division is allowed; the length of each of the two corner lists is 4.

[0294] Multiple SBT patterns belong to the same type of SBT pattern. SBT patterns can be categorized by their division ratio and shape. Based on these factors, SBT patterns can be divided into four categories: regular rectangular quarter-shaft division, regular rectangular bi-shaft division, corner quarter-shaft division, and corner bi-shaft division. A bi-shaft division indicates a 1:1 ratio; a quarter-shaft division indicates a 1:3 or 3:1 ratio. Each SBT pattern category can contain a maximum of four allowed SBT patterns.

[0295] After obtaining the allowed SBT modes for the current block, the encoder can determine the syntax elements to be encoded based on the partition shape and partition ratio of the allowed SBT modes.

[0296] If the allowed SBT pattern partitioning shapes only include regular rectangular partitioning shapes, then no third syntax element needs to be encoded. If the allowed SBT pattern partitioning shapes include both regular rectangular partitioning shapes and corner partitioning shapes, then the third syntax element is encoded.

[0297] If the allowed SBT pattern partitioning ratios include only one ratio (such as a bipartite ratio), then there is no need to encode the fourth syntax element. If the allowed SBT pattern partitioning ratios include both bipartite and quartic ratios, then the fourth syntax element is encoded.

[0298] The following section describes how to determine the target SBT mode based on the distortion magnitude corresponding to multiple SBT modes.

[0299] As an example, the encoder can sort multiple SBT modes according to their distortion levels to obtain a first SBT mode list. The encoder can sort multiple SBT modes in ascending order of distortion to obtain a first SBT mode list.

[0300] The encoder can select a target SBT pattern from multiple SBT patterns based on certain criteria (such as RDO criteria) and encode a first syntax element, which is used to indicate the index of the target SBT pattern in the first SBT pattern list.

[0301] In this way, a more suitable SBT mode can be selected for the current block, which helps to reduce image distortion.

[0302] The first syntax element can be represented by sbt_idx (of course, the first syntax element can also be represented by any other letters and / or numbers).

[0303] As mentioned earlier, the number of SBT patterns can be 2 or 4, meaning the first SBT pattern list can include 2 or 4 SBT patterns. If the first SBT pattern list includes 4 SBT patterns, the index range is [0,3]. If the first SBT pattern list includes 2 SBT patterns, the index range is [0,1].

[0304] In some implementations, the binary representation of the first syntax element can be done using variable-length code encoding to improve encoding efficiency. After sorting by distortion from smallest to largest, the encoder is more likely to select the SBT mode with the smallest distortion (such as the SBT mode with the lowest distortion). Since using variable-length code encoding requires fewer bits to encode the index of the SBT mode with the smallest distortion, encoding efficiency can be improved.

[0305] In some implementations, variable-length code encoding methods can be truncated Rice codes.

[0306] As another example, the encoder can select the two SBT patterns with the smallest and second-smallest distortion from multiple SBT patterns to obtain a second SBT pattern list. That is, the second SBT pattern list includes two SBT patterns. These two SBT patterns can be sorted either in ascending order of distortion or in descending order of distortion.

[0307] The encoder can select a target SBT pattern from two SBT patterns based on certain criteria (such as the RDO criterion) and encode a second syntax element, which indicates the index of the target SBT pattern in the list of second SBT patterns.

[0308] Since the second SBT mode list only includes two SBT modes, the value of the second syntax element is either 0 or 1, and the second syntax element only needs to occupy 1 bit. In this way, image distortion can be reduced to some extent while reducing signaling overhead.

[0309] As yet another example, the encoder can determine the SBT mode with the least distortion as the target SBT mode used by the current block.

[0310] In this case, the encoder does not need to transmit the index information of the target SBT mode, which can minimize signaling overhead.

[0311] To facilitate understanding, the following will be combined with... Figures 13-22 This application provides a detailed description of the encoding and decoding methods provided in some embodiments.

[0312] Some embodiments of this application modify the pattern encoding portion of the original SBT technology. Figure 13 The pattern encoding section shown includes steps S1310 to S1340. Figure 13 The method shown is a sorting-based SBT mode encoding and decoding method.

[0313] In step S1310, the residual block of the current block is estimated.

[0314] For CU blocks using bidirectional prediction and SBT mode, the predicted values ​​of the blocks corresponding to the current CU in the two consecutive frames are subtracted to obtain a residual block as the estimated residual block. By analyzing this estimated residual block, the residual distribution characteristics of the actual residual block are predicted. The decoder can obtain the estimated residual block before the inverse transform, therefore, the implementation of this method will not encounter unresolvable problems.

[0315] Compared to the ASBT technique, which uses predicted values ​​to derive sub-block gradients to reflect the residual distribution, this method more accurately reflects the distribution characteristics of the residuals.

[0316] In step S1320, the minimum distortion of each SBT mode is estimated.

[0317] Step S1320 may include steps S1322 and S1324, such as Figure 14 As shown.

[0318] In step S1322, the allowed modes are determined.

[0319] Based on the dimensions of the CU, determine the allowed modes. For the regular rectangular partitioning mode, if the width of the current block is ≥8, vertical bisection is allowed; if the height of the current block is ≥8, horizontal bisection is allowed; if the width of the current block is ≥16, vertical quarter-section is allowed; if the height of the current block is ≥16, horizontal quarter-section is allowed.

[0320] For the corresponding corner partitioning mode, if the width and height of the current block are both greater than or equal to 8, the child block is allowed to be divided into 1 / 2 block width × 1 / 2 block height; if the width and height of the current block are both greater than or equal to 16, the child block is allowed to be divided into 1 / 4 block width × 1 / 4 block height.

[0321] In step S1324, the minimum distortion of the allowed mode is estimated.

[0322] For each allowed mode, calculate the minimum distortion estimate for that mode. Where, minimum distortion inDist = zero residual partial distortion + non-zero residual partial distortion / 16.

[0323] In step S1330, the SBT patterns are sorted.

[0324] The process of sorting modes according to their mode distortion (step S1330) at the encoding end includes steps S1332 and S1334, such as... Figure 15 As shown.

[0325] In step S1332, the allowed patterns are classified.

[0326] Based on the shape and proportion of the division, the allowed SBT patterns can be divided into four categories: RectQuad (regular rectangular quarter-division), RectHalf (regular rectangular bi-division), Quarter (corner quarter-division), and Quad (corner bi-division). Each category of SBT patterns can contain a maximum of four allowed SBT patterns.

[0327] In step S1334, a sorted list of patterns is constructed for each type of pattern.

[0328] Sort the four patterns in ascending order of distortion magnitude to obtain four sorted lists: list0 (rectangle bisection ratio), list1 (rectangle quartile ratio), list3 (corner bisection ratio), and list4 (corner quartile ratio).

[0329] If none of the four patterns in a certain pattern class are allowed, then no list of patterns is constructed. For the two lists of a regular rectangle, each list may have a length of either 2 or 4, depending on whether horizontal or vertical division is allowed. For the two lists of corners, each list has a length of 4.

[0330] The process of sorting modes according to their distortion at the decoding end (step S1330) includes steps S1336 and S1338, such as... Figure 16 As shown.

[0331] In step S1336, the mode type is determined.

[0332] The decoder decodes the third syntax element sbtRectFlag and the fourth syntax element sbtQuadFlag, and determines the mode type of the SBT mode to be decoded (i.e., the target SBT mode).

[0333] The decoder can determine the mode type of the SBT mode to be decoded based on Table 4 above.

[0334] In step S1338, a sorted list of patterns is constructed for this type of pattern.

[0335] After determining the mode type of the SBT mode to be decoded, a sorted list of modes corresponding to that type is constructed. The decoder can sort the allowed modes under that class according to their distortion levels to obtain a sorted list.

[0336] In step S1340, the flags and indices used for encoding and decoding the final SBT mode are determined. This is described below from the perspectives of both the encoding and decoding ends.

[0337] The encoder can use RDO to determine the final SBT mode to be used, encode the sbtRectFlag and sbtQuadFlag corresponding to the SBT mode, determine the position of the SBT mode in the corresponding list, and encode the index of the SBT mode.

[0338] In some implementations, the encoder can determine all allowed modes based on the CU size.

[0339] If only the regular rectangle pattern is allowed, there is no need to transmit sbtRectFlag; otherwise, sbtRectFlag is encoded and transmitted.

[0340] If both partitioning ratios (bipartite partitioning and quartic partitioning) are allowed, then sbtQuadFlag is encoded and transmitted; otherwise, sbtQuadFlag = 0, and there is no need to transmit sbtQuadFlag.

[0341] For regular rectangular partitioning patterns, if both partitioning directions (vertical and horizontal) are allowed, the corresponding pattern list includes 4 SBT patterns with an index range of [0,3]; otherwise, the corresponding pattern list includes 2 SBT patterns with an index range of [0,1]. For corner partitioning patterns, the pattern list includes 4 SBT patterns with an index range of [0,3]. The index is indicated by sbt_idx.

[0342] The indexed binary method uses truncated Rice code.

[0343] The decoder decodes sbtRectFlag, sbtQuadFlag, and sbt_idx.

[0344] In some implementations, the decoder determines all allowed modes based on the CU size.

[0345] If only the regular rectangle mode is allowed, there is no need to decode sbtRectFlag, and sbtRectFlag = 1 is set; otherwise, sbtRectFlag is decoded.

[0346] If both partitioning ratios (bipartitioning and quartile partitioning) are allowed, then decode sbtQuadFlag; otherwise, there is no need to decode sbtQuadFlag, and sbtQuadFlag = 0.

[0347] The decoder decodes sbt_idx to determine the index of the target SBT mode in the mode list. The index binaryization method uses truncated Rice code.

[0348] Figure 17 The pattern encoding section shown includes steps S1710 to S1740. Figure 17 The method shown is a preferred SBT mode encoding / decoding method.

[0349] In step S1710, the residual block of the current block is estimated.

[0350] For CU blocks using bidirectional prediction and SBT mode, the predicted values ​​of the blocks corresponding to the current CU in the two consecutive frames are subtracted to obtain a residual block as the estimated residual block. By analyzing this estimated residual block, the residual distribution characteristics of the actual residual block are predicted. The decoder can obtain the estimated residual block before the inverse transform, therefore, the implementation of this method will not encounter unresolvable problems.

[0351] Compared to the ASBT technique, which uses predicted values ​​to derive sub-block gradients to reflect the residual distribution, this method more accurately reflects the distribution characteristics of the residuals.

[0352] In step S1720, the minimum distortion of each SBT mode is estimated.

[0353] Step S1720 may include steps S1322 and S1324, such as Figure 14 As shown.

[0354] In step S1322, the allowed modes are determined.

[0355] Based on the dimensions of the CU, determine the allowed modes. For the regular rectangular partitioning mode, if the width of the current block is ≥8, vertical bisection is allowed; if the height of the current block is ≥8, horizontal bisection is allowed; if the width of the current block is ≥16, vertical quarter-section is allowed; if the height of the current block is ≥16, horizontal quarter-section is allowed.

[0356] For the corresponding corner partitioning mode, if the width and height of the current block are both greater than or equal to 8, the child block is allowed to be divided into 1 / 2 block width × 1 / 2 block height; if the width and height of the current block are both greater than or equal to 16, the child block is allowed to be divided into 1 / 4 block width × 1 / 4 block height.

[0357] In step S1324, the minimum distortion of the allowed mode is estimated.

[0358] For each allowed mode, calculate the minimum distortion estimate for that mode. Where, minimum distortion inDist = zero residual partial distortion + non-zero residual partial distortion / 16.

[0359] In step S1730, the SBT mode is filtered.

[0360] The process of pattern selection at the encoding end based on the distortion of each mode (step S1730) includes steps S1732 and S1734, such as... Figure 18 As shown.

[0361] In step S1732, the allowed patterns are classified.

[0362] Based on the shape and proportion of the division, the allowed SBT patterns can be divided into four categories: RectQuad (regular rectangular quarter-division), RectHalf (regular rectangular bi-division), Quarter (corner quarter-division), and Quad (corner bi-division). Each category of SBT patterns can contain a maximum of four allowed SBT patterns.

[0363] In step S1734, a list of the most likely patterns is constructed for each type of pattern.

[0364] The four patterns are filtered based on their distortion levels. The two patterns with the smallest distortion are selected to obtain the most probable pattern list, with a length of 2. Specifically, patterns involving a regular rectangle with a bipartite ratio are compiled into a sorted list (list0), patterns involving a regular rectangle with a quarterpartite ratio are compiled into a sorted list (list1), patterns involving corner bipartite ratios are compiled into a sorted list (list2), and patterns involving corner quarterpartite ratios are compiled into a sorted list (list3). If none of the four possible patterns for a given pattern type are allowed, then that pattern list is not constructed.

[0365] The decoding process for mode selection based on mode distortion (step S1730) includes steps S1736 and S1738, such as... Figure 19 As shown.

[0366] In step S1736, the mode type is determined.

[0367] The decoder decodes the third syntax element sbtRectFlag and the fourth syntax element sbtQuadFlag, and determines the mode type of the SBT mode to be decoded (i.e., the target SBT mode).

[0368] The decoder can determine the mode type of the SBT mode to be decoded based on Table 4 above.

[0369] In step S1738, a list of the most likely patterns is constructed for this type of pattern.

[0370] After determining the mode type of the SBT mode to be decoded, construct a list of the most likely modes corresponding to that type. Based on the distortion level, filter the four modes in that class, selecting the two modes with the smallest distortion to obtain the most likely mode list, with a list length of 2.

[0371] In step S1740, the flags and indices used for encoding and decoding the final SBT mode are determined. This is described below from the perspectives of both the encoding and decoding ends.

[0372] The encoder iterates through the list of most likely patterns for each pattern type, uses RDO to decide on the final SBT pattern to be used, encodes the sbtRectFlag and sbtQuadFlag corresponding to the SBT pattern, determines the position of the SBT pattern in the corresponding list, and encodes the index of the SBT pattern.

[0373] In some implementations, the encoder can determine all allowed modes based on the CU size.

[0374] If only the regular rectangle pattern is allowed, there is no need to transmit sbtRectFlag; otherwise, sbtRectFlag is encoded and transmitted.

[0375] If both partitioning ratios (bipartite partitioning and quartic partitioning) are allowed, then sbtQuadFlag is encoded and transmitted; otherwise, sbtQuadFlag = 0, and there is no need to transmit sbtQuadFlag.

[0376] The encoder encodes the target SBT mode at the index sbt_idx in the list of most likely modes, with the index range being [0,1].

[0377] The decoder decodes sbtRectFlag, sbtQuadFlag, and sbt_idx.

[0378] In some implementations, the decoder determines all allowed modes based on the CU size.

[0379] If only the regular rectangle mode is allowed, there is no need to decode sbtRectFlag, and sbtRectFlag = 1 is set; otherwise, sbtRectFlag is decoded.

[0380] If both partitioning ratios (bipartitioning and quartile partitioning) are allowed, then decode sbtQuadFlag; otherwise, there is no need to decode sbtQuadFlag, and sbtQuadFlag = 0.

[0381] The decoder decodes sbt_idx to determine the index of the target SBT pattern in the pattern list.

[0382] Figure 20 The pattern encoding section shown includes steps S2010 to S2040. Figure 20 The method shown is a filter-based SBT mode encoding and decoding method.

[0383] In step S2010, the residual block of the current block is estimated.

[0384] For CU blocks using bidirectional prediction and SBT mode, the predicted values ​​of the blocks corresponding to the current CU in the two consecutive frames are subtracted to obtain a residual block as the estimated residual block. By analyzing this estimated residual block, the residual distribution characteristics of the actual residual block are predicted. The decoder can obtain the estimated residual block before the inverse transform, therefore, the implementation of this method will not encounter unresolvable problems.

[0385] Compared to the ASBT technique, which uses predicted values ​​to derive sub-block gradients to reflect the residual distribution, this method more accurately reflects the distribution characteristics of the residuals.

[0386] In step S2020, the minimum distortion of each SBT mode is estimated.

[0387] Step S2020 may include steps S1322 and S1324, such as Figure 14 As shown.

[0388] In step S1322, the allowed modes are determined.

[0389] Based on the dimensions of the CU, determine the allowed modes. For the regular rectangular partitioning mode, if the width of the current block is ≥8, vertical bisection is allowed; if the height of the current block is ≥8, horizontal bisection is allowed; if the width of the current block is ≥16, vertical quarter-section is allowed; if the height of the current block is ≥16, horizontal quarter-section is allowed.

[0390] For the corresponding corner partitioning mode, if the width and height of the current block are both greater than or equal to 8, the child block is allowed to be divided into 1 / 2 block width × 1 / 2 block height; if the width and height of the current block are both greater than or equal to 16, the child block is allowed to be divided into 1 / 4 block width × 1 / 4 block height.

[0391] In step S1324, the minimum distortion of the allowed mode is estimated.

[0392] For each allowed mode, calculate the minimum distortion estimate for that mode. Where, minimum distortion inDist = zero residual partial distortion + non-zero residual partial distortion / 16.

[0393] In step S2030, the SBT mode is filtered.

[0394] The process of mode selection based on mode distortion at the encoding end (step S2030) includes steps S2032 and S2034, such as... Figure 21 As shown.

[0395] In step S2032, the allowed patterns are classified.

[0396] Based on the shape and proportion of the division, the allowed SBT patterns can be divided into four categories: RectQuad (regular rectangular quarter-division), RectHalf (regular rectangular bi-division), Quarter (corner quarter-division), and Quad (corner bi-division). Each category of SBT patterns can contain a maximum of four allowed SBT patterns.

[0397] In step S2034, the most likely pattern is constructed for each type of pattern.

[0398] Based on the magnitude of distortion, the four types of modes are filtered to select the SBT mode with the smallest distortion.

[0399] The decoding process for mode selection based on mode distortion (step S2030) includes steps S2036 and S2038, such as... Figure 22 As shown.

[0400] In step S2036, the mode type is determined.

[0401] The decoder decodes the third syntax element sbtRectFlag and the fourth syntax element sbtQuadFlag, and determines the mode type of the SBT mode to be decoded (i.e., the target SBT mode).

[0402] The decoder can determine the mode type of the SBT mode to be decoded based on Table 4 above.

[0403] In step S2038, the most likely pattern is selected for this type of pattern.

[0404] After determining the mode type of the SBT mode to be decoded, the four modes in that type are filtered according to the amount of distortion, and the mode with the smallest distortion is selected as the final SBT mode.

[0405] In step S2040, the flags used in the final SBT mode of encoding and decoding are determined. This is described below from the perspectives of both the encoding and decoding ends.

[0406] The encoder iterates through the most likely patterns for each pattern class, determines the final SBT pattern to be used through RDO, and encodes the sbtRectFlag and sbtQuadFlag corresponding to the SBT pattern.

[0407] In some implementations, the encoder can determine all allowed modes based on the CU size.

[0408] If only the regular rectangle pattern is allowed, there is no need to transmit sbtRectFlag; otherwise, sbtRectFlag is encoded and transmitted.

[0409] If both partitioning ratios (bipartite partitioning and quartic partitioning) are allowed, then sbtQuadFlag is encoded and transmitted; otherwise, sbtQuadFlag = 0, and there is no need to transmit sbtQuadFlag.

[0410] The decoder decodes sbtRectFlag, sbtQuadFlag, and sbt_idx.

[0411] In some implementations, the decoder determines all allowed modes based on the CU size.

[0412] If only the regular rectangle mode is allowed, there is no need to decode sbtRectFlag, and sbtRectFlag = 1 is set; otherwise, sbtRectFlag is decoded.

[0413] If both partitioning ratios (bipartitioning and quartile partitioning) are allowed, then decode sbtQuadFlag; otherwise, there is no need to decode sbtQuadFlag, and sbtQuadFlag = 0.

[0414] The specific implementation process of the encoding and decoding ends is described below.

[0415] 1. Encoding end

[0416] 1) Use the two-frame prediction values ​​srcPred0 and srcPred1 of bidirectional SBT to obtain an estimated residual block, and calculate the distortion estimate for each allowed mode.

[0417] Based on the CU size, determine the allowed mode: checkAllowedSbt.

[0418] allowType[SBT_VER_HALF]=cuWidth>=minSbtCUSize;

[0419] allowType[SBT_HOR_HALF]=cuHeight>=minSbtCUSize;

[0420] allowType[SBT_VER_QUAD]=cuWidth>=(minSbtCUSize<<1);

[0421] allowType[SBT_HOR_QUAD]=cuHeight>=(minSbtCUSize<<1);

[0422] #if JVET_AJ0260_SBT_CORNER_MODE

[0423] allowType[SBT_QUAD]=cuWidth>=minSbtCUSize&&cuHeight>=minSbtCUSize&&cuWidth>=SBT_QUAD_MIN_BLOCK_SIZE&&cuHeight>=SBT_QUAD_MIN_BLOCK_SIZE;

[0424] allowType[SBT_QUARTER]=cuWidth>=minSbtCUSize&&cuHeight>=minSbtCUSize&&cuWidth>=SBT_QUARTER_MIN_BLOCK_SIZE&&cuHeight>=SBT_QUARTER_MIN_BLOCK_SIZE;

[0425] #endif

[0426] 2) Based on the different shapes and proportions of the divisions, the allowed patterns are divided into 4 categories. The 4 categories are then sorted in ascending order of distortion magnitude, resulting in 4 sorted lists. Specifically, a sorted list `list0` is constructed for regular rectangles with a 2:5 / 4 / 5 division ratio; a sorted list `list1` is constructed for regular rectangles with a 4:5 / 5 division ratio; a sorted list `list2` is constructed for corner rectangles with a 2:5 / 5 division ratio; and a sorted list `list3` is constructed for corner rectangles with a 4:4 / 5 division ratio. If none of the four modes in a certain category are allowed, then no list is constructed for that mode. The length of each of the two lists for regular rectangles can be 2 or 4 depending on whether horizontal or vertical division is allowed; the length of each of the two lists for corner rectangles is 4. During transmission, the index of the last selected mode in the corresponding list is transmitted.

[0427] 3) Decisions are made to determine the optimal SBT mode through RDO.

[0428] 4) Encode the corresponding sbtRectFlag and sbtQuadFlag, find their positions in the corresponding lists, and encode the indices.

[0429] All allowed modes are determined based on the CU size.

[0430] If only the regular rectangle pattern is allowed, there is no need to pass sbtRectFlag; otherwise, encode sbtRectFlag.

[0431] If both ratios (binary / quartic) are allowed, encode sbtQuadFlag; otherwise, sbtQuadFlag = 0, and no encoding is required.

[0432] For regular rectangle partitioning patterns, if both directions (horizontal / vertical) are allowed, the corresponding list has 4 patterns with an index range of [0,3]. Otherwise, the corresponding list has 2 patterns with a transmission index range of [0,1]. For corner partitioning patterns, the list has 4 patterns with an index range of [0,3]. The index binaryization method uses truncated Rice code.

[0433] If the encoder filters each type of pattern, then steps 3) and 4) above are to select the two SBT patterns with the smallest and second smallest distortion, obtain the list information of the most likely SBT patterns, the encoder decides the optimal SBT pattern based on the RDO criterion, and encodes sbtRectFlag and sbtQuadFlag, and finds the position of the optimal SBT pattern in the list, encoding the index sbt_idx.

[0434] If the encoder selects the SBT mode with the least distortion as the optimal SBT mode, then the encoder will not encode the index sbt_idx.

[0435] 2. Decoding end

[0436] 1) Parse sbt_mode. Decode using a similar process to that described in 4) above to obtain sbtRectFlag, sbtQuadFlag, and sbt_idx.

[0437] All allowed modes are determined based on the CU size.

[0438] If only the regular rectangle pattern is allowed, there is no need to parse sbtRectFlag; otherwise, decode sbtRectFlag.

[0439] If both ratios (binary / quartic) are allowed, decode sbtQuadFlag; otherwise, sbtQuadFlag = 0.

[0440] For regular rectangular partitioning, if both directions (horizontal / vertical) are allowed, the corresponding list has 4 patterns with an index range of [0,3]. Otherwise, the corresponding list has 2 patterns with a transmission index range of [0,1]. For corner partitioning patterns, the list has 4 patterns with an index range of [0,3]. The index binaryization method uses truncated Rice code.

[0441] 2) When performing TU partitioning in SBT mode, determine whether to partition into a regular rectangular pattern or a corner pattern, and whether to partition into a two-part or four-part proportion, based on sbtRectFlag and sbtQuadFlag. That is, determine one of the four partitioning types: RectQuad, RectHalf, Quad, or Quarter. Specific partitioning scheme:

[0442] Quad: Divided into 4 sub-TUs at the corners.

[0443] Quarter: Divided into 16 sub-TUs.

[0444] These two division methods are the same as the existing divisions.

[0445] RectQuad: First divide into vertical quarters and the case where pos is 0.

[0446] RectHalf: First divide into vertical bisections and the case where pos is 0.

[0447] This is a pre-partitioning assumption. All four SBT patterns included in RectQuad are pre-partitioned... Figure 23 The partitioning method in diagram (a) pre-partitions the four SBT modes contained in RectHalf according to... Figure 23 The partitioning method in diagram (b) is pre-partitioning. This pre-partitioning is only for the convenience of subsequent parsing of TU information, such as ts_flag, the position of the last non-zero coefficient, the absolute value of the residual, and the sign of the residual. It is not the actual TU shape used during the inverse transform, so using this method to pre-partition patterns of the same partitioning type does not affect the correctness of the final decoding.

[0448] 3) Assume the first sub-TU is a non-zero residual block, and the parsing shows that the non-zero residual block information is stored in the first sub-TU.

[0449] 4) Subtract the prediction values ​​srcPred0 and srcPred1 from the two-way SBT frames to obtain an estimated residual block. Determine the allowed modes in the parsed partition types. Calculate the distortion estimate for each allowed mode.

[0450] Corresponding to the encoding end, the decoding end has three processing methods.

[0451] Method 1: Sort the SBT patterns according to the distortion size to obtain the sorted list 1.

[0452] Method 2: Determine the two SBT patterns with the smallest and second smallest distortion to obtain the sorted list 2.

[0453] Method 3: Use the SBT mode with the least distortion as the final SBT mode.

[0454] 5) If step 4) uses method 1, then the SBT partitioning mode found in list 1 according to sbt_idx is the final determined SBT mode.

[0455] If step 4) uses method 2, then the SBT partitioning mode found in list 2 based on sbt_idx is the final determined SBT mode.

[0456] If step 4) uses method 3, then there is no need to decode sbt_idx.

[0457] The decoder correctly divides the TU according to the determined SBT pattern and assigns the parsed non-zero residual block information to the corresponding non-zero residual block sub-TU. Then, it determines the corresponding implicit transform kernel according to the SBT pattern, and finally performs an inverse transform on the sub-TU with non-zero residual blocks to obtain the residuals.

[0458] The preceding section introduced a scheme for estimating the residual of the current block based on two predicted values, and inferring the SBT mode using the criterion of minimum distortion. In addition, some embodiments of this application can also use the predicted values ​​of the current block to calculate the gradient to estimate the residual, and infer the SBT mode using the criterion of maximizing the sum of gradients of sub-blocks. For each type of mode, the four possible modes are sorted in descending order of gradient sum, and the encoder can encode the index of the target SBT mode in this sort. The decoder can also sort the SBT modes according to the gradient sum and determine the target SBT mode based on this index.

[0459] In some implementations, the encoder can use the SBT pattern with the largest gradient sum as the target SBT pattern. In this case, the encoder does not need to encode the index syntax elements, and the decoder can also directly use the SBT pattern with the largest gradient sum as the target SBT pattern.

[0460] In some implementations, the encoder can identify the two SBT modes with the largest and second largest gradient sums and encode the index of the target SBT mode among these two SBT modes. The decoder can also identify the two SBT modes with the largest and second largest gradient sums and determine the target SBT mode based on this index.

[0461] The above text combined Figures 1 to 23 The method embodiments of this application are described in detail below, in conjunction with... Figures 24 to 27 The present application provides a detailed description of the apparatus embodiments. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be found in the foregoing method embodiments.

[0462] Figure 24 This is a schematic diagram of the decoder structure provided in one embodiment of this application. Figure 24As shown, the decoder 2400 includes: a first determining unit 2410, a calculation unit 2420, a sorting unit 2430, a parsing unit 2440, and a second determining unit 2450. The first determining unit 2410 is configured to determine the estimated residual of the current block; the calculation unit 2420 is configured to calculate the distortion size corresponding to multiple SBT modes based on the estimated residual; the sorting unit 2430 is configured to sort the multiple SBT modes according to the distortion size to obtain a first SBT mode list; the parsing unit 2440 is configured to parse a first syntax element, which indicates the index of the target SBT mode in the first SBT mode list, the target SBT mode being the SBT mode used by the current block; the second determining unit 2450 is configured to determine the target SBT mode used by the current block based on the estimated residual.

[0463] In some implementations, the decoder 2400 further includes a third determining unit. The third determining unit is configured to determine the allowed SBT modes of the current block based on the size of the current block; the parsing unit 2440 is further configured to parse a third syntax element if the partition shape of the allowed SBT modes includes a rectangular partition shape and a corner partition shape, the third syntax element indicating the partition shape of the target SBT mode; and to parse a fourth syntax element if the partition ratio of the allowed SBT modes includes a bipartite ratio and a quartic ratio, the fourth syntax element indicating the partition ratio of the target SBT mode. The third determining unit is further configured to determine a plurality of SBT modes from the allowed SBT modes based on at least one of the third syntax element and the fourth syntax element.

[0464] In some implementations, if the allowed SBT pattern partition shape includes only one partition shape and the allowed SBT pattern partition ratio includes only one partition ratio, then the multiple SBT patterns are the allowed SBT patterns.

[0465] In some implementations, the binary encoding of the first syntax element is a variable-length code encoding method.

[0466] In some implementations, the variable-length code encoding method is truncated Rice code.

[0467] In some implementations, the first determining unit 2410 is configured to: determine the predicted value of the current block; calculate the gradient of the predicted value to obtain the estimated residual of the current block.

[0468] In some implementations, the computing unit 2420 is configured to calculate the gradient sum of the multiple SBT modes respectively, wherein the gradient sum of the multiple SBT modes is the distortion magnitude of the multiple SBT modes.

[0469] In some implementations, the first determining unit 2410 is configured to: determine a first predicted value of the current block based on a first reference block of the current block; determine a second predicted value of the current block based on a second reference block of the current block; and obtain an estimated residual of the current block by subtracting the first predicted value and the second predicted value.

[0470] In some implementations, the first reference block is a forward reference block and the second reference block is a backward reference block.

[0471] In some implementations, the decoder 2400 further includes a fourth determining unit and an inverse transform unit. The fourth determining unit is configured to: determine a first sub-block in the current block based on the target SBT mode; the inverse transform unit is configured to perform an inverse transform on the transform coefficients of the first sub-block to obtain the residual information corresponding to the current block.

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

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

[0474] Therefore, some embodiments of this application provide a computer-readable storage medium applied to a decoder 2400, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned decoding method.

[0475] Based on the composition of the decoder 2400 and the computer-readable storage medium described above, see [link to documentation]. Figure 25 This illustrates a schematic diagram of the specific hardware structure of the decoder provided in some embodiments of this application. For example... Figure 25 As shown, the decoder 2500 may include a communication interface 2510, a memory 2520, and a processor 2530; the various components are coupled together via a bus system 2540. It is understood that the bus system 2540 is used to implement communication between these components. In addition to a data bus, the bus system 2540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 25 The general designated all buses as Bus System 2540. Among them,

[0476] The communication interface 2510 is used for receiving and sending signals during the process of sending and receiving information with other external network elements.

[0477] Memory 2520 is used to store computer programs.

[0478] Processor 2530, when running the computer program, performs the following:

[0479] Determine the estimated residual for the current block;

[0480] Based on the estimated residual, the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in the first category is calculated respectively, and the division ratio and division shape of the SBT modes in the first category are the same.

[0481] The SBT modes are sorted according to their distortion magnitude to obtain a first SBT mode list;

[0482] Parse the first syntax element, which is used to indicate the index of the target SBT pattern in the first SBT pattern list, wherein the target SBT pattern is the SBT pattern used by the current block;

[0483] Based on the first syntax element, the target SBT pattern is determined.

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

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

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

[0487] In some embodiments, as another example, the processor 2530 is also configured to perform the decoding method described in the foregoing embodiments when running the computer program.

[0488] In some embodiments of this application, a decoding chip is also provided, which includes a processor and a memory. The processor is configured to call and run a computer program from the memory, enabling a device equipped with the decoding chip to perform any of the decoding methods described above.

[0489] Figure 26 This is a schematic diagram of the encoder provided in one embodiment of this application. Figure 26 As shown, the encoder 2600 includes: a first determining unit 2610, a calculation unit 2620, a sorting unit 2630, and an encoding unit 2640. The first determining unit 2610 is configured to determine the estimated residual of the current block; the calculation unit 2620 is configured to calculate the distortion size corresponding to multiple SBT modes based on the estimated residual; the sorting unit 2630 is configured to sort the multiple SBT modes according to the distortion size to obtain a first SBT mode list; and the encoding unit 2640 is configured to encode a first syntax element, which indicates the index of the target SBT mode in the first SBT mode list, wherein the target SBT mode is the SBT mode used by the current block.

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

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

[0492] Therefore, some embodiments of this application provide a computer-readable storage medium applied to an encoder 2600, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the encoding method in the foregoing embodiments.

[0493] Based on the composition of the encoder 2600 and the computer-readable storage medium described above, see [link to documentation]. Figure 27 This illustrates a schematic diagram of the specific hardware structure of the encoder provided in some embodiments of this application. For example... Figure 27 As shown, encoder 2700 may include: communication interface 2710, memory 2720, and processor 2730; the various components are coupled together via bus system 2740. It is understood that bus system 2740 is used to implement communication between these components. In addition to a data bus, bus system 2740 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 27 The general designated all buses as Bus System 2740. Among them,

[0494] The communication interface 2710 is used for receiving and sending signals during the process of sending and receiving information with other external network elements.

[0495] Memory 2720 is used to store computer programs.

[0496] Processor 2730, when running the computer program, performs the following:

[0497] Determine the estimated residual for the current block;

[0498] Based on the estimated residual, the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in the first category is calculated respectively, and the division ratio and division shape of the SBT modes in the first category are the same.

[0499] The SBT modes are sorted according to their distortion magnitude to obtain a first SBT mode list;

[0500] Encode a first syntax element, which indicates the index of the target SBT mode in the first SBT mode list, the target SBT mode being the SBT mode used by the current block.

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

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

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

[0504] In some embodiments, as another example, the processor 2730 is also configured to perform the encoding method described in the foregoing embodiments when running the computer program.

[0505] In some embodiments of this application, an encoding chip is also provided, which includes a processor and a memory, the processor being configured to call and run a computer program from the memory, enabling a device equipped with the encoding chip to perform any of the decoding methods described above.

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

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

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

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

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

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

Claims

1. A decoding method, characterized in that, The method is applied to the decoder and includes: Determine the estimated residual for the current block; Based on the estimated residual, the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in the first category is calculated respectively, and the division ratio and division shape of the SBT modes in the first category are the same. The SBT modes are sorted according to their distortion magnitude to obtain a first SBT mode list; Parse the first syntax element, which is used to indicate the index of the target SBT pattern in the first SBT pattern list, wherein the target SBT pattern is the SBT pattern used by the current block; Based on the first syntax element, the target SBT pattern is determined.

2. The method according to claim 1, characterized in that, The method further includes: Based on the size of the current block, determine the allowed SBT modes for the current block; If the partition shape of the allowed SBT pattern includes a rectangular partition shape and a corner partition shape, then parse the third syntax element, which is used to indicate the partition shape of the target SBT pattern. If the allowed SBT pattern partition ratio includes a two-part ratio and a four-part ratio, then parse the fourth syntax element, which is used to indicate the partition ratio of the target SBT pattern. Based on at least one of the third and fourth syntax elements, a plurality of the allowed SBT patterns are determined from the allowed SBT patterns.

3. The method according to claim 2, characterized in that, If the allowed SBT pattern has only one partition shape and the allowed SBT pattern has only one partition ratio, then the multiple SBT patterns are the allowed SBT patterns.

4. The method according to any one of claims 1-3, characterized in that, The binary encoding method for the first syntax element is a variable-length code encoding method.

5. The method according to claim 4, characterized in that, The variable-length code encoding method is truncated Rice code.

6. The method according to any one of claims 1-5, characterized in that, Determining the estimated residual of the current block includes: Determine the predicted value of the current block; The gradient of the predicted value is calculated to obtain the estimated residual of the current block.

7. The method according to claim 6, characterized in that, The step of calculating the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in the first category based on the estimated residual includes: The gradient sum of the multiple SBT modes is calculated separately, and the gradient sum of the multiple SBT modes is the distortion magnitude of the multiple SBT modes.

8. The method according to any one of claims 1-5, characterized in that, Determining the estimated residual of the current block includes: Based on the first reference block of the current block, determine the first predicted value of the current block; Based on the second reference block of the current block, determine the second predicted value of the current block; The estimated residual of the current block is obtained by subtracting the first predicted value from the second predicted value.

9. The method according to claim 8, characterized in that, The first reference block is a forward reference block, and the second reference block is a backward reference block.

10. The method according to any one of claims 1-9, characterized in that, The method further includes: Based on the target SBT pattern, determine the first sub-block in the current block; The transformation coefficients of the first sub-block are inversely transformed to obtain the residual information corresponding to the current block.

11. An encoding method, characterized in that, The method is applied to an encoder and includes: Determine the estimated residual for the current block; Based on the estimated residual, the distortion magnitude corresponding to the SBT modes of multiple sub-blocks in the first category is calculated respectively, and the division ratio and division shape of the SBT modes in the first category are the same. The SBT modes are sorted according to their distortion magnitude to obtain a first SBT mode list; Encode a first syntax element, which indicates the index of the target SBT mode in the first SBT mode list, the target SBT mode being the SBT mode used by the current block.

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

13. A decoding chip, characterized in that, It includes a processor and a memory, the processor being configured to invoke a program or instructions from the memory to cause the method as described in any one of claims 1-10 to be executed.