Chroma block prediction method and apparatus

By classifying luma values ​​and chroma values, scaling coefficients and offset factors are determined based on the classification average value, the problem of low efficiency of chroma block prediction in the prior art is solved, and more efficient encoding and decoding is achieved.

JP7661577B2Active Publication Date: 2025-04-14HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024080410
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-01-03
Filing Date
2024-05-16
Publication Date
2025-04-14
Estimated Expiration
2039-12-10

AI Technical Summary

Technical Problem

In the prior art, chroma block prediction is less efficient, mainly because a large number of multiplication operations are required to determine scaling factor and offset factor.

Method used

The number of multiplication operations is reduced by classifying luma values ​​and chroma values ​​into two sets and determining scaling coefficients and offset factors based on the average of these sets.

Benefits of technology

Improves the efficiency of chroma block prediction, reduces the amount of calculation, and improves the speed of encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007661577000016
    Figure 0007661577000016
  • Figure 0007661577000017
    Figure 0007661577000017
  • Figure 0007661577000018
    Figure 0007661577000018
Patent Text Reader

Abstract

To provide a chroma block prediction method and device for improving chroma block prediction efficiency.SOLUTION: The method includes: acquiring chroma values of chroma samples at preset positions from neighboring samples of a chroma block; acquiring, on the basis of the neighboring samples of the luma block corresponding to the chroma block, luma values of luma samples corresponding to the chroma samples; classifying the acquired luma values into a first and second luma sets to group the luma values, respectively; determining a scaling coefficient in a linear model based on an average value of the luma values in the first luma set, an average value of the luma values in the second luma set, an average value of the chroma values in a first chroma set, and an average value of the chroma values in a second chroma set; determining, based on the scaling coefficient, an offset factor in the linear model corresponding to the chroma block; and determining prediction information of the chroma block based on luma reconfiguration information corresponding to the scaling coefficient, the offset factor, and the chroma block.SELECTED DRAWING: Figure 11
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 201910005667.3, entitled “Chroma Block Prediction Method and Apparatus,” filed on January 3, 2019, which is hereby incorporated by reference in its entirety.

[0002] This application relates to the field of video encoding and decoding technologies, and in particular to a chroma block prediction method and apparatus. [Background technology]

[0003] With the development of Internet technology, the amount of video application programs is increasing, and the video application programs impose more and more requirements on high definition video. However, the data amount of high definition video is relatively large, so when high definition video needs to be transmitted within a limited network bandwidth, the high definition video needs to be encoded. Generally, the encoding process mainly includes intra prediction, inter prediction, transform, quantization, entropy coding, intra loop filtering, and the like.

[0004] In the related art, when intra prediction needs to be performed, prediction information of a chroma block can be determined by using a Cross Component Linear Mode (CCLM) (which may also be referred to as a Cross-Component Prediction (CCP) mode, or a Cross-Component Intra Prediction (CCIP) mode, or simply a linear mode (LM)). This is a chroma intra prediction method that uses the correlation between luminance and chrominance. In this method, prediction information of a current chroma block is derived according to a linear model using a reconstructed luma component, which is expressed as follows:

number

number

[0005] Thus, for each chroma block in which CCLM is used, it is necessary to determine the scaling coefficient and offset factor. However, the above-mentioned determination process requires a large number of multiplications and is relatively complicated. As a result, the chroma block prediction efficiency is relatively low. Summary of the Invention

[0006] To solve the problems in the related art, the embodiments of this application provide a chroma block prediction method and apparatus, the technical solutions of which are as follows:

[0007] According to a first aspect, there is provided a method for chroma block prediction, the method comprising: obtaining chroma values ​​of chroma samples at preset positions from adjacent samples of a chroma block; obtaining luma values ​​of luma samples corresponding to the chroma samples at the preset positions based on adjacent samples of a luma block corresponding to the chroma blocks; classifying the obtained luma values ​​into a first luma set and a second luma set; grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the first luma set into the first chroma set; and grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the second luma set into the second chroma set; determining a scaling coefficient in a linear model corresponding to the chroma block based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set; determining an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient; and determining prediction information for the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block.

[0008] In the solution shown in this embodiment of this application, when intra prediction needs to be performed on a current chroma block (hereinafter may be abbreviated as chroma block), a chroma value of a chroma sample at a preset position may be obtained from adjacent samples of the chroma block. Then, a luma block corresponding to the chroma block may be determined, and a luma value of a luma sample corresponding to the chroma sample at a preset position may be obtained based on adjacent samples of the luma block. The obtained luma value is classified into a first luma set and a second luma set. The chroma value is automatically classified into the first chroma set and the second chroma set based on the luma value. Then, a scaling coefficient in a linear model corresponding to a chroma block is determined based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set. Then, an offset factor in a linear model corresponding to a chroma block is determined based on the scaling coefficient. Finally, prediction information of the chroma block is obtained based on the luma reconstruction information corresponding to the chroma block, the scaling coefficient, and the offset factor, where the luma reconstruction information corresponding to the chroma block includes downsampling information of the luma reconstruction block corresponding to the chroma block.

[0009] Thus, only a smaller number of multiplications are required, which can reduce the amount of calculations and further improve the efficiency of chroma block prediction.

[0010] In one possible implementation, the method further includes obtaining instruction information, determining an intra-prediction mode corresponding to the chroma block based on the instruction information, the intra-prediction mode including at least one of a linear mode LM, a linear mode above (LMA), and a linear mode left (LML), and determining the preset position based on the intra-prediction mode corresponding to the chroma block.

[0011] In the solution shown in this embodiment of this application, when performing encoding, the encoder side may encode indication information into a bitstream, and then send the bitstream to the decoder side. The decoder side may obtain the indication information from the received bitstream, and determine an intra-prediction mode corresponding to a chroma block based on the indication information. Then, the decoder side may determine a preset position based on the intra-prediction mode corresponding to a chroma block. Thus, the decoder side may determine an intra-prediction mode used for a chroma block, and then determine a preset position based on the intra-prediction mode.

[0012] In one possible implementation, obtaining the chroma value of the chroma sample at the preset position from adjacent samples of the chroma block includes obtaining the chroma value of the chroma sample at the preset position from the adjacent samples of the chroma block based on a predetermined correspondence between intra-prediction modes and preset positions and the intra-prediction mode corresponding to the chroma block.

[0013] In the solution shown in this embodiment of this application, when performing decoding, the decoder side may obtain a predetermined correspondence between an intra-prediction mode and a position, and determine a preset position corresponding to the intra-prediction mode of a chroma block from the correspondence, and then obtain a chroma value of a chroma sample at the preset position from adjacent samples of the chroma block based on the preset position.

[0014] Thus, different preset positions can be selected for different intra prediction modes, so that the chroma block prediction results can be more accurate.

[0015] In one possible implementation, the position coordinates of the upper adjacent sample of the chroma block are (0,-1), (1,-1), ..., and (X-1,-1), and the position coordinates of the left adjacent sample of the chroma block are (-1,0), (-1,1), ..., and (-1,Y-1), where X represents the width of the chroma block and Y represents the height of the chroma block, and when the intra prediction mode corresponding to the chroma block is a cross-component linear mode LM, the position coordinates of the chroma samples at the preset positions are (0,-1), (X-1,-1), (-1,-0), and (-1,Y-1).

[0016] In the solution shown in this embodiment of this application, a rectangular plane coordinate system is correspondingly established for a chroma block. The first chroma sample in the upper left corner of the chroma block is used as the coordinate origin, the horizontal direction to the right is the positive direction of the x-axis, and the vertical direction to the bottom is the positive direction of the y-axis. Thus, the position coordinates of the upper neighboring sample of a chroma block are (0,-1), (1,-1), ..., and (X-1,-1), and the position coordinates of the left neighboring sample of a chroma block are (-1,0), (-1,1), ..., and (-1,Y-1), where X represents the width of the chroma block (i.e., the number of samples in the width direction of the chroma block) and Y represents the height of the chroma block (i.e., the number of samples in the height direction of the chroma block). When the intra prediction mode is LM, the position coordinates of the chroma samples at the preset positions are (0, -1), (X-1, -1), (-1, -0), and (-1, Y-1).

[0017] In one possible implementation, the position coordinates of the upper adjacent sample of the chroma block are (0, -1), (1, -1), ..., and (X-1, -1), where X represents the width of the chroma block, and when the intra prediction mode corresponding to the chroma block is cross-component linear mode upper LMA, the position coordinates of the preset positions are (0, -1), (X / 4, -1), (X-1-X / 4, -1), and (X-1, -1), or (0, -1), (X / 4, -1), (3 x X / 4, -1), and (X-1, -1).

[0018] In the solution shown in this embodiment of this application, a rectangular plane coordinate system is correspondingly established for the chroma block. The first chroma sample in the upper left corner of the chroma block is used as the coordinate origin, the horizontal direction to the right is the positive direction of the x-axis, and the vertical direction to the bottom is the positive direction of the y-axis. When the intra prediction mode is LMA, the position coordinates of the preset positions are (0,-1), (X / 4,-1), (X-1-X / 4,-1), and (X-1,-1), or (0,-1), (X / 4,-1), (3×X / 4,-1), and (X-1,-1), where X represents the width of the chroma block (i.e., the number of samples in the width direction of the chroma block).

[0019] In one possible implementation, the position coordinates of the left adjacent sample of the chroma block are (-1,0), (-1,1), ..., and (-1,Y-1), where Y represents the height of the chroma block, and if the intra prediction mode corresponding to the chroma block is cross-component linear mode left LML, the position coordinates of the preset positions are (-1,0), (-1,Y / 4), (-1,Y-1-Y / 4), and (-1,Y-1), or (-1,0), (-1,Y / 4), (-1,3×Y / 4), and (-1,Y-1).

[0020] In the solution shown in this embodiment of this application, a rectangular plane coordinate system is correspondingly established for the chroma block. The first chroma sample in the upper left corner of the chroma block is used as the coordinate origin, the horizontal direction to the right is the positive direction of the x-axis, and the vertical direction to the bottom is the positive direction of the y-axis. When the intra prediction mode is LML, the position coordinates of the preset positions are (-1,0), (-1,Y / 4), (-1,Y-1-Y / 4), and (-1,Y-1), or (-1,0), (-1,Y / 4), (-1,3×Y / 4), and (-1,Y-1), where Y represents the height of the chroma block (i.e., the number of samples in the height direction of the chroma block).

[0021] In one possible implementation, the obtaining of the luma value of the luma sample corresponding to the chroma sample at the preset position based on adjacent samples of a luma block corresponding to the chroma block includes obtaining, from the adjacent samples of the luma block, a position coordinate of the luma sample corresponding to the chroma sample at the i-th preset position within the preset positions, where the position coordinate of the luma sample corresponding to the i-th preset position within the preset positions is (2×X i ,2×Y i ), and the position coordinates of the chroma sample at the i-th preset position are (X i ,Y i and obtaining the luma value of the luma sample corresponding to the chroma sample at the preset position from the neighboring samples of the luma block corresponding to the chroma block based on a position coordinate of the luma sample corresponding to the chroma sample at the preset position, or determining position coordinates of a plurality of samples corresponding to the j-th preset position from the neighboring samples of the luma block based on a position coordinate of the chroma sample of a j-th preset position within the preset positions, and determining position coordinates of a luma sample corresponding to the chroma sample at the j-th preset position based on the position coordinates of the plurality of samples, and obtaining the luma value of the luma sample corresponding to the chroma sample at the preset position from the neighboring samples of the luma block corresponding to the chroma sample at the preset position based on the position coordinate of the luma sample corresponding to the chroma sample at the preset position.

[0022] In the solution shown in this embodiment of the present application, when a chroma block is decoded, the position coordinate of the chroma sample of the i-th preset position within the preset positions is (X i ,Y i ), and the position coordinate of the luma sample corresponding to the chroma sample at the i-th preset position from the adjacent samples of the luma block is (2 × X i ,2×Y i ) can be determined. Thus, the position coordinates of the luma sample corresponding to the chroma sample at the preset position can be obtained.

[0023] Alternatively, when a chroma block is decoded, the position coordinates of the chroma sample at the j-th preset position within the preset positions are (X j ,Y j ) for the chroma sample at the j-th preset position. j ,Y j ) of adjacent samples of the luma block corresponding to the jth preset position is determined, and then the position coordinates of the luma sample corresponding to the chroma sample of the jth preset position are obtained based on the position coordinates of the plurality of sample positions. For example, a weighting method may be used. The position coordinates of the plurality of sample positions are determined based on the position coordinates of the plurality of sample positions. j ,2×Y j ), (2×X j ,2×Y j +1), (2×X j +1,2×Y j ), (2×X j +1,2×Y j +1), (2×X j +2,2×Y j ), and (2×X j +2,2×Y j +1), all of these sample positions correspond to weighting values ​​of 2 / 8, 1 / 8, 1 / 8, 2 / 8, 1 / 8, and 1 / 8, respectively. After weighting, the position coordinates (2×X j ,2×Y j +0.5) may be obtained. Also, the weighting method may not be used, which is not limited in this embodiment of this application. Thus, the position coordinates of the luma sample corresponding to the chroma sample at the preset position may be obtained. Then, based on the position coordinates of the luma sample corresponding to the chroma sample at the preset position, the luma value may be obtained from the corresponding luma sample.

