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

By deriving the intra-frame prediction mode of the current block using the prediction block corresponding to a chroma component, the encoding and decoding complexity problem caused by multi-chroma component derivation in the prior art is solved, and the encoding and decoding process is simplified.

WO2026137114A1PCT designated stage Publication Date: 2026-07-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2024-12-23
Publication Date
2026-07-02

Smart Images

  • Figure CN2024141425_02072026_PF_FP_ABST
    Figure CN2024141425_02072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided are an encoding method, a decoding method, an encoder, a decoder, a storage medium, and a bitstream. The decoding method comprises: determining a first prediction block and a second prediction block of a current block, the first prediction block corresponding to a first chrominance component, and the second prediction block corresponding to a second chrominance component; determining an intra prediction mode of the current block on the basis of one prediction block among the first prediction block and the second prediction block; determining a transform kernel of the current block on the basis of the intra prediction mode of the current block; and determining a reconstructed block of the current block on the basis of the transform kernel of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding / decoding methods, codecs, storage media, and bitstreams Technical Field

[0001] This application relates to the field of video encoding and decoding, and more particularly to an encoding and decoding method, an encoder and decoder, a storage medium, and a bitstream. Background Technology

[0002] In related technologies, the transform kernel for the current block needs to be determined based on the intra-prediction mode of the current block. If the prediction mode of the current block does not belong to the traditional intra-prediction mode, the intra-prediction mode of the current block can be derived using prediction blocks of multiple chroma components through a virtual intra-prediction mode (VIPM). Then, the transform kernel for the current block can be determined based on the derived intra-prediction mode. This method of determining the transform kernel increases the encoding and decoding complexity. Summary of the Invention

[0003] This application provides an encoding / decoding method, an encoding / decoding method, a storage medium, and a bitstream. The various aspects involved in this application are described below.

[0004] In a first aspect, a decoding method is provided, applied to a decoder, comprising: determining a first prediction block and a second prediction block of a current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component; determining an intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; determining a transform kernel of the current block based on the intra-prediction mode of the current block; and determining a reconstructed block of the current block based on the transform kernel of the current block.

[0005] Secondly, an encoding method is provided, applied to an encoder, comprising: determining a first prediction block and a second prediction block for a current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component; determining an intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; determining a transform kernel of the current block based on the intra-prediction mode of the current block; and determining transform coefficients of the current block based on the transform kernel of the current block.

[0006] Thirdly, a decoder is provided, comprising: a first determining unit configured to determine a first prediction block and a second prediction block of a current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component; a second determining unit configured to determine an intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; a third determining unit configured to determine a transform kernel of the current block based on the intra-prediction mode of the current block; and a fourth determining unit configured to determine a reconstructed block of the current block based on the transform kernel of the current block.

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

[0008] Fifthly, an encoder is provided, the encoder comprising: a first determining unit configured to determine a first prediction block and a second prediction block of a current block, the first prediction block corresponding to a first chroma component and the second prediction block corresponding to a second chroma component; a second determining unit configured to determine an intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; a third determining unit configured to determine a transform kernel of the current block based on the intra-prediction mode of the current block; and a fourth determining unit configured to determine transform coefficients of the current block based on the transform kernel of the current block.

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

[0010] In a seventh aspect, a non-volatile computer-readable storage medium is provided for storing a bit stream, the bit stream being generated by an encoding method using an encoder, or the bit stream being decoded by a decoding method using a decoder, wherein the decoding method is as described in the first aspect and the encoding method is as described in the second aspect.

[0011] Eighthly, a bitstream is provided, the bitstream comprising a bitstream generated by the method described in the second aspect.

[0012] A ninth aspect provides a computer-readable storage medium storing a computer program that, when executed, implements the method described in the first aspect or the method described in the second aspect.

[0013] In a tenth aspect, a computer program product is provided, comprising a computer program that, when executed, implements the method as described in the first or second aspect.

[0014] When deriving the intra-prediction mode of the current block, this embodiment uses a prediction block corresponding to one chroma component for derivation. Compared with the method of using prediction blocks corresponding to multiple chroma components in related technologies, this simplifies the complexity of encoding and decoding. Attached Figure Description

[0015] Figure 1 is a structural example diagram of a video encoder applicable to embodiments of this application.

[0016] Figure 2 is a structural example diagram of a video decoder applicable to embodiments of this application.

[0017] Figure 3 shows an example diagram of the Sobel filter.

[0018] Figure 4 is an example of the decoding process of intra-mode derivation (DIMD).

[0019] Figure 5 is a schematic diagram of the direction of the angle prediction mode.

[0020] Figure 6 shows an example of the transformation process of the low frequency non-separable transform (LFNST).

[0021] Figure 7 is a schematic diagram of the conditions for enabling the non-separable primary transform (NSPT).

[0022] Figure 8 is an example diagram showing how gradient information is determined.

[0023] Figure 9 is an example diagram illustrating the derivation process of virtual intra prediction mode (VIPM).

[0024] Figure 10 is a flowchart illustrating the decoding method provided in an embodiment of this application.

[0025] Figure 11 is a flowchart illustrating the encoding method provided in an embodiment of this application.

[0026] Figure 12 is an example diagram of the derivation process of VIM provided in the embodiments of this application.

[0027] Figure 13 is a schematic diagram of the structure of a decoder provided in one embodiment of this application.

[0028] Figure 14 is a schematic diagram of the structure of a decoder provided in another embodiment of this application.

[0029] Figure 15 is a schematic diagram of the encoder provided in one embodiment of this application.

[0030] Figure 16 is a schematic diagram of the encoder provided in another embodiment of this application. Detailed Implementation

[0031] Video encoding and decoding framework

[0032] Figure 1 is a schematic block diagram of a video encoder involved in an embodiment of this application.

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

[0034] 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) for every 4 samples; 4:2:2 means that there are 4 luminance components and 4 chrominance components (YYYYCbCrCbCr) for every 4 samples; and 4:4:4 means that all samples are displayed (YYYYCbCrCbCrCbCrCbCr).

[0035] For example, the video encoder 100 reads video data and, for each image (or sub-image or frame) in the video data, divides an image into several coding tree units (CTUs). In some examples, CTUs may be called "tree blocks," "largest coding unit" (LCU), or "coding tree block" (CTB). Each CTU can be associated with a sample block of equal size within the image. Each sample can correspond to one luminance (or luma) sample and two chrominance (or chroma) samples. Therefore, each CTU can be associated with one luminance sample block and two chrominance sample blocks. A CTU can be a square block (or, the shape of the CTU is square). The size of a CTU is, for example, 256×256, 128×128, 64×64, 32×32, etc. A CTU can be further divided into several coding units (CUs) for encoding. CUs can be rectangular blocks or square blocks. The CU can be further divided into prediction units (PUs) and transform units (TUs), thus separating encoding, prediction, and transformation for more flexible processing. In one example, the CTU is divided into CUs using a quadtree structure, and the CUs are further divided into TUs and PUs using a quadtree structure. In some embodiments, the division of the prediction unit and the transform unit can be different.

[0036] It's important to note that video codec standards (such as VVC and HEVC) allow encoders to determine the size and partitioning of CUs and / or PUs based on the video content. For example, regions with simple textures or motion may tend to use larger blocks, while regions with complex textures or motion may tend to use smaller blocks. The deeper the block partitioning, the more complex and closer the blocks can be to the actual texture or motion, but correspondingly, the overhead for representing these partitions is also greater.

[0037] The video encoder and decoder support various PU sizes. Assuming a specific CU size of 2N×2N, the video encoder and decoder can support PU sizes of 2N×2N or N×N for intra-frame prediction, and also support symmetric PUs of 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter-frame prediction. The video encoder and decoder can also support asymmetric PUs of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.

[0038] In some embodiments, as shown in FIG1, the video encoder 100 may include: a prediction unit 110, a residual unit 120, a transform / quantization unit 130, an inverse transform / quantization unit 140, a reconstruction unit 150, a loop filtering unit 160, a decoded image buffer 170, and an entropy coding unit 180. It should be noted that the video encoder 100 may include more, fewer, or different functional components.

[0039] In some embodiments, the prediction unit 110 includes an inter-frame prediction unit 111 and an intra-frame prediction unit 112. Because there is a strong correlation between adjacent samples in an image of a video, intra-frame prediction is used in video encoding and decoding techniques to eliminate spatial redundancy between adjacent samples. 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 coding efficiency.

[0040] Inter-frame prediction unit 111 can be used for inter-frame prediction, which can include motion estimation and motion compensation. Referring to 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. The motion information includes a list of reference images containing the reference image, the reference image index, and motion vectors. Motion vectors can be whole-sample or multi-sample. If the motion vectors are multi-sample, interpolation filtering needs to be used in the reference images to create the required multi-sample blocks. Here, the whole-sample or multi-sample block in the reference image found based on the motion vector is called a reference block. Some techniques directly use the reference block as the prediction block, while others process the reference block further to generate the prediction block. Processing the reference block further to generate the prediction block can also be understood as using the reference block as the prediction block and then processing it to generate a new prediction block.

[0041] Intra-frame prediction unit 112 refers only to information from the same image to predict sample information within the current code image block, thereby eliminating spatial redundancy.

[0042] 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. HEVC uses Planar, DC, and 33 angular modes for a total of 35 intra-frame prediction modes. VVC uses Planar, DC, and 65 angular modes for a total of 67 intra-frame prediction modes.

