Encoding and decoding methods and apparatus therefor, encoders, decoders, bitstreams, devices, and storage media

By arranging inter-component prediction models by prediction error and selecting those with lower errors for intra-prediction, the method effectively minimizes bitstream overhead and bandwidth in digital video transmission, addressing the inefficiencies of existing compression technologies.

JP2026513977APending Publication Date: 2026-05-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-04-13
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing digital video compression technologies struggle to effectively reduce bandwidth and traffic load due to high bitstream overhead, particularly in high-resolution video transmissions.

Method used

The encoding and decoding methods arrange candidate inter-component prediction models in ascending order of prediction error, selecting models with lower errors for intra-prediction to minimize bitstream overhead, thereby reducing bandwidth and traffic load.

Benefits of technology

This approach significantly reduces bitstream overhead and associated bandwidth and traffic load by favoring candidate models with lower prediction errors, enhancing video transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026513977000001_ABST
    Figure 2026513977000001_ABST
Patent Text Reader

Abstract

Embodiments of this application disclose an encoding / decoding method and apparatus therefor, an encoder, a decoder, a bitstream, a device, and a storage medium, wherein the encoding method comprises determining a first candidate list, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors in the model group in which the candidate component prediction model resides; selecting a first component prediction model for a first color component from the first candidate list; performing an intra-prediction on the first color component of the current block based on the first component prediction model and the reconstructed value of the second color component of the current block to obtain a first intra-prediction value; determining a first residual value of the first color component of the current block based on the first intra-prediction value and the sample value of the first color component of the current block; and generating a bitstream based on the first residual value of the current block and the index value of the first component prediction model in the first candidate list.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The embodiments of this application relate to video image technology, and more particularly to encoding and decoding methods and apparatus therefor, encoders, decoders, bitstreams, devices, and storage media, but are not limited thereto. [Background technology]

[0002] Digital video compression technology primarily aims to compress vast amounts of digital video data to facilitate transmission and storage. With the rapid increase in internet video and people's growing demands for higher video resolution, while existing digital video compression standards can save a significant amount of video data, there is still a need for better digital video compression technologies to reduce the bandwidth and traffic load on digital video transmissions. [Overview of the Initiative]

[0003] In view of this, the encoding / decoding method and apparatus, encoder, decoder, bitstream, device, and storage medium provided in the embodiments of this application can save bitstream overhead of the index values ​​of the selected inter-component prediction model, thereby reducing the bandwidth and traffic load of digital video transmission. The encoding / decoding method and apparatus, encoder, decoder, bitstream, device, and storage medium provided in the embodiments of this application are implemented as follows.

[0004] According to one embodiment of the present application, an encoding method is provided which an encoder performs, the method comprising: determining a first candidate list, wherein the candidate inter-component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors in the model group in which the candidate inter-component prediction model resides; selecting a first inter-component prediction model for a first color component from the first candidate list; performing an intra-prediction on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block to obtain a first intra-prediction value; determining a first residual value of the first color component of the current block based on the first intra-prediction value and the sample value of the first color component of the current block; and generating a bitstream based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0005] According to one embodiment of the present application, a decoding method is provided which a decoder performs, the method comprising: analyzing a bitstream to obtain a first residual value of a first color component of the current block and an index value of a first inter-component prediction model in a first candidate list; determining the first candidate list, wherein the candidate inter-component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors in the model group in which the candidate inter-component prediction model resides; determining the first inter-component prediction model based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list; performing an intra-prediction on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block to obtain a first intra-prediction value; and determining the reconstructed value of the first color component of the current block based on the first intra-prediction value and the first residual value.

[0006] According to one embodiment of the present application, an encoding device is provided that can be applied to an encoder, the device comprising: a first decision module configured to determine a first candidate list, wherein the candidate inter-component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors in the model group in which the candidate inter-component prediction model resides; a selection module configured to select a first inter-component prediction model for a first color component from the first candidate list; a first prediction module configured to perform an intra-prediction on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, and to obtain a first intra-prediction value; a second decision module configured to determine a first residual value of the first color component of the current block based on the first intra-prediction value and the sample value of the first color component of the current block; and an encoding module configured to generate a bitstream based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0007] According to one embodiment of the present application, an encoder is provided comprising a first memory and a first processor, wherein the first memory is configured to store a computer program executable by the first processor, and the first processor is configured to execute the encoding method described in the embodiment of the present application when executing the computer program.

[0008] According to one embodiment of the present application, a bitstream obtained by employing the encoding method described in the embodiment of the present application is provided.

[0009] According to one embodiment of the present application, a decoding device is provided to be applied to a decoder, the device comprising: a decoding module configured to analyze a bitstream and obtain a first residual value of the first color component of the current block and an index value of a first inter-component prediction model in a first candidate list; a third determination module configured to determine the first candidate list, wherein the candidate inter-component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors in the model group in which the candidate inter-component prediction model resides; a fourth determination module configured to determine the first inter-component prediction model based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list; a second prediction module configured to perform an intra-prediction on the first color component of the current block and obtain a first intra-prediction value based on the first inter-component prediction model and the reconstructed value of the second color component of the current block; and a fifth determination module configured to determine the reconstructed value of the first color component of the current block based on the first intra-prediction value and the first residual value.

[0010] According to one embodiment of the present application, a decoder is provided comprising a second memory and a second processor, wherein the second memory is configured to store a computer program executable by the second processor, and the second processor is configured to execute the decoding method described in the embodiment of the present application when executing the computer program.

[0011] According to one embodiment of the present application, an electronic device is provided, the electronic device comprising: a processor configured to execute a computer program; and a computer-readable storage medium storing a computer program that, when executed by the processor, implements the encoding method described in the embodiment of the present application, or implements the decoding method described in the embodiment of the present application.

[0012] According to one embodiment of the present application, a computer-readable storage medium is provided which stores a computer program for implementing the encoding method or decoding method described in the embodiment of the present application when executed.

[0013] In the embodiment of this application, the candidate inter-component prediction modes recorded in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors within the model group in which the candidate inter-component prediction model resides. Thus, since candidate inter-component prediction models with smaller prediction errors are more likely to be selected for intra-prediction, placing candidate inter-component prediction models with smaller prediction errors before candidate inter-component prediction models with larger prediction errors is beneficial in saving bitstream overhead of the index values ​​of the selected candidate inter-component prediction model (i.e., the first inter-component prediction model), thereby reducing the bandwidth and traffic load of digital video transmission. [Brief explanation of the drawing]

[0014] [Figure 1] This is a schematic diagram of a basic video codec flowchart. [Figure 2] This is a schematic diagram of the implementation process of the encoding method according to the embodiment of this application. [Figure 3] This is a schematic diagram of a 5-tap cross-shaped filter according to an embodiment of this application. [Figure 4] This is a schematic diagram showing the reconstruction region for deriving the filter coefficient according to the embodiment of this application. [Figure 5] This is a schematic diagram of the implementation process of the encoding method according to the embodiment of this application. [Figure 6] This is a schematic diagram showing the adjacent positions of the current blocks according to the embodiment of this application. [Figure 7] This is a schematic diagram illustrating the implementation process of the method for determining the first candidate list according to the embodiment of this application. [Figure 8] This is a schematic diagram of the implementation process of the decoding method according to the embodiment of this application. [Figure 9]This is a schematic diagram of the implementation process of the decoding method according to an embodiment of the present application. [Figure 10A] This is a schematic diagram showing the positions of luminance and chrominance reconstruction samples for deriving α and β according to an embodiment of the present application. [Figure 10B] This is a schematic diagram for constructing a linear relationship between luminance samples (Y) and chrominance samples (C). [Figure 10C] This is a schematic diagram for dividing samples into two groups based on a threshold value and deriving linear models for the two groups. [Figure 11] This is a schematic diagram of four Sobel operators used by the GLM to obtain gradients according to an embodiment of the present application. [Figure 12] This is a schematic diagram of templates for the Cb component and Cr component used for resorting according to an embodiment of the present application. [Figure 13] This is an exemplary structural diagram of an encoding device according to an embodiment of the present application. [Figure 14] This is an exemplary structural diagram of a decoding device according to an embodiment of the present application. [Figure 15] This is an exemplary structural diagram of an encoder according to an embodiment of the present application. [Figure 16] This is an exemplary structural diagram of a decoder according to an embodiment of the present application.

Embodiments for Implementing the Invention

[0015] The drawings here are incorporated into the specification and form a part of the specification. These drawings show embodiments that conform to the embodiments of the present application and are used together with the specification to explain the technical solutions of the present application. Obviously, the drawings described above are only some embodiments of the present application, and it should be understood that those skilled in the art can obtain other drawings based on these drawings without creative efforts.

[0016] The flowchart shown in the diagram is merely an illustrative explanation and does not necessarily have to include all content and actions / steps, nor does it necessarily have to be executed in the order described. For example, some actions / steps can be further broken down, some actions / steps can be combined, or partially combined, so the actual execution order may change depending on the actual situation.

[0017] To further clarify the purpose, technical solutions, and advantages of the embodiments of this application, the specific technical solutions of this application will be described in more detail below with reference to the drawings of the embodiments. The following embodiments are used to illustrate this application but are not intended to limit the scope of this application.

[0018] Unless otherwise specified, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art. The terms used herein are for illustrative purposes only and are not intended to limit this application.

[0019] In the following description, when we refer to "several embodiments," "this embodiment," "embodiments of this application," and examples, we are describing a subset of all possible embodiments. However, it should be understood that "several embodiments" may be the same or different subsets of all possible embodiments, and these can be combined with each other without conflict.

[0020] The terms "first," "second," "third," etc., appearing in the embodiments of this application are merely for distinguishing similar objects and do not indicate any order, nor do they specifically limit the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application.

[0021] The term "current block" as used in the embodiments of this application can be understood as the "current coding / decoding unit (CU)" or the "current prediction unit (PU)," etc.

[0022] The term "pixel" as used in the embodiments of this application can be understood as "sample".

[0023] The encoding / decoding architectures and business scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will see that, as encoding / decoding architectures evolve and new business scenarios emerge, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.

[0024] Video compression involves intra-prediction (i.e., spatial domain compression) and / or inter-prediction (i.e., temporal domain compression) to reduce or eliminate redundancy inherent in video, and includes multiple modules such as transformation, quantization, and dequantization of residual information, as well as inverse transformation, loop filtering to improve subjective and objective reconstruction quality, and entropy coding. Most mainstream video compression standards are block-based compression techniques. A video slice, a frame of image, or a series of images is divided into coding tree units (CTUs), which are further divided into blocks of coding units (CUs). Intra-blocks perform predictions by referencing pixels / samples around the block, while inter-blocks perform predictions by referencing spatially adjacent block information and reference information from other frames. In contrast to the prediction information, the residual information is transformed, quantized, and entropy coded on a block-by-block basis to form a bitstream. These techniques are documented in standards and implemented in various fields related to video compression.

[0025] Figure 1 shows a basic flowchart of the video codec. On the encoding side, one frame of image 101 is divided into blocks, intra-prediction or inter-prediction is performed on the current block to generate a predicted block of the current block, the predicted block is subtracted from the original block of the current block to obtain a residual block, transformation and quantization are performed on the residual block to obtain a quantization coefficient matrix, entropy coding is performed on the quantization coefficient matrix to generate a bitstream. On the decoding side (not shown), intra-prediction or inter-prediction is performed on the current block to generate a predicted block of the current block, while the bitstream is analyzed to obtain a quantization coefficient matrix, inverse quantization and inverse transformation are performed on the quantization coefficient matrix to obtain a residual block, and the predicted block and residual block are added to obtain a reconstructed block. The reconstructed block constitutes a reconstructed image, and loop filtering is performed on the reconstructed image based on the image or block to obtain a decoded image. The encoding side also performs the same operations as the decoding side to obtain a decoded image. The decoded image obtained on the encoding side can be used as a reference image for inter-prediction of subsequent frames. If necessary, the encoding side must output mode information or parameter information, such as block partitioning information, prediction, transformation, quantization, entropy coding, and loop filtering, to the bitstream. The decoding side determines the same block partitioning information, prediction, transformation, quantization, entropy coding, and loop filtering mode information or parameter information as the encoding side through analysis and analysis based on existing information, thereby ensuring that the decoded image obtained by the encoding side is the same as the decoded image obtained by the decoding side. The decoded image obtained by the encoding side is usually also called the reconstructed image. During prediction, the current block can be divided into prediction units, and during transformation, the current block can be divided into transformation units, and the division of the prediction units and transformation units may be different.

[0026] The above describes the basic process of a video codec in a block-based hybrid coding framework. As technology advances, some modules or steps of the framework or process may be optimized. The encoding and decoding methods provided in the embodiments of this application are applicable to, but not limited to, the basic process of a video codec in a block-based hybrid coding framework. Those skilled in the art will see that, with the evolution of encoders and decoders and the emergence of new business scenarios, the methods provided in the embodiments of this application are equally applicable to similar technical problems.

[0027] It is understood that there is a strong spatial correlation between adjacent parts or adjacent pixels / samples within an image, and intra-prediction is a method of predicting the current block by referencing reconstructed pixels / samples around the current block. To eliminate redundancy between different color channels, intra-prediction modes between components have been proposed. For example, predicting the chromaticity component of the current block using a reconstructed luminance block, and during prediction, it is necessary to construct a linear or nonlinear relationship between luminance and chromaticity based on the reconstructed values ​​of the luminance and chromaticity components.