[0024] In this way the luma value can be determined more quickly.

[0025] In one possible implementation, the indication information is obtained from the received bitstream.

[0026] In the solution shown in this embodiment of this application, when performing encoding, the encoder side can encode indication information indicating an intra-prediction mode into a bitstream, and then send the bitstream to the decoder side, which can obtain the indication information from the received bitstream.

[0027] Thus, the decoder side can determine the intra prediction mode to be used for the chroma block.

[0028] In one possible implementation, the classifying of the acquired luma values ​​into a first luma set and a second luma set includes determining an average value of the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions, grouping luma values ​​among the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions that are less than or equal to the average value of the luma values ​​into the first luma set, and grouping luma values ​​among the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions that are greater than the average value of the luma values ​​into the second luma set.

[0029] In the solution presented in this embodiment of the application, luma values ​​among all the obtained luma values ​​that are less than or equal to the average value of the luma values ​​are determined, and these luma values ​​are grouped into a first luma set. Furthermore, luma values ​​among all the obtained luma values ​​that are greater than the average value of the luma values ​​can be determined, and these luma values ​​are grouped into a second luma set. Thus, the luma values ​​in the first luma set are smaller than the luma values ​​in the second luma set.

[0030] Thus, the chroma block prediction speed can be increased without degrading the coding performance.

[0031] In one possible implementation, the classifying of the acquired luma values ​​into a first luma set and a second luma set includes sorting the luma values ​​of the luma samples corresponding to the chroma samples at the preset position in ascending order to obtain a first luma value queue, and if the number of luma samples in the first luma value queue is an even number, grouping the luma values ​​of a first half of the first luma value queue into the first luma set and grouping the luma values ​​of a second half of the luma value queue into the second luma set, or sorting the luma values ​​of the luma samples corresponding to the chroma samples at the preset position in descending order to obtain a second luma value queue, and if the number of luma samples in the second luma value queue is an even number, grouping the luma values ​​of a second half of the second luma value queue into the first luma set and grouping the luma values ​​of the first half of the luma value queue into the second luma set.

[0032] In the solution shown in this embodiment of the application, the obtained luma values ​​are sorted in ascending order to obtain a first luma value queue. If the number of luma samples in the first luma value queue is even, the luma values ​​of the first half of the first luma value queue may be determined and grouped into a first luma set, and the luma values ​​of the second half of the first luma value queue may be determined and grouped into a second luma set. Alternatively, the obtained luma values ​​are sorted in descending order to obtain a second luma value queue. If the number of luma samples in the second luma value queue is even, the luma values ​​of the second half of the second luma value queue may be determined and grouped into a first luma set, and the luma values ​​of the first half of the second luma value queue may be determined and grouped into a second luma set.

[0033] Thus, the chroma block prediction speed can be increased without degrading the coding performance.

[0034] In one possible implementation, determining a scaling factor in a linear model corresponding to the chroma block based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set is Lmean -C Rmean ) / (L Lmean -L Rmean ), where α is the scaling factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and C Rmean is the average value of the chroma values ​​in the second chroma set, and L Lmean is the average value of the luma values ​​in the first luma set, and L Rmean is the average value of the luma values ​​in the second luma set.

[0035] In one possible implementation, determining an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient includes determining the offset factor in the linear model corresponding to the chroma block based on the scaling coefficient, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set.

[0036] In the solution shown in this embodiment of the application, an average value of the chroma values ​​in a first chroma set may be determined, and an average value of the luma values ​​in a first luma set may be determined, and an offset factor in the linear model corresponding to the chroma block is then determined based on the scaling coefficient, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set.

[0037] In one possible implementation, determining the offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set comprises: Lmean -α*L Lmean where α is the scaling factor, β is the offset factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and L Lmean is the average value of the luma values ​​in the first luma set.

[0038] In one possible implementation, determining an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient includes determining the offset factor in the linear model corresponding to the chroma block based on the scaling coefficient, an average value of the chroma values ​​of the chroma samples at the preset positions, and the average value of the luma values ​​of the luma samples corresponding to the chroma samples.

[0039] In the solution presented in this embodiment of this application, an average value of all obtained chroma values ​​may be determined, and an average value of all obtained luma values ​​may be determined, and then an offset factor in the linear model corresponding to the chroma block is determined based on the scaling factor, the average value of all chroma values, and the average value of all luma values.

[0040] In one possible implementation, determining the offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​of the chroma samples at the preset positions, and the average value of the luma values ​​of the luma samples corresponding to the chroma samples comprises: mean -α*L meanwhere α is the scaling factor, β is the offset factor in the linear model corresponding to the chroma block, and C mean is the average value of the chroma values ​​of the chroma samples at the preset positions, and L mean is the average value of the luma values ​​of the luma samples corresponding to the chroma samples of the preset positions.

[0041] According to a second aspect, there is provided a chroma block prediction apparatus, the prediction apparatus comprising a processor and a memory configured to store processor-executable instructions, the processor executing the instructions to perform the chroma block prediction method provided in the first aspect.

[0042] According to a third aspect, there is provided a chroma block prediction apparatus, the apparatus including one or more modules configured to implement the chroma block prediction method provided in the first aspect.

[0043] According to a fourth aspect, there is provided a computer-readable storage medium having instructions stored thereon that, when executed on a computing device, enable the computing device to perform the chroma block prediction method provided in the first aspect.

[0044] According to a fifth aspect, there is provided a computer program product comprising instructions which, when executed on a computing device, enable the computing device to perform the chroma block prediction method provided in the first aspect.

[0045] The beneficial effects brought about by the technical solutions provided in the embodiments of this application at least include:

[0046] In an embodiment of this application, during encoding or decoding, the chroma value of the chroma sample at the preset position may be obtained from the neighboring samples of the chroma block. Then, the luma value of the luma sample corresponding to the chroma sample at the preset position is obtained from the neighboring samples of the luma block corresponding to the chroma block, and the obtained luma value is classified into a first luma set and a second luma set, and the chroma value is correspondingly classified into the first chroma set and the second chroma set based on the classification of the luma value. Then, a scaling coefficient in the linear model corresponding to the chroma block may be determined based on the average value of the luma values ​​in the first luma set, the average value of the luma values ​​in the second luma set, the average value of the chroma values ​​in the first chroma set, and the average value of the chroma values ​​in the second chroma set, and after the scaling coefficient is determined, an offset factor in the linear model corresponding to the chroma block may be determined based on the scaling coefficient. Finally, prediction information of the chroma block is determined based on the scaling coefficient, the offset factor, and the luma reconstruction information corresponding to the chroma block. Thus, in encoding or decoding, a preset number of chroma values ​​are selected and then classified into two chroma sets, and a preset number of luma values ​​are selected and then classified into two luma sets. Based on the average value of the luma values ​​in each luma set and the average value of the chroma values ​​in each chroma set, a scaling coefficient in the linear model corresponding to the chroma block is determined, and further, an offset factor is determined. Since only a smaller number of multiplications are required, the encoding time and the decoding time can be reduced. [Brief description of the drawings]

[0047] [Figure 1] FIG. 1 is a block diagram illustrating an example of a video encoding system implementing an embodiment of the present application. [Diagram 2] 5 is a block diagram of an example of a video coding system including any one or two of the encoder 20 of FIG. 3 and the decoder 30 of FIG. 4. [Diagram 3] FIG. 1 is a block diagram showing an example of the configuration of a video encoder that implements an embodiment of the present application. [Figure 4] FIG. 2 is a block diagram showing an example of the configuration of a video decoder implementing an embodiment of the present application. [Diagram 5] FIG. 1 is a block diagram showing an example of an encoding device or a decoding device. [Figure 6] FIG. 13 is a block diagram showing an example of another encoding device or another decoding device. [Figure 7] 1 shows an example of a sampling grid in the YUV format. [Figure 8] 1 illustrates one embodiment of a cross-component prediction mode. [Figure 9] FIG. 1 is a schematic diagram of adjacent samples. [Figure 10] FIG. 13 is another schematic diagram of adjacent samples. [Figure 11] 1 is a schematic flow chart of a chroma block prediction method. [Figure 12] FIG. 2 is a schematic diagram of a rectangular coordinate system that is established. [Figure 13] FIG. 13 is a schematic diagram of chroma samples at preset positions. [Figure 14(a)] 14(a) and 14(b) are schematic diagrams of chroma samples at preset positions. [Figure 14(b)] 14(a) and 14(b) are schematic diagrams of chroma samples at preset positions. [Figure 15(a)] 15(a) and 15(b) are schematic diagrams of chroma samples at preset positions. [Figure 15(b)] 15(a) and 15(b) are schematic diagrams of chroma samples at preset positions. [Figure 16(a)] 16(a)-16(d) are schematic diagrams of chroma samples at preset positions. [Figure 16(b)] 16(a)-16(d) are schematic diagrams of chroma samples at preset positions. [Figure 16(c)] 16(a)-16(d) are schematic diagrams of chroma samples at preset positions. [Figure 16(d)]16(a)-16(d) are schematic diagrams of chroma samples at preset positions. [Figure 17] FIG. 1 is a schematic diagram illustrating the configuration of a chroma block prediction device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0048] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the implementation of the present application in detail with reference to the accompanying drawings.

[0049] To facilitate understanding of this application, the following first describes the system architecture and the terminology used in this application.

[0050] Video coding typically processes a series of pictures that form a video or a video sequence. In the field of video coding, the terms "picture", "frame" and "image" may be used synonymously. Video coding as used in this application (or in this disclosure) refers to video encoding or video decoding. Video encoding is performed at the source side and typically involves processing an original video picture (e.g., through compression) to reduce the amount of data needed to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically involves the reverse processing relative to the encoder to reconstruct the video picture. "Encoding" a video picture in the embodiments should be understood as "encoding" or "decoding" with respect to a video sequence. The combination of encoding and decoding is also referred to as coding (encoding and decoding).

[0051] Each picture in a video sequence is usually divided into a set of non-overlapping blocks, and coding is usually performed at the block level. Specifically, at the encoder side, video is usually processed, i.e., encoded, at the block (also called picture block or video block) level. For example, a prediction block is generated through spatial (intra-picture) prediction and temporal (inter-picture) prediction, the prediction block is subtracted from a current block (a block being processed or to be processed) to obtain a residual block, and the residual block is transformed and quantized in a transform domain to reduce the amount of data to be transmitted (compressed). At the decoder side, the inverse process to the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder's processing loop so that the encoder and decoder generate the same prediction (e.g., intra-prediction and inter-prediction) and / or reconstruction for processing or encoding subsequent blocks.

[0052] The term "block" may refer to a portion of a picture or a frame. Key terms in this application are defined as follows:

[0053] Current block: The current block is the block being processed. For example, in encoding, the current block is the block being coded, and in decoding, the current block is the block being decoded. If the block being processed is a chroma component block, the block is called the current chroma block. The luma block corresponding to the current chroma block may be called the current luma block.

[0054] Reference Block: A reference block is a block that provides a reference signal for a current block. In the search process, multiple reference blocks may be considered to find the most suitable reference block.

[0055] Prediction block: A block that provides a prediction for a current block is called a prediction block. For example, after considering multiple reference blocks, a best reference block is found. The best reference block provides a prediction for the current block, and the block is called a prediction block.

[0056] Picture block signal: A picture block signal is a sample value, sampling value, or sampling signal within a picture block.

[0057] Prediction signal: The sample values, sampling values, or sampling signals in a prediction block are called the prediction signal.

[0058] Hereinafter, an embodiment of the encoder 20, the decoder 30, and the encoding system 10 will be described with reference to FIGS.

[0059] 1 is a conceptual or schematic block diagram illustrating an example of an encoding system 10, such as a video encoding system 10 that may employ techniques of this application (this disclosure). An encoder 20 (e.g., video encoder 20) and a decoder 30 (e.g., video decoder 30) in the video encoding system 10 represent example devices that may be configured to perform intra prediction according to various examples described in this application. As shown in FIG. 1, the encoding system 10 includes a source device 12 configured to provide encoded data 13, such as encoded pictures 13, to a destination device 14 for decoding the encoded data 13.

[0060] The source device 12 includes an encoder 20 , and may additionally or optionally include a picture source 16 , a pre-processing unit 18 , such as a picture pre-processing unit 18 , and a communication interface or unit 22 .

[0061] Picture source 16 may include or be any type of picture capture device configured to capture real-world pictures and the like, and / or any type of device that generates pictures or comments (for screen content coding, where some text on the screen is also considered to be part of the picture to be coded or a part of the picture), such as, for example, a computer graphics processing unit configured to generate computer animated pictures, or any type of device configured to obtain and / or provide real-world pictures or computer animated pictures (e.g., screen content or virtual reality (VR) pictures) and / or any combination thereof (e.g., augmented reality (AR) pictures).