[0043] 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.

[0044] The residual unit 120 can generate a residual block of the CU based on the sample block of the CU and the prediction block of the PU of the CU. For example, the residual unit 120 can 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 sample block of the CU and the corresponding sample in the prediction block of the PU of the CU.

[0045] Transform / quantization unit 130 can quantize transform coefficients. Transform / quantization unit 130 can quantize transform coefficients associated with the TU of the CU based on the quantization parameter (QP) value associated with the CU. 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.

[0046] The inverse transform / quantization unit 140 can apply inverse quantization and inverse transform to the quantized transform coefficients to reconstruct the residual block from the quantized transform coefficients.

[0047] The reconstruction unit 150 can add samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by the prediction unit 110 to produce a reconstructed image block associated with the TU. By reconstructing the sample blocks of each TU of the CU in this way, the video encoder 100 can reconstruct the sample blocks of the CU.

[0048] The loop filtering unit 160 is used to process the samples after inverse transform and inverse quantization to compensate for distorted information and provide a better reference for subsequent encoded samples. For example, it can perform deblocking filtering to reduce the block effect of sample blocks associated with the CU.

[0049] In some embodiments, the loop filtering unit 160 includes a deblocking filtering unit and a sample adaptive compensation / adaptive loop filtering (SAO / ALF) unit, wherein the deblocking filtering unit is used to remove block effects and the SAO / ALF unit is used to remove ringing effects.

[0050] The decoded image buffer 170 can store reconstructed sample blocks. The inter-frame prediction unit 111 can use a reference image containing the reconstructed sample blocks to perform inter-frame prediction on PUs in other images. In addition, the intra-frame prediction unit 112 can use the reconstructed sample blocks in the decoded image buffer 170 to perform intra-frame prediction on other PUs in the same image as the CU.

[0051] The entropy coding unit 180 can receive quantized transform coefficients from the transform / quantization unit 130. The entropy coding unit 180 can perform one or more entropy coding operations on the quantized transform coefficients to produce entropy-coded data.

[0052] Figure 2 is a schematic block diagram of a video decoder involved in an embodiment of this application.

[0053] As shown in Figure 2, the video decoder 200 includes: an entropy decoding unit 210, a prediction unit 220, an inverse quantization / transformation unit 230, a reconstruction unit 240, a loop filtering unit 250, and a decoded image buffer 260. It should be noted that the video decoder 200 may contain more, fewer, or different functional components.

[0054] Video decoder 200 can receive a bitstream. Entropy decoding unit 210 can parse the bitstream to extract syntax elements. As part of parsing the bitstream, entropy decoding unit 210 can parse the entropy-encoded syntax elements in the bitstream. Prediction unit 220, dequantization / transform unit 230, reconstruction unit 240, and loop filtering unit 250 can decode video data based on the syntax elements extracted from the bitstream, i.e., generate decoded video data.

[0055] In some embodiments, the prediction unit 220 includes an intra-frame prediction unit 222 and an inter-frame prediction unit 221.

[0056] Intra-prediction unit 222 can perform intra-prediction to generate prediction blocks for the PU. Intra-prediction unit 222 can use an intra-prediction mode to generate prediction blocks for the PU based on sample blocks of spatially adjacent PUs. Intra-prediction unit 222 can also determine the intra-prediction mode of the PU based on one or more syntax elements parsed from the bitstream.

[0057] Inter-frame prediction unit 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 unit 210 can parse the motion information of the PU. Inter-frame prediction unit 221 can determine one or more reference blocks of the PU based on the motion information of the PU. Inter-frame prediction unit 221 can generate prediction blocks for the PU based on one or more reference blocks of the PU.

[0058] The dequantization / transformation unit 230 reversibly quantizes (i.e., dequantizes) the transform coefficients associated with the TU. The dequantization / transformation unit 230 can use the QP value associated with the CU of the TU to determine the degree of quantization.

[0059] After the inverse quantization transform coefficients, the inverse quantization / transformation unit 230 can apply one or more inverse transforms to the inverse quantization transform coefficients to generate a residual block associated with the TU.

[0060] The reconstruction unit 240 uses the residual block associated with the TU of the CU and the prediction block of the PU of the CU to reconstruct the sample block of the CU. For example, the reconstruction unit 240 can add the samples of the residual block to the corresponding samples of the prediction block to reconstruct the sample block of the CU, thereby obtaining the reconstructed image block.

[0061] The loop filter unit 250 can perform deblocking filtering operations to reduce the block effect of sample blocks associated with the CU.

[0062] The video decoder 200 can store the reconstructed image of the CU in the decoded image buffer 260. The video decoder 200 can 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.

[0063] 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, prediction unit 110 uses intra-frame prediction or inter-frame prediction to generate a prediction block for the current block. Residual unit 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. This residual block is transformed and quantized by transform / quantization unit 130, which can remove information that is not sensitive to the human eye to eliminate visual redundancy. Optionally, the residual block before transformation and quantization by transform / quantization unit 130 can be called a temporal residual block, and the temporal residual block after transformation and quantization by transform / quantization unit 130 can be called a frequency residual block or a frequency domain residual block. Entropy coding unit 180 receives the quantized change coefficients output by transform / quantization unit 130, and can entropy code the quantized change coefficients to output a bitstream. For example, entropy coding unit 180 can eliminate character redundancy based on the target context model and the probability information of the binary bitstream.

[0064] At the decoding end, the entropy decoding unit 210 can parse the bitstream to obtain the prediction information and quantization coefficient matrix of the current block. The prediction unit 220 uses intra-frame prediction or inter-frame prediction to generate the prediction block of the current block based on the prediction information. The dequantization / transform unit 230 uses the quantization coefficient matrix obtained from the bitstream to perform dequantization and inverse transform on the quantization coefficient matrix to obtain the residual block. The reconstruction unit 240 adds the prediction block and the residual block to obtain the reconstructed block. The reconstructed blocks form the reconstructed image. The loop filtering unit 250 performs loop filtering on the reconstructed image based on the image or based on the blocks to obtain the decoded image. The encoding end also needs similar operations to the decoding end to obtain the decoded image. This decoded image can also be called the reconstructed image, which can be used as a reference image for inter-frame prediction of subsequent images.

[0065] 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.

[0066] In some embodiments, the current block may be referred to as the current coding unit (CU), the current prediction unit (PU), or the current transform unit (TU), etc. The prediction block may also be referred to as the predicted image block or the image prediction block, and the reconstructed image block may also be referred to as the reconstruction block or the image reconstruction block.

[0067] In some embodiments, images can be divided into slices or similar components to facilitate parallel processing. Slices within the same image can be processed in parallel, meaning there is no data dependency between different slices within the same image.

[0068] It should be noted that the term "frame" as used in this application can generally be understood as a frame or an image, or in other words, the term "frame" as used in this application can also be replaced with an image or a slice, etc.

[0069] 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.

[0070] The foregoing has described in detail the encoding / decoding framework provided by the embodiments of this application. These embodiments can be applied to prediction units and / or transformation units within the encoding / decoding framework. The related technologies involved in the embodiments of this application will be described in detail below.

[0071] Decoder intra-mode derivation (DIMD)

[0072] DIMD is a method that constructs an input template based on the reconstructed information of the current block's surroundings, and then uses the gradients of samples in the input template to derive the intra-prediction mode, thus saving bitstream transmission by not transmitting the intra-prediction mode. DIMD uses a 3x3 horizontal Sobel filter (Gx) and a vertical Sobel filter (Gy) as shown in Figure 3 to calculate the horizontal gradient Gx and vertical gradient Gy for the sample at the center of the template. Then, the angle of the sample at the center of the template can be obtained by arctan(Gx / Gy), and the angle of the sample at the center of the template can be converted into the angle in the angle prediction mode (arctan is a function that uses the ratio of opposite sides to adjacent sides of a right triangle to find the angle). Then, the amplitude value corresponding to the angle can be obtained by |Gx|+|Gy|. The above operation is performed for each input sample, and the amplitude value corresponding to each angle is accumulated to obtain the histogram of oriented gradients (HOG) containing the accumulated amplitude values ​​of different angles, as shown in Figure 4. Generally, only the angle modes with higher amplitude values ​​in the HoG can be recorded for reference in subsequent processes.

[0073] Generally, the sources of samples in the input template of DIMD include, but are not limited to, the following: reconstructed samples adjacent to the current block; and prediction samples in the prediction block. In chroma DIMD prediction mode, HoG is constructed by reconstructing samples adjacent to the current block and partially reconstructing samples of the same luma block. Based on this HoG, a corresponding traditional intra-frame prediction angle mode is determined, and a prediction block is generated based on this traditional intra-frame prediction angle mode.

[0074] Cross-component prediction mode

[0075] The cross-component prediction mode was proposed to reduce redundancy between cross components. Cross-component prediction mainly uses the reconstructed luminance samples from the same coding block to construct the predicted values ​​of chrominance samples. Cross-component prediction modes include the cross-component linear mode (CCLM), and the linear relationship in CCLM can be expressed by the following formula (1):

[0076] pred C (i, j) = a·rec L ′(i, j)+ b (1)