[0028] An embodiment of this application provides an encoding method performed by an encoder, and Figure 2 is a schematic diagram of the implementation process of the encoding method according to an embodiment of this application, and as shown in Figure 2, the method includes the following steps 201 to 205.

[0029] In step 201, a first candidate list is determined, and the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located.

[0030] It can be understood that in the first candidate list, one index value can correspond to one candidate component prediction model in the first candidate list. In some other embodiments, in the first candidate list, one index value can correspond to one group of candidate component prediction models in the first candidate list, the first candidate list includes N groups of candidate component prediction models, each group of candidate component prediction models includes a candidate component prediction model for the first color component and a candidate component prediction model for the third color component, where N is 1 or greater. In some embodiments, N is a fixed value, for example, N=6.

[0031] For example, in some embodiments, both the first and third color components are chromaticity components. For instance, the first color component is the blue (Cb) chromaticity component and the third color component is the red (Cr) chromaticity component; in another example, the first color component is the red (Cr) chromaticity component and the third color component is the blue (Cb) chromaticity component.

[0032] In the embodiments of this application, it is not limited whether the candidate component prediction models for each color component in the first candidate list are sorted individually or in groups.

[0033] In some embodiments, the candidate component prediction models for the first color component in the first candidate list are arranged in ascending order of their prediction errors, and / or the candidate component prediction models for the third color component in the first candidate list are arranged in ascending order of their prediction errors. That is, the candidate component prediction models for the first color component and the candidate component prediction models for the third color component are sorted individually in the first candidate list.

[0034] In some other embodiments, the candidate inter-component prediction model groups in the first candidate list are arranged in ascending order of the sum of the prediction errors of the first color component inter-component prediction model and the third color component inter-component prediction model in the candidate inter-component prediction model group. Understandably, one group of candidate inter-component prediction models includes a candidate inter-component prediction model for the first color component and a candidate inter-component prediction model for the third color component, and in the first candidate list, the candidate inter-component prediction models are arranged sequentially in groups. One group of candidate inter-component prediction models inherits the inter-component prediction models used for intra-prediction of different color components of the same reconstruction block.

[0035] It can be understood that the prediction error of the candidate component prediction model refers to the error the candidate component prediction model makes when performing intra-prediction in the template region of the current block, and the template region may be a reconstructed region. Specifically, refer to the explanation of step 502 in the following example.

[0036] In step 202, a first component-to-component prediction model for the first color component is selected from the first candidate list.

[0037] In the embodiments of this application, there is no limitation on how the encoder selects the first inter-component prediction model; in short, it is sufficient that it can encode a valid bitstream that conforms to the specifications. In some embodiments, the candidate inter-component prediction model with the minimum rate distortion cost can be selected as the first inter-component prediction model from a first candidate list based on rate distortion optimization.

[0038] In step 203, an intra-prediction is performed on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, and a first intra-predicted value is obtained.

[0039] For example, in some embodiments, the second color component is the luminance component, and the first color component is the chromaticity component.

[0040] One thing that can be understood is that different types of first-component prediction models may also require different methods for calculating the first intra-predicted values.

[0041] For example, if the first component prediction model is a CCLM model, the formula for that model is as shown in equation (1) below.

[0042] Nod c (i,j) = α × rec L ′(i,j)+β (1) In equation (1), pred c (i,j) represents the first intra-predicted value of the chromaticity component whose current coordinate position within the block is (i,j), and rec L ′(i,j) represents the reconstructed value of the luminance component whose current coordinate position within the block is (i,j). This reconstructed value of the luminance component is obtained by downsampling the reconstructed values ​​of the luminance components of at least two samples, and α and β are the parameters of the model, i.e., linear parameters.

[0043] In some embodiments, α and β can be determined based on the reconstructed values ​​of the chromaticity components of adjacent and / or non-adjacent regions of the current block, and the reconstructed values ​​of the luminance components of the corresponding regions.

[0044] In ECM, α and β are derived using the least squares method, and the calculation formulas are as shown in equations (2) and (3) below.

[0045]

number

[0046] In equations (2) and (3), I represents the number of reconstituted samples, and Rec c (i) represents the reconstructed value of the chromaticity component of the i-th sample, Rec L '(i) represents the reconstructed value of the luminance component of the i-th sample.

[0047] In another example, if the first component prediction model is an MMLM model, it is similar to the CCLM model, but differs in that it allows for the derivation of two CCLM models for a single current block. Which of the two CCLM models a pending prediction sample of the current block adopts is controlled by a first threshold, which can be determined based on the reconstructed values ​​of the luminance components of the adjacent and / or non-adjacent regions of the current block. For example, the first threshold is equal to the mean of the reconstructed values ​​of the luminance components of the adjacent and / or non-adjacent regions of the current block. The formula for the MMLM model is shown in equation (4) below.

[0048]

number

[0049] In the MMLM model's prediction, Rec' LIf (i,j) is less than or equal to the first threshold, Pred in the prediction of the current sample (i,j) is c (i,j) = α1 × Rec′ L (i,j) + β1 is used, and Rec′ L If (i,j) is greater than the first threshold, Pred in the prediction of the current sample (i,j) is c (i,j) = α2 × Rec′ L (i,j) + β2 is used.

[0050] In yet another example, when the first component - to - component prediction model is the CCCM model, its model parameters are not the simple α and β, but a group of filter parameters. The filter parameters of the CCCM model are a 7 - tap filter, which is composed of one 5 - tap cross - shaped filter, one non - linear term, and one offset term. Here, as shown in Figure 3, the input of the 5 - tap cross - shaped filter consists of the luminance sample at the center (C:Center) (the down - sampled luminance sample at the position corresponding to the current chrominance prediction position), the luminance sample above (N:Above / North), the luminance sample below (S:Below / South), the luminance sample on the left (W:Left / West), and the luminance sample on the right (E:Right / East).

[0051] As shown in the following formula (5), the non - linear term P is determined by the luminance input sample C at the central position and the bit - depth bitDepth of the chrominance component of the current block.

[0052]

Equation

[0053] The offset term B is set to (1 << (bitDepth - 1)) in CCCM. For example, for the content where the bit - depth of the chrominance component of the current block is 10 bit, B = 512.

[0054] As shown in equation (6) below, the first intra-predicted value predChromaVal based on CCCM can be determined based on the self-adaptively acquired 7-tap filter coefficients {c0,…,c6} and the luminance reconstruction value of the input sample.

[0055] predChromaVal=c0C+c1N+c2S+c3E+c4W+c5P+c6B (6) The method for obtaining filter coefficients is explained below.

[0056] The filter coefficient is obtained by minimizing the mean squared error between the predicted chromaticity value and the reconstructed chromaticity value for the entire reconstruction region. As shown in Figure 4, the reconstruction region of the chromatic component of the current block consists of 6 rows and 6 columns of reconstructed chromaticity values ​​around the current block, and if there are positions in the reconstruction region that are not yet reconstructed, the values ​​at those positions are filled with reconstructed chromaticity values.

[0057] The calculation process for minimizing the mean squared error is as follows:

[0058] 1. Obtain the autocorrelation matrix of the input luminance samples and the cross-correlation vector between the input luminance samples and the output chromaticity samples.

[0059] 2. The autocorrelation matrix is ​​decomposed using LDL, and the final filter coefficients are obtained by finding the solution using backward substitution.

[0060] In calculating the autocorrelation matrix, the numerical values ​​of the input luminance samples used are relatively large, requiring high precision when calculating the convolutional filter coefficients. Therefore, CCCM requires subtracting corresponding offset values ​​offsetLuma, offsetCb, and offsetCr from both the input luminance samples and the output chromaticity samples. Currently, the luminance reconstruction value and chromaticity prediction value from the upper left outer part of the block are used as offsets, resulting in the following input to CCCM:

[0061] C' = C - offsetLuma N' = N-offsetLuma S' = S - offset Luma E' = E-offsetLuma W' = W - offsetLuma P' = nonLinear(C') B = midValue = 1 ≪ (bitDepth - 1) The chromaticity prediction value predChromaVal (i.e., the first intra prediction value) is calculated by the following formula (7), where offsetChroma is the offset value of the Cb or Cr component.

[0062] predChromaVal=c0C′+c1N′+c2S′+c3E′+c4W′+c5P′+c6B+offsetChroma (7) CCCM also supports having two groups of filter coefficients in a single block, and, similar to MMLM, it controls the use of coefficients from one group based on, for example, a set corresponding threshold.

[0063] Since the CCCM parameters c0, ..., c6, and possible corresponding thresholds, as well as the parameters of the second group, are derived, there is no need to analyze them from the bitstream on the decoding side.

[0064] In step 204, the first residual value of the first color component of the current block is determined based on the first intra-predicted value and the sample value of the first color component of the current block.

[0065] In step 205, a bitstream is generated based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0066] In some embodiments, the encoder can, by default, perform intra-component prediction for the chromaticity components of the current block using CCMerge mode, and can also decide whether or not to perform intra-component prediction for the chromaticity components of the current block using CCMerge mode based on predetermined rules. Understandably, if the encoder decides to perform intra-component prediction using CCMerge mode, it writes the index value in the first candidate list of the first inter-component prediction model to the bitstream.

[0067] It can be understood that, in the embodiments of this application, the candidate inter-component prediction models recorded in the first candidate list are arranged in ascending order of the prediction error of the candidate inter-component prediction model or the sum of the prediction errors within the model group in which the candidate inter-component prediction model resides. In this way, candidate inter-component prediction models with smaller prediction errors are more likely to be selected for intra-prediction. Therefore, by placing candidate inter-component prediction models with smaller prediction errors before candidate inter-component prediction models with larger prediction errors, it is beneficial to save bitstream overhead on the index values ​​of the selected candidate inter-component prediction model (i.e., the first inter-component prediction model), thereby reducing the bandwidth and traffic load of digital video transmission.

[0068] The embodiments of this application further provide an encoding method performed by an encoder, and Figure 5 is a schematic diagram of the implementation process of the encoding method according to the embodiments of this application, and as shown in Figure 5, the method includes the following steps 501 to 505.

[0069] In step 501, a second candidate list is constructed, wherein the second candidate list includes a multi-group candidate component prediction model, each group's candidate component prediction model includes the first color component prediction model and / or the third color component prediction model, and the multi-group candidate component prediction model includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intraprediction for the first and / or third color components at adjacent and / or non-adjacent positions of the current block.

[0070] In step 502, the first candidate list is determined based on the second candidate list.

[0071] In step 503, a first inter-component prediction model for the first color component is selected from the first candidate list, and an intra-prediction is performed on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block to obtain a first intra-prediction value.

[0072] In step 504, the first residual value of the first color component of the current block is determined based on the first intra-predicted value and the sample value of the first color component of the current block.

[0073] In step 505, a bitstream is generated based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0074] In some embodiments, the encoder can, by default, perform intra-component prediction for the chromaticity components of the current block using CCMerge mode, and can also decide whether or not to perform intra-component prediction for the chromaticity components of the current block using CCMerge mode based on predetermined rules. Understandably, if the encoder decides to perform intra-component prediction using CCMerge mode, it writes the index value in the first candidate list of the first inter-component prediction model to the bitstream.

[0075] The following sections describe further selective embodiments of each of the steps described above, as well as related nouns, etc.

[0076] In step 501, a second candidate list is constructed, wherein the second candidate list includes a multi-group candidate component prediction model, each group's candidate component prediction model includes the first color component prediction model and / or the third color component prediction model, and the multi-group candidate component prediction model includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intraprediction for the first and / or third color components at adjacent and / or non-adjacent positions of the current block.

[0077] Furthermore, in some embodiments, the construction of a second candidate list can be achieved as follows: Obtain a group of second-component prediction models employed to perform intra-prediction for adjacent and / or non-adjacent positions of the current block, where the group of second-component prediction models includes inter-component prediction models for the first color component and / or the third color component. The obtained second-component prediction model is subjected to duplicate removal to obtain the second-component prediction model after duplicate removal. If the number of groups in the second intercomponent prediction model after duplicate removal is less than N, the second intercomponent prediction model after duplicate removal is used as the candidate intercomponent prediction model in the second candidate list, and the candidate intercomponent prediction model in the second candidate list is supplemented using a CCLM model with a specific slope so that the number of candidate intercomponent prediction models in the second candidate list reaches N groups.

[0078] If the number of groups in the second component prediction model after duplicate removal is equal to N, then the second component prediction model after duplicate removal is set as the candidate component prediction model in the second candidate list.

[0079] If the number of groups in the second component prediction model after duplicate removal is greater than N, the second component prediction model after duplicate removal is used as the candidate component prediction model in the second candidate list.

[0080] One understandable reason for performing duplicate removal on the acquired second-component prediction models is to ensure that any two groups of candidate component prediction models recorded in the second candidate list are different.

[0081] In the embodiments of this application, the number of groups of candidate component prediction models in the second candidate list is not limited; it may be N groups or more than N groups. If the number of groups of candidate component prediction models in the second candidate list is less than N groups, a CCLM model with a specific slope can be used to supplement the candidate component prediction models in the second candidate list so that the number of candidate component prediction models in the second candidate list reaches N groups.

[0082] In some embodiments, the second candidate list includes one or more of the CCLM model, MMLM model, CCCM model, and GLM model.