[0062] A picture may be considered as a two-dimensional array or matrix of samples with luma values. A sample in the array may also be referred to as a pixel (short for picture element) or a pel. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, three color components are usually used, i.e. a picture can be represented as or contain three sample arrays. In an RBG format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each sample is usually represented in a luminance / chrominance format or color space, e.g. an image in YCbCr format contains a luminance component denoted by Y (sometimes denoted by L) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y indicates brightness or gray-level intensity (e.g., in a grayscale picture, the two are the same), and the two chrominance (or chroma for short) components Cb and Cr represent the components of chromaticity or color information. Thus, a picture in YCbCr format contains a luminance sample array of luminance sample values ​​(Y) and two chrominance sample arrays of chrominance values ​​(Cb and Cr). A picture in RGB format may be converted to a picture in YCbCr format, and vice versa. This process is also called color transformation or color conversion. If a picture is monochrome, it may contain only a luminance sample array.

[0063] The picture source 16 (e.g., video source 16) may be, for example, a camera configured to capture a picture, a memory, such as, for example, a picture memory, that contains or stores previously captured or generated pictures, and / or any type of interface (internal or external) for acquiring or receiving pictures. The camera may be, for example, a local camera or an integrated camera integrated in the source device, and the memory may be a local memory or an integrated memory integrated in the source device. The interface may be, for example, an external interface for receiving pictures from an external video source. The external video source is, for example, an external picture capture device, such as a camera, an external memory, or an external picture generation device. The external picture generation device is, for example, an external computer graphics processing unit, a computer, or a server. The interface may be any type of interface according to any proprietary or standardized interface protocol, for example a wired or wireless interface or an optical interface. The interface for acquiring picture data 17 may be the same interface as the communication interface 22 or may be part of the communication interface 22.

[0064] Distinct from pre-processing unit 18 and the processing performed by pre-processing unit 18, picture 17 or picture data 17 (eg, video data 16) may also be referred to as original picture 17 or original picture data 17.

[0065] The pre-processing unit 18 is configured to receive the (original) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. For example, the pre-processing performed by the pre-processing unit 18 may include cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise reduction. It may be appreciated that the pre-processing unit 18 may be an optional component.

[0066] An encoder 20 (e.g., a video encoder 20) is configured to receive pre-processed picture data 19 and provide encoded picture data 21 (as will be further described below, e.g., with reference to FIG. 3 or FIG. 5). In one example, the encoder 20 may be configured to perform the following embodiments 1 to 7.

[0067] The communication interface 22 of the source device 12 may be configured to receive the coded picture data 21 and to transmit the coded picture data 21 to another device, for example the destination device 14 or some other device, for storage or direct reconstruction, or may be configured to process the coded picture data 21 correspondingly before storing the coded data 13 and / or transmitting the coded data 13 to another device, for example the destination device 14 or any other device used for decoding or storage.

[0068] The destination device 14 includes a decoder 30 (eg, a video decoder 30 ), and may additionally or optionally include a communications interface or unit 28 , a post-processing unit 32 , and a display device 34 .

[0069] For example, the communications interface 28 of the destination device 14 is arranged to receive the coded picture data 21 or the coded data 13 directly from the source device 12 or from any other source, for example a storage device, which may for example be a coded picture data storage device.

[0070] Communications interface 22 and communications interface 28 may be configured to transmit or receive encoded picture data 21 or encoded data 13 over a direct communications link between source device 12 and destination device 14, or over any type of network, such as a direct wired or wireless connection, and any type of network, such as a wired or wireless network or any combination thereof, or any type of private or public network or any combination thereof.

[0071] The communications interface 22 may, for example, be configured to encapsulate the encoded picture data 21 into a suitable format, such as packets, for transmission over a communications link or network.

[0072] Communications interface 28 , as a counterpart of communications interface 22 , may be configured to de-encapsulate encoded data 13 to obtain encoded picture data 21 , etc.

[0073] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, e.g., an arrow pointing from source device 12 to destination device 14 is used for coded picture data 13 in FIG. 1, or may be configured as bidirectional communication interfaces, e.g., configured to send and receive messages to establish a connection, as well as to confirm and exchange a communication link and / or other information related to data transmission, e.g., coded picture data transmission.

[0074] The decoder 30 is configured to receive the encoded picture data 21 and to provide decoded picture data 31 or decoded pictures 31 (as will be further described below, e.g. with reference to Fig. 4 or Fig. 6). In one example, the decoder 30 may be configured to perform the following embodiments 1 to 7.

[0075] Post-processing unit 32 of destination device 14 is configured to post-process decoded picture data 31 (also referred to as reconstructed picture data), such as decoded picture 131, to obtain post-processed picture data 33, such as post-processed picture 33. The post-processing performed by post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color correction, cropping, resampling, or some other processing to prepare the decoded picture data 31 for display by display device 34.

[0076] A display device 34 of the destination device 14 is configured to receive the post-processed picture data 33 and display the picture to a user, viewer, or the like. The display device 34 can be or include any type of display configured to present the reconstructed picture, such as an integrated or external display or monitor. For example, the display can include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS) display, a digital light processor (DLP), or any other type of display.

[0077] 1 depicts source device 12 and destination device 14 as separate devices, device embodiments may also include both source device 12 and destination device 14, or both the functionality of source device 12 and the functionality of destination device 14, i.e., both source device 12 or corresponding functionality, and destination device 14 or corresponding functionality. In such embodiments, source device 12 or corresponding functionality, and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, may be implemented using separate hardware and / or software, or may be implemented using some combination thereof.

[0078] Based on these descriptions, one skilled in the art will readily understand that the presence and (exact) division of multiple / single functions or functions into different units of source device 12 and / or destination device 14 shown in FIG. 1 may vary depending on the actual device and application.

[0079] The encoder 20 (e.g., video encoder 20) and the decoder 30 (e.g., video decoder 30) may each be implemented as any one of a variety of suitable circuits, such as, for example, one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques are implemented in part in software, an apparatus may store software instructions in a suitable non-transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques in this disclosure. Any of the above (including hardware, software, combinations of hardware and software, and the like) may be considered as one or more processors. The video encoder 20 and the video decoder 30 may each be included in one or more encoders or decoders, or any one of the encoders or decoders may be integrated as part of a combined encoder / decoder (codec) in a corresponding apparatus.

[0080] Source device 12 may be referred to as a video encoder or video encoder device. Destination device 14 may be referred to as a video decoder or video decoder device. Source device 12 and destination device 14 may each be an example of a video encoder or video decoder device.

[0081] Source device 12 and destination device 14 may each include any one of a variety of devices, including any type of handheld or fixed device, such as, for example, a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a video camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming transmission device (e.g., a content service server or a content delivery server), a broadcast receiver device, or a broadcast transmitter device, and may or may not use any type of operating system.

[0082] In some cases, source device 12 and destination device 14 may be equipped for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.

[0083] In some cases, the video encoding system 10 shown in FIG. 1 is merely an example, and the techniques in this application may be applied to video encoding settings (e.g., video encoding or video decoding) that do not need to include any data communication between an encoding device and a decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store the data in memory, and / or a video decoding device may retrieve data from memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data to memory and / or retrieve data from memory and decode the data.

[0084] It should be understood that for each of the above examples described with reference to video encoder 20, video decoder 30 may be configured to perform the inverse process. For signaling syntax elements, video decoder 30 may be configured to receive and parse the syntax elements and decode the associated video data accordingly. In some examples, video encoder 20 may entropy encode the syntax elements into the encoded video bitstream. In such examples, video decoder 30 may parse the syntax elements and decode the associated video data accordingly.

[0085] Figure 2 illustrates an example of a video coding system 40 including the encoder 20 of Figure 3 and / or the decoder 30 of Figure 4 according to an example embodiment. The system 40 may implement a combination of various techniques of this application. In the illustrated implementation, the video coding system 40 may include an imaging device 41, a video encoder 20, a video decoder 30 (and / or a video decoder implemented by logic circuitry 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.

[0086] 2, imaging device 41, antenna 42, processing unit 46, logic circuitry 47, video encoder 20, video decoder 30, processor 43, memory 44, and / or display device 45 may be in communication with one another. As illustrated, video coding system 40 is shown with both video encoder 20 and video decoder 30, but in different examples, video coding system 40 may include only video encoder 20 or only video decoder 30.

[0087] In some examples, as shown in FIG. 2, the video coding system 40 may include an antenna 42. For example, the antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Additionally, in some examples, the video coding system 40 may include a display device 45. The display device 45 may be configured to present the video data. In some examples, as shown in FIG. 2, the logic circuitry 47 may be implemented by a processing unit 46. The processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processing unit, a general-purpose processor, or the like. The video coding system 40 may also include an optional processor 43. The optional processor 43 may also include application-specific integrated circuit logic, a graphics processing unit, a general-purpose processor, or the like. In some examples, the logic circuitry 47 may be implemented by hardware, such as dedicated video coding hardware, and the processor 43 may be implemented by universal software, an operating system, or the like. Furthermore, memory 44 may be any type of memory, such as, for example, volatile memory (e.g., Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM)) or non-volatile memory (e.g., flash memory). In one non-limiting example, memory 44 may be implemented by a cache memory. In some examples, logic circuitry 47 may access memory 44 (e.g., to implement a picture buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (e.g., a cache) for implementing a picture buffer or the like.

[0088] In some examples, video encoder 20 implemented by logic circuitry may include a picture buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the picture buffer. The graphics processing unit may include video encoder 20 implemented by logic circuitry 47 to implement various modules described with reference to FIG. 2 and / or any other encoder system or subsystem described herein. The logic circuitry may be configured to perform various operations described herein.

[0089] Video decoder 30 may also be implemented by logic circuitry 47 to implement the various modules described with reference to decoder 30 of FIG. 4 and / or any other decoder system or subsystem described herein. In some examples, video decoder 30 implemented by logic circuitry may include a picture buffer (implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the picture buffer. The graphics processing unit may include video decoder 30 implemented by logic circuitry 47 to implement the various modules described with reference to FIG. 4 and / or any other decoder system or subsystem described herein.

[0090] In some examples, antenna 42 of video coding system 40 may be configured to receive an encoded bitstream of video data. As described, the encoded bitstream may include data related to the video frame coding described herein, such as data related to a coding partition (e.g., transform coefficients or quantized transform coefficients, optional indicators (to be described), and / or data defining the coding partition), indicators, index values, mode selection data, or the like. Video coding system 40 may further include a video decoder 30 coupled to antenna 42 and configured to decode the encoded bitstream. Display device 45 is configured to present the video frames.

[0091] Encoders & encoding methods FIG. 3 is a schematic / conceptual block diagram of an example of a video encoder 20 configured to implement the techniques in this application (disclosure). In the example of FIG. 3, the video encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy coding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 3 may also be referred to as a hybrid video encoder or a hybrid video codec-based video encoder.

[0092] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer 230, the prediction processing unit 260, etc. form a backward signal path of the encoder. The backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in FIG. 4).

[0093] Encoder 20 receives a picture 201, or a block 203 of picture 201, e.g. a picture in a series of pictures forming a video or a video sequence, by using input 202 or the like. Picture block 203 may also be referred to as a current picture block or a picture block to be coded, and picture 201 may also be referred to as a current picture or a picture to be coded (particularly when the current picture is distinguished from other pictures in video coding, e.g. those in the same video sequence, which also include previously coded and / or decoded pictures in the video sequence of the current picture).

[0094] Split An embodiment of encoder 20 may include a division unit (not shown in FIG. 3) configured to divide picture 201 into multiple non-overlapping blocks, such as blocks 203. The division unit may be configured to use the same block size for all pictures in a video sequence and a corresponding raster that defines the block size, or may be configured to vary the block size among pictures, subsets, or groups of pictures to divide each picture into corresponding blocks.

[0095] In one example, prediction processing unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described above.

[0096] For example, within a picture 201, a block 203 is also a two-dimensional array or matrix of samples with luminance values ​​(sample values), although the size of the block 203 is smaller than the size of the picture 201, and can be considered as such. In other words, the block 203 may include, for example, one sample array (e.g., a luminance array in the case of a monochrome picture 201), three sample arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture), or some other number and / or type of arrays based on the color format used. The number of samples in the horizontal and vertical directions (or axes) of the block 203 determines the size of the block 203.

[0097] The encoder 20 shown in FIG. 3 is arranged to code a picture 201 block by block, for example to perform coding and prediction for each block 203 .

[0098] Residual calculation The residual calculation unit 204 is configured to calculate the residual block 205 based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 are provided later), for example, to obtain the residual block 205 in the sample domain by subtracting sample values ​​of the prediction block 265 from sample values ​​of the picture block 203 sample by sample.

[0099] conversion The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values ​​of the residual block 205 to obtain transform coefficients 207 in a transform domain. The transform coefficients 207, sometimes called residual transform coefficients, represent the residual block 205 in the transform domain.

[0100] The transform processing unit 206 may be configured to apply an integer approximation of the DCT / DST, such as the transform specified in HEVC / H.265. This integer approximation is usually proportionally scaled by a factor compared to the orthogonal DCT transform. An additional scale factor is applied as part of the transform process to maintain the norm of the residual block obtained through the forward and inverse transforms. The scale factor is usually selected based on some constraint, such as, for example, being a power of two, the bit depth of the transform coefficients, or a trade-off between the precision used in the shift operation and the implementation cost. For example, a particular scale factor may be specified for the inverse transform at the decoder 30 side by using the inverse transform processing unit 212 (and correspondingly, for the inverse transform at the encoder 20 side by using the inverse transform processing unit 212, etc.), and correspondingly, a corresponding scale factor may be specified for the forward transform at the encoder 20 side by using the transform processing unit 206.