[0077] Where predc(i,j) represents the chroma prediction sample of the current block, and recL'(i,j) represents the downsampled reconstructed luminance sample of the current block. a and b are called linear model parameters (a is the scaling parameter, b is the offset parameter), and the values ​​of a and b can be derived from adjacent chroma and luminance samples. Since the linear model can be calculated at the encoder / decoder end, it does not need to be written into the bitstream. Some related technologies also introduce other nonlinear cross-component prediction modes, such as convolutional cross-component intra prediction mode (CCCM), gradient linear model (GLM), CCCM using multiple downsampling filters (CCCM-MDF), etc. These cross-component prediction modes differ from traditional angle prediction modes; they generate the prediction sample of the current block from the reconstructed samples of the corresponding luminance block.

[0078] Classification of prediction blocks and selection of transform kernel

[0079] Different angle prediction modes are suitable for different transformations. The transformations mentioned here include primary transformations (such as multiple transform selection (MTS)), non-separable primary transforms (NSPT), and secondary transformations (such as low frequency non-separable transforms (LFNST)).

[0080] MTS includes some traditional transforms, such as the Discrete Cosine Transform (DCT) and the Discrete Sine Transform (DST). NSPT and LFNST, on the other hand, are based on the optimal transform and obtain a series of transform coefficients from a universal training set. The difference between NSPT and LFNST is that NSPT is directly used to transform the residual coefficients, while LFNST further transforms the coefficients after the DCT2 transform.

[0081] Both NSPT and LFNST have multiple sets of transform kernels. To determine which set of NSPT / LFNST transform kernels to use for a given prediction mode, a mapping table is established to map traditional intra-frame prediction modes (PLANAR, DC, and angle modes) to a specific NSPT / LFNST transform set. This allows the selection of which NSPT / LFNST transform set to use to determine the prediction mode corresponding to the current block.

[0082] In some related fields, traditional intra-prediction modes include PLANA mode, DC mode, and angle mode. Specifically, the intra-prediction mode index for PLANA mode is 0, for DC mode it is 1, and for angle mode it ranges from 2 to 66.

[0083] The arrows in Figure 5 indicate the directions of the angular prediction modes present in versatile video coding (VVC). These angular prediction modes use prediction mode indices from 2 to 66 during encoding and decoding. When the current prediction block is a non-square block, the directions of some angular prediction modes are replaced with wide angles (as shown by the angles corresponding to prediction mode indices -1 to -14 and 67 to 80 in Figure 5).

[0084] In related technologies, NSPT and LFNST divide the traditional intra-frame prediction mode into 35 transform sets, each with 3 selectable transform kernels. Table 1 shows the correspondence between the traditional intra-frame prediction mode and the transform sets.

[0085] Table 1 Mapping between traditional intra-frame prediction modes and NSPT / LFNST transform sets

[0086] For the basic transform, it is also divided into multiple transform sets according to different traditional intra-frame prediction modes, so that the corresponding transform set can be selected according to the traditional intra-frame prediction mode.

[0087] Low-frequency non-separable transform (LFNST)

[0088] LFNST applies inseparable transforms based on direct matrix multiplication, allowing these transforms to be implemented in a single iteration without requiring multiple iterations. As shown in Figure 6, LFNST typically operates between the fundamental transform and quantization, and between inverse quantization and the inverse transform of the fundamental transform. For some coding units using traditional intra-prediction modes, the selection of the LFNST transform kernel is based on the traditional intra-prediction mode and the mapping relationship shown in Table 1 to find the corresponding transform set. Then, the final transform kernel to be used is determined from the transform set based on the transform kernel index. However, for some non-traditional intra-prediction modes, a traditional intra-prediction mode needs to be derived first using a special method before the corresponding transform set can be selected according to Table 1. Currently, related technologies use the index identifier lfnstIdx to indicate whether LFNST is used. For example, when lfnstIdx > 0, it indicates that the current block uses LFNST, and the specific transform kernel can then be determined from the selected transform set based on the specific value of lfnstIdx. When lfnstIdx is 0, it indicates that the current block does not use LFNST.

[0089] Non-separable primary transform (NSPT)

[0090] NSPT is a non-separable main transform used to replace the combination of separable DCT-II main transform and LFNST transform. If the current block uses LFNST, the main transform is DCT-II, and the current block size meets a specific block size requirement, then an NSPT transform scheme can replace the original transform scheme. In NSPT, the method for determining the transform kernel is basically the same as in LFNST. Currently, NSPT determines whether to use it based on the value of the index identifier lfnstIdx and the block size, among other conditions. As shown in Figure 7, when lfnstIdx > 0 and the current block size meets the NSPT replacement conditions, the current block uses NSPT, and the specific transform kernel is determined from the selected transform set based on the specific value of lfnstIdx. Otherwise, the current block does not use NSPT.

[0091] Virtual intra-prediction mode (VIPM)

[0092] Some non-traditional prediction modes (such as cross-component prediction modes) require determining the transform set by deriving the VIPM. The following explanation uses the cross-component prediction mode as an example. Cross-component prediction modes generate predicted values ​​for chrominance blocks based on information from the luma block; therefore, Table 1 cannot be directly used to determine which NSPT / LFNST transform set to use for the current block. In this case, the VIPM for the current block can be derived first using the DIMD method, and then the corresponding transform set for the current block can be determined based on the VIPM. This process is described in detail below.

[0093] First, prediction blocks for the Cb and Cr chromaticity components are obtained. Then, based on the DIMD method, a 3x3 filter is used to calculate the gradients of some samples in the prediction blocks for the Cb and Cr chromaticity components, respectively. Specifically, a sliding 3x3 window, as shown in Figure 8, is used to calculate the gradient values ​​and corresponding amplitude values ​​of the (W-2)*(H-2) sample positions at the center of the prediction block (i.e., the samples contained in the dashed area in Figure 8). The amplitude value G of the gradient at each sample position is accumulated over its derived traditional angle prediction mode category to obtain HoG. Finally, the traditional angle prediction mode with the largest accumulated amplitude value is selected as the VIM. After obtaining the VIM, the mapping relationship shown in Table 1 can be used to determine which NSPT / LFNST transform set to use for the current block. Finally, the specific transform kernel can be determined from the transform set according to the transform kernel index (lfnstIdx). The general flow of the entire scheme is shown in Figure 9.

[0094] Joint coding of chroma residuals (JCCR)

[0095] Generally, for the two chrominance components Cb and Cr, each chrominance component has a corresponding set of residual coefficients, and the reconstructed blocks of the two chrominance components can be constructed using their respective prediction blocks. JCCR mode is a special residual coding technique that, based on the correlation between the residuals of the two chrominance components, represents the residual information of the two chrominance components through a set of residual coefficients. In implementation, the presence of residuals in the Cb and Cr chrominance components can be indicated by the flags tu_cb_coded_flag and tu_cr_coded_flag, and the use of JCCR mode can be indicated by the flag tu_joint_cbcr_residual_flag. When both tu_cb_coded_flag and tu_cr_coded_flag are 0, the default value of tu_joint_cbcr_residual_flag is 0. When not all values ​​of tu_cb_coded_flag and tu_cr_coded_flag are 0, the value of tu_joint_cbcr_residual_flag is obtained from parsing the bitstream. When `tu_joint_cbcr_residual_flag` is 1, it indicates that the current block has only one set of residual coefficients, and the residuals of chrominance components Cb and Cr are derived from this set of residual coefficients. In this case, the derivation method of the residual coefficients of chrominance components Cb and Cr depends on the values ​​of `tu_cb_coded_flag` and `tu_cr_coded_flag`. As shown in Table 2, the residual coefficients of chrominance component Cb (resCb) and chrominance component Cr (resCr) can be derived from the residual coefficients of joint coding in the bitstream (resJointC) according to the formula based on the corresponding mode. In Table 2, `CSign` represents +1 or -1 (its specific value is determined by the higher-level syntax `ph_joint_cbcr_sign_flag`). As can be seen from Table 2, there are three different JCCR modes depending on the different values ​​of `tu_cb_coded_flag` and `tu_cr_coded_flag`.

[0096] Table 2: Residual Coefficient Derivation Relationship under the Three JCCR Models

[0097] As described above, in some cases, the intra-prediction mode of the current block is determined based on the prediction blocks corresponding to multiple chroma components, and the transform kernel of the current block is determined based on the intra-prediction mode of the current block. This increases the complexity of encoding and decoding.

[0098] To address the aforementioned issues, this application provides an encoding method comprising: determining a first prediction block and a second prediction block for a current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component; determining an intra-prediction mode of the current block based on one of the first and second prediction blocks; determining a transform kernel of the current block based on the intra-prediction mode of the current block; and determining transform coefficients of the current block based on the transform kernel of the current block.

[0099] This application also provides a decoding method, including: determining a first prediction block and a second prediction block for a current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component; determining an intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; determining a transform kernel of the current block based on the intra-prediction mode of the current block; and determining a reconstructed block of the current block based on the transform kernel of the current block.

[0100] When deriving the intra-prediction mode of the current block, this embodiment uses a prediction block corresponding to one chroma component for derivation. Compared with the method of using prediction blocks corresponding to multiple chroma components in related technologies, this simplifies the complexity of encoding and decoding.

[0101] The decoding method provided in the embodiments of this application will be described in detail below with reference to Figure 10.

[0102] Figure 10 is a schematic flowchart of the decoding method provided in an embodiment of this application. The method shown in Figure 10 can be applied to a decoder.