[0083] Exemplary, the second candidate list is the CCMerge list. Understandably, the CCMerge list records the second-component prediction models employed to perform intra-prediction for the first and third color components of adjacent and / or non-adjacent positions of the current block, and the list stores the second-component prediction models inherited from adjacent and / or non-adjacent positions without duplication. The inter-component prediction models in the CCMerge list may be one or more models from CCLM, MMLM, CCCM, and GLM, and if the second-component prediction models cannot fill the CCMerge list, a default model is used to supplement the models in the list up to N groups, and the default model may be, for example, a CCLM model with a specific slope, for example, if the slope α is {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8} in order, then β is obtained by the calculation method described in equation (3) for CCLM.

[0084] The current block's adjacent positions are as shown in Figure 6, and when obtaining the second-component prediction model for the current block's adjacent positions, the second-component prediction models used for positions B1, A1, B0, A0, and B2 can be accessed sequentially. The encoder can also obtain the second-component prediction model used for the current block's non-adjacent positions and add these models to the CCMerge list, where the current block's non-adjacent positions can be one or more non-adjacent positions above, above left, above right, to the left, and / or below right of the current block.

[0085] In step 502, the first candidate list is determined based on the second candidate list.

[0086] One thing that can be understood is that the candidate inter-component prediction models in the second candidate list may be arranged according to a set access order, where the access order refers to the order in which adjacent and / or non-adjacent positions of the current block are accessed. For example, when retrieving the inter-component prediction models for adjacent positions of the current block, the inter-component prediction models used at positions B1, A1, B0, A0, and B2 can be accessed in that order.

[0087] Based on the obtained second candidate list, the candidate component prediction models in the second candidate list are re-sorted, and the first candidate list is determined based on the re-sorted second candidate list. Here, "re-sorting" can also be understood as "sorting" or "sorting again," and in short, it means reordering the candidate component prediction models in the second candidate list.

[0088] Specifically, in some embodiments, as shown in Figure 7, step 502 can be realized by the following steps 5021 to 5023.

[0089] In step 5021, the prediction error of the prediction model between candidate components in the second candidate list is determined.

[0090] In step 5022, the candidate component prediction models in the second candidate list are sorted based on their prediction errors.

[0091] In step 5023, the first candidate list is determined based on the second candidate list after sorting.

[0092] Here, In step 5021, the prediction error of the prediction model between candidate components in the second candidate list is determined.

[0093] One thing that can be understood is that each different color component has its own corresponding candidate component prediction model, so it is necessary to calculate the prediction error of each candidate component prediction model for each different color component.

[0094] For illustrative purposes, in some embodiments, step 5021 can be implemented as follows: An intra-prediction is performed on the color component of the template region of the current block based on the candidate component prediction model for the color component in the second candidate list (which is either the first or third color component) and the reconstructed value of the second color component of the template region of the current block to obtain a second intra-prediction value. Based on the second intra-prediction value and the reconstructed value of the color component in the template region of the current block, the prediction error of the candidate component prediction model for the color component in the second candidate list is determined.

[0095] For example, in some embodiments, the template region of the current block includes the upper adjacent template and / or the left adjacent template of the current block.

[0096] For example, the upper adjacent template is the upper adjacent row of the current block, and / or the left adjacent template is the left adjacent column of the current block.

[0097] What can be understood is that the current block template region includes the first sample, whose second color component reconstruction is incomplete, and / or the second sample, whose second color component reconstruction is complete.

[0098] In some embodiments, if a first sample whose second color component reconstruction is incomplete exists in the template region of the current block, the reconstruction value of the second color component of the first sample is filled using the reconstruction value of a second sample whose second color component reconstruction is complete, which is adjacent to or not adjacent to the first sample.

[0099] In some embodiments, if the reconstruction of the second color component of all samples in the template region of the current block is incomplete, intra-prediction is performed based on the second candidate list without re-sorting the candidate component prediction models in the second candidate list. For example, a third component prediction model for the first color component is selected from the second candidate list, and intra-prediction is performed for the first color component of the current block based on the third component prediction model and the reconstructed value of the second color component of the current block to obtain a third intra-prediction value, and a second residual value for the first color component of the current block is determined based on the third intra-prediction value and the sample value of the first color component of the current block, and a bitstream is generated based on the second residual value of the current block and the index value of the third component prediction model in the second candidate list.

[0100] In step 5022, the candidate component prediction models in the second candidate list are sorted based on their prediction errors.

[0101] In the embodiments of this application, during sorting, the candidate component prediction models for different color components belonging to the same group can be sorted individually, and the candidate component prediction model groups can also be sorted on a group basis.

[0102] For example, in some embodiments, step 5022 can be implemented as follows: Sort the candidate component prediction models for the first color component in the second candidate list in ascending order of prediction error of the candidate component prediction models for the first color component in the second candidate list, and / or The candidate component prediction models for the third color component in the second candidate list are sorted in ascending order of their prediction errors.

[0103] For illustrative purposes, in some other embodiments, step 5022 can be implemented as follows: The candidate component prediction model groups in the second candidate list are sorted in ascending order of the sum of the prediction errors of the candidate component prediction models for the first color component in the second candidate list and the prediction errors of the candidate component prediction models for the third color component in the same group.

[0104] In the embodiments of this application, it is not limited whether the parameters recorded in the second candidate list are partial or all parameters of the candidate component prediction model.

[0105] In some embodiments, if the inter-candidate component prediction model for the color component in the second candidate list is a CCCM model, then the partial parameters of the CCCM model are the filter parameters of the CCCM model, and the remaining parameters of the CCCM model include the offset value of the color component (offsetCb or offsetCr as described above) and the offset value of the second color component (offsetLuma as described above). The method further includes determining the offset value of the color component based on the reconstructed values ​​of the color component in adjacent and / or non-adjacent blocks of the current block, and determining the offset value of the second color component based on the reconstructed values ​​of the second color component in adjacent and / or non-adjacent blocks of the current block.

[0106] For example, in some embodiments, the offset value of the color component is equal to the average of one or more reconstructed values ​​of the color component of adjacent blocks and / or non-adjacent blocks of the current block, and the offset value of the second color component is equal to the average of one or more reconstructed values ​​of the second color component of adjacent blocks and / or non-adjacent blocks of the current block.

[0107] For example, offsetChroma (e.g., offsetCb or offsetCr) is obtained by taking the average of one or more reconstruction values ​​of the reconstruction region of the chromatic component of the current block (e.g., the reconstruction values ​​of the chromatic component on the top, top-left, left, bottom-left, and / or top-right of the current block). Similarly, offsetLuma can be obtained for the luminance block at the position corresponding to the current chromatic position using the same method as obtaining chromatic offsetChroma.

[0108] In some other embodiments, the second candidate list includes partial parameters of the candidate inter-component prediction model for the color component, and based thereon, the method further includes determining the remaining parameters of the candidate inter-component prediction model for the color component based on the partial parameters of the candidate inter-component prediction model for the color component in the second candidate list and the reconstruction values ​​of adjacent or non-adjacent blocks of the current block.

[0109] For illustrative purposes, in some embodiments, if the inter-candidate component prediction model for the color components in the second candidate list is a CCLM model, then a partial parameter of the inter-candidate component prediction model for the color components is the slope of the CCLM model, and the method for calculating the remaining parameters of the CCLM model (i.e., β) can be found by referring to equation (3) above, which will not be repeated here.

[0110] For illustrative purposes, in some embodiments, if the inter-candidate component prediction model for the color components in the second candidate list is an MMLM model, then the partial parameters of the inter-candidate component prediction model for the color components include the slope of the first CCLM model, the slope of the second CCLM model, and a first threshold in the MMLM model, and the method for calculating the remaining parameters (i.e., β) of the first and second CCLM models can be found by referring to equation (3) above, which will not be repeated here.

[0111] Regarding the use of the MMLM model, in some embodiments, if the reconstruction value of the second color component of the color component of the prediction-await sample in the template region of the current block is less than or equal to the first threshold, an intra-prediction is performed on the color component of the prediction-await sample based on the first CCLM model and the reconstruction value of the second color component of the prediction-await sample. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is greater than the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the second CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample.

[0112] The embodiments of this application are not limited to rules for determining the prediction error.

[0113] Exemplary, in some embodiments, the prediction error of the inter-candidate component prediction model for the color components in the second candidate list is equal to the sum of absolute differences (SAD), sum of absolute transformed differences (SATD), mean squared error (MSE), or sum of squared errors (SSD) between the second intra-predicted value and the reconstructed value of the color component in the template region of the current block.

[0114] In step 5023, the first candidate list is determined based on the second candidate list after sorting.

[0115] Furthermore, in some embodiments, if the number of candidate component prediction model groups in the second candidate list is equal to N groups, the first candidate list is the sorted second candidate list. If the number of candidate component prediction model groups in the second candidate list is greater than N groups, the first candidate list is obtained by retaining the candidate component prediction models of the first N groups in the sorted second candidate list.

[0116] In the embodiments of this application, for any coding unit, the encoder can perform intra-prediction using the first candidate list, and of course, the encoder can also decide whether or not to perform intra-prediction using the first candidate list based on the size of the current block and / or the frame type to which the current block belongs.

[0117] For example, in some embodiments, the first candidate list is determined in at least one of the following cases (1) to (3).

[0118] (1) The size of the current block is smaller than the second threshold.

[0119] (2) The current block size is greater than the third threshold, where the second threshold is greater than the third threshold.

[0120] (3) The frame type to which the current block belongs is an intraframe.

[0121] What can be understood is that a single video sequence is divided into intra-prediction frames and inter-prediction frames due to differences in encoding settings. All prediction blocks within an intra-prediction frame are intra-prediction blocks, while blocks within an inter-prediction frame contain both intra-prediction blocks and inter-prediction blocks. Here, an intra-frame refers to a frame in which all prediction blocks are intra-prediction blocks.

[0122] In some embodiments, the encoder writes a first flag to the bitstream, which is used to indicate whether the current block, the coding tree unit in which the current block is located, the slice in which the current block is located, the frame in which the current block is located, or the sequence in which the current block is located will undergo intraprediction using a sorting method. For example, if the first flag is equal to 0, it means that the candidate component prediction model will not be sorted, i.e., it will not be decoded using the first candidate list. In another example, if the first flag is equal to 1, it means that the candidate component prediction model will be sorted, i.e., it will be decoded using the first candidate list.

[0123] In response, on the decoding side, when the decoder analyzes the bitstream, it obtains a first flag and decides whether or not to sort the candidate inter-component prediction models based on this flag. If the first flag indicates that the candidate inter-component prediction models should be sorted, the models are sorted to obtain a first candidate list, and then intra-component predictions are made for the first color component of the current block based on this first candidate list.

[0124] In some embodiments, the encoder may also write a second flag to the bitstream, which is used to indicate whether or not to use a sorting method based on a template area.

[0125] What can be understood is that the second flag is an overall control flag, meaning that the use of a template-based sorting method includes not only sorting of candidate component prediction models, but also other cases where sorting needs to be achieved by a template-based sorting method.

[0126] In response, on the decoding side, when the decoder analyzes the bitstream, it obtains a second flag and, based on this second flag, decides whether or not to use a sorting method based on the template region. If the second flag indicates that a sorting method based on the template region should be used, the candidate inter-component prediction model is sorted to obtain a first candidate list, and then an intra-component prediction is made for the first color component of the current block based on the first candidate list.

[0127] The embodiments of this application further provide a decoding method performed by a decoder, and Figure 8 is a schematic diagram of the implementation process of the decoding method according to the embodiments of this application, and as shown in Figure 8, the method includes the following steps 801 to 805.

[0128] In step 801, the bitstream is analyzed to obtain the first residual value of the first color component of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0129] In one possible implementation, the bitstream includes a flag indicating whether or not to use CCMerge mode. If the flag indicates that CCMerge mode should be used, the decoder performs steps 802 to 805 below; otherwise, the decoder employs another method to determine the reconfiguration value of the current block.

[0130] In step 802, the first candidate list is determined, and the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located.

[0131] In some embodiments, the first candidate list includes N groups of candidate component prediction models, and each group of candidate component prediction models includes a candidate component prediction model for the first color component and a candidate component prediction model for the third color component.

[0132] For example, in some embodiments, the first and third color components are chromaticity components, and the second color component is a luminance component.

[0133] Furthermore, in some embodiments, the candidate component prediction models for the first color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the first color component, and / or the candidate component prediction models for the third color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the third color component.

[0134] Furthermore, in some other embodiments, the candidate component interpretation model groups in the first candidate list are arranged in ascending order of the sum of the prediction errors of the candidate component interpretation model for the first color component and the candidate component interpretation model for the third color component in the candidate component interpretation model group.

[0135] Furthermore, in some embodiments, the determination of the first candidate list can be achieved by steps 902 and 903 of the following embodiments.

[0136] In the embodiments of this application, the method for determining the first candidate list in the decoding method is the same as the method for determining the first candidate list in the encoding method. Therefore, technical details not described in the embodiments of the decoding method should be understood by referring to the description in the embodiments of the encoding method of this application.

[0137] In step 803, the first inter-component prediction model is determined based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list.

[0138] In step 804, an intra-prediction is performed on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, and a first intra-predicted value is obtained.

[0139] In step 805, the reconstruction value of the first color component of the current block is determined based on the first intra-predicted value and the first residual value.