[0101] Quantization The quantization unit 208 is configured to quantize the transform coefficients 207 by applying scale quantization, vector quantization, or the like to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth for some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient in quantization, where n is greater than m. The degree of quantization may be changed by adjusting a quantization parameter (QP). For example, in scale quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step corresponds to a finer quantization, and a larger quantization step corresponds to a coarser quantization. The quantization parameter may be used to indicate an appropriate quantization step. For example, the quantization parameter may be an index of a predefined set of appropriate quantization steps. For example, a smaller quantization parameter may correspond to a finer quantization (smaller quantization step), while a larger quantization parameter may correspond to a coarser quantization (larger quantization step), and vice versa. Quantization may include division by the quantization step and inverse quantization performed by the corresponding quantization or inverse quantization unit 210, or may include multiplication by the quantization step. In some standard compliant embodiments, such as HEVC, the quantization parameter may be used to determine the quantization step. In general, the quantization step may be calculated based on the quantization parameter via a fixed-point approximation of a formula that includes a division. An additional scale factor may be introduced in the quantization and inverse quantization to restore the norm of the residual block, which may be changed due to the scale used in the quantization step and the fixed-point approximation of the formula used for the quantization parameter. In one implementation, the scale of the inverse transform may be combined with the scale of the inverse quantization. Alternatively, a customized quantization table may be used and signaled from the encoder to the decoder, for example, in the bitstream.Quantization is a lossy operation, with larger quantization steps indicating larger losses.

[0102] The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain inverse quantized coefficients 211, e.g., to apply an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step as the quantization unit 208. The inverse quantized coefficients 211, which may also be referred to as inverse quantized residual coefficients 211, may correspond to the transform coefficients 207, but typically have different losses caused by quantization.

[0103] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform or an inverse discrete sine transform, to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform inverse quantization block 213 or an inverse transform residual block 213.

[0104] The reconstruction unit 214 (e.g., adder 214) is configured to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example by adding together sample values ​​of the reconstructed residual block 213 and sample values ​​of the prediction block 265, to obtain a reconstructed block 215 in the sample domain.

[0105] Optionally, a buffer unit 216 (or "buffer" 216 for short), e.g., a line buffer 216, is configured to buffer or store the reconstructed block 215 and corresponding sample values, e.g., intra prediction. In other embodiments, the encoder may be configured to use the unfiltered reconstructed block and / or corresponding sample values ​​stored in the buffer unit 216 for any type of estimation and / or prediction, e.g., intra prediction.

[0106] For example, embodiments of encoder 20 may be configured such that buffer unit 216 is not only configured to store reconstructed block 215 for intra prediction, but also configured to store filtered block 221 of loop filter unit 220 (not shown in FIG. 3), and / or such that buffer unit 216 and decoded picture buffer unit 230 form one buffer. Other embodiments may be used to use filtered block 221 and / or blocks or samples from decoded picture buffer 230 (not shown in FIG. 3) as input or basis for intra prediction.

[0107] The loop filter unit 220 (or "loop filter" 220 for short) is configured to perform filtering on the reconstructed block 215 to smooth sample conversion or improve video quality to obtain a filtered block 221. The loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a cooperative filter. Although the loop filter unit 220 is illustrated in FIG. 3 as an in-loop filter, the loop filter unit 220 may be implemented as a post-loop filter in other configurations. The filtered block 221 may also be referred to as a filtered reconstructed block 221. After the loop filter unit 220 performs the filtering process on the reconstructed coding block, the decoded picture buffer 230 may store the reconstructed coding block.

[0108] An embodiment of encoder 20 (and correspondingly, loop filter unit 220) may be used to output loop filter parameters (e.g., sample adaptive offset information), e.g., to output the loop filter parameters directly or to output the loop filter parameters after entropy encoding unit 270 or some other entropy encoding unit performs entropy encoding, thereby enabling decoder 30 to receive and apply the same loop filter parameters for decoding, etc.

[0109] The decoded picture buffer 230 may be a reference picture memory that stores reference picture data for the video encoder 20 to encode the video data. The DPB 230 may be any one of a number of memories, such as, for example, a dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), or resistive RAM (RRAM)), or other types of memory. The DPB 230 and the buffer 216 may be provided by the same memory or by separate memories. In one example, the decoded picture buffer (DPB) 230 is configured to store the filtered block 221. The decoded picture buffer 230 may further be configured to store other previous filtered blocks, such as previous reconstructed filtered block 221, of the same current picture or a different picture, such as a previous reconstructed picture, and may also provide a previous fully reconstructed or decoded picture (and corresponding reference blocks and corresponding samples) and / or a partially reconstructed current picture (and corresponding reference blocks and corresponding samples), such as for inter prediction. In one example, if the reconstructed block 215 is reconstructed without in-loop filtering, the decoded picture buffer 230 is configured to store the reconstructed block 215.

[0110] The prediction processing unit 260, also referred to as the block prediction processing unit 260, is configured to receive or obtain block 203 (the current block 203 of the current picture 201) and reconstructed picture data, such as reference samples from the same (current) picture in the buffer 216 and / or reference picture data 231 from one or more previously decoded pictures in the decoded picture buffer 230, and to process such data for prediction, i.e., to provide a prediction block 265, which may be an inter prediction block 245 or an intra prediction block 255.

[0111] The mode selection unit 262 may be configured to select a prediction mode (e.g., an intra-prediction mode or an inter-prediction mode) and / or a corresponding prediction block 245 or 255 as the prediction block 265 to calculate the residual block 205 and reconstruct the reconstruction block 215.

[0112] An embodiment of the mode selection unit 262 may be used to select a prediction mode (e.g., from prediction modes supported by the prediction processing unit 260) that provides the best match or the smallest residual (smallest residual means better compression on transmission or storage), or that provides the smallest signaling overhead (smallest signaling overhead means better compression on transmission or storage), or that considers or balances the two. The mode selection unit 262 may be configured to determine the prediction mode based on Rate Distortion Optimization (RDO), i.e., to select a prediction mode that provides the smallest rate distortion optimization, or to select a prediction mode whose associated rate distortion at least satisfies a prediction mode selection criterion.

[0113] The prediction processing (eg, by using prediction processing unit 260) and mode selection (eg, by using mode selection unit 262) performed by an example encoder 20 are described in more detail below.

[0114] As mentioned above, the encoder 20 is configured to determine or select a best or optimal prediction mode from a (predetermined) prediction mode set, which may include, for example, intra-prediction modes and / or inter-prediction modes.

[0115] The intra-prediction mode set may include 35 different intra-prediction modes, or may include 67 different intra-prediction modes, or may include developing intra-prediction modes defined in H.266.

[0116] The inter prediction mode set depends on the available reference pictures (e.g., at least a portion of the decoded pictures stored in DBP230) and other inter prediction parameters, such as whether the entire reference picture is used or only a portion of the reference picture is used, such as, for example, a search window area surrounding the area of ​​the current block is searched for the best matching reference block, and / or whether sample interpolation, such as, for example, 1 / 2 sample and / or 1 / 4 sample interpolation, is applied.

[0117] In addition to the prediction modes mentioned above, skip mode and / or direct mode may also be applied.

[0118] Prediction processing unit 260 may further be configured to divide block 203 into smaller block partitions or sub-blocks, e.g., by repeatedly using quad-tree (QT), binary-tree (BT), triple-tree (TT) partitioning, or any combination thereof, and perform prediction and the like on each of the block partitions or sub-blocks. Mode selection includes selecting a tree structure for block 203 to be divided and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.

[0119] The inter prediction unit 244 may include a motion estimation (ME) unit (not shown in FIG. 3) and a motion compensation (MC) unit (not shown in FIG. 3). The motion estimation unit is configured to receive or obtain a picture block 203 (current picture block 203 of current picture 201) and a decoded picture 231, or at least one or more previous reconstructed blocks, such as one or more other reconstructed blocks different from the previous decoded picture 231, to perform motion estimation. For example, a video sequence may include a current picture and a previous decoded picture 31. In other words, the current picture and the previous decoded picture 31 may form a video sequence, i.e., be part of a series of pictures forming a picture sequence.

[0120] For example, the encoder 20 may be configured to select a reference block from multiple reference blocks of the same picture or multiple different pictures among multiple other pictures, and provide an offset (spatial offset) between the position (XY coordinates) of the reference picture and / or reference block and the position of the current block as an inter prediction parameter to a motion estimation unit (not shown in FIG. 3 ). This offset is also called a motion vector (MV).

[0121] The motion compensation unit is configured to obtain, for example, receive, inter prediction parameters and perform inter prediction based on or by using the inter prediction parameters to obtain inter prediction block 245. The motion compensation performed by the motion compensation unit (not shown in FIG. 3) may include fetching or generating a prediction block based on a motion / block vector determined through motion estimation (possibly performing interpolation with sub-sample accuracy). In the interpolation filtering, additional samples may be generated from known samples, which may increase the number of candidate prediction blocks that may be used to encode the picture block. Upon receiving the motion vector used for the PU of the current picture block, the motion compensation unit 246 may locate the prediction block pointed to by the motion vector in the reference picture list. The motion compensation unit 246 may further generate syntax elements related to the block and the video slice, and may use the syntax elements when the video decoder 30 decodes the picture block of the video slice.

[0122] The intra prediction unit 254 is configured to obtain, e.g., receive, a picture block 203 of the same picture (current picture block) and one or more previous reconstructed blocks, e.g., reconstructed neighboring blocks, to perform intra estimation. For example, the encoder 20 may be configured to select an intra prediction mode from a plurality of intra prediction modes.

[0123] An embodiment of the encoder 20 may be configured to select an intra prediction mode based on an optimization criterion, such as based on a minimum residual (e.g., the intra prediction mode that provides the predicted block 255 that is most similar to the current picture block 203) or a minimum rate distortion.

[0124] The intra prediction unit 254 is further configured to determine an intra-predicted block 255 based on the intra prediction parameters of the selected intra prediction mode. In any case, after selecting the intra prediction mode to be used for the block, the intra prediction unit 254 is further configured to provide the intra prediction parameters to the entropy coding unit 270, i.e., to provide information indicating the selected intra prediction mode to be used for the block. In one example, the intra prediction unit 254 may be configured to perform some combination of the following intra prediction techniques:

[0125] The entropy coding unit 270 is configured to apply an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (CABAC) scheme, a syntax-based context-adaptive binary arithmetic coding (SBAC) scheme, a probability interval partitioning entropy (PIPE) coding scheme, or other entropy coding method or technique) to one or more (or none) of the quantized residual coefficients 209, the inter prediction parameters, the intra prediction parameters, and / or the loop filter parameters to obtain coded picture data 21, e.g. in the form of a coded bitstream, which can be output using an output 272. The coded bitstream may be transmitted to the video decoder 30 or may be archived for later transmission or retrieval by the video decoder 30. Entropy encoding unit 270 may also be configured to perform entropy encoding on other syntax elements of the current video slice being encoded.

[0126] Other video encoders 20 with slightly different structures may be configured to encode the video stream. For example, a non-transform-based encoder 20 may quantize the residual signal directly for some blocks or frames without using the transform processing unit 206. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into one unit.

[0127] 4 shows an example of a video decoder 30 configured to implement the techniques in this application. Video decoder 30 is configured to receive coded picture data (e.g., coded bitstream) 21 coded by encoder 20 or the like to obtain decoded pictures 31. In the decoding process, video decoder 30 receives video data from video encoder 20, e.g., a coded video bitstream indicating picture blocks and associated syntax elements of coded video slices.

[0128] 4, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform decoding calculations that are generally inverse to the encoding calculations described with reference to video encoder 20 of FIG.

[0129] Entropy decoding unit 304 is configured to perform entropy decoding on coded picture data 21 to obtain any one or all of quantized coefficients 309, decoded coding parameters (not shown in FIG. 4), and / or the like, such as inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other (decoded) syntax elements. Entropy decoding unit 304 is further configured to forward the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to prediction processing unit 360. Video decoder 30 may receive video slice-level syntax elements and / or video block-level syntax elements.

[0130] The inverse quantization unit 310 may have the same function as the inverse quantization unit 110, the inverse transform processing unit 312 may have the same function as the inverse transform processing unit 212, the reconstruction unit 314 may have the same function as the reconstruction unit 214, the buffer 316 may have the same function as the buffer 216, the loop filter 320 may have the same function as the loop filter 220, and the decoded picture buffer 330 may have the same function as the decoded picture buffer 230.

[0131] Prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354. The inter prediction unit 344 may have functionality similar to that of the inter prediction unit 244, and the intra prediction unit 354 may have functionality similar to that of the intra prediction unit 254. Prediction processing unit 360 is typically configured to perform block prediction and / or obtain a prediction block 365 from the encoded data 21, as well as to receive or obtain (explicitly or implicitly) prediction-related parameters and / or information about a selected prediction mode, e.g., from the entropy decoding unit 304.