[0103] Referring to Figure 10, in step S1010, the first prediction block and the second prediction block of the current block are determined. The current block mentioned in this embodiment can refer to the collective term for the current luma block and the current chroma block, or it can refer to the current chroma block. The first prediction block of the current block corresponds to the first chroma component (or the first chroma channel), and the second prediction block of the current block corresponds to the second chroma component (or the second chroma channel). The first chroma component can be the Cb component, and the second chroma component can be the Cr component; or, the first chroma component can be the Cr component, and the second chroma component can be the Cb component. The first prediction block and the second prediction block can be determined based on a certain prediction mode (such as an intra-frame prediction mode), but this embodiment does not limit the specific prediction mode used when determining the first prediction block and the second prediction block. For example, the first prediction block and / or the second prediction block can be predicted using a traditional intra-frame prediction mode (such as PLANAR, DC, and / or angle prediction modes). Alternatively, the first prediction block and / or the second prediction block can be predicted using a non-traditional intra-frame prediction mode. The non-traditional intra-prediction modes mentioned here can be any type of non-traditional prediction mode, such as one or more of the following: cross-component prediction mode, luminance-derived (DBV) mode, or prediction mode based on multiple intra-prediction modes (such as prediction mode that fuses multiple intra-prediction modes).

[0104] In step S1020, the intra-prediction mode of the current block is determined based on one of the first and second prediction blocks. The intra-prediction mode of the current block is determined or derived based on the prediction blocks; therefore, in some implementations, the intra-prediction mode of the current block can be referred to as the virtual intra-prediction mode of the current block. In a specific implementation, step S1020 may include, for example, determining the gradient information (e.g., gradient histogram) of the current block based on one of the first and second prediction blocks; then, the intra-prediction mode of the current block can be determined based on the gradient information (e.g., determining the intra-prediction mode with the largest magnitude in the gradient histogram as the intra-prediction mode of the current block, see the relevant description in Figure 9 for details). For example, the intra-prediction mode of the current block can be derived based on DIMD.

[0105] In step S1030, the transform kernel (or parameters for determining transform coefficients) of the current block is determined based on the intra-prediction mode of the current block. The transform kernel mentioned here can be a transform kernel for performing a single transform, a transform kernel for performing a double transform, or a transform kernel for performing both single and double transforms simultaneously. For example, the transform kernel is a transform kernel for performing either the LFNST transform or the NSPT transform. In a specific implementation, step S1030 may include: determining a transform set based on the intra-prediction mode of the current block. The transform set mentioned here refers to a set of transform kernels. Taking the transform kernel used for LFNST / NSPT transform as an example, this transform set can be called the NSPT / LFNST transform set. For example, the transform set corresponding to the intra-prediction mode of the current block can be found according to the mapping relationship shown in Table 1. After determining the transform set, the transform kernel of the current block can be selected or determined from the transform set. For example, the bitstream can be decoded to determine a first index. Then, based on this first index, the transform kernel of the current block is determined from the transform set. In some implementations, this first index can be called the transform kernel index. This first index can be represented, for example, by lfnstidx. For instance, a transform set may include three transform kernels, and the first index may indicate one of these three transform kernels. Therefore, based on this first index, a transform kernel can be selected from the transform set as the transform kernel for the current block.

[0106] In step S1040, the reconstructed block of the current block is determined based on the transform kernel of the current block (this may include the reconstructed block corresponding to the first chroma component and / or the reconstructed block corresponding to the second chroma component of the current block). For example, the residual block of the current block can be determined based on the transform kernel of the current block; then, the reconstructed block of the current block can be determined based on the residual block and the prediction block of the current block. As a more specific example, the bitstream can be decoded first to determine the quantization coefficients of the current block; then, the quantization coefficients can be dequantized, and the result of the dequantization can be inversely transformed based on the transform kernel to determine the residual block of the current block. After obtaining the residual block of the current block, the residual block can be summed with the prediction block of the current block to determine the reconstructed block of the current block.

[0107] When deriving the intra-prediction mode of the current block, this embodiment uses a prediction block corresponding to one chroma component for derivation. Compared with the method of using prediction blocks corresponding to multiple chroma components in related technologies, this simplifies the complexity of encoding and decoding.

[0108] Step S1020 in Figure 10 can be executed under certain conditions (hereinafter referred to as the first condition for ease of description). That is, if the first condition is met, the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. If the first condition is not met, step S1020 can be omitted, and the relevant technique can be used, i.e., the intra-prediction mode of the current block can be determined based on the first and second prediction blocks. The first condition can be set according to actual needs, and the content of the first condition is illustrated below.

[0109] Implementation Method 1: The first condition is related to the encoding pattern of the residual of the current block.

[0110] The first condition, related to the coding mode of the residual of the current block, can be understood as follows: when the coding mode of the residual of the current block is one or more types of coding modes, the intra-prediction mode of the current block is determined based on one of the prediction blocks from the first and second prediction blocks. For example, the first condition may include the current block using a chroma residual joint coding mode. That is, when the current block uses a chroma residual joint coding mode, the intra-prediction mode of the current block is determined based on one of the prediction blocks from the first and second prediction blocks. If the current block uses a chroma residual joint coding mode, it means that there is a certain correlation between the two chroma components of the current block. In this case, deriving the intra-prediction mode based on a single prediction block can reduce the decoding complexity, and the decoding performance can remain basically unchanged compared to deriving the intra-prediction mode based on multiple prediction blocks.

[0111] It should be understood that, as mentioned above (see the relevant description in Table 2 above), related technologies provide a variety of chroma residual joint coding modes. The chroma residual joint coding mode mentioned in the embodiments of this application may refer to the general term for the various chroma residual joint coding modes, or it may refer to one or more specific chroma residual joint coding modes among the various chroma residual joint coding modes.

[0112] Whether the current block uses chroma residual joint coding mode can be determined based on syntax elements carried in the bitstream. This syntax element can be, for example, an identifier. Hereinafter, this identifier will be referred to as the first identifier, which can be represented, for example, by `tu_joint_cbcr_residual_flag`. The first identifier can include a first value and a second value. The first value can be, for example, 1 or true, and the second value can be 0 or false. If the first identifier is the first value, it can be determined that the current block uses chroma residual joint coding mode; if the first identifier is the second value, it can be determined that the current block does not use chroma residual joint coding mode.

[0113] The value of the first identifier can be determined by decoding the bitstream or by other methods. For example, the bitstream can be decoded to determine the second and third identifiers. The second identifier indicates whether the first chromaticity component has a residual, and the third identifier indicates whether the second chromaticity component has a residual. Taking the first chromaticity component as the Cb component and the second chromaticity component as the Cr component as an example, the second identifier can be represented by tu_cb_coded_flag, and the third identifier can be represented by tu_cr_coded_flag. For example, a value of 1 for the second identifier indicates that the first chromaticity component has a residual; a value of 0 indicates that the first chromaticity component has no residual. Similarly, a value of 1 for the third identifier indicates that the second chromaticity component has a residual; a value of 0 indicates that the second chromaticity component has no residual. If the values ​​of the second and third identifiers are not both 0, the bitstream can be decoded to determine the first identifier; conversely, if the values ​​of the second and third identifiers are both 0, the value of the first identifier can be directly determined to be 0 without decoding the bitstream.

[0114] In some implementations, when the first condition includes the current block using a chroma residual joint coding mode, the first condition can be further correlated with second and / or third identification information. Alternatively, when the first condition includes the current block using a chroma residual joint coding mode, the values ​​of the second and / or third identification information can be further considered to determine whether the intra-prediction mode of the current block should be determined based on one of the first and second prediction blocks. The second and third identification information can be found above and will not be repeated here.

[0115] For example, the first condition may include the current block using chroma residual joint coding mode, the second identifier being 1, and the third identifier being 0. That is, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 0, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0116] For example, the first condition could include the current block using chroma residual joint coding mode, the second identifier being 0, and the third identifier being 1. That is, if the current block uses chroma residual joint coding mode, the second identifier is 0, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0117] For example, the first condition could include the current block using chroma residual joint coding mode, the second identifier being 1, and the third identifier being 1. That is, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0118] The first condition may include some or all of the conditions mentioned above. For example, the first condition may include the following two conditions: the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 0; and the current block uses chroma residual joint coding mode, the second identifier is 0, and the third identifier is 1, but does not include the following condition: the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1. In this implementation, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on the first prediction block and the second prediction block.

[0119] Implementation Method 2: The first condition is related to the prediction mode of the current block.

[0120] The first condition, related to the prediction mode of the current block, can be understood as follows: when the prediction mode of the current block is one or more prediction modes, the intra-prediction mode of the current block is determined based on one of the prediction blocks in the first and second prediction blocks. In some implementations, the first condition may include the prediction mode of the current block being a non-traditional intra-prediction mode. For example, the first condition may include one or more of the following: the prediction mode of the current block is a cross-component prediction mode, the prediction mode of the current block is a DBV mode, or the prediction mode of the current block is based on multiple intra-prediction modes. That is, when the prediction mode of the current block is a non-traditional intra-prediction mode such as a cross-component prediction mode or a DBV mode, the intra-prediction mode of the current block can be determined based on one of the prediction blocks in the first and second prediction blocks.

[0121] For example, if the prediction mode of the current block is cross-component prediction mode, then the intra-prediction mode of the current block is determined based on the first prediction block.

[0122] For example, if the prediction mode of the current block is cross-component prediction mode, then the intra-frame prediction mode of the current block is determined based on the second prediction block.