[0140] The embodiments of this application further provide a decoding method, and Figure 9 is a schematic diagram of the implementation process of the decoding method according to the embodiments of this application, and as shown in Figure 9, the method includes the following steps 901 to 906.

[0141] In step 901, the bitstream is analyzed to obtain the first residual value of the first color component of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0142] In step 902, a second candidate list is constructed.

[0143] Here, the second candidate list includes a multi-group candidate component prediction model, each group's candidate component prediction model includes the first color component prediction model and / or the third color component prediction model, and the multi-group candidate component prediction model includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intraprediction for the first and / or third color components at adjacent and / or non-adjacent positions of the current block.

[0144] For example, in some embodiments, the first and third color components are chromaticity components, and the second color component is a luminance component.

[0145] In some embodiments, the second candidate list can be constructed as follows: Obtain a group of second-component inter-prediction models employed to perform intra-prediction for adjacent and / or non-adjacent positions of the current block, wherein the group of second-component inter-prediction models includes inter-component prediction models for the first color component and / or the third color component. The obtained second-component prediction models for one or more groups are subjected to duplicate removal to obtain the second-component prediction models after duplicate removal. If the number of groups in the second intercomponent prediction model after duplicate removal is less than N, the second intercomponent prediction model after duplicate removal is used as the candidate intercomponent prediction model in the second candidate list, and the candidate intercomponent prediction model in the second candidate list is supplemented using a CCLM model with a specific slope so that the number of candidate intercomponent prediction models in the second candidate list reaches N groups.

[0146] If the number of groups in the second component prediction model after duplicate removal is equal to N, then the second component prediction model after duplicate removal is set as the candidate component prediction model in the second candidate list.

[0147] If the number of groups in the second component prediction model after duplicate removal is greater than N, the second component prediction model after duplicate removal is used as the candidate component prediction model in the second candidate list.

[0148] In some embodiments, the second candidate list includes one or more of the CCLM model, MMLM model, CCCM model, and GLM model.

[0149] In step 903, the first candidate list is determined based on the second candidate list.

[0150] Furthermore, in some embodiments, the decoder can implement step 903 as follows: determine the prediction error of the candidate component prediction model in the second candidate list, sort the candidate component prediction models in the second candidate list based on the prediction error of the candidate component prediction model in the second candidate list, and determine the first candidate list based on the sorted second candidate list.

[0151] Furthermore, in some embodiments, determining the prediction error of the candidate component prediction model for the color component in the second candidate list includes performing an intra-prediction on the color component in the template region of the current block based on the candidate component prediction model for the color component in the second candidate list and the reconstructed value of the second color component in the template region of the current block to obtain a second intra-prediction value, and determining the prediction error of the candidate component prediction model for the color component in the second candidate list based on the second intra-prediction value and the reconstructed value of the color component in the template region of the current block.

[0152] Exemplary, in some embodiments, the template region of the current block includes the upper adjacent template and / or the left adjacent template of the current block. For example, the upper adjacent template is the upper adjacent row of the current block, and / or the left adjacent template is the left adjacent column of the current block.

[0153] In some embodiments, if there is a first sample in the template region of the current block whose second color component reconstruction is incomplete, the reconstruction value of the second color component of the first sample is filled using the reconstruction value of a second sample adjacent to or not adjacent to the first sample, whose second color component reconstruction is complete. If the reconstruction of the second color component is incomplete for all samples in the template region of the current block, intra-prediction between components is performed based on the second candidate list without using a re-sorting technique, i.e., without sorting the second candidate list. Correspondingly, the bitstream includes the second residual value of the current block and the index value of the third component prediction model in the second candidate list. The decoder analyzes the bitstream and obtains the second residual value and the index value of the third component prediction model in the second candidate list. Based on the index value of the third component prediction model in the second candidate list and the second candidate list, the decoder determines the third component prediction model. Based on the third component prediction model and the reconstructed value of the second color component of the current block, the decoder performs an intra-prediction on the first color component of the current block to obtain a third intra-prediction value. Based on the third intra-prediction value and the second residual value, the decoder determines the reconstructed value of the first color component of the current block.

[0154] For example, in some embodiments, the prediction error of the inter-candidate component prediction model for the color component in the second candidate list is equal to the SAD, SATD, MSE, or SSD between the second intra-predicted value and the reconstructed value of the color component in the template region of the current block.

[0155] In some embodiments, sorting the candidate component prediction models in the second candidate list based on the prediction error of the candidate component prediction models in the second candidate list includes sorting the candidate component prediction models for the first color component in the second candidate list in ascending order of the prediction error of the candidate component prediction models for the first color component in the second candidate list, and / or sorting the candidate component prediction models for the third color component in the second candidate list in ascending order of the prediction error of the candidate component prediction models for the third color component in the second candidate list.

[0156] In some other embodiments, sorting the candidate component prediction models in the second candidate list based on the prediction error of the candidate component prediction models in the second candidate list includes sorting the candidate component prediction model groups in the second candidate list in ascending order of the sum of the prediction error of the candidate component prediction model for the first color component in the second candidate list and the prediction error of the candidate component prediction model for the third color component in the same group.

[0157] In some embodiments, if the number of candidate component prediction model groups in the second candidate list is equal to N groups, the first candidate list is the sorted second candidate list. If the number of candidate component prediction model groups in the second candidate list is greater than N groups, the first candidate list is obtained by retaining the candidate component prediction models of the first N groups in the sorted second candidate list.

[0158] In some embodiments, the second candidate list includes partial parameters of a candidate inter-component prediction model for the color component, and if the candidate inter-component prediction model for the color component in the second candidate list is a CCCM model, then the partial parameters of the CCCM model are the filter parameters of the CCCM model, and the remaining parameters of the CCCM model include the offset value of the color component and the offset value of the second color component. The method further includes determining the offset value of the color component based on the reconstructed values ​​of the color component in adjacent and / or non-adjacent blocks of the current block, and determining the offset value of the second color component based on the reconstructed values ​​of the second color component in adjacent and / or non-adjacent blocks of the current block.

[0159] In some other embodiments, the second candidate list includes partial parameters of the candidate inter-component prediction model for the color component, and the method further includes determining the remaining parameters of the candidate inter-component prediction model for the color component based on the partial parameters of the candidate inter-component prediction model for the color component in the second candidate list and the reconstruction values ​​of adjacent or non-adjacent blocks of the current block.

[0160] For example, in some embodiments, if the inter-candidate component prediction model for the color components in the second candidate list is a CCLM model, then a partial parameter of the inter-candidate component prediction model for the color components is the slope of the CCLM model.

[0161] Exemplary, in some embodiments, if the inter-candidate component prediction model for the color components in the second candidate list is an MMLM model, then the partial parameters of the inter-candidate component prediction model for the color components include the slope of the first CCLM model, the slope of the second CCLM model, and a first threshold in the MMLM model, where, If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is less than or equal to the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the first CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is greater than the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the second CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample.

[0162] In step 904, the first inter-component prediction model is determined based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list.

[0163] In step 905, an intra-prediction is performed on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, and a first intra-predicted value is obtained.

[0164] In step 906, the reconstruction value of the first color component of the current block is determined based on the first intra-predicted value and the first residual value.

[0165] In some embodiments, if the size of the current block is smaller than a second threshold and / or larger than a third threshold, the first candidate list is determined, where the second threshold is greater than the third threshold.

[0166] In some embodiments, if the frame type to which the current block belongs is an intraframe, the first candidate list is determined.

[0167] In some embodiments, the method further comprises analyzing a bitstream to obtain a first flag, the first flag used to indicate whether the current block, the coding tree unit in which the current block is located, the slice in which the current block is located, the frame in which the current block is located, or the sequence in which the current block is located undergoes intraprediction using a sorting method.

[0168] In some embodiments, the method further comprises analyzing a bitstream to obtain a second flag, which is used to indicate whether or not to use a sorting method based on a template region.

[0169] In the embodiments of this application, the method for determining the first candidate list in the decoding method is the same as the method for determining the first candidate list in the encoding method. Therefore, technical details not described in the embodiments of the decoding method should be understood by referring to the description in the embodiments of the encoding method of this application.

[0170] It is understood that there is a strong spatial correlation between adjacent parts or adjacent pixels within an image, and intra-prediction is a method of predicting the current block by referencing reconstructed samples / pixels around the current block. To eliminate redundancy between different color channels, an intra-prediction mode between components has been proposed. The idea is to predict the chromaticity component of the current block using a reconstructed luminance block, and during prediction, it is necessary to construct a linear or nonlinear relationship between luminance and chromaticity based on the reconstructed luminance pixel values ​​and reconstructed chromaticity pixel values. For example, inter-component prediction of the current block can be achieved using CCLM, MMLM, CCCM, GLM, or CCMerge lists. Here, The following is an introduction to CCLM.

[0171] As shown in equation (8) below, CCLM utilizes a simple linear relationship to predict the chromaticity pixel value using the reconstructed luminance pixel value at the corresponding position.

[0172] Nod c (i,j) = α × rec L ′(i,j)+β (8) In equation (8), pred c (i,j) represents the intra-predicted value of the chromaticity component at the current coordinate (i,j) position within the block, and rec L ′(i,j) is the reconstructed value (i.e., the reconstructed luminance pixel value) at coordinate (i,j) after downsampling the luminance block at the corresponding position of the current block, and α and β are derived linear parameters, which are derived from the reconstructed chromaticity pixel values ​​around the current block (chromaticity block shown in Figure 10A) and the reconstructed luminance pixel values ​​around the luminance block at the corresponding position (luminance block shown in Figure 10A).

[0173] In ECM, α and β are derived using the least squares method, and the calculation formulas are shown in equations (9) and (10) below.

[0174]

number

[0175] Figure 10B is a schematic diagram for constructing a linear relationship between the luminance sample (Y) and the chromaticity sample (C).

[0176] Since the linear parameters α and β of CCLM are derived, there is no need to analyze them from the bitstream.

[0177] The following is an introduction to MMLM.

[0178] MMLM is similar to CCLM, but differs in that it allows for the derivation of two groups of linear models for a single prediction block (i.e., the current block awaiting prediction). Which of the two linear models a prediction sample adopts is controlled by a first threshold, the value of which is obtained by the average of the reconstructed pixel values ​​around the luminance block at the corresponding location. MMLM is shown in equation (11) below. Figure 10C shows an example where samples are divided into two groups based on the threshold, and two groups of linear models are derived.

[0179]

number

[0180] Since the Threshold, α1, α2, β1, and β2 of MMLM are derived, there is no need to analyze them from the bitstream.

[0181] The following is an introduction to CCCM.

[0182] Similar in concept to the prediction method based on the CCLM model, the prediction method based on CCCM is also a process that predicts the pixel value of the chromaticity component from the reconstructed pixel value of the luminance component.

[0183] CCCM derives not simple α and β, but rather one group of convolutional filter coefficients. CCCM also supports deriving two groups of convolutional filter coefficients for a single block, and similarly, which group of convolutional filter coefficients is used is controlled by a second threshold.

[0184] The following is an introduction to convolutional filters.

[0185] The convolutional filter used by CCCM is a 7-tap filter, which consists of one 5-tap cross filter, one nonlinear term P, and one offset term B. As shown in Figure 3, the input to the 5-tap cross filter consists of a center (C) luminance sample (a downsampled luminance sample at a position corresponding to the current chromaticity prediction position), an above (N) luminance sample, a below (S) luminance sample, a left (W) luminance sample, and a right (E) luminance sample.

[0186] As shown in equation (12) below, the nonlinear term P is determined by the luminance input sample C at the central position and the bit precision bitDepth of the pixel value of the current prediction block.

[0187]

number

[0188] The offset term B is set to (1 ≪ (bitDepth-1)) in CCCM, so for example, if the pixel precision of the prediction block is 10 bits, then B = 512.

[0189] As shown in equation (13) below, the predicted value predChromaVal based on CCCM is determined based on the self-adaptively acquired 7-tap filter coefficients {c0,…,c6} and the input sample.

[0190] predChromaVal=c0C+c1N+c2S+c3E+c4W+c5P+c6B (13) The acquisition of convolution filter coefficients is explained below.

[0191] The convolution filter coefficients are obtained by minimizing the mean squared error between the predicted chromaticity values ​​and the reconstructed values ​​for the entire reconstruction region. As shown in Figure 4, the reconstruction region of the current chromaticity block consists of 6x6 reconstructed pixel values ​​around the current chromaticity block, and if there are incomplete reconstruction locations in the reconstruction region, the values ​​at those locations are filled with reconstructed values.

[0192] The calculation process for minimizing the mean squared error is as follows:

[0193] 1. Obtain the autocorrelation matrix of the luminance input samples and the cross-correlation vector between the luminance input samples and the chromaticity output samples.

[0194] 2. The autocorrelation matrix is ​​decomposed using LDL, and the final filter coefficients are obtained by finding the solution using backward substitution.

[0195] In calculating the autocorrelation matrix, the numerical values ​​of the luminance input samples used are relatively large, requiring high precision when calculating the convolutional filter coefficients. Therefore, CCCM requires subtracting the corresponding offset values ​​offsetLuma, offsetCb, and offsetCr from both the input luminance samples and the output chromaticity samples. Currently, the luminance reconstruction value and chromaticity prediction value from the upper left outer part of the block are used as offsets, resulting in the CCCM input as follows:

[0196] C' = C - offsetLuma N' = N-offsetLuma S' = S - offset Luma E' = E-offsetLuma W' = W - offsetLuma P' = nonLinear(C') B = midValue = 1 ≪ (bitDepth - 1) The chromaticity prediction value is calculated by the following formula (14), where offsetChroma is the offset of the Cb and Cr components, respectively.

[0197] predChromaVal=c0C′+c1N′+c2S′+c3E′+c4W′+c5P′+c6B+offsetChroma (14) CCCM also supports having two groups of filter coefficients in a single block, and, similar to MMLM, control the use of coefficients from one group based, for example, on a threshold.

[0198] The CCCM parameters c0, ..., c6, and possible thresholds, as well as the parameters of the second group, are derived and therefore do not need to be analyzed from the bitstream.

[0199] The following is an introduction to GLM.

[0200] GLM is an intra-chromaticity component prediction tool used in the YUV4:2:0 format, and in ECM reference software, GLM includes both two-parameter and three-parameter models.

[0201] Compared to CCLM, GLM derives a linear model using the gradient value of the luminance reconstruction sample and the chromaticity reconstruction sample. In particular, for the two-parameter GLM, the chromaticity prediction value is calculated by the following formula, where G is the gradient value of the luminance sample corresponding to the current position. The calculation methods for α and β are the same as in CCLM.

[0202] C = α·G + β In the case of a 3-parameter GLM, the chromaticity prediction value is calculated from both the luminance sample corresponding to the current position and the gradient value of the corresponding luminance sample. The calculation methods for α0, α1, and α2 are the same as in CCCM, with β = (1 ≪ (bitDepth - 1)), for example, for content with a pixel precision of 10 bits in the prediction block, β = 512.

[0203] C = α0·G + α1·L + α2·β The gradient of the GLM is obtained by one of the four Sobel operators shown in Figure 11, and which Sobel operator is used to obtain the gradient value is determined by a flag analyzed from the bitstream.

[0204] Since the GLM parameters are derived from this, there is no need to analyze them from the bitstream.

[0205] The following is an introduction to CCMerge.

[0206] CCMerge inherits the intercomponent prediction models of chromaticity components at adjacent or non-adjacent locations around the current block (i.e., the current block) and applies them to the prediction of the current block. CCMerge constructs a CCMerge list of length N (N=6) (i.e., an example of a second candidate list), which stores the intercomponent prediction models inherited from surrounding blocks without duplication. These intercomponent prediction models can be one or more of CCLM, MMLM, CCCM, and GLM models. If the surrounding models cannot fill the CCMerge list completely, a default model is used to fill the rest of the list. Here, the adjacent locations of the current block are as shown in Figure 6, and when CCMerge retrieves the intercomponent prediction models of the surrounding adjacent locations, it accesses the locations B1→A1B0→A0→B2 in that order.

[0207] CCMerge can further obtain inter-component prediction models at non-adjacent locations, and the concept of non-adjacent locations can also be used in intermerge, which currently includes several non-adjacent locations above, above left, above right, to the left, and below left of the block.

[0208] The default model includes a CCLM with a default slope. If the number of inter-component predictive models obtained from adjacent and non-adjacent locations is less than N, the CCLM with the default slope is used to fill in the remaining portion of the list. If the default slopes α are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8}, then β is calculated using the method described above.

[0209] Block-level flag bits are encoded and decoded to indicate whether CCMerge mode is selected. If CCMerge is selected, further decoding is required to determine which model in the CCMerge list is selected, and the model index is encoded and decoded by a truncated unary code.

[0210] In a list of length N constructed by CCMerge, each index can correspond to one group of inter-component prediction models in the CCMerge list. Each group of models includes one model for predicting the blue chromaticity component Cb block and one model for predicting the red chromaticity component Cr block. When analyzing the index to determine the selected model, the inter-component prediction models for Cb and Cr are determined simultaneously.

[0211] In an embodiment of this application, a method is provided for re-sorting (which can also be understood as sorting) a list constructed by CCMerge. The inter-component prediction models for Cb and Cr in the list can be re-sorted, that is, the inter-component prediction models for Cb and Cr obtained by index after re-sorting may be inherited from blocks at different locations.

[0212] The rearrangement of the merge list of Cb and Cr components is performed based on the cost of the predicted and reconstructed values ​​in the Cb and Cr templates, respectively, according to the inter-component prediction models within the list.

[0213] As an example, a method for resorting the inter-component prediction model of the Cb component includes the following steps 1 to 3.

[0214] In step 1, candidate Cb component prediction models are obtained for adjacent and non-adjacent locations. If there are fewer than N candidate Cb component prediction models, they are interpolated up to N using CCLM with a default slope.

[0215] In Step 2, each candidate Cb component prediction model is used to obtain the model input from the reconstructed template region of the Y component and calculate the predicted value of the Cb template region. The schematic diagram of the Cb and Cr component templates used for resorting is shown in Figure 12.

[0216] In step 3, the difference between the predicted and reconstructed values ​​for N groups is used as a reference, and modes with smaller difference values ​​are sorted first.

[0217] The method for resorting the Cr component is the same as for Cb, but the difference value of the Cr template region is used as the sorting criterion.

[0218] In some embodiments, if in step 1 there are more than N candidate Cb component prediction models for adjacent and non-adjacent positions, it is also possible to obtain more than N candidate Cb component prediction models and then, in the subsequent re-sorting, retain only the first N candidate Cb component prediction models that have the smallest prediction error.

[0219] In some embodiments, in step 2, if the reconstruction template region of the Y component as input to the model contains pixels that have not yet been reconstructed, it can be filled using neighboring reconstructed pixel values, and if all pixel values ​​are not yet reconstructed, a resort can be omitted.

[0220] In some implementations, in step 3, the difference value selected may be SAD (the sum of absolute difference), and if the template region of Cb has rows and columns that are powers of 2, such as 2, 4, 8, ..., then SATD (the sum of transformed difference) can be used as the difference value.

[0221] In some embodiments, in step 3, a 1x1 reconstruction region can be selected as the template for Cb and Cr to reduce complexity.

[0222] In some embodiments, the inter-component modes that the CCMerge list can inherit may include CCLM, MMLM, CCCM, and / or GLM, so the CCMerge list can only inherit partial parameters of these models.

[0223] For example, in CCLM, only the slope α can be inherited, and β can be adaptively calculated based on the current block.

[0224] For example, in MMLM, only the α and Threshold of the two models can be inherited, and the β of the two models can be adaptively calculated based on the current block.

[0225] For example, in CCCM, it is possible to inherit CCCM filter parameters, and luminance offsetLuma and chromaticity offsetChroma can now be obtained based on the block.

[0226] In some embodiments, the intercomponent prediction models for Cb and Cr can be sorted simultaneously; that is, the intercomponent prediction models for each group can be sorted based on the sum of the difference values ​​(i.e., prediction errors) in the Cb and Cr templates of each group's model, which means that the models for each group are inherited from the same block.

[0227] In some embodiments, the availability of the resort technique can be determined by whether the current frame is an intraframe. If the current frame is an intraframe, the use of resort is permitted.

[0228] In some embodiments, the size of the current block can be used to determine whether the resorting technique is available, for example, if the current block is less than N × M, and / or if the current block is greater than P × Q, where N, M, P, and Q are all positive integers.

[0229] In some embodiments, the availability of the resort technique can be controlled by syntactic elements such as block-level, coded tree unit-level, slice-level, frame-level, or sequence-level elements (i.e., an example of a first flag).

[0230] In some embodiments, a flag for template-based sorting (i.e., an example of a second flag) can be set to control whether template-based sorting techniques are available, and in such cases, whether or not to re-sort the CCMerge list can also be controlled by an overall flag.

[0231] In the embodiments of this application, a candidate list (e.g., a CCMerge list) is constructed for the intercomponent intra-prediction mode, and the list stores intercomponent prediction models inherited from surrounding blocks or default models, and the models inherited in the CCMerge list may include one or more of the CCLM, MMLM, CCCM, and GLM models.

[0232] In the embodiment of this application, the models in the candidate list are rearranged, and the rearrangement is performed based on the difference between the predicted value and the reconstructed value of each model in the Cb and Cr template regions.

[0233] In the embodiment of this application, a list of N or more elements can be constructed, and then, upon re-sorting, only the N groups of component prediction models with small difference values ​​can be retained.

[0234] In the embodiments of this application, the models of Cb and Cr can be sorted individually or together.

[0235] In the embodiment of this application, sorting can be performed using a 1x1 template of Cb and Cr, and SAD as the difference value, thereby reducing the complexity of the calculation.

[0236] In the embodiments of this application, when inheriting an inter-component prediction model, only partial parameters of the model are inherited, while some parameters are retained and can be adaptively calculated based on the current block.

[0237] In the embodiments of this application, the size of the blocks, the type of frames, or flags can be used to control whether or not the use of re-sorting of the CCMerge list is permitted.

[0238] While the drawings illustrate the steps of the method in this application in a specific order, it should be noted that this does not necessarily require or imply that these steps must be performed in that specific order, or that the desired results cannot be obtained unless all the steps shown are performed. Additional or alternative methods may be used, such as omitting some steps, combining several steps into one, and / or breaking down one step into several steps, or combining steps from different embodiments to create new technical solutions.

[0239] Based on the above embodiment, the embodiment of this application provides an encoding device applicable to an encoder, and Figure 13 is an exemplary structural diagram of the encoding device according to the embodiment of this application, and as shown in Figure 13, the encoding device 13 is A first decision module 131 configured to determine a first candidate list, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located, and the first decision module 131 A selection module 132 is configured to select a first-component prediction model for the first color component from the first candidate list, A first prediction module 133 is configured to perform an intra-prediction on the first color component of the current block and obtain a first intra-prediction value based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, A second determination module 134 is configured to determine the first residual value of the first color component of the current block based on the first intra-predicted value and the sample value of the first color component of the current block, The system includes an encoding module 135 configured to generate a bitstream based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

[0240] In some embodiments, the first candidate list includes N groups of candidate component prediction models, each group of candidate component prediction models includes a candidate component prediction model for the first color component and a candidate component prediction model for the third color component, where N is greater than 1.

[0241] In some embodiments, the candidate component prediction models for the first color component in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction models for the first color component.

[0242] In some embodiments, the candidate component prediction models for the third color component in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction models for the third color component.

[0243] In some embodiments, the candidate component interpretation model groups in the first candidate list are arranged in ascending order of the sum of the prediction errors of the candidate component interpretation model for the first color component and the candidate component interpretation model for the third color component in the candidate component interpretation model group.

[0244] In some embodiments, the first decision module 131 is configured to construct a second candidate list and determine the first candidate list based on the second candidate list, wherein the second candidate list includes a multi-group candidate component prediction model, each group of candidate component prediction models includes a candidate component prediction model for the first color component and / or a candidate component prediction model for the third color component, and the multi-group candidate component prediction model includes a CCLM model having a specific slope and / or a second component prediction model employed to perform intra-prediction for the first and / or third color components at adjacent and / or non-adjacent positions of the current block.

[0245] In some embodiments, the second candidate list includes one or more of the CCLM model, MMLM model, CCCM model, and GLM model.

[0246] In some embodiments, the first decision module 131 obtains a group of second-component prediction models employed to perform intra-prediction for adjacent and / or non-adjacent positions of the current block, wherein the group of second-component prediction models includes a component-interpolation prediction model for the first color component and / or a component-interpolation prediction model for the third color component. If the number of groups of the second-component prediction models after deduplication is less than N, the second-component prediction models after deduplication are used as candidate component-interpolation prediction models in the second candidate list. The candidate component-interpolation prediction models in the second candidate list are complemented using a CCLM model with a specific slope so that there are up to N groups of candidate component-interpolation prediction models in the second candidate list. If the number of groups of the second-component prediction models after deduplication is equal to N, the second-component prediction models after deduplication are used as candidate component-interpolation prediction models in the second candidate list. If the number of second-component prediction models after deduplication is greater than N, the second-component prediction models after deduplication are used as candidate component-interpolation prediction models in the second candidate list.

[0247] In some embodiments, the first decision module 131 is configured to determine the prediction error of the candidate component prediction model in the second candidate list, sort the candidate component prediction models in the second candidate list based on the prediction error of the candidate component prediction model in the second candidate list, and determine the first candidate list based on the sorted second candidate list.

[0248] In some embodiments, the first decision module 131 performs an intra-prediction on the color component in the template region of the current block based on the candidate component prediction model for the color component in the second candidate list and the reconstructed value of the second color component in the template region of the current block, thereby obtaining a second intra-prediction value, where the color component refers to the first color component or the third color component, and is configured to determine the prediction error of the candidate component prediction model for the color component in the second candidate list based on the second intra-prediction value and the reconstructed value of the color component in the template region of the current block.

[0249] In some embodiments, the prediction error of the inter-candidate component prediction model for the color component in the second candidate list is equal to the SAD, SATD, MSE, or SSD between the second intra-predicted value and the reconstructed value of the color component in the template region of the current block.

[0250] In some embodiments, the template region of the current block includes the upper adjacent template and / or the left adjacent template of the current block.

[0251] In some embodiments, the upper adjacent template is the upper adjacent row of the current block.

[0252] In some embodiments, the left-side adjacent template is the left-side adjacent column of the current block.