[0132] Also, when a video slice is coded as an intra-coded (I) slice, intra prediction unit 354 of prediction processing unit 360 is configured to generate a prediction block 365 used for a picture block of the current video slice based on the signaled intra prediction mode and data from a previously decoded block of the current frame or picture. When a video frame is coded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is configured to generate a prediction block 365 used for a video block of the current video slice based on the motion vector and other syntax elements received from entropy decoding unit 304. In inter prediction, a prediction block may be generated from one of the reference pictures in one reference picture list. Video decoder 30 may construct reference frame lists, List 0 and List 1, by using a default construction technique based on the reference pictures stored in DPB 330.

[0133] Prediction processing unit 360 is configured to determine prediction information to be used for the video blocks of the current video slice by analyzing the motion vectors and other syntax elements, and to generate a prediction block to be used for the current video block being decoded using the prediction information. For example, prediction processing unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) to be used to encode the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information of one or more of the pictures in the reference picture list used for the slice, a motion vector for each inter-coded video block used for the slice, an inter prediction status for each inter-coded video block used for the slice, and other information to decode the video blocks of the current video slice.

[0134] Inverse quantization unit 310 may be configured to perform inverse quantization (i.e., dequantization) on the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in a video slice to determine a degree of quantization to be applied and to determine a degree of inverse quantization to be applied.

[0135] The inverse transform processing unit 312 is configured to apply an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce residual blocks in the sample domain.

[0136] The reconstruction unit 314 (e.g., adder 314) is configured to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365, for example by adding the sample values ​​of the reconstructed residual block 313 to the sample values ​​of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.

[0137] The loop filter unit 320 (in the coding loop or after the coding loop) is configured to filter the reconstruction block 315 to obtain a filtered block 321 to perform a smooth sample conversion or improve video quality. In one example, the loop filter unit 320 may be configured to perform any combination of the following filtering techniques: The loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a cooperative filter. Although the loop filter unit 320 is illustrated as an in-loop filter in FIG. 4, the loop filter unit 320 may be implemented as a post-loop filter in other configurations.

[0138] The filtered blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330, which stores reference pictures used for subsequent motion compensation.

[0139] Decoder 30 is configured to output decoded picture 31 using output 332 and the like to present decoded picture 31 to a user or to provide decoded picture 31 for viewing by a user.

[0140] Other variations of the video decoder 30 may be configured to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without using the loop filter unit 320. For example, the non-transform-based decoder 30 may directly dequantize the residual signal for some blocks or frames without using the inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into one unit.

[0141] 5 is a schematic block diagram of a video coding device 400 (e.g., video encoder 400 or video decoder 400) according to an embodiment of this application. The video coding device 400 is suitable for implementing an embodiment described in this specification. In an embodiment, the video coding device 400 may be a video decoder (e.g., video decoder 30 of FIG. 1) or a video encoder (e.g., video encoder 20 of FIG. 1). In another embodiment, the video coding device 400 may be one or more components of the video decoder 30 of FIG. 1 or the video encoder 20 of FIG. 1.

[0142] The video coding device 400 includes an ingress port 410 and a receiver unit (Rx) 420 configured to receive data, a processor, logic unit, or central processing unit (CPU) 430 configured to process the data, a transmitter unit (Tx) 440 and an egress port 450 configured to transmit the data, and a memory 460 configured to store the data. The video coding device 400 may further include optical-to-electrical and electrical-to-optical (EO) conversion components coupled to the ingress port 410, the receiver unit 420, the transmitter unit 440, and the egress port 450 to serve as an egress or ingress for optical or electrical signals.

[0143] The processor 430 is implemented by using hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, or DSPs. The processor 430 communicates with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 includes a coding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding / decoding module 470 implements the embodiments disclosed above. For example, the encoding / decoding module 470 performs, processes, or provides various coding operations. Thus, the encoding / decoding module 470 substantially extends the functionality of the video coding device 400 and affects the transformation of the video coding device 400 into multiple different states. Alternatively, the encoding / decoding module 470 is implemented by using instructions stored in the memory 460 and executed by the processor 430.

[0144] Memory 460 may include one or more disks, tape drives, and solid state drives, may be used as an overflow data storage device, may be configured to store programs as they are selectively executed, and may store instructions and data retrieved during program execution. Memory 460 may be volatile and / or non-volatile, and may be read only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).

[0145] 6 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 of FIG. 1 according to an example embodiment. The apparatus 500 may implement the techniques in this application. The apparatus 500 configured to implement chroma block prediction may take the form of a computing system including multiple computing devices, or may take the form of a single computing device, such as, for example, a mobile phone, a tablet computer, a laptop computer, a notebook computer, or a desktop computer.

[0146] The processor 502 in the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of existing or future device or devices capable of controlling or processing information. As shown in FIG. 6, although the disclosed implementations may be implemented using a single processor, such as the processor 502, advantages in speed and efficiency may be achieved by using two or more processors.

[0147] In one implementation, the memory 504 in the device 500 may be a read-only memory device or a random access memory device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510. The application programs 510 include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which further include a video encoding application for performing the methods described herein. The device 500 may further include additional memory in the form of a secondary memory 514. The secondary memory 514 may be, for example, a memory card used with a mobile computing device. Because a video communication session may include a large amount of information, the information may be stored completely or partially in the secondary memory 514 and loaded into the memory 504 for processing as needed.

[0148] The device 500 may further include one or more output devices, such as a display 518. In one example, the display 518 may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. The display 518 may be coupled to the processor 502 by using the bus 512. In addition to the display 518, other output devices may be provided that enable a user to program or otherwise use the device 500, or other output devices may be provided instead of the display 518. When the output device is or includes a display, the display may be implemented in various ways, for example, using a liquid crystal display, a cathode-ray tube (CRT) display, a plasma display, or a light emitting diode (LED) display, such as an organic LED (OLED) display.

[0149] The device 500 may further include or be connected to a picture sensing device 520. The picture sensing device 520 may be, for example, a camera or any other existing or future picture sensing device 520 capable of sensing a picture. The picture may be, for example, a picture of a user operating the device 500. The picture sensing device 520 may be positioned directly facing the user operating the device 500. In one example, the position and optical axis of the picture sensing device 520 may be set such that the field of view of the picture sensing device 520 includes an area adjacent to the display 518 and allows the display 518 to be viewed from that area.

[0150] The device 500 may further include or be connected to a sound sensing device 522, which may be, for example, a microphone or any other existing or future sound sensing device capable of sensing sounds in the vicinity of the device 500. The sound sensing device 522 may be positioned directly facing a user operating the device 500, or may be configured to receive sounds, such as, for example, a voice or another sound made by a user, when the user operates the device 500.

[0151] The processor 502 and memory 504 of the device 500 are integrated into one unit as shown in FIG. 6, although other configurations may be used. The execution of the processor 502 may be distributed across multiple machines (each machine having one or more processors) that may be directly coupled, or may be distributed within a local area or another network. The memory 504 may be distributed across multiple machines, such as a network-based memory and memory within multiple machines that operate the device 500. Although a single bus is depicted here, there may be multiple buses 512 of the device 500. Additionally, the secondary memory 514 may be directly coupled to other components of the device 500 or may be accessed over a network, and may include a single integrated unit, such as a memory card, or multiple units, such as multiple memory cards. Thus, the device 500 may be implemented in multiple configurations.

[0152] As mentioned above in this application, in addition to the luma (Y) component, a color image further includes chroma components (U, V). Therefore, in addition to the luma component, the chroma components also need to be coded. According to different methods for sampling the luma and chroma components of a color image, there are commonly YUV4:4:4, YUV4:2:2, and YUV4:2:0. As shown in FIG. 7, the cross marks represent luma component samples, and the circles represent chroma component samples.

[0153] 4:4:4 format: Chroma components are not downsampled.

[0154] 4:2:2 format: A horizontal downsampling of 2:1 is performed on the chroma components versus the luma component, and no vertical downsampling is performed. For every two U or V samples, each row contains four Y samples.

[0155] 4:2:0 format: A horizontal downsampling of 2:1 is performed on the chroma components relative to the luma component, and a vertical downsampling of 2:1 is performed.

[0156] YUV4:2:0 is the most common format. When a video picture is in YUV4:2:0 sampling format, if the luma component of a picture block is a 2M×2N picture block, the chroma component of the picture block is an M×N picture block. Thus, the chroma component of a picture block is also referred to as a chroma block or a chroma component block in this application. This application is described using YUV4:2:0 as an example, but is also applicable to other methods for sampling the luma and chroma components.

[0157] In this application, a sample in a chroma picture is abbreviated as a chroma sample or a chroma point, and a sample in a luma picture is abbreviated as a luma sample or a luma point.

[0158] Similar to the luma component, in chroma intra prediction, the boundary samples of the neighboring reconstructed blocks around the current chroma block are also used as reference samples of the current block, and the reference samples are mapped to samples in the current chroma block according to a specific prediction mode to serve as predictors of the samples in the current chroma block. The difference is that the number of intra prediction modes for chroma components is usually less than that for luma components because the texture of chroma components is usually relatively simple.

[0159] The cross-component prediction mode is also called the cross-component intra prediction mode or CCLM prediction mode. The CCLM prediction mode may also be abbreviated as the linear model mode. The LM mode (abbreviated as the linear model or linear mode) is a chroma intra prediction method in which the texture correlation between luminance and chrominance is used. In LM, the predictor of the current chroma block is derived using the reconstructed luma component according to a linear model, which is given by:

number

[0160] where α and β are linear model coefficients, α is a scaling coefficient, β is an offset factor, and pred C (i,j) is the predictor of the chroma sample at position (i,j), and rec i L(i,j) is the luma reconstructed sample value at position (i,j) after the luma reconstructed block corresponding to the current chroma block (hereinafter referred to as the corresponding luma block for short) is downsampled to the chroma component resolution. In a video with YUV4:2:0 format, the resolution of the luma component is four times that of the chroma components (the width and height of the luma component are twice those of the chroma components, respectively). To obtain a luma block with the same resolution as the chroma block, the luma component needs to be downsampled to the chroma resolution according to the same downsampling method as that for the chroma components.

[0161] The linear model coefficients α and β do not need to be coded for transmission, and are derived by using edge samples of neighboring reconstructed blocks of the current chroma block and the luma samples corresponding to those edge samples. FIG. 8 illustrates an embodiment of the cross-component prediction mode. In FIG. 8, recL is a reconstructed luma block (the current chroma block corresponds to the reconstructed block and neighboring reference samples of the luma block), recL′ is a downsampled luma block, and recC′ is the neighboring reconstructed reference samples of the current chroma block. The size of the current chroma block is W×H, and the size of the corresponding luma block is 2W×2H by using the upper neighboring reconstructed samples and the left neighboring reconstructed samples of the current chroma block as reference samples. The luma block and the reference samples of the luma block are downsampled to the chroma resolution to obtain the sample block shown in FIG. 8(b). The neighboring reference samples in FIG. 8(b) and FIG. 8(c) have a one-to-one correspondence.

[0162] For ease of explanation, in this application, the above and left adjacent samples used to calculate the linear model coefficients are referred to as adjacent samples, with the sample at the top being the above adjacent sample and the sample at the left being the left adjacent sample. Samples adjacent to a chroma block are referred to as adjacent samples (which includes above adjacent samples and left adjacent samples), and samples adjacent to a luma block are referred to as adjacent samples (which includes above adjacent samples and left adjacent samples). Chroma samples have a one-to-one correspondence with luma samples, and the values ​​of the samples form value pairs.

[0163] In the embodiment of this application, the luma samples usually need to be obtained through downsampling (because the resolution of the chroma components is different from that of the luma components), and are denoted as Luma' samples. The chroma samples are usually the upper adjacent samples of one or two rows of the current chroma block and the left adjacent samples of one or two columns of the current chroma block. Figure 9 is a schematic diagram of using one row and one column, and Figure 10 is a schematic diagram of using two rows and two columns.

[0164] In the LM mode, the correlation between the luma and chroma components can be exploited. Compared with the directional prediction modes, the LM mode is more flexible and therefore provides a more accurate prediction signal for the chroma components.

[0165] In addition, there is also a multiple model linear model (MMLM) mode, where there are multiple α and β. In one example of a two-linear model, there are two groups of linear model coefficients: α1 and β1, and α2 and β2.

[0166] This application provides a chroma block prediction method. Below, the process shown in Figure 11 is described in detail with reference to a specific implementation. This process exists in both the encoding process and the decoding process. In this embodiment of this application, the decoder side is used as an example of the solution description, and the content may be as follows:

[0167] Step 1101: Obtain the chroma value of the chroma sample at the preset position from the adjacent samples of the chroma block.

[0168] The chroma block is a chroma block on which intra prediction is to be performed currently. The number of chroma samples at the preset position (sometimes abbreviated as preset number) can be preset. For example, the preset number is 2, 4, 6, or 8. The neighboring samples of the chroma block are reconstructed samples adjacent to the chroma block, see FIG. 9 and FIG. 10.