[0123] For example, if the prediction mode of the current block is DBV mode, then the intra-prediction mode of the current block is determined based on the first prediction block.

[0124] For example, if the prediction mode of the current block is DBV mode, then the intra-prediction mode of the current block is determined based on the second prediction block.

[0125] For example, if the current block corresponds to multiple intra-prediction modes, the intra-prediction mode of the current block is determined based on the first prediction block. For instance, the current block could correspond to multiple intra-prediction modes if it uses a mode that fuses multiple intra-prediction results (chroma fusion) for prediction.

[0126] For example, if the current block corresponds to multiple intra-prediction modes, the intra-prediction mode of the current block is determined based on the second prediction block. For instance, the current block could correspond to multiple intra-prediction modes if it uses a chroma fusion mode (where the results of multiple intra-prediction methods are fused) for prediction.

[0127] Implementation Method 3: The first condition is related to the encoding mode of the residual of the current block and the prediction mode of the current block.

[0128] Implementation method three can be understood as a combination of implementation methods one and two. For example, the first condition may include: the current block uses the chroma residual joint coding mode, and the prediction mode of the current block is one or more of the following: cross-component prediction mode, DBV mode, or fusion mode of multiple intra-frame prediction modes.

[0129] Furthermore, the first condition can be related to the second and / or third identification information. The second identification information is used to indicate whether the first chromaticity component has a residual, and the third identification information is used to indicate whether the second chromaticity component has a residual. Taking the first chromaticity component as the Cb component and the second chromaticity component as the Cr component as an example, the second identification information can be represented by tu_cb_coded_flag, and the third identification information can be represented by tu_cr_coded_flag. For example, a value of 1 for the second identification information indicates that the first chromaticity component has a residual; a value of 0 for the second identification information indicates that the first chromaticity component has no residual. Similarly, a value of 1 for the third identification information indicates that the second chromaticity component has a residual; a value of 0 for the third identification information indicates that the second chromaticity component has no residual.

[0130] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier being 1, and the third identifier being 0. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier is 1, and the third identifier is 0, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0131] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier value being 0, and the third identifier value being 1. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier value is 0, and the third identifier value is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0132] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier value being 1, and the third identifier value being 1. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier value is 1, and the third identifier value is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0133] The first condition may include some or all of the conditions mentioned above. For example, the first condition may include the following two conditions: the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 0; and the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 0, and the value of the third identifier is 1, but does not include the following condition: the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 1. In this implementation, if the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 1, then the intra-frame prediction mode of the current block can be determined based on the first prediction block and the second prediction block.

[0134] The decoding method provided by the embodiments of this application has been described in detail above with reference to Figure 12. The encoding method provided by the embodiments of this application has been described in detail below with reference to Figure 10.

[0135] Figure 11 is a flowchart illustrating the encoding method provided in an embodiment of this application. The method shown in Figure 11 can be applied to an encoder.

[0136] Referring to Figure 11, in step S1110, the first prediction block and the second prediction block of the current block are determined. The current block mentioned in this embodiment can refer to the collective term for the current luma block and the current chroma block, or it can refer to the current chroma block. The first prediction block of the current block corresponds to the first chroma component (or the first chroma channel), and the second prediction block of the current block corresponds to the second chroma component (or the second chroma channel). The first chroma component can be a Cb component, and the second chroma component can be a Cr component; or, the first chroma component can be a Cr component, and the second chroma component can be a Cb component. The first prediction block and the second prediction block can be determined based on a certain prediction mode (such as an intra-frame prediction mode), but this embodiment does not limit the specific prediction mode used when determining the first prediction block and the second prediction block. For example, the first prediction block and / or the second prediction block can be predicted using a traditional intra-frame prediction mode (such as PLANAR, DC, and / or angle prediction modes). Alternatively, the first prediction block and / or the second prediction block can be predicted using a non-traditional intra-frame prediction mode. The non-traditional intra-prediction modes mentioned here can be any type of non-traditional prediction mode, such as one or more of the following: cross-component prediction mode, luminance-derived (DBV) mode, or prediction mode based on multiple intra-prediction modes (such as prediction mode that fuses multiple intra-prediction modes).

[0137] In step S1120, the intra-prediction mode of the current block is determined based on one of the prediction blocks (first and second). The intra-prediction mode of the current block is determined or derived based on the prediction blocks; therefore, in some implementations, the intra-prediction mode of the current block can be referred to as the virtual intra-prediction mode of the current block. In a specific implementation, step S1120 may include, for example, determining the gradient information (e.g., gradient histogram) of the current block based on one of the prediction blocks (first and second); then, determining the intra-prediction mode of the current block based on the gradient information (e.g., determining the intra-prediction mode with the largest magnitude in the gradient histogram as the intra-prediction mode of the current block; see the relevant description in Figure 9 for details). For example, the intra-prediction mode of the current block can be derived based on DIMD.

[0138] In step S1130, the transform kernel (or parameters for determining transform coefficients) of the current block is determined based on the intra-prediction mode of the current block. The transform kernel mentioned here can be a transform kernel for performing a single transform, a transform kernel for performing a double transform, or a transform kernel for performing both single and double transforms simultaneously. For example, the transform kernel is a transform kernel for performing the following transforms: LFNST transform or NSPT transform. In a specific implementation, step S1130 may include: determining a transform set based on the intra-prediction mode of the current block. The transform set mentioned here refers to a set of transform kernels. Taking the transform kernel used for LFNST / NSPT transform as an example, this transform set can be called the NSPT / LFNST transform set. For example, the transform set corresponding to the intra-prediction mode of the current block can be found according to the mapping relationship shown in Table 1. After determining the transform set, the transform kernel of the current block can be selected or determined from the transform set. For example, the bitstream can be decoded to determine a first index. Then, based on this first index, the transform kernel of the current block is determined from the transform set. In some implementations, this first index can be called the transform kernel index. This first index can be represented, for example, by lfnstidx. For instance, a transform set may include three transform kernels, and the first index may indicate one of these three transform kernels. Therefore, based on this first index, a transform kernel can be selected from the transform set as the transform kernel for the current block.

[0139] In step S1140, the transformation coefficients of the current block are determined based on the transformation kernel of the current block (which may include the transformation coefficients of the current block corresponding to the first chromaticity component and / or the transformation coefficients of the current block corresponding to the second chromaticity component). For example, the residual block of the current block can be determined based on the prediction block of the current block, and then the residual block of the current block can be transformed based on the transformation kernel of the current block to determine the transformation coefficients of the current block.

[0140] When deriving the intra-prediction mode of the current block, this embodiment uses a prediction block corresponding to one chroma component for derivation. Compared with the method of using prediction blocks corresponding to multiple chroma components in related technologies, this simplifies the encoding complexity.

[0141] Step S1120 in Figure 11 can be executed under certain conditions (hereinafter referred to as the first condition for ease of description). That is, if the first condition is met, the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. If the first condition is not met, step S1120 can be omitted, and the relevant technique can be used, i.e., the intra-prediction mode of the current block can be determined based on the first and second prediction blocks. The first condition can be set according to actual needs, and the content of the first condition is illustrated below.

[0142] Implementation Method 1: The first condition is related to the encoding pattern of the residual of the current block.

[0143] The first condition, related to the coding mode of the residual of the current block, can be understood as follows: when the coding mode of the residual of the current block is one or more types of coding modes, the intra-prediction mode of the current block is determined based on one of the prediction blocks from the first and second prediction blocks. For example, the first condition may include the current block using a chroma residual joint coding mode. That is, when the current block uses a chroma residual joint coding mode, the intra-prediction mode of the current block is determined based on one of the prediction blocks from the first and second prediction blocks. If the current block uses a chroma residual joint coding mode, it means that there is a certain correlation between the two chroma components of the current block. In this case, deriving the intra-prediction mode based on a single prediction block can reduce the coding complexity, and the coding performance can remain basically unchanged compared to deriving the intra-prediction mode based on multiple prediction blocks.

[0144] It should be understood that, as mentioned above (see the relevant description in Table 2 above), related technologies provide a variety of chroma residual joint coding modes. The chroma residual joint coding mode mentioned in the embodiments of this application may refer to the general term for the various chroma residual joint coding modes, or it may refer to one or more specific chroma residual joint coding modes among the various chroma residual joint coding modes.

[0145] In some implementations, a syntax element can be written into the bitstream to indicate whether the current block uses chroma residual joint coding mode. This syntax element can be, for example, an identifier. Hereinafter referred to as the first identifier, this first identifier can be represented, for example, by `tu_joint_cbcr_residual_flag`. The first identifier can include a first value and a second value. The first value can be, for example, 1 or true, and the second value can be 0 or false. If the first identifier is the first value, it can be determined that the current block uses chroma residual joint coding mode; if the first identifier is the second value, it can be determined that the current block does not use chroma residual joint coding mode.

[0146] In some implementations, second and / or third identification information can be written into the bitstream. The second identification information indicates whether the first chroma component has a residual, and the third identification information indicates whether the second chroma component has a residual. Taking the first chroma component as the Cb component and the second chroma component as the Cr component as an example, the second identification information can be represented by `tu_cb_coded_flag`, and the third identification information can be represented by `tu_cr_coded_flag`. For example, a value of 1 for the second identification information indicates that the first chroma component has a residual; a value of 0 indicates that the first chroma component has no residual. Similarly, a value of 1 for the third identification information indicates that the second chroma component has a residual; a value of 0 indicates that the second chroma component has no residual. If the values ​​of the second and third identification information are not both 0, then the first identification information is written into the bitstream.