[0253] In some embodiments, the first determination module 131 is further configured to populate the reconstructed value of the second color component of the first sample using the reconstructed value of a second sample adjacent to or not adjacent to the first sample, in which the reconstruction of the second color component is complete, if the template region of the current block contains a first sample for which the reconstruction of the second color component is incomplete.

[0254] In some embodiments, the selection module 132 is further configured to select a third-component inter-prediction model for the first color component from the second candidate list if the reconstruction of the second color component of all samples in the template region of the current block is incomplete; the first prediction module 133 is further configured to perform an intra-prediction for the first color component of the current block based on the third-component inter-prediction model and the reconstructed value of the second color component of the current block to obtain a third intra-prediction value; the second decision module 134 is further configured to determine a second residual value for the first color component of the current block based on the third intra-prediction value and the sample value of the first color component of the current block; and the encoding module 135 is further configured to generate a bitstream based on the second residual value of the current block and the index value of the third-component inter-prediction model in the second candidate list.

[0255] In some embodiments, the first decision module 131 is configured to sort the candidate component prediction models for the first color component in the second candidate list in ascending order of prediction error for the first color component in the second candidate list, and / or sort the candidate component prediction models for the third color component in the second candidate list in ascending order of prediction error for the third color component in the second candidate list.

[0256] In some other embodiments, the first determination module 131 is configured to sort the candidate component prediction model groups in the second candidate list in ascending order of the sum of the prediction error of the candidate component prediction model of the first color component and the prediction error of the candidate component prediction model of the third color component in the same group.

[0257] In some embodiments, when the number of candidate component prediction model groups in the second candidate list is equal to N groups, the first candidate list is the sorted second candidate list; when the number of candidate component prediction model groups in the second candidate list is greater than N groups, the first candidate list is obtained by retaining the candidate component prediction models of the first N groups at the beginning of the sorted second candidate list.

[0258] In some other embodiments, the second candidate list includes partial parameters of the candidate component prediction model of the color component, and the first determination module 131 is configured to determine the remaining parameters of the candidate component prediction model of the color component based on the partial parameters of the candidate component prediction model of the color component in the second candidate list and the reconstruction values of adjacent or non - adjacent blocks of the current block.

[0259] In some embodiments, when the candidate component prediction model of the color component in the second candidate list is a CCLM model, the partial parameter of the candidate component prediction model of the color component is the slope of the CCLM model.

[0260] In some embodiments, when the prediction model between candidate components of the color component in the second candidate list is the MMLM model, the partial parameters of the prediction model between candidate components of the color component include the slope of the first CCLM model, the slope of the second CCLM model, and the first threshold in the MMLM model. Here, when the reconstructed value of the second color component of the prediction pending sample of the color component in the template area of the current block is less than or equal to the first threshold, the first prediction module 133 performs intra prediction on the color component of the prediction pending sample based on the first CCLM model and the reconstructed value of the second color component of the prediction pending sample. When the reconstructed value of the second color component of the prediction pending sample of the color component in the template area of the current block is greater than the first threshold, the first prediction module 133 is configured to perform intra prediction on the color component of the prediction pending sample based on the second CCLM model and the reconstructed value of the second color component of the prediction pending sample.

[0261] In some embodiments, the second candidate list includes partial parameters of the prediction model between candidate components of the color component. When the prediction model between candidate components of the color component in the second candidate list is the CCCM model, the partial parameters of the CCCM model are the filter parameters of the CCCM model, and the remaining parameters of the CCCM model include the offset value of the color component and the offset value of the second color component. The first determination module 131 is further configured to determine the offset value of the color component based on the reconstructed values of the color component of the adjacent block and / or non-adjacent block of the current block, and determine the offset value of the second color component based on the reconstructed values of the second color component of the adjacent block and / or non-adjacent block of the current block.

[0262] In some embodiments, the first determination module 131 is configured to determine the first candidate list when the size of the current block is smaller than a second threshold and / or when the size of the current block is larger than a third threshold, where the second threshold is larger than the third threshold.

[0263] In some embodiments, the first decision module 131 is configured to determine the first candidate list if the frame type to which the current block belongs is an intraframe.

[0264] In some embodiments, the encoding module 135 is further configured to write a first flag to the bitstream, the first flag being used to indicate whether the current block, the encoding tree unit in which the current block resides, the slice in which the current block resides, the frame in which the current block resides, or the sequence in which the current block resides undergoes intraprediction using a sorting method.

[0265] In some embodiments, the encoding module 135 is further configured to write a second flag to the bitstream, which is used to indicate whether or not to use a sorting method based on a template area.

[0266] In some embodiments, the first and third color components are chromaticity components, and the second color component is a luminance component.

[0267] The description of the above-described embodiment of the encoding device is similar to the description of the above-described embodiment of the encoding method, and has similar beneficial effects. Technical details not disclosed in the embodiment of the encoding device of this application should be understood by referring to the description of the embodiment of the encoding method of this application.

[0268] The embodiments of this application provide a decoding device applicable to a decoder, and Figure 14 is an exemplary structural diagram of the decoding device according to the embodiments of this application, and as shown in Figure 14, the decoding device 14 is A decoding module 141 is configured to analyze a bitstream and obtain the first residual value of the first color component of the current block and the index value of the first inter-component prediction model in the first candidate list. A third decision module 142 configured to determine the first candidate list, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located, and the third decision module 142 A fourth decision module 143 is configured to determine the first inter-component prediction model based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list, A second prediction module 144 is configured to perform an intra-prediction on the first color component of the current block and obtain a first intra-prediction value based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, The system includes a fifth determination module 145 configured to determine the reconstruction value of the first color component of the current block based on the first intra-predicted value and the first residual value.

[0269] In some embodiments, the third decision module 142 is configured to construct a second candidate list and determine the first candidate list based on the second candidate list, wherein the second candidate list includes a multi-group candidate component prediction model, each group's candidate component prediction model includes a candidate component prediction model for the first color component and / or a candidate component prediction model for the third color component, and the multi-group candidate component prediction model includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intra-predictions for the first and / or third color components at adjacent and / or non-adjacent positions of the current block.

[0270] In some embodiments, the third decision module 142 obtains a group of second-component prediction models employed to perform intra-prediction for adjacent and / or non-adjacent positions of the current block, wherein the group of second-component prediction models includes inter-component prediction models for the first and / or third color components. If the number of groups of the second-component prediction models after deduplication is less than N, the second-component prediction models after deduplication are used as candidate inter-component prediction models in the second candidate list. The candidate inter-component prediction models in the second candidate list are complemented using a CCLM model with a specific slope so that there are up to N groups of candidate inter-component prediction models in the second candidate list. If the number of groups of the second-component prediction models after deduplication is equal to N, the second-component prediction models after deduplication are used as candidate inter-component prediction models in the second candidate list. If the number of groups of the second-component prediction models after deduplication is greater than N, the second-component prediction models after deduplication are used as candidate inter-component prediction models in the second candidate list.

[0271] In some embodiments, the third decision module 142 is configured to determine the prediction error of the candidate component prediction model in the second candidate list, sort the candidate component prediction models in the second candidate list based on the prediction error of the candidate component prediction model in the second candidate list, and determine the first candidate list based on the sorted second candidate list.

[0272] In some embodiments, the third decision module 142 performs an intra-prediction on the color component in the template region of the current block based on the candidate component prediction model for the color component in the second candidate list and the reconstructed value of the second color component in the template region of the current block, thereby obtaining a second intra-prediction value, where the color component refers to the first color component or the third color component, and is configured to determine the prediction error of the candidate component prediction model for the color component in the second candidate list based on the second intra-prediction value and the reconstructed value of the color component in the template region of the current block.

[0273] In some embodiments, the third decision module 142 is further configured to populate the reconstructed value of the second color component of the first sample using the reconstructed value of a second sample adjacent to or not adjacent to the first sample, in which the reconstruction of the second color component is complete, if the template region of the current block contains a first sample for which the reconstruction of the second color component is incomplete.

[0274] In some embodiments, if the reconstruction of the second color component of all samples in the template region of the current block is incomplete, the bitstream includes the second residual value of the current block and the index value of the third component prediction model in the second candidate list. The decoding module 141 is further configured to analyze the bitstream to obtain the second residual value and the index value of the third component prediction model in the second candidate list. The fourth decision module 143 is further configured to determine the third component prediction model based on the index value of the third component prediction model in the second candidate list and the second candidate list. The second prediction module 144 is further configured to perform an intra-prediction on the first color component of the current block based on the third component prediction model and the reconstructed value of the second color component of the current block to obtain a third intra-prediction value. The fifth decision module 145 is further configured to determine the reconstructed value of the first color component of the current block based on the third intra-prediction value and the second residual value.

[0275] In some embodiments, the third decision module 142 is configured to sort the candidate component prediction models for the first color component in the second candidate list in ascending order of prediction error for the first color component in the second candidate list, and / or sort the candidate component prediction models for the third color component in the second candidate list in ascending order of prediction error for the third color component in the second candidate list.

[0276] In some other embodiments, the third decision module 142 is configured to sort the candidate component prediction model groups in the second candidate list in ascending order of the sum of the prediction errors of the candidate component prediction models for the first color component in the second candidate list and the prediction errors of the candidate component prediction models for the third color component in the same group.

[0277] In some embodiments, if the number of candidate component prediction model groups in the second candidate list is equal to N groups, the first candidate list is the sorted second candidate list. If the number of candidate component prediction model groups in the second candidate list is greater than N groups, the first candidate list is obtained by retaining the candidate component prediction models of the first N groups in the sorted second candidate list.

[0278] In some other embodiments, the second candidate list includes partial parameters of the candidate inter-component prediction model for the color component, and the third decision module 142 is configured to determine the remaining parameters of the candidate inter-component prediction model for the color component based on the partial parameters of the candidate inter-component prediction model for the color component in the second candidate list and the reconstruction values ​​of adjacent or non-adjacent blocks of the current block.

[0279] In some embodiments, when the inter-candidate component prediction model for the color components in the second candidate list is a CCLM model, a partial parameter of the inter-candidate component prediction model for the color components is the slope of the CCLM model.

[0280] In some embodiments, when the prediction model between candidate components of the color component in the second candidate list is the MMLM model, the partial parameters of the prediction model between candidate components of the color component include the slope of the first CCLM model, the slope of the second CCLM model, and the first threshold in the MMLM model. Here, when the reconstruction value of the second color component of the prediction pending sample of the color component in the template area of the current block is less than or equal to the first threshold, the second prediction module 144 further performs intra prediction on the color component of the prediction pending sample based on the first CCLM model and the reconstruction value of the second color component of the prediction pending sample. When the reconstruction value of the second color component of the prediction pending sample of the color component in the template area of the current block is greater than the first threshold, it is configured to perform intra prediction on the color component of the prediction pending sample based on the second CCLM model and the reconstruction value of the second color component of the prediction pending sample.

[0281] In some embodiments, the second candidate list includes partial parameters of the prediction model between candidate components of the color component. When the prediction model between candidate components of the color component in the second candidate list is the CCCM model, the partial parameters of the CCCM model are the filter parameters of the CCCM model, and the remaining parameters of the CCCM model include the offset value of the color component and the offset value of the second color component. The third determination module 142 is further configured to determine the offset value of the color component based on the reconstruction values of the color component of the adjacent block and / or non - adjacent block of the current block, and determine the offset value of the second color component based on the reconstruction values of the second color component of the adjacent block and / or non - adjacent block of the current block.

[0282] In some embodiments, the third determination module 142 is configured to determine the first candidate list when the size of the current block is smaller than a second threshold and / or when the size of the current block is larger than a third threshold, where the second threshold is larger than the third threshold.

[0283] In some embodiments, the third decision module 142 is configured to determine the first candidate list if the frame type to which the current block belongs is an intraframe.

[0284] In some embodiments, the decoding module 141 is further configured to analyze the bitstream and obtain a first flag, which is used to indicate whether the current block, the coding tree unit in which the current block is located, the slice in which the current block is located, the frame in which the current block is located, or the sequence in which the current block is located undergoes intraprediction using a sorting method.

[0285] In some embodiments, the decoding module 141 is further configured to analyze the bitstream and obtain a second flag, which is used to indicate whether or not to use a sorting method based on a template area.

[0286] The description of the above-described embodiment of the encoding / decoding device is similar to the description of the above-described embodiment of the encoding / decoding method, and has similar beneficial effects. Technical details not disclosed in the embodiment of the decoding device of this application should be understood by referring to the description of the embodiment of the encoding / decoding method of this application.

[0287] It should be noted that the module division of the encoding / decoding device described in the embodiments of this application is illustrative and merely a logical functional division; in actual implementation, other division methods may be possible. Furthermore, each functional unit in each embodiment of this application may be integrated into a single processing unit, or it may be a separate, independent physical unit, or two or more units may be integrated into a single unit. The integrated unit described above may be implemented in hardware form, or in the form of a software functional unit, or it may be implemented as a combination of software and hardware.

[0288] Furthermore, in the embodiments of this application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can be stored on a single computer-readable storage medium. Based on this understanding, the essential parts of the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product, which is stored on a single storage medium and contains several instructions for causing an electronic device to execute all or part of the methods in each embodiment of this application. The aforementioned storage mediums include various media capable of storing program code, such as U disks, mobile hard disks, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.