[0169] In a particular implementation, when intra prediction needs to be performed on a current chroma block (hereinafter, this may be abbreviated as chroma block), the chroma value of the chroma sample at the preset position can be obtained from the neighboring samples of the chroma block and expressed as a set φ, where φ={C0, C1, ..., C M-1}, where M represents the number of presets, i.e., the number of chroma values ​​to be obtained.

[0170] Optionally, when there is only one linear mode (sometimes called intra-linear prediction mode), in the coordinate system shown in FIG. 12, the preset positions are typically (0,-1), (X-1,-1), (-1,0), and (-1,Y-1), and the chroma values ​​of the chroma samples at the preset positions may be obtained from adjacent samples of the chroma block.

[0171] Optionally, the decoder side may determine an intra-prediction mode corresponding to the chroma block according to the indication information in the bitstream, and determine the preset position according to the intra-prediction mode. The method may include obtaining indication information, determining an intra-prediction mode corresponding to the chroma block based on the indication information, and determining a preset position based on the intra-prediction mode corresponding to the chroma block.

[0172] The intra-prediction mode corresponding to the chroma block may include at least one of LM, LMA, and LML. The indication information is used to indicate the intra-prediction mode corresponding to the chroma block.

[0173] In one particular implementation, when performing encoding, the encoder side encodes the intra-prediction mode corresponding to the chroma block, and then transmits the intra-prediction mode to the decoder side (this process is described below).

[0174] The decoder side may obtain the indication information from the received bitstream, and determine the intra-prediction mode corresponding to the chroma block based on the indication information. Then, the decoder side determines the preset position based on the intra-prediction mode corresponding to the chroma block.

[0175] Optionally, the instruction information can be set in a syntax table such as that shown in Table 1. [Table 1]

[0176] In Table 1, the syntax element CuPredMode[x0][y0] in the syntax table is used to indicate whether the prediction mode of the current chroma block is an intra prediction mode or an inter prediction mode. For example, when CuPredMode[x0][y0] is MODE_INTRA, it indicates that the intra prediction mode is used for the current chroma block, and when CuPredMode[x0][y0] is MODE_INTER, it indicates that the inter prediction mode is used for the current chroma block. Here, x0 and y0 represent the coordinates of the current chroma block in the video picture.

[0177] The syntax element intra_croma_pred_mode[x0][y0] is used to indicate the intra prediction mode information (i.e., the indication information described above) of the current chroma block. For example, when intra_croma_pred_mode[x0][y0]=0, it indicates that the LM0 mode is used for the current block, when intra_croma_pred_mode[x0][y0]=1, it indicates that the LM1 mode is used for the current chroma block, when intra_croma_pred_mode[x0][y0]=2, it indicates that the LM2 mode is used for the current chroma block, and when intra_croma_pred_mode[x0][y0]=N-1, it indicates that the LM(N-1) mode is used for the current chroma block. Here, N represents N different LMs that can be selected at the encoder side for the current chroma block, and LM0, LM1, . . . , and LM(N-1) represent different intra prediction modes.

[0178] Optionally, if there are multiple linear modes, there are different preset positions for different linear modes, and the corresponding processing in step 1101 is: The method may include obtaining a chroma value of a chroma sample at the preset position from adjacent samples of the chroma block based on a predetermined correspondence between the intra-prediction mode and the preset position and the intra-prediction mode corresponding to the chroma block.

[0179] In one particular implementation, when performing decoding, the decoder side may determine an intra-prediction mode corresponding to a chroma block, then obtain a predetermined correspondence between the intra-prediction mode and a preset position, and determine a preset position corresponding to the intra-prediction mode of the chroma block from the correspondence, and then obtain a chroma value of a chroma sample at the preset position from an adjacent sample of the chroma block.

[0180] In the above-mentioned correspondence relationship, the recorded preset position may be the position coordinates of the preset position.

[0181] Optionally, to more fully describe the preset positions, in this embodiment of the application, a rectangular plane coordinate system is correspondingly established for the chroma block, as shown in Fig. 12. The first chroma sample at the top left corner of the chroma block is used as the coordinate origin, the horizontal direction to the right is the positive direction of the x-axis, and the vertical direction to the bottom is the positive direction of the y-axis. Thus, the position coordinates of the top neighboring sample of the chroma block are (0,-1), (1,-1), ..., and (X-1,-1), and the position coordinates of the left neighboring sample of the chroma block are (-1,0), (-1,1), ..., and (-1,Y-1), where X represents the width of the chroma block (i.e., the number of samples in the width direction of the chroma block) and Y represents the height of the chroma block (i.e., the number of samples in the height direction of the chroma block).

[0182] When the intra prediction mode is LM0, in the corresponding relationship, the position coordinates of the preset positions may be (0, -1), (X-1, -1), (-1, 0), and (-1, Y-1).

[0183] When the intra prediction mode is LM1, in the corresponding relationship, the position coordinates of the preset positions may be (0, -1), (X / 4, -1), (X-1-X / 4, -1), and (X-1, -1).

[0184] When the intra prediction mode is LM2, in the corresponding relationship, the position coordinates of the preset positions may be (-1, 0), (-1, Y / 4), (-1, Y-1-Y / 4), and (-1, Y-1).

[0185] When the intra prediction mode is LM3, in the corresponding relationship, the position coordinates of the preset positions may be (X-2, -1), (X-1, -1), (-1, Y-2), and (-1, Y-1).

[0186] When the intra prediction mode is LM(N-1), in the corresponding relationship, the position coordinates of the preset positions may be (0, -1), (1, -1), (X-2, -1), and (X-1, -1).

[0187] It will be appreciated that if multiple linear modes are present, different linear modes may correspond to different preset positions.

[0188] In addition, when the linear mode is LM, LMA, and LML, the position coordinates of the preset positions are further listed separately, which may be as follows:

[0189] When the intra prediction mode is LM, in the correspondence relationship, the position coordinates of the preset positions may be (0, -1), (X-1, -1), (-1, 0), and (-1, Y-1), as indicated by the shaded circles in FIG.

[0190] When the intra prediction mode is LMA, in the correspondence relationship, the position coordinates of the preset positions may be (0, -1), (X / 4, -1), (X-1-X / 4, -1), and (X-1, -1), as shown by the diagonally shaded circles in Figure 14(a), or (0, -1), (X / 4, -1), (3×X / 4, -1), and (X-1, -1), as shown by the diagonally shaded circles in Figure 14(b).

[0191] When the intra prediction mode is LML, in the correspondence relationship, the position coordinates of the preset positions may be (-1, 0), (-1, Y / 4), (-1, Y-1-Y / 4), and (-1, Y-1), as shown by the diagonally shaded circles in Figure 15(a), or (-1, 0), (-1, Y / 4), (-1, 3×Y / 4), and (-1, Y-1), as shown by the diagonally shaded circles in Figure 15(b).

[0192] It should be noted that the position coordinates of these preset positions are merely examples, which are not limiting in this embodiment of the application.

[0193] Furthermore, when the intra prediction mode is LM, the preset number may be 2 instead, and the position coordinates of the preset position may be (X-1,-1) and (-1,Y-1) as shown by the filled circle in Fig. 16(a), or (X / 2,-1) and (-1,Y / 2) as shown by the filled circle in Fig. 16(b), or (X / 2,-1) and (-1,Y-1) as shown by the filled circle in Fig. 16(c), or (X-1,-1) and (-1,Y / 2) as shown by the filled circle in Fig. 16(d). This is merely an example and is not limited to this embodiment of the application.

[0194] Note that X and Y are usually 4 or more. In FIG. 13 and FIG. 16(a) to FIG. 16(d), X and Y are 8 and 8, respectively, in FIG. 14(a), X is 8, in FIG. 14(b), X is 16, in FIG. 15(a), Y is 8, and in FIG. 15(b), Y is 16. The above values ​​are merely one possible implementation. This is not limited to this embodiment of the application. Also, in FIG. 12 to FIG. 16(d), the boxes represent chroma blocks.

[0195] Step 1102: Obtain a luma value of a luma sample corresponding to a chroma sample at a preset position based on neighboring samples of a luma block corresponding to a chroma block.

[0196] In one particular implementation, after the chroma values ​​are obtained, a luma block corresponding to the chroma block can be determined, and the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions from the neighboring samples of the luma block can be obtained and expressed as a set Ψ, where Ψ={L0, L1, ..., L M-1}, where M represents the number of presets, i.e., the number of luma values ​​to be obtained.

[0197] Optionally, in step 1102, the luma value can be selected in several ways. In the following, two possible processing methods are provided.

[0198] Method 1: From the adjacent samples of the luma block, the position coordinates of the luma sample corresponding to the chroma sample at the i-th preset position in the preset positions are (2×X i ,2×Y i ), and the position coordinate of the chroma sample at the i-th preset position is (X i ,Y i ), and then obtain the luma value of the luma sample corresponding to the chroma sample at the preset position from the adjacent samples of the luma block corresponding to the chroma block according to the position coordinate of the luma sample corresponding to the chroma sample at the preset position.

[0199] The i-th preset position is any one of the preset positions.

[0200] In one particular implementation, when a chroma block is decoded, the position coordinate of the chroma sample at the i-th preset position among the preset positions is (X i ,Y i ) and (X i is the horizontal coordinate of the i-th preset position in the coordinate system shown in FIG. 12, and Y iis the vertical coordinate of the i-th preset position in the coordinate system shown in FIG. 12), and the position coordinate of the luma sample corresponding to the chroma sample at the i-th preset position from the adjacent samples of the luma block is (2×X i ,2×Y i ) may be determined. Thus, the position coordinates of the luma sample corresponding to the chroma sample at the preset position may be obtained. Then, based on the position coordinates of the luma sample corresponding to the chroma sample at the preset position, a luma value may be obtained from the corresponding luma sample.

[0201] Method 2: Based on the position coordinates of a chroma sample of a j-th preset position within the preset positions, determine position coordinates of a plurality of samples corresponding to the j-th preset position from adjacent samples of a luma block, determine position coordinates of a luma sample corresponding to the chroma sample of the j-th preset position based on the position coordinates of the plurality of samples, and obtain a luma value of the luma sample corresponding to the chroma sample of the preset position from adjacent samples of the luma block corresponding to the chroma block based on the position coordinates of the luma sample corresponding to the chroma sample of the preset position.

[0202] The j-th preset position is any one of the preset positions.

[0203] In one particular implementation, when a chroma block is decoded, the position coordinate of the chroma sample at the jth preset position within the preset positions is (X j ,Y j ) is (X j is the horizontal coordinate of the j-th preset position in the coordinate system shown in FIG. 12, and Y j is the vertical coordinate of the j-th preset position in the coordinate system shown in FIG. 12). For the chroma sample at the j-th preset position, (X j ,Y j), a plurality of sample positions of adjacent samples of the luma block corresponding to the jth preset position may be determined, and then based on the position coordinates of the plurality of sample positions, a position coordinate of a luma sample corresponding to the chroma sample of the jth preset position may be obtained.

[0204] For example, a weighting method may be used. The position coordinates of the multiple sample positions are expressed as (2×X j ,2×Y j ), (2×X j ,2×Y j +1), (2×X j +1,2×Y j ), (2×X j +1,2×Y j +1), (2×X j +2,2×Y j ), and (2×X j +2,2×Y j +1), all of these sample positions correspond to weighting values ​​of 2 / 8, 1 / 8, 1 / 8, 2 / 8, 1 / 8, and 1 / 8, respectively. After weighting, the position coordinates (2×X j ,2×Y j +0.5) may be obtained. Also, the weighting method may not be used, which is not limited in this embodiment of this application. Thus, the position coordinates of the luma sample corresponding to the chroma sample at the preset position may be obtained. Then, based on the position coordinates of the luma sample corresponding to the chroma sample at the preset position, the luma value may be obtained from the corresponding luma sample.

[0205] Step 1103: Classify the obtained luma values ​​into a first luma set and a second luma set.

[0206] In one particular implementation, after the luma values ​​are obtained, the obtained luma values ​​may be classified into a first luma set and a second luma set.

[0207] Optionally, these luma sets can be obtained in several ways. This embodiment of this application provides three possible approaches.

[0208] Method 1: Determine an average value of luma values ​​of luma samples corresponding to chroma samples at preset positions, and group luma values ​​among the luma values ​​of the luma samples corresponding to the chroma samples at preset positions that are less than or equal to the average value into a first luma set, and group luma values ​​among the luma values ​​of the luma samples corresponding to the chroma samples at preset positions that are greater than the average value into a second luma set.

[0209] In one particular implementation, an average value of the luma values ​​obtained in step 1102 may be determined. Then, luma values ​​among the luma values ​​obtained in step 1102 that are less than or equal to the average value of the luma values ​​are determined and grouped into a first luma set. Further, luma values ​​among the luma values ​​obtained in step 1102 that are greater than the average value of the luma values ​​are determined and grouped into a second luma set. Thus, the luma values ​​in the first luma set are less than the luma values ​​in the second luma set.

[0210] We use the following formula to represent: The average luma value is

number