[0147] In some implementations, when the first condition includes the current block using a chroma residual joint coding mode, the first condition can be further correlated with second and / or third identification information. Alternatively, when the first condition includes the current block using a chroma residual joint coding mode, the values ​​of the second and / or third identification information can be further considered to determine whether the intra-prediction mode of the current block should be determined based on one of the first and second prediction blocks. The second and third identification information can be found above and will not be repeated here.

[0148] For example, the first condition may include the current block using chroma residual joint coding mode, the second identifier being 1, and the third identifier being 0. That is, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 0, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0149] For example, the first condition could include the current block using chroma residual joint coding mode, the second identifier being 0, and the third identifier being 1. That is, if the current block uses chroma residual joint coding mode, the second identifier is 0, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0150] For example, the first condition could include the current block using chroma residual joint coding mode, the second identifier being 1, and the third identifier being 1. That is, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0151] The first condition may include some or all of the conditions mentioned above. For example, the first condition may include the following two conditions: the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 0; and the current block uses chroma residual joint coding mode, the second identifier is 0, and the third identifier is 1, but does not include the following condition: the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1. In this implementation, if the current block uses chroma residual joint coding mode, the second identifier is 1, and the third identifier is 1, then the intra-prediction mode of the current block can be determined based on the first prediction block and the second prediction block.

[0152] Implementation Method 2: The first condition is related to the prediction mode of the current block.

[0153] The first condition, related to the prediction mode of the current block, can be understood as follows: when the prediction mode of the current block is one or more prediction modes, the intra-prediction mode of the current block is determined based on one of the prediction blocks in the first and second prediction blocks. In some implementations, the first condition may include the prediction mode of the current block being a non-traditional intra-prediction mode. For example, the first condition may include one or more of the following: the prediction mode of the current block is a cross-component prediction mode, the prediction mode of the current block is a DBV mode, or the prediction mode of the current block is based on multiple intra-prediction modes. That is, when the prediction mode of the current block is a non-traditional intra-prediction mode such as a cross-component prediction mode or a DBV mode, the intra-prediction mode of the current block can be determined based on one of the prediction blocks in the first and second prediction blocks.

[0154] For example, if the prediction mode of the current block is cross-component prediction mode, then the intra-prediction mode of the current block is determined based on the first prediction block.

[0155] For example, if the prediction mode of the current block is cross-component prediction mode, then the intra-frame prediction mode of the current block is determined based on the second prediction block.

[0156] For example, if the prediction mode of the current block is DBV mode, then the intra-prediction mode of the current block is determined based on the first prediction block.

[0157] For example, if the prediction mode of the current block is DBV mode, then the intra-prediction mode of the current block is determined based on the second prediction block.

[0158] For example, if the current block corresponds to multiple intra-prediction modes, the intra-prediction mode of the current block is determined based on the first prediction block. For instance, the current block could correspond to multiple intra-prediction modes if it uses a mode that fuses multiple intra-prediction results (chroma fusion) for prediction.

[0159] For example, if the current block corresponds to multiple intra-prediction modes, the intra-prediction mode of the current block is determined based on the second prediction block. For instance, the current block could correspond to multiple intra-prediction modes if it uses a chroma fusion mode (where the results of multiple intra-prediction methods are fused) for prediction.

[0160] Implementation Method 3: The first condition is related to the encoding mode of the residual of the current block and the prediction mode of the current block.

[0161] Implementation method three can be understood as a combination of implementation methods one and two. For example, the first condition may include: the current block uses the chroma residual joint coding mode, and the prediction mode of the current block is one or more of the following: cross-component prediction mode, DBV mode, or fusion mode of multiple intra-frame prediction modes.

[0162] Furthermore, the first condition can be related to the second and / or third identification information. The second identification information is used to indicate whether the first chromaticity component has a residual, and the third identification information is used to indicate whether the second chromaticity component has a residual. Taking the first chromaticity component as the Cb component and the second chromaticity component as the Cr component as an example, the second identification information can be represented by tu_cb_coded_flag, and the third identification information can be represented by tu_cr_coded_flag. For example, a value of 1 for the second identification information indicates that the first chromaticity component has a residual; a value of 0 for the second identification information indicates that the first chromaticity component has no residual. Similarly, a value of 1 for the third identification information indicates that the second chromaticity component has a residual; a value of 0 for the third identification information indicates that the second chromaticity component has no residual.

[0163] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier being 1, and the third identifier being 0. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier is 1, and the third identifier is 0, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0164] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier value being 0, and the third identifier value being 1. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier value is 0, and the third identifier value is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0165] For example, the first condition may include the current block using chroma residual joint coding mode, the current block's prediction mode being cross-component prediction mode or DBV mode, the second identifier value being 1, and the third identifier value being 1. That is, if the current block uses chroma residual joint coding mode, the current block's prediction mode is cross-component prediction mode or DBV mode, the second identifier value is 1, and the third identifier value is 1, then the intra-prediction mode of the current block can be determined based on one of the first and second prediction blocks. In this case, the intra-prediction mode of the current block can be determined based on either the first or the second prediction block.

[0166] The first condition may include some or all of the conditions mentioned above. For example, the first condition may include the following two conditions: the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 0; and the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 0, and the value of the third identifier is 1, but does not include the following condition: the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 1. In this implementation, if the current block uses chroma residual joint coding mode, the prediction mode of the current block is cross-component prediction mode or DBV mode, the value of the second identifier is 1, and the value of the third identifier is 1, then the intra-frame prediction mode of the current block can be determined based on the first prediction block and the second prediction block.

[0167] The embodiments of this application are described in more detail below with specific examples. It should be noted that the examples below are merely to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific numerical values ​​or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or variations based on the given examples, and such modifications or variations also fall within the scope of the embodiments of this application.

[0168] This scheme proposes a transform kernel derivation method under chroma residual joint coding mode. This scheme uses different prediction information under different chroma residual joint coding modes and derives the VIPM (Virtual Transformer Model) based on the prediction information using the DIMD (Digital-Induced Modulation) method. Then, the transform kernel for the current block can be determined based on the derived VIPM.

[0169] Since the operations on the encoding and decoding ends are the same, the following sections will describe the process of this scheme in a unified manner.

[0170] One embodiment of this solution includes the following:

[0171] If the current block uses the cross-component prediction mode and the current block meets the usage conditions of LFNST / NSPT, then the current block determines the transform kernel derivation scheme based on the chroma residual joint coding mode.

[0172] For example, if the value of `tu_joint_cbcr_residual_flag` is 0, the transform kernel export scheme for the current block is not adjusted. In this case, the DIMD method can be used to export the VIM from the prediction block of the Cb and Cr components. Then, the NSPT / LFNST transform set used for the current block is determined according to the mapping relationship in Table 1. Finally, the transform kernel for the current block is determined according to the transform kernel index.

[0173] For example, if the value of `tu_joint_cbcr_residual_flag` is 1, the transform kernel derivation scheme is determined based on the chrominance residual joint coding mode. The chrominance residual joint coding mode can be determined based on the values ​​of `tu_cb_coded_flag` and `tu_cr_coded_flag`. If both `tu_cb_coded_flag` and `tu_cr_coded_flag` are 1, the DIMD method can be used to derive the VIM from the prediction blocks of the Cb and Cr components. Then, the NSPT / LFNST transform set used for the current block is determined according to the mapping relationship in Table 1. Finally, the transform kernel of the current block is determined based on the transform kernel index. If the value of `tu_cb_coded_flag` is 1 and the value of `tu_cr_coded_flag` is 0, a prediction block of a single Cb component is used. The VIM is derived using the DIMD method, the NSPT / LFNST transform set used for the current block is determined according to the mapping relationship in Table 1, and finally, the transform kernel of the current block is determined based on the transform kernel index. If the value of tu_cb_coded_flag is 0 and the value of tu_cr_coded_flag is 1, then a prediction block of a single Cr component can be used to derive the VIM using the DIMD method. Then, the NSPT / LFNST transform set used for the current block can be determined according to the mapping relationship in Table 1. Finally, the specific transform kernel is determined according to the transform kernel index. The general process of the scheme is shown in Figure 12.

[0174] The test results for this solution are as follows:

[0175] The test results above show that, based on this scheme, the encoding and decoding performance of the U component (corresponding to the Cb component) and the V component (corresponding to the Cr component) is significantly improved.

[0176] In summary, this scheme improves the transform kernel derivation method in cross-component prediction modes. Related techniques consistently derive the VIPM from the prediction blocks of the Cb and Cr chrominance components using the DIMD method, thereby determining the transform kernel for the current block. However, in actual encoding, there exists a chrominance residual joint coding mode. This mode only requires a set of residual coefficients, which are then converted using a certain formula to restore the residuals of the Cb and Cr chrominance components. The chrominance residual joint coding mode indicates a certain correlation between the information of the two chrominance components. To address this, this scheme proposes a transform kernel derivation method based on the chrominance residual joint coding mode. This method selects a prediction block of one chrominance component for VIPM derivation under specific conditions, thus ensuring encoding performance while reducing encoding / decoding complexity.

[0177] The method embodiments of this application have been described in detail above with reference to Figures 1 to 12. The apparatus embodiments of this application will be described in detail below with reference to Figures 13 to 16. 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 referred to the preceding method embodiments.