[0289] The embodiments of this application provide a computer-readable storage medium that stores a computer program for causing the encoding or decoding method described in the embodiments of this application to be executed when executed.

[0290] Embodiments of this application provide an encoder, as shown in Figure 15, comprising a first communication interface 151, a first memory 152, and a first processor 153, each component coupled to the others by a first bus system 154. For clarity, the first bus system 154 is configured to enable connection communication between these components. In addition to the data bus, the first bus system 154 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in Figure 15, the various buses are denoted as the first bus system 154. Here, The first communication interface 151 is configured to send and receive signals in the process of sending and receiving information with other external network elements.

[0291] The first memory 152 is configured to store computer programs that can be executed by the first processor 153.

[0292] The first processor 153 is configured to execute the encoding method described in the embodiment of this application when executing the computer program.

[0293] It should be understood that the first memory 152 in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Here, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. To the extent that this is not an exhaustive description, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linkage dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The first memory 152 in the systems and methods described herein includes, but is not limited to, these and any other suitable types of memory.

[0294] The first processor 153 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be performed by a hardware-type integrated logic circuit or a software-type instruction in the first processor 153. The first processor 153 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 gates, or transistor logic devices, discrete hardware components, etc., which can implement or execute each method, step and logic block diagram disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of this application may be performed directly by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module can be placed in a conventional storage medium such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, or registers. The storage medium is placed in the first memory 152, and the first processor 153 reads the information in the first memory 152 and performs the steps of the method described above in combination with its hardware.