[0211] Method 2: Arrange the luma values of the luma samples corresponding to the chroma samples at the preset positions in ascending order to obtain a first luma value queue. When the number of luma samples in the first luma value queue is even, group the luma values in the first half of the first luma value queue into a first luma set, and group the luma values in the second half of the luma value queue into a second luma set.

[0212] In a specific implementation, the luma values obtained in step 1102 can be sorted in ascending order to obtain a first luma value queue. When the number of luma samples in the first luma value queue is even, the luma values in the first half of the first luma value queue can be determined and grouped into a first luma set, and further, the luma values in the second half of the first luma value queue can be determined and grouped into a second luma set.

[0213] For example, in step 1102, four luma values, which are L1, L2, L3, and L4 in sequence, are obtained. When L4 < L2 < L1 < L3, the first luma value queue is L4, L2, L1, and L3. In this case, the first luma set is {L4, L2}, and the second luma set is {L1, L3}.

[0214] Method 3: Arrange the luma values of the luma samples corresponding to the chroma samples at the preset positions in descending order to obtain a second luma value queue. When the number of luma samples in the second luma value queue is even, group the luma values in the second half of the second luma value queue into a first luma set, and group the luma values in the first half of the luma value queue into a second luma set.

[0215] In a specific implementation, the luma values obtained in step 1102 can be sorted in descending order to obtain a second luma value queue. When the number of luma samples in the second luma value queue is even, the luma values in the second half of the second luma value queue can be determined and grouped into a first luma set, and further, the luma values in the first half of the second luma value queue can be determined and grouped into a second luma set.

[0216] For example, in step 1102, four luma values ​​are obtained, which are L1, L2, L3, and L4, in that order, and if L3>L1>L2>L4, then the second luma value queue is L3, L1, L2, and L4. In this case, the first luma set is {L4, L2} and the second luma set is {L1, L3}.

[0217] Furthermore, when the number of luma samples in the first luma value queue in method 2 is odd, if the first luma value queue contains N luma values, the first (N-1) / 2 luma values ​​may be grouped into a first luma set and the last (N+1) / 2 luma values ​​may be grouped into a second luma set, or the first (N+1) / 2 luma values ​​may be grouped into the first luma set and the last (N-1) / 2 luma values ​​may be grouped into the second luma set. Similarly, when the number of luma samples in the second luma value queue in Method 3 is odd, if the second luma value queue contains N luma values, the first (N-1) / 2 luma values ​​may be grouped into the second luma set and the last (N+1) / 2 luma values ​​may be grouped into the first luma set, or the first (N+1) / 2 luma values ​​may be grouped into the second luma set and the last (N-1) / 2 luma values ​​may be grouped into the first luma set.

[0218] Step 1104: Grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in a first luma set into a first chroma set, and grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in a second luma set into a second chroma set.

[0219] In one particular implementation, after the first luma set and the second luma set are obtained, the chroma values ​​corresponding to all the luma values ​​in the first luma set may be classified into the first chroma set, and the chroma values ​​corresponding to all the luma values ​​in the second luma set may be classified into the second chroma set. The following formula may be used to represent: The first chroma set is φ L ={C i0 ,C i1 ,…,C ij ,…,C iS}, The resulting second chroma set is φ R ={C j0 ,C j1 ,…,C ji ,…,C jT}.

[0220] Note that in step 1101, a luma value is determined using a luma sample corresponding to a chroma sample, where the chroma value corresponding to the luma sample is the chroma value of the chroma sample corresponding to the luma sample associated with the luma value.

[0221] Step 1105: Determine a scaling coefficient in a linear model corresponding to a chroma block based on an average value of luma values ​​in the first luma set, an average value of luma values ​​in the second luma set, an average value of chroma values ​​in the first chroma set, and an average value of chroma values ​​in the second chroma set.

[0222] In one particular implementation, after the first luma set, the second luma set, the first chroma set, and the second chroma set are determined, an average value of the luma values ​​in the first luma set and an average value of the luma values ​​in the second luma set may be determined, and an average value of the chroma values ​​in the first chroma set and an average value of the chroma values ​​in the second chroma set may be determined. Corresponding to Method 1, the following formula is used to represent: The average luma value in the first luma set is

number

number

number

number

[0223] Then, a scaling coefficient in the linear model corresponding to the chroma block is determined based on the average value of the luma values ​​in the first luma set, the average value of the luma values ​​in the second luma set, the average value of the chroma values ​​in the first chroma set, and the average value of the chroma values ​​in the second chroma set.

[0224] Optionally, the scaling factor can be determined by using a formula, and the corresponding process can be as follows:

number

[0225] In one particular implementation, a predetermined formula for the scaling factor can be obtained, and the formula for the scaling factor α=(C Lmean -C Rmean ) / (L Lmean -L Rmean ) to C Lmean , C Rmean , L Lmean , and L Rmean By substituting:

[0226] Step 1106: Determine an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient.

[0227] In a specific implementation, after the scaling coefficient is determined, an offset factor in the linear model corresponding to the chroma block can be determined based on the scaling coefficient. The offset factor can be determined in several ways. This embodiment of this application provides two possible ways.

[0228] Method 1: Determine an offset factor in a linear model corresponding to a chroma block based on a scaling coefficient, an average value of the chroma values ​​in the first chroma set, and an average value of the luma values ​​in the first luma set.

[0229] In one particular implementation, the average chroma values ​​in the first chroma set:

number

number

[0230] Then, an offset factor in the linear model corresponding to the chroma block is determined based on the scaling coefficients, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set.

[0231] Optionally, the offset factor can be determined by using the following formula, and the corresponding processing can be as follows: β=C Lmean -α*L Lmean where α is a scaling factor, β is an offset factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and L Lmeanis the average value of the luma values ​​in the first luma set.

[0232] In one particular implementation, a predetermined formula for the offset factor can be obtained, and the formula for the offset factor is β=C Lmean -α*L Lmean , the scaling coefficient C obtained in step 1105 Lmean and L Lmean By substituting:

[0233] Method 2: Determine an offset factor in a linear model corresponding to a chroma block based on a scaling coefficient, an average value of the chroma values ​​of the chroma samples at a preset position, and an average value of the luma values ​​of the luma samples corresponding to the chroma samples.

[0234] In one particular implementation, the average chroma value of the chroma samples at the preset positions:

number

number

[0235] And the scaling factor C mean and L mean The offset factor corresponding to the chroma block is determined by using:

[0236] Optionally, the offset factor can be determined by using the following formula, and the corresponding processing can be as follows: β=C mean -α*L mean where α is a scaling factor, β is an offset factor in the linear model corresponding to the chroma block, and C meanis the average chroma value of the chroma samples at the preset positions, and L mean is the average value of the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions.

[0237] In one particular implementation, a predetermined formula for the offset factor can be obtained, and the scaling coefficient C obtained in step 1105 can be added to the formula for the offset factor. mean and L mean By substituting:

[0238] Step 1107: Determine prediction information for the chroma block based on the scaling factor, the offset factor, and the luma reconstruction information corresponding to the chroma block.

[0239] The luma reconstruction information corresponding to a chroma block includes downsampling information of the luma reconstructed block corresponding to the chroma block.

[0240] In one particular implementation, after the scaling factor and offset factor corresponding to a chroma block are obtained, prediction information for the chroma block may be obtained using the luma reconstruction information, the scaling factor, and the offset factor corresponding to the chroma block.

[0241] Optionally, to get prediction information for a chroma block, use the formula:

number

[0242] When this embodiment of this application is applied to the encoder side, the only difference is the way to determine the intra prediction mode. On the encoder side, if it is determined that the intra prediction method is used for a chroma block, the chroma block is coded using each intra prediction mode. Then, it uses a rate-distortion optimization (RDO) criterion to determine the intra prediction mode with the best coding effect, writes the intra prediction mode into the above syntax table, and adds the intra prediction mode to the bitstream. Thus, the decoder side can determine the intra prediction mode to be used for decoding directly from the bitstream.

[0243] Optionally, the approach for determining the intra prediction mode by using the RDO criterion may be as follows.

[0244] The prediction information of the chroma block is determined by the method of steps 1101 to 1107, the prediction information is subtracted from the original information of the chroma block to obtain residual information, a transform process is performed on the residual information to obtain transform coefficients, a quantization process is performed on the transform coefficients to obtain quantized coefficients, and an entropy coding process is performed on the quantized coefficients to obtain a bitstream. Then, the bitstream is sequentially subjected to an inverse entropy coding process, an inverse quantization process, and an inverse transform process to perform intra prediction to obtain reconstructed information, the reconstructed information is compared with the original information, and the intra prediction mode with the smallest difference between the reconstructed information and the original information is determined as the intra prediction mode to be finally used, i.e., the intra prediction mode to be written into the above-mentioned syntax table.

[0245] In addition, the encoder side may be an encoder side using H.263, H.264, MPEG-2, MPEG-4, VP8, or VP9, ​​and correspondingly, the decoder side may be a decoder side using H.263, H.264, MPEG-2, MPEG-4, VP8, or VP9.

[0246] It should be further noted that this embodiment of the application is described using only one row of adjacent samples as an example, this embodiment of the application can also be applied to the scenario of two rows of adjacent samples shown in Figure 10, where the processing method is the same as that of the one row of samples case, but the position coordinates of the preset number of position points are different.

[0247] In an embodiment of this application, during encoding or decoding, the chroma value of the chroma sample at the preset position may be obtained from the neighboring samples of the chroma block. Then, the luma value of the luma sample corresponding to the chroma sample at the preset position is obtained from the neighboring samples of the luma block corresponding to the chroma block, and the obtained luma value is classified into a first luma set and a second luma set, and the chroma value is correspondingly classified into the first chroma set and the second chroma set based on the classification of the luma value. Then, a scaling coefficient in the linear model corresponding to the chroma block may be determined based on the average value of the luma values ​​in the first luma set, the average value of the luma values ​​in the second luma set, the average value of the chroma values ​​in the first chroma set, and the average value of the chroma values ​​in the second chroma set, and after the scaling coefficient is determined, an offset factor in the linear model corresponding to the chroma block may be determined based on the scaling coefficient. Finally, prediction information of the chroma block is determined based on the scaling coefficient, the offset factor, and the luma reconstruction information corresponding to the chroma block. Thus, in encoding or decoding, a preset number of chroma values ​​are selected and then classified into two chroma sets, and a preset number of luma values ​​are selected and then classified into two luma sets. Based on the average value of the luma values ​​in each luma set and the average value of the chroma values ​​in each chroma set, a scaling coefficient in the linear model corresponding to the chroma block is determined, and further, an offset factor is determined. Since only a smaller number of multiplications are required, the encoding time and the decoding time can be reduced.

[0248] FIG. 17 is a block diagram of a chroma block prediction device according to an embodiment of this application. The device may be implemented as a part of a device or as a whole device by using software, hardware, or a combination thereof. The device provided in this embodiment of this application may implement the procedures of FIG. 11 to FIG. 16(d) in the embodiment of this application. The device includes an acquisition module 1710, a classification module 1720, and a decision module 1730.

[0249] The acquisition module 1710 is configured to obtain chroma values ​​of a chroma sample at a preset position from adjacent samples of a chroma block, and obtain luma values ​​of a luma sample corresponding to a chroma sample at a preset position based on adjacent samples of a luma block corresponding to the chroma block, and may be configured in particular to implement the acquisition functions in FIG. 11 and the implicit steps included in FIG. 11.

[0250] The classification module 1720 may be configured to classify the acquired luma values ​​into a first luma set and a second luma set, group chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the first luma set into the first chroma set, and group chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the second luma set into the second chroma set, and in particular to implement the classification function in FIG. 11 and the implicit steps included in FIG. 11.

[0251] The determination module 1730 may be configured to: determine a scaling coefficient in a linear model corresponding to a chroma block based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set; determine an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient; and determine prediction information of the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block, where the luma reconstruction information corresponding to the chroma block includes downsampling information of the luma reconstruction block corresponding to the chroma block, and may be configured to implement, in particular, the determination function in FIG. 11 and the implicit steps included in FIG. 11.

[0252] Optionally, the acquisition module 1710 further comprises: Obtain indication information, and determine an intra-prediction mode corresponding to a chroma block according to the indication information, the intra-prediction mode including at least one of a linear mode LM, a linear mode above LMA, and a linear mode left LML; determining a preset position based on an intra prediction mode corresponding to the chroma block; It is configured as follows.

[0253] Optionally, the acquisition module 1710 includes: Obtaining a chroma value of a chroma sample at the preset position from adjacent samples of the chroma block according to a predetermined correspondence relationship between the intra prediction mode and the preset position and the intra prediction mode corresponding to the chroma block; It is configured as follows.

[0254] Optionally, the position coordinates of the top neighboring sample of the chroma block are (0,-1), (1,-1), ..., and (X-1,-1) and the position coordinates of the left neighboring sample of the chroma block are (-1,0), (-1,1), ..., and (-1,Y-1); When the intra prediction mode corresponding to the chroma block is the cross-component linear mode LM, the position coordinates of the chroma samples at the preset positions are (0, -1), (X-1, -1), (-1, -0), and (-1, Y-1).