[0178] Figure 13 is a schematic diagram of a decoder provided in one embodiment of this application. The decoder 1300 in Figure 13 includes a first determining unit 1310, a second determining unit 1320, a third determining unit 1330, and a fourth determining unit 1340. The first determining unit 1310 is configured to determine a first prediction block and a second prediction block for the current block, wherein the first prediction block corresponds to a first chroma component, and the second prediction block corresponds to a second chroma component. The second determining unit 1320 is configured to determine the intra-prediction mode of the current block based on one of the first and second prediction blocks. The third determining unit 1330 is configured to determine the transform kernel of the current block based on the intra-prediction mode of the current block. The fourth determining unit 1340 is configured to determine the reconstructed block of the current block based on the transform kernel of the current block.

[0179] In some implementations, the second determining unit 1320 is further configured to: if a first condition is met, determine the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; wherein the first condition is related to one or more of the following: the prediction mode of the current block; the coding mode of the residual of the current block.

[0180] In some implementations, the first condition includes the current block using a chroma residual joint coding mode.

[0181] In some implementations, the decoder 1300 further includes: a fifth determining unit configured to decode the bitstream and determine first identification information, wherein the first identification information is used to indicate whether the current block uses a chroma residual joint coding mode.

[0182] In some implementations, the first condition is also associated with one or more of the following: second identification information, which indicates whether the first chromaticity component has a residual; and third identification information, which indicates whether the second chromaticity component has a residual.

[0183] In some implementations, the first condition includes one or more of the following: the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0; the current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1; the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1.

[0184] In some implementations, the second determining unit 1320 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0, then determine the intra-prediction mode of the current block based on the first prediction block.

[0185] In some implementations, the second determining unit 1320 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1, then determine the intra-prediction mode of the current block based on the second prediction block.

[0186] In some implementations, the decoder 1300 further includes a sixth determining unit, configured to determine the intra-prediction mode of the current block based on the first prediction block and the second prediction block if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1.

[0187] In some implementations, the second determining unit 1320 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then determine the intra-prediction mode of the current block based on the first prediction block or the second prediction block.

[0188] In some implementations, the fifth determining unit is further configured to: decode the bitstream and determine the first identifying information if the values ​​of the second identification information and the third identification information are not all 0; wherein the second identification information is used to indicate whether the first chromaticity component has a residual, and the third identification information is used to indicate whether the second chromaticity component has a residual.

[0189] In some implementations, the first condition includes one or more of the following: the prediction mode of the current block is a cross-component prediction mode; the prediction mode of the current block is a DBV mode; the current block corresponds to multiple intra-frame prediction modes.

[0190] In some implementations, the third determining unit 1330 is further configured to: determine a transform set based on the intra-prediction mode of the current block; and determine the transform kernel of the current block from the transform set based on the first index.

[0191] In some implementations, the decoder 1300 further includes: a seventh determining unit, which decodes the bitstream and determines the first index.

[0192] In some implementations, the second determining unit 1320 is further configured to: determine the gradient information of the current block based on one of the first prediction block and the second prediction block; and determine the intra-frame prediction mode of the current block based on the gradient information of the current block.

[0193] In some implementations, the transform kernel is used to perform a single transform, LFNST or NSPT.

[0194] In some implementations, the fourth determining unit 1340 is further configured to: determine the reconstructed block of the current block corresponding to the first chromaticity component based on the transform kernel of the current block; and / or, determine the reconstructed block of the current block corresponding to the second chromaticity component based on the transform kernel of the current block.

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

[0196] 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.

[0197] Therefore, embodiments of this application provide a computer-readable storage medium for use with a decoder, wherein the computer-readable storage medium stores a computer program that, when executed by a processor, implements the decoding method described in the first embodiment.

[0198] Based on the composition of the decoder 1300 described above and the computer-readable storage medium, refer to Figure 14, which shows a schematic diagram of the specific hardware structure of the decoder 1400 provided in this embodiment of the application. As shown in Figure 14, the decoder 1400 may include: a communication interface 1410, a memory 1420, and a processor 1430; the various components are coupled together through a bus system 1440. It is understood that the bus system 1440 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 1440 in Figure 14.

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

[0200] Memory 1420 is used to store computer programs;

[0201] Processor 1430, when running the computer program, performs the following:

[0202] Determine the first prediction block and the second prediction block of the current block, where the first prediction block corresponds to the first chromaticity component and the second prediction block corresponds to the second chromaticity component;

[0203] The intra-prediction mode of the current block is determined based on one of the first prediction block and the second prediction block;

[0204] The transform kernel of the current block is determined based on the intra-prediction mode of the current block;

[0205] The reconstruction block of the current block is determined based on the transformation kernel of the current block.

[0206] It is understood that the memory 1420 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1420 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.

[0207] The processor 1430 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 1430 or by instructions in software form. The processor 1430 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1420. Processor 1430 reads the information in memory 1420 and completes the steps of the above method in conjunction with its hardware.

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

[0209] Alternatively, as another embodiment, the processor 1430 is also configured to execute the decoding method described in the foregoing embodiments when running the computer program.

[0210] Figure 15 is a schematic diagram of an encoder provided in one embodiment of this application. The encoder 1500 in Figure 15 includes a first determining unit 1510, a second determining unit 1520, a third determining unit 1530, and a fourth determining unit 1540. The first determining unit 1510 is configured to determine a first prediction block and a second prediction block for the current block, wherein the first prediction block corresponds to a first chroma component and the second prediction block corresponds to a second chroma component. The second determining unit 1520 is configured to determine an intra-prediction mode for the current block based on one of the first and second prediction blocks. The third determining unit 1530 is configured to determine a transform kernel for the current block based on the intra-prediction mode of the current block. The fourth determining unit 1540 is configured to determine the transform coefficients for the current block based on the transform kernel of the current block.

[0211] In some implementations, the second determining unit 1520 is further configured to: if a first condition is met, determine the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block; wherein the first condition is related to one or more of the following: the prediction mode of the current block; the coding mode of the residual of the current block.

[0212] In some implementations, the first condition includes the current block using a chroma residual joint coding mode.

[0213] In some implementations, the decoder 1500 includes: a first writing unit configured to write first identification information into the bitstream, the first identification information being used to indicate whether the current block uses a chroma residual joint coding mode.

[0214] In some implementations, the first condition is also associated with one or more of the following: second identification information, which indicates whether the first chromaticity component has a residual; and third identification information, which indicates whether the second chromaticity component has a residual.

[0215] In some implementations, the first condition includes one or more of the following: the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0; the current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1; the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1.

[0216] In some implementations, the second determining unit 1520 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0, then determine the intra-prediction mode of the current block based on the first prediction block.

[0217] In some implementations, the second determining unit 1520 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1, then determine the intra-prediction mode of the current block based on the second prediction block.

[0218] In some implementations, the decoder 1500 includes a fifth determining unit configured to determine the intra-prediction mode of the current block based on the first prediction block and the second prediction block if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1.

[0219] In some implementations, the second determining unit 1520 is further configured to: if the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then determine the intra-prediction mode of the current block based on the first prediction block or the second prediction block.

[0220] In some implementations, the first writing unit is further configured to: write the first identification information into the bitstream if the values ​​of the second identification information and the third identification information are not all 0; wherein the second identification information is used to indicate whether the first chroma component has a residual, and the third identification information is used to indicate whether the second chroma component has a residual.

[0221] In some implementations, the first condition includes one or more of the following: the prediction mode of the current block is a cross-component prediction mode; the prediction mode of the current block is a DBV mode; the current block corresponds to multiple intra-frame prediction modes.

[0222] In some implementations, the third determining unit 1530 is further configured to: determine a transform set based on the intra-prediction mode of the current block; and determine the transform kernel of the current block from the transform set based on the rate-distortion cost of the transform kernels in the transform set.

[0223] In some implementations, the decoder 1500 includes a second writing unit configured to write a first index into the bitstream, the first index being used to indicate the transform kernel of the current block.

[0224] In some implementations, the second determining unit 1520 is further configured to: determine the gradient information of the current block based on one of the first prediction block and the second prediction block; and determine the intra-frame prediction mode of the current block based on the gradient information of the current block.

[0225] In some implementations, the transform kernel is used to perform a single transform, LFNST or NSPT.

[0226] In some implementations, the fourth determining unit 1540 is further configured to: determine the transformation coefficients of the current block corresponding to the first chromaticity component based on the transformation kernel of the current block; and / or, determine the transformation coefficients of the current block corresponding to the second chromaticity component based on the transformation kernel of the current block.

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

[0228] 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.

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

[0230] [Correction 15.01.2025 based on Rule 91] Based on the composition of the encoder 1500 described above and the computer-readable storage medium, refer to Figure 16, which shows a schematic diagram of the specific hardware structure of the encoder 1600 provided in this application embodiment. As shown in Figure 16, the encoder 1600 may include: a communication interface 1610, a memory 1620, and a processor 1630; the various components are coupled together through a bus system 1640. It is understood that the bus system 1640 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1640 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 1640 in Figure 16.

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

[0232] Memory 1620 is used to store computer programs;

[0233] Processor 1630, when running the computer program, performs the following:

[0234] Determine the first prediction block and the second prediction block of the current block, where the first prediction block corresponds to the first chromaticity component and the second prediction block corresponds to the second chromaticity component;

[0235] The intra-prediction mode of the current block is determined based on one of the first prediction block and the second prediction block;