[0295] To ensure understanding, these embodiments described in this application can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. Regarding hardware implementations, the processing unit can be one or more application-specific integrated circuits (ASICs), digital signal processing (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units configured to perform the functions described in this application, or a combination thereof. Regarding software implementations, the technology described in this application can be implemented by modules (processes, functions, etc.) that perform the functions described in this application. The software code can be stored in memory and executed by a processor. The memory may be implemented within or outside the processor.

[0296] Selectively, in another embodiment, the first processor 153 is further configured to execute any embodiment of the aforementioned encoding method when executing the computer program.

[0297] Embodiments of this application provide a decoder, as shown in Figure 16, comprising a second communication interface 161, a second memory 162, and a second processor 163, each component coupled to the others by a second bus system 164. For clarity, the second bus system 164 is configured to enable connection communication between these components. In addition to the data bus, the second bus system 164 also includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, the various buses are denoted as the second bus system 164 in Figure 16. Here, The second communication interface 161 is configured to send and receive signals in the process of sending and receiving information with other external network elements.

[0298] The second memory 162 is configured to store computer programs that can be executed by the first processor 163.

[0299] The second processor 163 is configured to execute the decoding method described in the embodiment of this application when executing the computer program.

[0300] It can be understood that the second memory 162 has similar hardware functionality to the first memory 152, and the second processor 163 has similar hardware functionality to the first processor 153, so we will not repeat and explain in detail here.

[0301] The embodiments of this application further provide a bitstream obtained by employing the encoding method described above.

[0302] Embodiments of this application provide an electronic device comprising a processor configured to execute a computer program and a computer-readable storage medium storing a computer program causing the processor to execute the encoding and / or decoding method described in the embodiment of this application. The electronic device may be any type of device having video encoding and / or video decoding capabilities, such as a mobile phone, tablet computer, notebook computer, personal computer, television, projection device or monitoring device.

[0303] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the method embodiments and has similar beneficial effects. Technical details not disclosed in the storage medium and device embodiments of this application should be understood by referring to the description of the method embodiments of this application.

[0304] Throughout this specification, the terms “one embodiment,” “one embodiment,” or “several embodiments” refer to the same specific embodiment. Therefore, “in one embodiment,” “in one embodiment,” or “in several embodiments” do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. In the various embodiments of this application, the magnitude of the process number does not indicate the order in which they are performed; the order of execution of each process should be determined by its function and internal logic and should not constitute any limitation on the implementation processes of the embodiments of this application. The above numbering of embodiments is not intended to indicate superiority or inferiority of embodiments, but is for illustrative purposes only. The above descriptions of each embodiment tend to emphasize the differences between them, and similarities or identicalities can be referenced to one another; for brevity, these are not described again in this specification.

[0305] In this specification, the term "and / or" describes the relationship between the related objects and indicates that there may be three possible relationships. For example, object A and / or object B can represent three cases: object A exists independently, both object A and object B exist, or object B exists independently.

[0306] In this specification, “includes,” “contains,” or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, item, or apparatus containing a set of elements may include not only those elements but also other elements not expressly enumerated, or elements inherent to those processes, methods, items, or apparatus. Without further restriction, an element limited by the phrase “contains one…” does not preclude the presence of other related elements in the process, method, item, or apparatus containing that element.

[0307] In some embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are illustrative only, and for example, the division of the modules is merely a division of logical functions, and in actual implementation, other methods of division may exist, for example, multiple modules or components may be combined or integrated into another system, and some features may be ignored or not implemented. Also, the coupling, direct coupling or communication connection between each component shown or discussed may be an indirect coupling or communication connection via several interfaces, devices or modules, and may be in the form of electrical, mechanical or other.

[0308] The modules described as individual parts may or may not be physically separated, and the parts shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network units, and some or all of these modules can be selected according to actual needs to achieve the objectives of the technical solution in this embodiment.

[0309] Furthermore, each functional module in each embodiment of this application may be integrated into a single processing unit, each module may be independent as a single unit, or two or more modules may be integrated into a single unit. The integrated module may be implemented in hardware form, or in the form of a hardware and software functional unit.

[0310] As those skilled in the art will understand, all or some of the steps of the embodiments of the above method can be performed by hardware associated with program instructions, the program can be stored in a computer-readable storage medium, and when the program is executed, the steps of the embodiments of the above method are performed, the storage medium includes a medium capable of storing program code, such as mobile storage, read-only memory (ROM), magnetic memory, or optical disk.

[0311] Alternatively, if the integrated unit described above in this application is implemented in the form of a software function module and sold or used as an independent product, it may be stored in a single computer-readable storage medium. Based on this understanding, essential parts of the technical solutions of the embodiments of this application, or parts that contribute to the prior art, may be embodied in the form of a software product, which may be stored in a single storage medium and may contain several instructions for causing an electronic device to perform all or part of the methods in each embodiment of this application. The aforementioned storage mediums include various media capable of storing program code, such as removable storage, ROM, magnetic disks, or optical disks.

[0312] The methods disclosed in some embodiments of the methods provided in this application can be arbitrarily combined without conflict to obtain new embodiments of the methods.

[0313] The features disclosed in some product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments. The features disclosed in some of the embodiments of methods or apparatus provided in this application can be arbitrarily combined without conflict to obtain new embodiments of methods or apparatus. The above description is merely an embodiment of the present application, and the scope of protection of this application is not limited thereto. All modifications or substitutions that a person skilled in the art could easily conceive of within the technical scope disclosed in this application should be included within the scope of protection of this application. Accordingly, the scope of protection of this application shall be subject to the scope of protection of the claims.

Claims

1. The encoding method performed by the encoder, The first candidate list is determined, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located. A first inter-component prediction model for the first color component is selected from the first candidate list, and an intra-prediction is performed on the first color component of the current block based on the first inter-component prediction model and the reconstructed value of the second color component of the current block to obtain a first intra-predicted value. Based on the first intra-predicted value and the sample value of the first color component of the current block, the first residual value of the first color component of the current block is determined. An encoding method comprising generating a bitstream based on a first residual value of the current block and an index value of the first inter-component prediction model in the first candidate list.

2. The first candidate list includes N groups (where N is greater than 1) of candidate component prediction models, and each group's candidate component prediction model includes the candidate component prediction model for the first color component and the candidate component prediction model for the third color component. The encoding method according to claim 1.

3. The candidate component prediction models for the first color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the first color component. The encoding method according to claim 2.

4. The candidate component prediction models for the third color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the third color component. The encoding method according to claim 2 or 3.

5. The candidate component inter-prediction model groups in the first candidate list are arranged in ascending order of the sum of the prediction errors of the candidate component inter-prediction model for the first color component and the candidate component inter-prediction model for the third color component in the candidate component inter-prediction model group. The encoding method according to claim 2.

6. A second candidate list is constructed, and based on the second candidate list, the first candidate list is determined. The second candidate list includes a candidate component prediction model for multiple groups, each candidate component prediction model for a group includes a candidate component prediction model for the first color component and / or a candidate component prediction model for the third color component, and each candidate component prediction model for multiple groups includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intraprediction for the first color component and / or third color component at adjacent and / or non-adjacent positions of the current block. The encoding method according to claim 1.

7. The aforementioned second candidate list includes one or more of the CCLM model, MMLM model, CCCM model, and GLM model. The encoding method according to claim 6.

8. Obtain a group of second-component prediction models employed to perform intraprediction for adjacent and / or non-adjacent positions of the current block, wherein the group of second-component prediction models includes a component-inter-component prediction model for the first color component and / or a component-inter-component prediction model for the third color component. If the number of groups in the second intercomponent prediction model after duplicate removal is less than N, the second intercomponent prediction model after duplicate removal is used as the candidate intercomponent prediction model in the second candidate list, and the candidate intercomponent prediction model in the second candidate list is supplemented using a CCLM model with a specific slope so that the number of candidate intercomponent prediction models in the second candidate list reaches N groups. The encoding method according to claim 6.

9. The aforementioned encoding method is If the number of groups in the second inter-component prediction model after duplicate removal is equal to N, the second inter-component prediction model after duplicate removal is further set as the candidate inter-component prediction model in the second candidate list. The encoding method according to claim 8.

10. The aforementioned encoding method is If the number of second-component prediction models after duplicate removal is greater than N, the method further includes making the second-component prediction models after duplicate removal the candidate-component prediction models in the second candidate list. The encoding method according to claim 8.

11. Determining the first candidate list based on the second candidate list means that To determine the prediction error of the prediction model between candidate components in the second candidate list, The prediction errors of the prediction models between candidate components in the second candidate list are used to sort the prediction models between candidate components in the second candidate list, This includes determining the first candidate list based on the second candidate list after sorting, The encoding method according to any one of claims 8 to 10.

12. Determining the prediction error of the prediction model between candidate color components in the second candidate list is: The process involves performing an intra-prediction on the color component in the template region of the current block based on the candidate component prediction model for the color component in the second candidate list and the reconstructed value of the second color component in the template region of the current block, thereby obtaining a second intra-predicted value, wherein the color component refers to either the first color component or the third color component. This includes determining the prediction error of the candidate component prediction model for the color component in the second candidate list based on the second intra-predicted value and the reconstructed value of the color component in the template region of the current block, The encoding method according to claim 11.

13. The prediction error of the inter-candidate component prediction model for the color component in the second candidate list is equal to the SAD, SATD, MSE, or SSD between the second intra-predicted value and the reconstructed value of the color component in the template region of the current block. The encoding method according to claim 12.

14. The template region of the current block includes the upper adjacent template and / or the left adjacent template of the current block. The encoding method according to claim 12.

15. The aforementioned upper adjacent template is the upper adjacent row of the current block. The encoding method according to claim 14.

16. The left-side adjacent template is the left-side adjacent column of the current block. The encoding method according to claim 14 or 15.

17. The aforementioned encoding method is If a first sample exists in the template region of the current block for which the reconstruction of the second color component is incomplete, the reconstruction of the second color component of the first sample is further filled using the reconstruction values ​​of a second sample adjacent to or not adjacent to the first sample for which the reconstruction of the second color component is complete. The encoding method according to claim 12.

18. The aforementioned encoding method is If the reconstruction of the second color component of all samples in the template region of the current block is incomplete, a third-component prediction model for the first color component is selected from the second candidate list, and an intra-prediction is performed on the first color component of the current block based on the third-component prediction model and the reconstructed value of the second color component of the current block to obtain a third intra-prediction value. Based on the third intra-predicted value and the sample value of the first color component of the current block, the second residual value of the first color component of the current block is determined. The further includes generating a bitstream based on the second residual value of the current block and the index value of the third component prediction model in the second candidate list, The encoding method according to claim 12.

19. Sort the candidate component prediction models in the second candidate list based on their prediction errors. Sort the candidate component prediction models for the first color component in the second candidate list in ascending order of prediction error of the candidate component prediction models for the first color component in the second candidate list, and / or This includes sorting the candidate prediction models for the third color component in the second candidate list in ascending order of their prediction errors. The encoding method according to claim 11.

20. Sort the candidate component prediction models in the second candidate list based on their prediction errors. This includes sorting the candidate component prediction model groups in the second candidate list in ascending order of the sum of the prediction errors of the candidate component prediction models for the first color component in the second candidate list and the prediction errors of the candidate component prediction models for the third color component in the same group. The encoding method according to claim 11.

21. If the number of candidate component prediction model groups in the second candidate list is equal to N groups, then the first candidate list is the sorted second candidate list. If the number of candidate component prediction model groups in the second candidate list is greater than N groups, the candidate component prediction model of the first N group in the sorted second candidate list is retained, and the first candidate list is obtained. The encoding method according to claim 19 or 20.

22. The second candidate list includes partial parameters of the prediction model between candidate color components, The process further includes determining the remaining parameters of the candidate component prediction model for the color component based on partial parameters of the candidate component prediction model for the color component in the second candidate list and the reconstruction values ​​of adjacent or non-adjacent blocks of the current block. The encoding method according to claim 12.

23. If the inter-candidate component prediction model for the color component in the second candidate list is a CCLM model, then a partial parameter of the inter-candidate component prediction model for the color component is the slope of the CCLM model. The encoding method according to claim 22.

24. If the inter-candidate component prediction model for the color component in the second candidate list is an MMLM model, then the partial parameters of the inter-candidate component prediction model for the color component include the slope of the first CCLM model, the slope of the second CCLM model, and the first threshold in the MMLM model. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is less than or equal to the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the first CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is greater than the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the second CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample. The encoding method according to claim 22.

25. The second candidate list includes partial parameters of the prediction model between candidate color components, If the inter-candidate component prediction model for the color components in the second candidate list is a CCCM model, then the partial parameters of the CCCM model are the filter parameters of the CCCM model. The remaining parameters of the CCCM model include the offset value of the color component and the offset value of the second color component, and the encoding method is The offset value of the color component is determined based on the reconstruction values ​​of the color components of the adjacent blocks and / or non-adjacent blocks of the current block. The further includes determining the offset value of the second color component based on the reconstruction values ​​of the second color component of adjacent blocks and / or non-adjacent blocks of the current block, The encoding method according to claim 12.

26. If the size of the current block is less than the second threshold, and / or the size of the current block is greater than the third threshold, the first candidate list is determined, and the second threshold is greater than the third threshold. The encoding method according to claim 1.

27. If the frame type to which the current block belongs is an intraframe, the first candidate list is determined. The encoding method according to claim 1.

28. The aforementioned encoding method is The process further includes writing a first flag to the bitstream, the first flag being used to indicate whether the current block, the coded tree unit in which the current block is located, the slice in which the current block is located, the frame in which the current block is located, or the sequence in which the current block is located performs intraprediction using a sorting method. The encoding method according to claim 1.

29. The aforementioned encoding method is The process further includes writing a second flag to the bitstream, the second flag being used to indicate whether or not to use a sorting method based on a template area. The encoding method according to claim 12.

30. The first and third color components are chromaticity components, and the second color component is a luminance component. The encoding method according to claim 2.

31. A decoding method performed by the decoder, The bitstream is analyzed to obtain the first residual value of the first color component of the current block and the index value of the first component-to-component prediction model in the first candidate list. The first candidate list is determined such that the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located. The first component prediction model is determined based on the index value of the first component prediction model in the first candidate list and the first candidate list, Based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, an intra-prediction is performed on the first color component of the current block to obtain a first intra-predicted value. A decoding method comprising determining the reconstructed value of the first color component of the current block based on the first intra-predicted value and the first residual value.

32. The first candidate list includes N groups of candidate component prediction models, and each group's candidate component prediction model includes the candidate component prediction model for the first color component and the candidate component prediction model for the third color component. The decoding method according to claim 31.

33. The candidate component prediction models for the first color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the first color component. The decoding method according to claim 32.

34. The candidate component prediction models for the third color component in the first candidate list are arranged in ascending order of prediction error of the candidate component prediction models for the third color component. The decoding method according to claim 32 or 33.

35. The candidate component inter-prediction model groups in the first candidate list are arranged in ascending order of the sum of the prediction errors of the candidate component inter-prediction model for the first color component and the candidate component inter-prediction model for the third color component in the candidate component inter-prediction model group. The decoding method according to claim 32.

36. A second candidate list is constructed, and based on the second candidate list, the first candidate list is determined. The second candidate list includes a candidate component prediction model for multiple groups, each candidate component prediction model for a group includes a candidate component prediction model for the first color component and / or a candidate component prediction model for the third color component, and each candidate component prediction model for multiple groups includes a CCLM model with a specific slope and / or a second component prediction model employed to perform intraprediction for the first color component and / or third color component at adjacent and / or non-adjacent positions of the current block. The decoding method according to claim 31.

37. The aforementioned second candidate list includes one or more of the CCLM model, MMLM model, CCCM model, and GLM model. The decoding method according to claim 36.

38. Obtain a group of second-component interpretation models employed to perform intraprediction for adjacent and / or non-adjacent positions of the current block, wherein the group of second-component interpretation models includes inter-component prediction models for the first color component and / or the third color component. If the number of groups in the second intercomponent prediction model after duplicate removal is less than N, the second intercomponent prediction model after duplicate removal is used as the candidate intercomponent prediction model in the second candidate list, and the candidate intercomponent prediction model in the second candidate list is supplemented using a CCLM model with a specific slope so that the number of candidate intercomponent prediction models in the second candidate list reaches N groups. The decoding method according to claim 36.

39. The aforementioned decoding method is If the number of groups in the second inter-component prediction model after duplicate removal is equal to N, the second inter-component prediction model after duplicate removal is further set as the candidate inter-component prediction model in the second candidate list. The decoding method according to claim 38.

40. The aforementioned decoding method is If the number of groups in the second inter-component prediction model after duplicate removal is greater than N, the second inter-component prediction model after duplicate removal is further set as the candidate inter-component prediction model in the second candidate list. The decoding method according to claim 38.

41. Determining the first candidate list based on the second candidate list means that To determine the prediction error of the prediction model between candidate components in the second candidate list, The prediction errors of the prediction models between candidate components in the second candidate list are used to sort the prediction models between candidate components in the second candidate list, This includes determining the first candidate list based on the second candidate list after sorting, The decoding method according to any one of claims 38 to 40.

42. Determining the prediction error of the prediction model between candidate color components in the second candidate list is: The process involves performing an intra-prediction on the color component in the template region of the current block based on the candidate component prediction model for the color component in the second candidate list and the reconstructed value of the second color component in the template region of the current block, thereby obtaining a second intra-predicted value, wherein the color component refers to either the first color component or the third color component. This includes determining the prediction error of the candidate component prediction model for the color component in the second candidate list based on the second intra-predicted value and the reconstructed value of the color component in the template region of the current block, The decoding method according to claim 41.

43. The prediction error of the inter-candidate component prediction model for the color component in the second candidate list is equal to the SAD, SATD, MSE, or SSD between the second intra-predicted value and the reconstructed value of the color component in the template region of the current block. The decoding method according to claim 42.

44. The template region of the current block includes the upper adjacent template and / or the left adjacent template of the current block. The decoding method according to claim 42.

45. The aforementioned upper adjacent template is the upper adjacent row of the current block. The decoding method according to claim 44.

46. The left-side adjacent template is the left-side adjacent column of the current block. The decoding method according to claim 44 or 45.

47. The aforementioned decoding method is If a first sample exists in the template region of the current block for which the reconstruction of the second color component is incomplete, the reconstruction of the second color component of the first sample is further filled using the reconstruction values ​​of a second sample adjacent to or not adjacent to the first sample for which the reconstruction of the second color component is complete. The decoding method according to claim 42.

48. If the reconstruction of the second color component of all samples in the template region of the current block is incomplete, the bitstream includes the second residual value of the current block and the index value of the third component prediction model in the second candidate list, and the decoding method is The bitstream is analyzed to obtain the second residual value and the index value of the third component prediction model in the second candidate list, The third component prediction model is determined based on the index value of the third component prediction model in the second candidate list and the second candidate list, Based on the third component prediction model and the reconstructed value of the second color component of the current block, an intra-prediction is performed on the first color component of the current block to obtain a third intra-predicted value. The further step is to determine the reconstruction value of the first color component of the current block based on the third intra-predicted value and the second residual value, The decoding method according to claim 42.

49. Sort the candidate component prediction models in the second candidate list based on their prediction errors. Sort the candidate component prediction models for the first color component in the second candidate list in ascending order of prediction error of the candidate component prediction models for the first color component in the second candidate list, and / or This includes sorting the candidate prediction models for the third color component in the second candidate list in ascending order of their prediction errors. The decoding method according to claim 41.

50. Sort the candidate component prediction models in the second candidate list based on their prediction errors. This includes sorting the candidate component prediction model groups in the second candidate list in ascending order of the sum of the prediction errors of the candidate component prediction models for the first color component in the second candidate list and the prediction errors of the candidate component prediction models for the third color component in the same group. The decoding method according to claim 41.

51. If the number of candidate component prediction model groups in the second candidate list is equal to N groups, then the first candidate list is the sorted second candidate list. If the number of candidate component prediction model groups in the second candidate list is greater than N groups, the candidate component prediction model of the first N group in the sorted second candidate list is retained, and the first candidate list is obtained. The decoding method according to claim 49 or 50.

52. The second candidate list includes partial parameters of the prediction model between candidate color components, and the decoding method is The process further includes determining the remaining parameters of the candidate component prediction model for the color component based on partial parameters of the candidate component prediction model for the color component in the second candidate list and the reconstruction values ​​of adjacent or non-adjacent blocks of the current block. The decoding method according to claim 42.

53. If the inter-candidate component prediction model for the color component in the second candidate list is a CCLM model, then a partial parameter of the inter-candidate component prediction model for the color component is the slope of the CCLM model. The decoding method according to claim 52.

54. If the inter-candidate component prediction model for the color component in the second candidate list is an MMLM model, then the partial parameters of the inter-candidate component prediction model for the color component include the slope of the first CCLM model, the slope of the second CCLM model, and the first threshold in the MMLM model. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is less than or equal to the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the first CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample. If the reconstruction value of the second color component of the color component of the prediction-awaiting sample in the template region of the current block is greater than the first threshold, an intra-prediction is performed on the color component of the prediction-awaiting sample based on the second CCLM model and the reconstruction value of the second color component of the prediction-awaiting sample. The decoding method according to claim 52.

55. The second candidate list includes partial parameters of the prediction model between candidate color components, If the inter-candidate component prediction model for the color components in the second candidate list is a CCCM model, then the partial parameters of the CCCM model are the filter parameters of the CCCM model. The remaining parameters of the CCCM model include the offset value of the color component and the offset value of the second color component, and the decoding method is The offset value of the color component is determined based on the reconstruction values ​​of the color components of the adjacent blocks and / or non-adjacent blocks of the current block. The further includes determining the offset value of the second color component based on the reconstruction values ​​of the second color component of adjacent blocks and / or non-adjacent blocks of the current block, The decoding method according to claim 42.

56. If the size of the current block is less than the second threshold, and / or the size of the current block is greater than the third threshold, the first candidate list is determined, and the second threshold is greater than the third threshold. The decoding method according to claim 31.

57. If the frame type to which the current block belongs is an intraframe, the first candidate list is determined. The decoding method according to claim 31.

58. The aforementioned decoding method is The method further includes analyzing a bitstream and obtaining a first flag, the first flag being used to indicate whether the current block, the coded tree unit in which the current block is located, the slice in which the current block is located, the frame in which the current block is located, or the sequence in which the current block is located performs intraprediction using a sorting method. The decoding method according to claim 31.

59. The aforementioned decoding method is The process further includes parsing the bitstream and obtaining a second flag, which is used to indicate whether or not to use a sorting method based on a template region. The decoding method according to claim 42.

60. The first and third color components are chromaticity components, and the second color component is a luminance component. The decoding method according to claim 32.

61. An encoding device applied to an encoder, A first decision module configured to determine a first candidate list, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located. A selection module configured to select a first-component prediction model for the first color component from the first candidate list, A first prediction module is configured to perform an intra-prediction on the first color component of the current block and obtain a first intra-prediction value based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, A second determination module is configured to determine a first residual value of the first color component of the current block based on the first intra-predicted value and the sample value of the first color component of the current block, An encoding device comprising: an encoding module configured to generate a bitstream based on the first residual value of the current block and the index value of the first inter-component prediction model in the first candidate list.

62. An encoder comprising a first memory and a first processor, The first memory is configured to store a computer program that can be executed by the first processor. The first processor is configured to execute the encoding method described in any one of claims 1 to 30 when executing the computer program, wherein the first processor is an encoder.

63. A bitstream obtained by employing the encoding method described in any one of claims 1 to 30.

64. A decoding device applied to a decoder, A decoding module configured to analyze a bitstream and obtain the first residual value of the first color component of the current block and the index value of the first component-to-component prediction model in the first candidate list, A third decision module configured to determine the first candidate list, wherein the candidate component prediction models in the first candidate list are arranged in ascending order of the prediction error of the candidate component prediction model or the sum of the prediction errors within the model group in which the candidate component prediction model is located. A fourth decision module configured to determine the first inter-component prediction model based on the index value of the first inter-component prediction model in the first candidate list and the first candidate list, A second prediction module is configured to perform an intra-prediction on the first color component of the current block and obtain a first intra-prediction value based on the first inter-component prediction model and the reconstructed value of the second color component of the current block, A decoding device comprising: a fifth determination module configured to determine the reconstruction value of the first color component of the current block based on the first intra-predicted value and the first residual value.

65. A decoder comprising a second memory and a second processor, The second memory is configured to store a computer program that can be executed by the second processor. The second processor is configured to execute the decoding method described in any one of claims 31 to 60 when executing the computer program, wherein the second processor is configured to execute the decoding method described in any one of claims 31 to 60.

66. It is an electronic device, A processor configured to run computer programs, An electronic device comprising: a computer-readable storage medium storing a computer program in the processor that, when executed, implements the encoding method described in any one of claims 1 to 30, or the decoding method described in any one of claims 31 to 60.

67. A computer-readable storage medium storing a computer program for implementing the encoding method described in any one of claims 1 to 30, or the decoding method described in any one of claims 31 to 60, when executed.