[0255] Optionally, the position coordinates of the upper adjacent samples of the chroma block are (0,-1), (1,-1), …, and (X-1,-1); When the intra prediction mode corresponding to the chroma block is LMA on cross-component linear mode, the position coordinates of the preset positions are (0, -1), (X / 4, -1), (X-1-X / 4, -1), and (X-1, -1), or (0, -1), (X / 4, -1), (3×X / 4, -1), and (X-1, -1).

[0256] Optionally, the position coordinates of the left adjacent sample of the chroma block are (-1,0), (-1,1), …, and (-1,Y-1); If the intra prediction mode corresponding to the chroma block is cross-component linear mode left LML, the position coordinates of the preset positions are (-1,0), (-1,Y / 4), (-1,Y-1-Y / 4), and (-1,Y-1), or (-1,0), (-1,Y / 4), (-1,3×Y / 4), and (-1,Y-1).

[0257] Optionally, the acquisition module 1710 includes: From the adjacent samples of the luma block, the position coordinates of the luma sample corresponding to the chroma sample of the i-th preset position in the preset positions are (2 × X i ,2×Y i ), and the position coordinate of the chroma sample at the i-th preset position is (X i ,Y i ), and obtaining a luma value of the luma sample corresponding to the chroma sample at the preset position from an adjacent sample of the luma block corresponding to the chroma block according to the position coordinate of the luma sample corresponding to the chroma sample at the preset position; or According to a position coordinate of the chroma sample of the j-th preset position in the preset positions, determine position coordinates of a plurality of samples corresponding to the j-th preset position from adjacent samples of the luma block, and according to the position coordinates of the plurality of samples, determine position coordinates of the luma sample corresponding to the chroma sample of the j-th preset position; and according to the position coordinates of the luma sample corresponding to the chroma sample of the preset position, obtain a luma value of the luma sample corresponding to the chroma sample of the preset position from adjacent samples of the luma block corresponding to the chroma block. It is configured as follows.

[0258] Optionally, the classification module 1720 determining an average value of the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions; grouping luma values ​​among the luma samples corresponding to the chroma samples at the preset positions that are less than or equal to an average value of the luma values ​​into a first luma set, and grouping luma values ​​among the luma samples corresponding to the chroma samples at the preset positions that are greater than the average value of the luma values ​​into a second luma set; It is configured as follows.

[0259] Optionally, the classification module 1720 sorting the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions in ascending order to obtain a first luma value queue, and if the number of luma samples in the first luma value queue is even, grouping the luma values ​​in a first half of the first luma value queue into a first luma set and grouping the luma values ​​in a second half of the luma value queue into a second luma set; or sorting the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions in descending order to obtain a second luma value queue, and if the number of luma samples in the second luma value queue is even, grouping the luma values ​​in a latter part of the second luma value queue into a first luma set, and grouping the luma values ​​in a former part of the luma value queue into a second luma set; It is configured as follows.

[0260] Optionally, the determination module 1730: α = (C Lmean -C Rmean ) / (L Lmean -L Rmean ), where α is a scaling factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and C Rmean is the average value of the chroma values ​​in the second chroma set, and L Lmean is the average luma value in the first luma set, and L Rmean is the average value of the luma values ​​in the second luma set.

[0261] Optionally, the determination module 1730: determining an offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set; It is configured as follows.

[0262] Optionally, the determination module 1730: β=C Lmean -α*L Lmean where α is a scaling factor, β is an offset factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and L Lmean is the average value of the luma values ​​in the first luma set.

[0263] Optionally, the determination module 1730: determining an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient, the average value of the chroma values ​​of the chroma samples at the preset positions, and the average value of the luma values ​​of the luma samples corresponding to the chroma samples; It is configured as follows.

[0264] Optionally, the determination module 1730: β=C mean -α*L mean where α is a scaling factor, β is an offset factor in the linear model corresponding to the chroma block, and C mean is the average chroma value of the chroma samples at the preset positions, and L mean is the average value of the luma values ​​of the luma samples corresponding to the chroma samples at the preset positions.

[0265] In an embodiment of this application, during encoding or decoding, the chroma value of the chroma sample at the preset position may be obtained from the neighboring samples of the chroma block. Then, the luma value of the luma sample corresponding to the chroma sample at the preset position is obtained from the neighboring samples of the luma block corresponding to the chroma block, and the obtained luma value is classified into a first luma set and a second luma set, and the chroma value is correspondingly classified into the first chroma set and the second chroma set based on the classification of the luma value. Then, a scaling coefficient in the linear model corresponding to the chroma block may be determined based on the average value of the luma values ​​in the first luma set, the average value of the luma values ​​in the second luma set, the average value of the chroma values ​​in the first chroma set, and the average value of the chroma values ​​in the second chroma set, and after the scaling coefficient is determined, an offset factor in the linear model corresponding to the chroma block may be determined based on the scaling coefficient. Finally, prediction information of the chroma block is determined based on the scaling coefficient, the offset factor, and the luma reconstruction information corresponding to the chroma block. Thus, in encoding or decoding, a preset number of chroma values ​​are selected and then classified into two chroma sets, and a preset number of luma values ​​are selected and then classified into two luma sets. Based on the average value of the luma values ​​in each luma set and the average value of the chroma values ​​in each chroma set, a scaling coefficient in the linear model corresponding to the chroma block is determined, and further, an offset factor is determined. Since only a smaller number of multiplications are required, the encoding time and the decoding time can be reduced.

[0266] It should be noted that, when the chroma block prediction device provided in the above embodiment determines chroma block prediction information, the division of the above function modules is merely used as an example of description. In actual application, the above functions can be assigned to different function modules as needed. In other words, the internal structure of the device is divided into multiple different function modules to complete all or part of the described functions. In addition, the chroma block prediction device provided in the above embodiment has the same concept as the embodiment of the chroma block prediction method. For details on the specific implementation process of the chroma block prediction device, please refer to the method embodiment. The details will not be described again here.

[0267] The application further provides a computer-readable storage medium having instructions stored thereon that, when executed on a computing device, enable the computing device to perform a chroma block prediction method.

[0268] The application further provides a computer program product including instructions that, when executed on a computing device, enable the computing device to perform a chroma block prediction method.

[0269] All or part of the above-mentioned embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used for implementation, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed in a server or a terminal, all or part of the procedures or functions according to the embodiments of this application are generated. The computer instructions may be stored in a computer-readable storage medium, or may be sent from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be sent from a website, computer, server, or data center to another website, computer, server, or data center in a wired (e.g., coaxial optical cable, optical fiber, or digital subscriber line) manner or a wireless (e.g., infrared, radio, or microwave) manner. The computer-readable storage medium may be any available medium accessible by a server or terminal, or may be a data storage device, such as a server or data center, that integrates one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, and magnetic tapes), optical media (eg, Digital Video Disks (DVDs)), or semiconductor media (eg, solid state drives).

[0270] The above description is merely a specific implementation of this application, and is not intended to limit this application. Any modification, equivalent replacement, or improvement made without departing from the spirit and principle of this application shall fall within the protection scope of this application.

Claims

1. 1. A method of encoding, comprising: determining a preset position based on an intra prediction mode corresponding to the chroma block; Obtaining four chroma values ​​of the chroma sample at the preset position from adjacent samples of the chroma block; Obtaining four luma values ​​of luma samples corresponding to the four chroma samples at the preset positions based on adjacent samples of a luma block corresponding to the chroma block; sorting the four luma values ​​into two smaller luma values ​​and two larger luma values; grouping the two smaller luma values ​​into a first luma set and grouping the two larger luma values ​​into a second luma set; grouping into a first chroma set chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the first luma set and grouping into a second chroma set chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the second luma set; determining a scaling factor in a linear model corresponding to the chroma block based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set; determining an offset factor in the linear model corresponding to the chroma block based on the scaling factor; determining prediction information for the chroma block based on the scaling factor, the offset factor, and luma reconstruction information corresponding to the chroma block; encoding indication information into a bitstream, the indication information being used to indicate the intra-prediction mode corresponding to the chroma block, the intra-prediction mode being a linear-matrix-on-a-line (LMA) mode; obtaining residual information based on the prediction information of the chroma block and the chroma block; encoding the residual information into the bitstream; How to have that.

2. The obtaining of four chroma values ​​of the chroma sample at the preset position from adjacent samples of a chroma block includes: obtaining the four chroma values ​​of the chroma sample at the preset position from the neighboring samples of the chroma block based on a predetermined correspondence between an intra-prediction mode and a preset position and the intra-prediction mode corresponding to the chroma block; The method of claim 1 comprising:

3. said classifying said four luma values ​​into two smaller luma values ​​and two larger luma values ​​by permuting said four luma values; or sorting the four luma values ​​of the luma sample corresponding to the chroma sample at the preset position in ascending order to obtain a first luma value queue, a first half portion of the first luma value queue having the two smaller luma values ​​of the first luma value queue and a second half portion of the first luma value queue having the two larger luma values ​​of the first luma value queue; or sorting the four luma values ​​of the luma sample corresponding to the chroma sample at the preset position in descending order to obtain a second luma value queue, a first half portion of the second luma value queue having the two larger luma values ​​of the second luma value queue, and a second half portion of the second luma value queue having the two smaller luma values ​​of the second luma value queue; The method of claim 1 or 2, comprising:

4. Determining an offset factor in the linear model corresponding to the chroma block based on the scaling factor comprises: determining the offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set; 4. The method according to claim 1 , further comprising:

5. Determining the offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set includes: β=C Lmean -α*L Lmean where α is the scaling factor, β is the offset factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and L Lmean is the average value of the luma values ​​in the first luma set, The method according to claim 4.

6. 1. An encoding device, comprising: a determining module configured to determine a preset position based on an intra-prediction mode corresponding to a chroma block; an acquisition module configured to acquire four chroma values ​​of a chroma sample at the preset position from adjacent samples of the chroma block, and to acquire four luma values ​​of a luma sample corresponding to the four chroma samples at the preset position based on adjacent samples of a luma block corresponding to the chroma block; a classification module configured to sort the four luma values ​​into two smaller luma values ​​and two larger luma values ​​by sorting the four luma values, grouping the two smaller luma values ​​into a first luma set and grouping the two larger luma values ​​into a second luma set, grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the first luma set into the first chroma set, and grouping chroma values ​​of chroma samples corresponding to luma samples associated with luma values ​​in the second luma set into the second chroma set; a classification module, the determination module further configured to: determine a scaling coefficient in a linear model corresponding to the chroma block based on an average value of the luma values ​​in the first luma set, an average value of the luma values ​​in the second luma set, an average value of the chroma values ​​in the first chroma set, and an average value of the chroma values ​​in the second chroma set; determine an offset factor in the linear model corresponding to the chroma block based on the scaling coefficient; and determine prediction information for the chroma block based on the scaling coefficient, the offset factor, and luma reconstruction information corresponding to the chroma block; an encoding module configured to encode indication information into a bitstream, the indication information being used to indicate the intra-prediction mode corresponding to the chroma block, the intra-prediction mode being a linear-matrix-on-a-mode (LMA) mode; a residual block configured to obtain residual information based on the prediction information of the chroma block and the chroma block; having the encoding module is further configured to encode the residual information into the bitstream. Device.

7. The acquisition module further comprises: obtaining the four chroma values ​​of the chroma sample at the preset position from the neighboring samples of the chroma block based on a predetermined correspondence between an intra-prediction mode and a preset position and the intra-prediction mode corresponding to the chroma block; The apparatus of claim 6 , configured to:

8. The classification module includes: or sorting the four luma values ​​of the luma sample corresponding to the chroma sample at the preset position in ascending order to obtain a first luma value queue, a first half portion of the first luma value queue having the two smaller luma values ​​of the first luma value queue and a second half portion of the first luma value queue having the two larger luma values ​​of the first luma value queue; or sorting the four luma values ​​of the luma sample corresponding to the chroma sample at the preset position in descending order to obtain a second luma value queue, a first half portion of the second luma value queue having the two larger luma values ​​of the second luma value queue, and a second half portion of the second luma value queue having the two smaller luma values ​​of the second luma value queue; 8. The apparatus according to claim 6 or 7, configured so as to

9. The decision module: determining the offset factor in the linear model corresponding to the chroma block based on the scaling factor, the average value of the chroma values ​​in the first chroma set, and the average value of the luma values ​​in the first luma set; 9. Apparatus according to any one of claims 6 to 8, configured to:

10. The decision module: β=C Lmean -α*L Lmean where α is the scaling factor, β is the offset factor in the linear model corresponding to the chroma block, and C Lmean is the average value of the chroma values ​​in the first chroma set, and L Lmean is the average value of the luma values ​​in the first luma set, The apparatus of claim 9 , configured to:

11. 1. A coding device having a memory and a processor, the memory configured to store processor-executable instructions; The processor is configured to execute the processor-executable instructions to perform the encoding method according to any one of claims 1 to 5. Encoding device.

12. 6. A computer readable storage medium having stored thereon instructions which, when executed on a computing device, enable the computing device to perform the encoding method according to any one of claims 1 to 5.

13. A computer program product comprising instructions which, when executed on a computing device, enable the computing device to perform the encoding method according to any one of claims 1 to 5.