[0236] The transform kernel of the current block is determined based on the intra-prediction mode of the current block;

[0237] The transformation coefficients of the current block are determined based on the transformation kernel of the current block.

[0238] It is understood that the memory 1620 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1620 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.

[0239] The processor 1630 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 1630 or by instructions in software form. The processor 1630 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can be located 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 1620. Processor 1630 reads the information in memory 1620 and completes the steps of the above method in conjunction with its hardware.

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

[0241] Alternatively, as another embodiment, the processor 1630 is also configured to execute the encoding method in the foregoing embodiments when running the computer program.

[0242] 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.

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

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

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

[0246] 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.

[0247] 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, applied to a decoder, comprising: Determine the first prediction block and the second prediction block of the current block, where the first prediction block corresponds to the first chromaticity component and the second prediction block corresponds to the second chromaticity component; The intra-prediction mode of the current block is determined based on one of the first prediction block and the second prediction block; The transform kernel of the current block is determined based on the intra-prediction mode of the current block; The reconstruction block of the current block is determined based on the transformation kernel of the current block.

2. The method according to claim 1, wherein, Determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: If the first condition is met, the intra-prediction mode of the current block is determined based on one of the prediction blocks in the first prediction block and the second prediction block. The first condition is related to one or more of the following: The prediction mode of the current block; The encoding pattern of the residual of the current block.

3. The method according to claim 2, wherein, The first condition includes the current block using a chroma residual joint coding mode.

4. The method according to claim 3, wherein, The method further includes: Decode the bitstream and determine the first identification information, which is used to indicate whether the current block uses the chroma residual joint coding mode.

5. The method according to claim 3 or 4, wherein, The first condition is also related to one or more of the following: The second identification information is used to indicate whether the first chromaticity component has a residual; The third identification information is used to indicate whether the second chromaticity component has a residual.

6. The method according to claim 5, wherein, The first condition includes one or more of the following: The current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0; The current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1; The current block uses a chroma residual joint coding mode, the second identification information is 1, and the third identification information is 1.

7. The method according to claim 6, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0, then the intra-prediction mode of the current block is determined according to the first prediction block.

8. The method according to claim 6 or 7, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined according to the second prediction block.

9. The method according to claim 7 or 8, wherein, The method further includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined based on the first prediction block and the second prediction block.

10. The method according to any one of claims 6 to 8, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: If the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined according to the first prediction block or the second prediction block.

11. The method according to claim 4, wherein, The decoded bitstream determines the first identifier information, including: If the values ​​of the second and third identification information are not all 0, then decode the bitstream and determine the first identification information; The second identification information is used to indicate whether the first chromaticity component has a residual, and the third identification information is used to indicate whether the second chromaticity component has a residual.

12. The method according to any one of claims 2 to 11, wherein, The first condition includes one or more of the following: The prediction mode for the current block is a cross-component prediction mode; The prediction mode for the current block is DBV mode; The current block corresponds to multiple intra-frame prediction modes.

13. The method according to any one of claims 1 to 12, wherein, Determining the transform kernel of the current block based on the intra-prediction mode of the current block includes: The transform set is determined based on the intra-prediction mode of the current block; The transform kernel of the current block is determined from the transform set according to the first index.

14. The method according to claim 13, wherein, The method further includes: Decode the bitstream and determine the first index.

15. The method according to any one of claims 1 to 14, wherein, Determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: The gradient information of the current block is determined based on one of the first prediction block and the second prediction block; The intra-prediction mode of the current block is determined based on the gradient information of the current block.

16. The method according to any one of claims 1 to 15, wherein, The transform kernel is used to perform a transform, LFNST or NSPT.

17. The method according to any one of claims 1 to 16, wherein, The step of determining the reconstructed block of the current block based on the transform kernel of the current block includes: Determine the reconstructed block corresponding to the first chromaticity component of the current block based on the transform kernel of the current block; and / or, The reconstructed block corresponding to the second chromaticity component of the current block is determined based on the transform kernel of the current block.

18. An encoding method applied to an encoder, comprising: Determine the first prediction block and the second prediction block of the current block, where the first prediction block corresponds to the first chromaticity component and the second prediction block corresponds to the second chromaticity component; The intra-prediction mode of the current block is determined based on one of the first prediction block and the second prediction block; The transform kernel of the current block is determined based on the intra-prediction mode of the current block; The transformation coefficients of the current block are determined based on the transformation kernel of the current block.

19. The method according to claim 18, wherein, Determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: If the first condition is met, the intra-prediction mode of the current block is determined based on one of the first prediction block and the second prediction block. The first condition is related to one or more of the following: The prediction mode of the current block; The encoding pattern of the residual of the current block.

20. The method according to claim 19, wherein, The first condition includes the current block using a chroma residual joint coding mode.

21. The method according to claim 20, wherein, The method further includes: Write the first identification information into the bitstream. The first identification information is used to indicate whether the current block uses the chroma residual joint coding mode.

22. The method according to claim 20 or 21, wherein, The first condition is also related to one or more of the following: The second identification information is used to indicate whether the first chromaticity component has a residual; The third identification information is used to indicate whether the second chromaticity component has a residual.

23. The method according to claim 22, wherein, The first condition includes one or more of the following: The current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0; The current block uses a chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1; The current block uses a chroma residual joint coding mode, the second identification information is 1, and the third identification information is 1.

24. The method according to claim 23, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first and second prediction blocks includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 0, then the intra-prediction mode of the current block is determined according to the first prediction block.

25. The method according to claim 23 or 24, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first and second prediction blocks includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 0, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined according to the second prediction block.

26. The method according to claim 24 or 25, wherein, The method further includes: If the current block uses the chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined based on the first prediction block and the second prediction block.

27. The method according to any one of claims 23 to 25, wherein, If the first condition is met, determining the intra-prediction mode of the current block based on one of the first and second prediction blocks includes: If the current block uses a chroma residual joint coding mode, the value of the second identification information is 1, and the value of the third identification information is 1, then the intra-prediction mode of the current block is determined according to the first prediction block or the second prediction block.

28. The method according to claim 21, wherein, The step of writing the first identifier information into the bitstream includes: If the values ​​of the second and third identification information are not all 0, then the first identification information is written into the bitstream; The second identification information is used to indicate whether the first chromaticity component has a residual, and the third identification information is used to indicate whether the second chromaticity component has a residual.

29. The method according to any one of claims 19 to 28, wherein, The first condition includes one or more of the following: The prediction mode for the current block is a cross-component prediction mode; The prediction mode for the current block is DBV mode; The current block corresponds to multiple intra-frame prediction modes.

30. The method according to any one of claims 18 to 29, wherein, Determining the transform kernel of the current block based on the intra-prediction mode of the current block includes: The transform set is determined based on the intra-prediction mode of the current block; The transform kernel of the current block is determined from the transform set based on the rate-distortion cost of the transform kernels in the transform set.

31. The method according to claim 30, wherein, The method further includes: Write the first index into the bitstream. The first index is used to indicate the transform kernel of the current block.

32. The method according to any one of claims 18 to 31, wherein, Determining the intra-prediction mode of the current block based on one of the first prediction block and the second prediction block includes: The gradient information of the current block is determined based on one of the first prediction block and the second prediction block; The intra-prediction mode of the current block is determined based on the gradient information of the current block.

33. The method according to any one of claims 18 to 32, wherein, The transform kernel is used to perform a transform, LFNST or NSPT.

34. The method according to any one of claims 18 to 33, wherein, Determining the transform coefficients of the current block based on the transform kernel of the current block includes: The transformation coefficients corresponding to the first chromaticity component of the current block are determined based on the transformation kernel of the current block; and / or, The transformation coefficients of the current block corresponding to the second chromaticity component are determined based on the transformation kernel of the current block.

35. A decoder, comprising: The first determining unit is configured to determine a first prediction block and a second prediction block for the current block, wherein the first prediction block corresponds to a first chromaticity component and the second prediction block corresponds to a second chromaticity component; The second determining unit is configured to determine the intra-frame prediction mode of the current block based on one of the first prediction block and the second prediction block; The third determining unit is configured to determine the transform kernel of the current block based on the intra-frame prediction mode of the current block; The fourth determining unit is configured to determine the reconstruction block of the current block based on the transformation kernel of the current block.

36. A decoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 1 to 17 when running the computer program.

37. An encoder, comprising: The first determining unit is configured to determine a first prediction block and a second prediction block for the current block, wherein the first prediction block corresponds to a first chromaticity component and the second prediction block corresponds to a second chromaticity component; The second determining unit is configured to determine the intra-frame prediction mode of the current block based on one of the first prediction block and the second prediction block. The third determining unit is configured to determine the transform kernel of the current block based on the intra-frame prediction mode of the current block; The fourth determining unit is configured to determine the transformation coefficients of the current block based on the transformation kernel of the current block.

38. An encoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 18 to 34 when running the computer program.

39. A non-volatile computer-readable storage medium for storing a bitstream, said bitstream being generated by an encoding method using an encoder, or said bitstream being decoded by a decoding method using a decoder, wherein, The decoding method is the method as described in any one of claims 1 to 17, and the encoding method is the method as described in any one of claims 18 to 34.

40. A bitstream comprising a bitstream generated by the method of any one of claims 18 to 34.

41. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 17, or the method as described in any one of claims 18 to 34.