Chroma block prediction method and device

The chroma block prediction method using a linear model mode in video coding standards addresses inefficiencies in chroma component coding by aligning filter types with chroma sample positions, enhancing coding accuracy and efficiency.

JP2025118669AInactive Publication Date: 2025-08-13HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025067670
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-09-05
Filing Date
2025-04-16
Publication Date
2025-08-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing video coding standards face challenges in improving coding efficiency for chroma components during intra prediction, particularly in high-definition video applications.

Method used

A chroma block prediction method using a linear model mode (LM mode) is employed, where the encoder determines a filter type based on the sample position type of the chroma block and encodes this information into a bitstream, allowing both encoder and decoder to use corresponding luma downsampling filters, thereby enhancing coding accuracy and efficiency.

Benefits of technology

This approach ensures consistent filter application across different chroma sample positions, improving coding accuracy and efficiency by aligning downsampled luma sample positions with chroma sample positions, thus optimizing video coding for chroma components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025118669000001_ABST
    Figure 2025118669000001_ABST
Patent Text Reader

Abstract

To provide a chroma block prediction method and a device.SOLUTION: A method includes the steps of: parsing a bitstream to obtain first indication information; executing downsampling operation on a first luma block by using a first filter when a value of the first indication information is a first value or by using a second filter when a value of the first indication information is a second value, in order to obtain a second luma block, where the first luma block is a luma block corresponding to a current luma block; obtaining a plurality of chroma samples and a plurality of luma samples; obtaining linear model coefficients based on the plurality of chroma samples and the plurality of luma samples; and obtaining a prediction value of the current chroma block based on the second luma block and the linear model coefficients.SELECTED DRAWING: Figure 13
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to the field of video coding, and in particular to a chroma block prediction method and device. [Background technology]

[0002] As Internet technology develops rapidly and human material and spiritual cultures become increasingly rich, the demand for video applications, especially high-definition video applications, on the Internet is increasing. However, high-definition video involves an extremely large amount of data. To transmit high-definition video over the Internet, where bandwidth is limited, compression coding of the high-definition video must first be performed. Currently, two international organizations, namely, MPEG at ISO / IEC and VCEG at ITU-T, are dedicated to developing video coding standards. Founded in 1986, MPEG specializes in developing standards related to multimedia applications, such as storage, broadcast television, and streaming media over the Internet or wireless networks. ITU-T primarily develops video coding standards for real-time video communications, such as video telephony, video conferencing, and other applications. Over the past few decades, video coding standards have been developed for a variety of applications, including MPEG-1 for VCD, MPEG-2 for DVD and DVB, H.261, H.263, and H.264 for video conferencing, and MPEG-4 and HEVC, which allow for the coding of arbitrarily shaped objects.

[0003] In currently widely used video coding standards H.264 / AVC (denoted as H.264) and H.265 / HEVC (denoted as H.265), various types of coding operations, such as prediction, transform, and entropy coding, are performed by using an image block as a basic unit. An image block is a two-dimensional sample array, i.e., an array of size W*H samples, where W may or may not be equal to H. In addition, the value of the sample at each sample position is known.

[0004] A typical video encoding process mainly includes the following steps: intra prediction, inter prediction, transform, quantization, entropy encoding, in-loop filtering, etc. After an image is divided into image blocks, intra prediction and inter prediction are performed. Then, after the residual is obtained, transform and quantization are performed. Finally, entropy encoding is performed to output a bitstream.

[0005] Intra prediction means that the sample values of samples in a reconstructed area in a current image are used to predict the sample values of samples in a current block.Generally, the predicted value of a sample in a current block is derived based on the samples in the reconstructed neighboring blocks around the current block.For example, in H.264 or H.265, the boundary samples of neighboring blocks (the boundaries near the current block) are generally used as the reference samples of the current block, and the predicted value of a sample in the current block is derived based on these reference samples by using a specific method.The intra prediction mode is, for example, a non-directional mode such as DC (or average) mode or planar mode, or a directional mode as specified in H.265.

[0006] After obtaining prediction information through intra prediction, residual information is obtained by subtracting the corresponding prediction information from the sample values of samples in the current coding block. The residual information is then transformed using a method such as Discrete Cosine Transformation (DCT). Finally, a bitstream is obtained through quantization and entropy coding. After the prediction signal and the reconstructed residual signal are summed, a further filtering operation needs to be performed to obtain a reconstructed signal. The reconstructed signal is used as a reference signal for subsequent coding.

[0007] Decoding is the reverse process of encoding. Entropy decoding, dequantization, and inverse transform are first performed to obtain residual information. The bitstream is decoded to determine whether intra prediction or inter prediction is used for the current block. If intra coding is used, prediction information is constructed based on sample values of samples in a reconstructed area around the current image by using an intra prediction method. After the prediction information and residual information are summed, reconstructed information can be obtained by performing a filtering operation.

[0008] Existing videos are generally color videos. In addition to the luma component, an image in the color video also includes a chroma component. Therefore, the luma component needs to be coded, and the chroma component also needs to be coded. How to improve coding efficiency for the chroma component in intra prediction remains a technical challenge at present. Summary of the Invention [Means for solving the problem]

[0009] SUMMARY OF THE INVENTION An embodiment of the present invention provides a chroma block prediction method and device to improve coding efficiency for chroma components (chroma blocks) in intra prediction.

[0010] According to a first aspect, an embodiment of the present invention provides a chroma block prediction method. The method is described from an encoder side perspective. The method may be used in intra prediction for a current chroma block, and the intra prediction mode used is a linear model mode (LM mode for short). The method may include determining a filter type based on a sample position type of the current chroma block, where the filter type is determined based on the sample position type of the current chroma block and each sample position type of the current chroma block corresponds to a filter type; setting first display information, where the first display information is used to indicate the filter type; and encoding the first display information into a bitstream, so that the bitstream is later sent to a decoder side.

[0011] In this embodiment of the present invention, it can be known that the encoder can determine the luma downsampling filter to be used for the current luma block based on the sample position type of the current chroma sample, and can specify the type of downsampling filter for the decoder through display information, which ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position, thereby improving the coding accuracy and coding efficiency of the encoder side.

[0012] Based on the first aspect, in a possible embodiment, six sample position types, namely, type0, type1, type2, type3, type4, and type5, may be designed. Therefore, there are six types of luma downsampling filters corresponding to the six sample position types, namely, filter0, filter1, filter2, filter3, filter4, and filter5. In other words, the sample position type of the current chroma block may be one of the six sample position types. By setting these filters, it is ensured that both the encoder side and the decoder side obtain filters corresponding to the chroma sample positions. This takes into account cases where different chroma sample positions may actually exist in different video sequences, thereby improving coding accuracy and coding efficiency on the encoder side.

[0013] Based on the first aspect, in a possible embodiment, considering that chroma sample position type0 and type2 are currently the most common, two sample position types may be designed as alternatives. In other words, the two sample position types only include type0 and type2. Therefore, there are two types of luma downsampling filters, namely, filter0 and filter2, corresponding to the two sample position types. In other words, the sample position type of the current chroma block may be one of the two sample position types. By configuring these filters, the most common coding requirements can be met while improving coding accuracy and coding efficiency on the encoder side.

[0014] Based on the first aspect, in a possible embodiment, a sequence parameter set (SPS) parameter may be newly added, and the value of the SPS parameter is used to indicate the type of luma downsampling filter in LM mode during encoding or decoding of a current video sequence. At the encoder side, this parameter may be set based on a chroma sample position in the current sequence. Specifically, the first display information may be set based on a filter type. The first display information may include a value of the SPS parameter, where the value is used to indicate the type of luma downsampling filter used for prediction for a chroma block during encoding or decoding.

[0015] Based on the first aspect, in a possible embodiment, multiple intra prediction modes may be preset at the encoder side. The multiple intra prediction modes include the LM mode. The encoder side reviews the multiple intra prediction modes and determines that the optimal intra prediction mode for the current chroma block is the LM mode. In addition, the encoder side may further set second display information, where the second display information is used to indicate the LM mode, and encode the second display information into the bitstream, so that the decoder side also performs intra prediction in the LM mode to improve coding efficiency.

[0016] Based on the first aspect, in a possible embodiment, during construction of the prediction block, the encoder side may further perform the following: determining a filter corresponding to the filter type based on the first display information; downsampling the first luma block by using the filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, where the template chroma sample includes a plurality of neighboring chroma samples of the current chroma block, and the template luma sample is obtained by downsampling the plurality of neighboring luma samples of the first luma block; obtaining a linear model coefficient based on the template chroma sample and the template luma sample; and obtaining a prediction value of the current chroma block based on the second luma block and the linear model coefficient.

[0017] According to a second aspect, an embodiment of the present invention provides a chroma block prediction method, which may be used in intra prediction for a current chroma block, and the intra prediction mode used is LM mode. The method includes parsing a bitstream to obtain first display information, where the first display information is used to indicate a filter type; performing a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to a current chroma block and positions of luma samples of the second luma block match positions of chroma samples of the current chroma block; obtaining a template chroma sample and a template luma sample, where the template chroma sample includes a plurality of neighboring chroma samples of the current chroma block and is obtained by performing a downsampling operation on the plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma sample and the template luma sample; and obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients.

[0018] In this embodiment of the present invention, for the LM mode, it can be known that the decoder side can determine the filter used for downsampling the luma block corresponding to the current chroma block based on the display information in the bitstream during downsampling of the current block. In this way, the filter corresponding to the chroma sample position can be obtained. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby improving coding accuracy and coding efficiency.

[0019] Specifically, in this embodiment of the present invention, the adjacent upper and adjacent left sides used for calculating the linear model coefficients may be referred to as a template. A template is a set of luma samples or a set of chroma samples used for calculating the linear model coefficients. The set of luma samples used for calculating the linear model coefficients may also be referred to as a template luma sample. The template luma sample is obtained by performing a downsampling operation on multiple adjacent luma samples of a luma block (because there may be no luma sample value at a position in the luma image corresponding to the template chroma sample). The set of chroma samples used for calculating the linear model coefficients may also be referred to as a template chroma sample. The template chroma sample includes multiple reconstructed neighboring chroma samples of the current chroma block.

[0020] Based on the second aspect, in a possible embodiment, the template chroma samples specifically include one or more rows of neighboring chroma samples above the current chroma block and one or more columns of neighboring chroma samples to the left of the current chroma block. The template luma samples correspond one-to-one to the template chroma samples, and the values of samples in the template luma samples and the values of samples in the template chroma samples form value pairs.

[0021] Based on the second aspect, in a possible embodiment, the template chroma sample includes one row of neighboring chroma samples above and one column of neighboring chroma samples to the left of the current chroma block. Thus, the template luma sample includes one row of luma samples and one column of left luma samples, where the one row of luma samples and the one column of left luma samples correspond to chroma sample positions in the template chroma sample.

[0022] Based on the second aspect, in a possible embodiment, the template chroma samples include two rows of above-neighboring chroma samples and two columns of left-neighboring chroma samples of the current chroma block. Thus, the template luma samples include two rows of luma samples and two columns of luma samples, where the two rows of luma samples and the two columns of luma samples correspond to chroma sample positions in the template chroma samples.

[0023] Based on the second aspect, in a possible embodiment, the template chroma samples may alternatively include only one or more columns of left neighboring chroma samples of the current chroma block, and the template luma samples include only one or more columns of luma samples, and the template luma samples have a one-to-one correspondence with the template chroma samples.

[0024] Based on the second aspect, in a possible embodiment, the template chroma samples may alternatively include only one or more rows of adjacent chroma samples above the current chroma block. The template luma samples include only one or more rows of luma samples, and the template luma samples correspond one-to-one to the template chroma samples.

[0025] Based on the second aspect, in a possible embodiment, for a template luma sample, the first display information indicates a filter type, so that a downsampling operation may be performed on multiple neighboring luma samples of the first luma block by using a filter corresponding to the filter type to obtain the template luma sample. In this way, the decoder side uses the same filter in the downsampling process for deriving the template luma sample and the downsampling process for the current block, thereby improving processing efficiency.

[0026] For example, if six filter types are designed for the decoder side and the value currently indicated by the first display information is 0, the luma downsampling filter used is filter 0, and a downsampling operation may be performed on multiple adjacent luma samples of the first luma block by using filter 0 to obtain the value of each luma sample among the template luma samples.

[0027] Based on the second aspect, in a possible embodiment, during parsing of the bitstream, second indication information may be further obtained by parsing the bitstream, where the second indication information is used to indicate that the intra-prediction mode used by the decoder side to decode the current chroma block is the LM mode, so that the decoder side determines that the LM mode should be used for intra-prediction for the current image in the video sequence.

[0028] According to the second aspect, in a possible embodiment, the method is used for decoding a current image block in a video sequence, the current image block including a first luma block and a current chroma block, and the image in the video sequence is in 4:2:0 format or 4:2:2 format.

[0029] Based on the second aspect, in a possible embodiment, the encoder side and the decoder side may use the same designed filter types. For example, six filter types (corresponding to six chroma sample positions) are designed for the encoder side, and six filter types are also designed for the decoder side. In addition, the downsampling algorithms of the six filter types on the decoder side are respectively matched to the downsampling algorithms of the six filter types on the encoder side. In another example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms of the two filter types on the decoder side are respectively matched to the downsampling algorithms of the two filter types on the encoder side.

[0030] Based on the second aspect, in a possible embodiment, the first display information includes a value of an SPS parameter, where the value is used to indicate the type of luma downsampling filter used for prediction for a chroma block during encoding or decoding.

[0031] Based on the second aspect, in a possible embodiment, obtaining the linear model coefficients based on the template chroma samples and the template luma samples includes obtaining the linear model coefficients α and β based on the template chroma samples and the template luma samples by using a least squares method.

[0032] Based on the second aspect, in a possible embodiment, obtaining the linear model coefficients based on the template chroma samples and the template luma samples includes obtaining the linear model coefficients α and β based on the template chroma samples and the template luma samples by using an extremum method.

[0033] According to a third aspect, a method may be used in intra prediction for a current chroma block. The method may be described from a decoder side perspective, and the intra prediction mode used is, for example, LM mode. The method includes: determining a filter type based on sample positions of the current chroma block; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, where the template chroma sample includes multiple neighboring chroma samples of the current chroma block and is obtained by performing a downsampling operation on the multiple neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma sample and the template luma sample; and obtaining a predicted value of the current chroma block based on the second luma block and the linear model coefficients.

[0034] In this embodiment of the present invention, it can be seen that the encoder can determine the luma downsampling filter to be used for the current luma block based on the sample position of the current chroma block to obtain a filter corresponding to the chroma sample position, which takes into account the cases where different chroma sample positions may actually exist in different video sequences, thereby improving coding accuracy and coding efficiency.

[0035] Based on the third aspect, in a possible embodiment, before determining the filter type based on the sample position of the current chroma block, the method includes parsing the bitstream to obtain first display information, where the first display information is used to indicate the sample position of the current chroma block. The sample position of the current chroma block may be associated with the filter type.

[0036] In this embodiment of the present invention, it can be known that the encoder can determine the sample position of the current chroma sample based on the first display information to obtain the filter corresponding to the chroma sample position, and both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position, thereby improving the coding accuracy and coding efficiency of the encoder side.

[0037] Based on the third aspect, in a possible embodiment, the sample positions of the current chroma block may be determined based on, for example, the sample position type of the current chroma block, which may be associated with a filter type.

[0038] In one implementation, the sample position type of the current chroma block is at least one of the following sample position types: sample position type type0 and sample position type type2.

[0039] In another implementation, the sample position type of the current chroma block is at least one of the following sample position types: sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5.

[0040] Based on the third aspect, in a possible embodiment, parsing the bitstream to obtain the first display information includes parsing a sequence parameter set (SPS) parameter in the bitstream to obtain the first display information. In this embodiment, the encoder side may indicate the sample position type of the current chroma block to the decoder side through a specific SPS parameter. This is equivalent to specifying the type of downsampling filter for the decoder side, thereby ensuring that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position.

[0041] According to a fourth aspect, an embodiment of the present invention provides a video data encoding device. The device includes a memory and an encoder coupled to the memory. The memory is configured to store video data in a bitstream format. The encoder is configured to determine a filter type based on a sample position type of a current chroma block, set first display information, where the first display information is used to indicate the filter type, and encode the first display information into the bitstream. Specifically, the device may be configured to implement the method described in the first aspect.

[0042] According to a fifth aspect, an embodiment of the present invention provides a video data decoding device. The device includes a memory and a decoder coupled to the memory. The memory is configured to store video data in a bitstream format. The decoder is configured to: parse the bitstream to obtain first display information, where the first display information is used to indicate a filter type; perform a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to a current chroma block; obtain a template chroma sample and a template luma sample, where the template chroma sample includes multiple neighboring chroma samples of the current chroma block and the template luma sample is obtained by performing a downsampling operation on the multiple neighboring luma samples of the first luma block; obtain linear model coefficients based on the template chroma sample and the template luma sample; and obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients. In particular, the device may be configured to carry out the method described in the second aspect.

[0043] According to a sixth aspect, an embodiment of the present invention provides a video data decoding device. The device includes a memory and a decoder coupled to the memory. The memory is configured to store video data in a bitstream format. The decoder is configured to: determine a filter type based on a sample position type of a current chroma block; perform a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block; obtain a template chroma sample and a template luma sample, where the template chroma sample includes multiple neighboring chroma samples of the current chroma block and is obtained by performing a downsampling operation on the multiple neighboring luma samples of the first luma block; obtain linear model coefficients based on the template chroma sample and the template luma sample; and obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients. Specifically, the device may be configured to implement the method described in the third aspect.

[0044] According to a seventh aspect, an embodiment of the present invention provides an encoding device, the encoding device comprising a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform the method described in the first aspect.

[0045] According to an eighth aspect, an embodiment of the present invention provides a decoding device, the decoding device including a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform the method described in the second aspect.

[0046] According to a ninth aspect, an embodiment of the present invention provides a decoding device, the decoding device including a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to perform the method described in the third aspect.

[0047] According to a tenth aspect, an embodiment of the present invention provides a system, the system comprising a device as described in the fourth aspect and a device as described in the fifth aspect, or the system comprising a device as described in the fourth aspect and a device as described in the sixth aspect.

[0048] According to an eleventh aspect, an embodiment of the present invention provides another system, the system comprising the encoding device described in the seventh aspect and the decoding device described in the eighth aspect, or the system comprising the encoding device described in the seventh aspect and the decoding device described in the ninth aspect.

[0049] According to a twelfth aspect, an embodiment of the present invention provides a non-volatile computer-readable storage medium configured to store program code for the method described in the first aspect, the program code, when executed by a computing device, configuring the computing device to perform the method described in the first aspect.

[0050] According to a thirteenth aspect, an embodiment of the present invention provides another non-volatile computer-readable storage medium, the computer-readable storage medium being configured to store program code for a method described in the second or third aspect, the program code, when executed by a computing device, configuring the computing device to perform the method described in the second or third aspect.

[0051] According to a fourteenth aspect, an embodiment of the present invention provides a computer program product. The computer program product includes program instructions. When the computer program product is executed by a computing device, the computing device performs the method described in the first aspect. The computer program product may be a software installation package. When the method provided in any possible design of the first aspect needs to be used, the computer program product may be downloaded and executed on the computing device to implement the method described in the first aspect.

[0052] According to a fifteenth aspect, an embodiment of the present invention provides another computer program product. The computer program product includes program instructions. When the computer program product is executed by a computing device, the computing device performs the method provided in any possible design of the second or third aspect. The computer program product may be a software installation package. When the method provided in any possible design of the second or third aspect needs to be used, the computer program product may be downloaded and executed on the computing device to implement the method described in the second or third aspect.

[0053] In an embodiment of the present invention, for the LM mode, it is possible to know that the encoder may determine the luma downsampling filter to be used for the current luma block based on the sample position of the current chroma block, and may specify the type of downsampling filter for the decoder through display information (e.g., the value of the newly added SPS parameter). This ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby ensuring consistency between the downsampled luma sample positions and the chroma sample positions, and improving the coding accuracy and coding efficiency on the encoder side.

[0054] In order to describe the technical solutions in the embodiments of the present invention or the background art more clearly, the following describes the accompanying drawings used in the embodiments of the present invention or the background art. [Brief explanation of the drawings]

[0055] [Figure 1A] 1 is a block diagram of an exemplary video coding system for implementing one embodiment of the present invention; [Figure 1B] 4 is a block diagram of an exemplary video coding system including any one or two of the encoder 20 in FIG. 2 and the decoder 30 in FIG. 3. [Figure 2] FIG. 2 is a block diagram of an exemplary structure of an encoder for implementing one embodiment of the present invention; [Figure 3] FIG. 2 is a block diagram of an exemplary structure of a decoder for implementing one embodiment of the present invention; [Figure 4] 1 is a block diagram of an exemplary encoding device or an exemplary decoding device. [Figure 5] 10 is a block diagram of another exemplary encoding device or another exemplary decoding device. [Figure 6]1 is a schematic diagram of several formats of YUV images. [Figure 7] FIG. 1 is a schematic diagram of the relationship between chroma and luma sample positions. [Figure 8] FIG. 2 illustrates one embodiment of a luma block, a downsampled luma block, and a current chroma block. [Figure 9] FIG. 1 illustrates an embodiment of a template luma sample and a template chroma sample. [Figure 10] FIG. 10 illustrates another embodiment of template luma and chroma samples. [Figure 11] FIG. 2 is an exemplary diagram of the relationship between some chroma sample positions and some luma sample positions. [Figure 12] 1 is a flowchart of a chroma block prediction method according to an embodiment of the present invention. [Figure 13] 10 is a flowchart of another chroma block prediction method according to an embodiment of the present invention. [Figure 14] FIG. 1 is a schematic diagram of the distribution of a set of sample value pairs in the luma-chroma coordinate system. [Figure 15] 10 is a flowchart of yet another chroma block prediction method according to an embodiment of the present invention. [Figure 16] 1 is a block diagram of an exemplary architecture of a content supply system for implementing a content distribution service. [Figure 17] FIG. 2 is a block diagram of an exemplary structure of a terminal device. DETAILED DESCRIPTION OF THE INVENTION

[0056] The following describes embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. The terms used in the implementation of the present invention are only intended to describe specific embodiments of the present invention, and are not intended to limit the present invention.

[0057] Video coding typically refers to the processing of a sequence of pictures that form a video or a video sequence. In the field of video coding, the terms "picture," "frame," and "image" are sometimes used synonymously. As used herein, video coding refers to video encoding or video decoding. Video encoding is performed at the source side and typically involves processing original video pictures to reduce the amount of data for representing the video picture (e.g., by compressing) for more efficient storage and / or transmission. Video decoding is performed at the destination side and typically involves the reverse process compared to the process of an encoder to reconstruct a video picture. The "coding" of a video picture in this embodiment should be understood as the "encoding" or "decoding" of a video sequence. The combination of the encoding part and the decoding part is also called a codec (encoding and decoding).

[0058] Each of multiple pictures in a video sequence is usually partitioned into a set of non-overlapping blocks, and coding is usually performed at the block level. In other words, at the encoder side, video is usually processed or coded at the block (also called image block or video block) level, for example, by generating a predictive block using spatial (intra-picture) prediction and / or temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, and transforming and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compressed); on the other hand, at the decoder side, an inverse process compared to that of the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder processing loop, so that both generate the same prediction (e.g., intra-prediction and inter-prediction) and / or reconstruction for processing or coding subsequent blocks.

[0059] The term "block" refers to a portion of a picture or a frame. In this specification, a current block refers to a block currently being processed. For example, during encoding, the current block refers to the block currently being coded, and during decoding, the current block refers to the block currently being decoded. If the block currently being processed is a chroma component block, the block is referred to as a current chroma block. A luma block corresponding to the current chroma block may be referred to as a current luma block. A reference block refers to a block that provides a reference signal for the current block. The reference signal represents a sample value, sample value, or sample signal in an image block. A prediction block refers to a block that provides a prediction signal for the current block. The prediction signal represents a sample value, sample value, or sample signal in the prediction block. For example, after multiple reference blocks are traversed, a best reference block is found. The best reference block provides a prediction for the current block, and this block is referred to as a prediction block.

[0060] Additionally, in this specification, a sample (or a pel) may also be referred to as a sample. Correspondingly, a sample value may also be referred to as a sample value (or a sample value). If the samples contained in the current block are luma samples, the current block may also be referred to as a current luma block (or a current luma image block). If the samples contained in the current image block are chroma samples, the current image block may also be referred to as a current chroma block (or a current chroma image block).

[0061] The following describes a system architecture to which an embodiment of the present invention is applied. FIG. 1A is a block diagram of an exemplary video coding system 10 described in an embodiment of the present invention. As used herein, the term “video codec” generally refers to both a video encoder and a video decoder. As used herein, the terms “video coding” or “coding” may generally refer to video encoding or video decoding. As shown in FIG. 1A , video coding system 10 may include a source device 12 and a destination device 14. Source device 12 generates encoded video data, and therefore, source device 12 may be referred to as a video encoder. Destination device 14 may decode the encoded video data generated by source device 12, and therefore, destination device 14 may be referred to as a video decoder. Various implementation solutions of source device 12, destination device 14, or source device 12 or destination device 14 may include one or more processors and memory coupled to the one or more processors. The memory, as described herein, may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures accessible by a computer. The source device 12 and the destination device 14 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handheld telephones such as "smartphones," television sets, cameras, display devices, digital media players, video game consoles, in-vehicle computers, and similar devices.

[0062] The communication connection between source device 12 and destination device 14 may be implemented through link 13, and destination device 14 may receive encoded video data from source device 12 through link 13. Link 13 may include one or more media or devices capable of moving encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media that enable source device 12 to immediately transmit encoded video data to destination device 14 in real time. In this example, source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to destination device 14. The one or more communication media may include wireless communication media and / or wired communication media, e.g., a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, which may be, for example, a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication mediums may include a router, a switch, a base station, or another device that facilitates communication from source device 12 to destination device 14.

[0063] Source device 12 includes an encoder 20, and optionally, source device 12 may further include a picture source 16, a picture preprocessor 18, and a communication interface 22. In a particular implementation, encoder 20, picture source 16, picture preprocessor 18, and communication interface 22 may be hardware components within source device 12 or may be software programs on source device 12. A detailed description of each follows.

[0064] Picture source 16 may include or be, for example, any type of picture capture device configured to capture real-world pictures and / or any type of device for generating pictures or comments (in the case of screen content coding, some text on the screen is also considered part of the picture or image to be coded), for example, a computer graphics processor configured to generate computer-animated pictures, or any type of device configured to acquire 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). Picture source 16 may be a camera configured to capture pictures or a memory configured to store pictures. Picture source 16 may further include any type of interface (internal or external) for storing previously captured or generated pictures and / or for acquiring or receiving pictures. When picture source 16 is a camera, picture source 16 may be, for example, a local camera or an integrated camera integrated in the source device. When picture source 16 is a memory, picture source 16 may be, for example, a local memory or an integrated memory integrated in the source device. When picture source 16 includes an interface, the interface may be, for example, an external interface for receiving pictures from an external video source. The external video source may be, 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 may be, for example, an external computer graphics processor, computer, or server.The interface may be any type of interface, for example a wired or wireless or optical interface according to any proprietary or standardized interface protocol.

[0065] A picture may be viewed as a two-dimensional array or matrix of samples having luma values. The samples in the array are sometimes called samples (a shortened form of picture element) or pels. 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 commonly used. For example, a picture may be represented as or include three sample arrays. In an RBG format or color space, a picture includes corresponding red, green, and blue sample arrays. However, in video coding, each sample is typically represented in a luminance / chrominance format or color space. For example, a picture in YUV format includes a luminance component denoted by Y (sometimes L is used instead) and two chrominance components denoted by U and V. The luminance (or luma for short) component Y represents brightness or gray-level intensity (e.g., in a grayscale picture, the two are identical), and the two chrominance (or chroma for short) components U and V represent chromaticity or color information components. Thus, a picture in YUV format includes a luma sample array of luma sample values (Y) and two chroma sample arrays of chroma values (U and V). A picture in RGB format may be converted or transformed into a picture in YUV format, or vice versa, a process also called color transformation or color conversion. If a picture is monochrome, the picture may include only a luma sample array. In this embodiment of the present invention, the picture sent by picture source 16 to the picture processor may also be called raw picture data 17. In a possible embodiment of the present invention, picture source 16 may be further configured to determine chroma sample positions for each picture in the current video sequence.

[0066] The picture preprocessor 18 is configured to receive the raw picture data 17 and preprocess the raw picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. For example, the preprocessing performed by the picture preprocessor 18 may include cropping, color format conversion (e.g., from RGB format to YUV format), color correction, or noise removal. In possible embodiments, the picture preprocessor 18 may further be configured to determine chroma sample positions in the current video sequence.

[0067] Encoder 20 (also referred to as video encoder 20) is configured to receive pre-processed picture data 19 and process the pre-processed picture data 19 in a relevant prediction mode (e.g., an intra-prediction mode in this embodiment of the present specification) to provide coded picture data 21. (Structural details of encoder 20 are described further below with reference to FIG. 2, FIG. 4, or FIG. 5.) In some embodiments, encoder 20 may be configured to execute the embodiments described below to implement the application of the chroma block prediction method at the encoder side described in the present invention.

[0068] The communications interface 22 may be configured to receive the coded picture data 21 and transmit the coded picture data 21 over the link 13 to the destination device 14 or any other device (e.g., memory) for storage or direct reconstruction. The any other device may be any device used for decoding or storage. The communications interface 22 may be configured, for example, to package the coded picture data 21 into an appropriate format, for example, into data packets, for transmission over the link 13.

[0069] Destination device 14 includes a decoder 30, and optionally, destination device 14 may further include a communication interface 28, a picture post-processor 32, and a display device 34, each of which is described below.

[0070] Communications interface 28 may be configured to receive encoded picture data 21 from source device 12 or any other source. The any other source may be, for example, a storage device, and the storage device may be, for example, an encoded picture data storage device. Communications interface 28 may be configured to transmit or receive encoded picture data 21 over link 13 between source device 12 and destination device 14 or over any type of network. Link 13 may be, for example, a direct wired or wireless connection, and the any type of network may be, for example, a wired or wireless network, or any combination thereof, or any type of private or public network, or any combination thereof. Communications interface 28 may be configured to depackage data packets transmitted over communications interface 22 to obtain encoded picture data 21, for example.

[0071] Both communication interface 28 and communication interface 22 may be configured as unidirectional or bidirectional communication interfaces, for example, configured to send and receive messages to set up a connection, and to acknowledge, respond, and exchange any other information related to the communication link, and / or data transmissions, such as coded picture data transmissions.

[0072] Decoder 30 (also referred to as video decoder 30) is configured to receive encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (structural details of decoder 30 are described further below with reference to Figure 3, Figure 4 or Figure 5). In some embodiments, decoder 30 may be configured to execute the embodiments described below in order to implement the application of the chroma block prediction method at the decoder side described in the present invention.

[0073] The picture post-processor 32 is configured to post-process the decoded picture data 31 (also called reconstructed picture data) to obtain post-processed picture data 33. The post-processing performed by the picture post-processor 32 may include color format conversion (e.g., from YUV format to RGB format), color correction, cropping, resampling, or any other processing. The picture post-processor 32 may further be configured to send the post-processed picture data 33 to a display device 34.

[0074] The display device 34 is configured to receive the post-processed picture data 33, for example, for displaying the picture to a user or viewer. The display device 34 may be or include any type of display configured to present the reconstructed picture, e.g., an integrated or external display or monitor. For example, the display may 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), a digital light processor (DLP), or any other type of display.

[0075] FIG. 1A shows the source device 12 and the destination device 14 as separate devices, but embodiments of the device may also include both the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality, or both of their functions. In such embodiments, the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented by using the same hardware and / or software, or by using separate hardware and / or software or any combination thereof.

[0076] Based on this description, those skilled in the art may know that the presence and (exact) division of the functions of various units or the functions of the source device 12 and / or the destination device 14 shown in FIG. 1A may vary according to the actual device and application example. The source device 12 and the destination device 14 may each be any type of handheld or fixed device, such as a notebook or laptop computer, mobile phone, smartphone, pad or tablet computer, video camera, desktop computer, set-top box, television, camera, in-vehicle device, display device, digital media player, video game console, video streaming device (such as a content service server or a content delivery server), broadcast receiver device or broadcast transmitter device, and may be any one of a wide range of devices, and may or may not use any type of operating system.

[0077] The encoder 20 and the decoder 30 may each be implemented as any of a variety of suitable circuits, such as 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. Where the techniques are implemented in part using software, a device may store software instructions in a suitable non-transitory computer-readable storage medium and execute the instructions using hardware, such as one or more processors, to perform the techniques of this disclosure. Any of the above (including hardware, software, a combination of hardware and software, etc.) may be considered to be one or more processors.

[0078] 1A is merely an example, and the techniques in this application are applicable to video coding settings (e.g., video encoding or video decoding) that do not necessarily 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 encoded 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.

[0079] 1B is an illustrative diagram of an example video coding system 40 including the encoder 20 in FIG. 2 and / or the decoder 30 in FIG. 3 according to an example embodiment. The video coding system 40 may implement a combination of various techniques in embodiments of the present invention. In the illustrated implementation, the video coding system 40 may include an imaging device 41, the encoder 20, the decoder 30 (and / or a video encoder / decoder implemented by logic 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.

[0080] 1B , imaging device 41, antenna 42, processing unit 46, logic circuitry 47, encoder 20, decoder 30, processor 43, memory 44, and / or display device 45 may be in communication with one another. As described, while video coding system 40 is illustrated using encoder 20 and decoder 30, video coding system 40 may include only encoder 20 or only decoder 30 in various examples.

[0081] In some examples, antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Further, in some examples, display device 45 may be configured to present the video data. In some examples, logic circuitry 47 may be implemented by processing unit 46. Processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, etc. Video coding system 40 may also include optional processor 43. Optional processor 43 may likewise include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, etc. In some examples, logic circuitry 47 may be implemented by hardware, e.g., dedicated hardware for video coding, and processor 43 may be implemented by general-purpose software, an operating system, etc. Additionally, memory 44 may be any type of memory, e.g., volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM)), or non-volatile memory (e.g., flash memory). In a non-limiting example, memory 44 may be implemented by a cache memory. In some examples, logic circuitry 47 may access memory 44 (e.g., for implementing an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (e.g., a cache) for implementing an image buffer, etc.

[0082] In some examples, encoder 20 implemented by logic circuitry may include an image 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 image buffer. The graphics processing unit may include 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.

[0083] In some examples, decoder 30 may be implemented by logic circuitry 47 in a similar manner to implement the various modules described with reference to decoder 30 in FIG. 3 and / or any other decoder system or subsystem described herein. In some examples, decoder 30 implemented by logic circuitry may include an image 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 image buffer. The graphics processing unit may include decoder 30 implemented by logic circuitry 47 to implement the various modules described with reference to FIG. 3 and / or any other decoder system or subsystem described herein.

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

[0085] It should be understood that in this embodiment of the present invention, with respect to the examples described with reference to encoder 20, decoder 30 may be configured to perform the inverse process. With respect to signaling syntax elements, decoder 30 may be configured to receive and parse such syntax elements and correspondingly decode the associated video data. In some examples, encoder 20 may entropy encode the syntax elements into the encoded video bitstream. In such examples, decoder 30 may parse such syntax elements and correspondingly decode the associated video data.

[0086] It should be noted that the chroma block prediction method described in the embodiments of the present invention is mainly used in the intra prediction process, and the process exists in both the encoder 20 and the decoder 30. The encoder 20 / decoder 30 in the embodiments of the present invention may be an encoder / decoder that supports a video standard protocol such as H.263, H.264, HEVC, MPEG-2, MPEG-4, VP8, or VP9, or that supports a next-generation video standard protocol (such as H.266).

[0087] Figure 2 is a schematic / conceptual block diagram of an exemplary encoder 20 configured to implement one embodiment of the present invention. In the example of Figure 2, 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. Prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. Inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Encoder 20 shown in Figure 2 may also be referred to as a hybrid video encoder or a video encoder based on a hybrid video codec.

[0088] 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 for example, 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 (DPB) 230, and the prediction processing unit 260 form a backward signal path of the encoder 20. The backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in FIG. 3).

[0089] The encoder 20 receives, for example, via an input 202, a picture 201 or an image block 203 of the picture 201, e.g., a picture in a sequence of pictures forming a video or a video sequence. The image block 203 may also be called a current picture block or a picture block to be coded. The picture 201 may also be called a current picture or a picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, which may e.g. be previously coded and / or decoded pictures in the same video sequence, i.e., the video sequence that also includes the current picture).

[0090] An embodiment of encoder 20 may include a partitioning unit (not shown in FIG. 2) configured to partition picture 201 into multiple blocks, such as image block 203. Picture 201 is typically partitioned into non-overlapping blocks. The partitioning unit may be configured to use the same block size for all pictures in a video sequence and a corresponding grid that defines the block sizes, or to vary the block size among pictures or subsets or groups of pictures and partition each picture into corresponding blocks.

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

[0092] Like picture 201, image block 203 is also, or may be considered to be, a two-dimensional array or matrix of samples having luma values (sample values), but the size of image block 203 is smaller than the size of picture 201. In other words, image block 203 may include, for example, one sample array (e.g., a luma array in the case of monochrome picture 201), three sample arrays (e.g., one luma array and two chroma arrays in the case of a color picture), or any other quantity and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of image block 203 defines the size of image block 203.

[0093] The encoder 20 shown in FIG. 2 is configured to code a picture 201 block-by-block, for example to code and predict each image block 203 .

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

[0095] The transform processing unit 206 is configured to apply a transform, for example 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 the transform domain. The transform coefficients 207, sometimes called transform residual coefficients, represent the residual block 205 in the transform domain.

[0096] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified in HEVC / H.265. Compared to an orthogonal DCT transform, such an integer approximation is usually scaled by a specific factor. To maintain the norm of a residual block processed by using a forward transform and an inverse transform, applying an additional scale factor is part of the transform process. The scale factor is usually chosen based on some constraints. For example, the scale factor may be a power of two for shift operations, a bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. A specific scale factor may be specified for, e.g., an inverse transform, e.g., by the inverse transform processing unit 212 at the decoder side 30 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 212 at the encoder side 20), and a corresponding scale factor for a forward transform, e.g., by the transform processing unit 206 at the encoder side 20, may be specified accordingly.

[0097] The quantization unit 208 is configured to quantize the transform coefficients 207 to obtain quantized transform coefficients 209, for example, by applying scalar quantization or vector quantization. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce a bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step corresponds to finer quantization, and a larger quantization step corresponds to coarser quantization. An appropriate quantization step size may be indicated by a quantization parameter (QP). The quantization parameter may, for example, be an index into a predefined set of appropriate quantization step sizes. For example, a smaller quantization parameter may correspond to finer quantization (smaller quantization step size), and a larger quantization parameter may correspond to coarser quantization (larger quantization step size), or vice versa. Quantization may include division by the quantization step size and corresponding quantization and / or inverse quantization, e.g., performed by inverse quantization unit 210, or may include multiplication by the quantization step size. In embodiments according to some standards, such as HEVC, the quantization parameter may be used to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter by using a fixed-point approximation of an equation involving division. An additional scaling factor may be introduced for quantization and dequantization to restore the norm of the residual block, where the norm of the residual block may be modified due to the scale used in the fixed-point approximation of the equation for determining the quantization step size and the quantization parameter. In an example implementation, the scales of the inverse transform and dequantization may be combined.Alternatively, customized quantization tables may be used, e.g., signaled from the encoder to the decoder in the bitstream. Quantization is a lossy operation, where loss increases with increasing quantization step size.

[0098] The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain dequantized coefficients 211, and to apply an inverse quantization scheme of the quantization scheme applied by the quantization unit 208, e.g., based on or by using the same quantization step as the quantization unit 208. The dequantized coefficients 211, which are sometimes referred to as dequantized residual coefficients 211, may correspond to the transform coefficients 207, although they are not typically identical to the transform coefficients due to losses due to quantization.

[0099] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, for example, an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transformed dequantized block 213 or an inverse transformed residual block 213.

[0100] 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 the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265, to obtain a reconstructed block 215 in the sample domain.

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

[0102] For example, one embodiment of encoder 20 may be configured such that buffer unit 216 is not only used to store reconstructed blocks 215 for intra prediction unit 254, but also for loop filter unit 220 (not shown in FIG. 2), and / or such that buffer unit 216 and decoded picture buffer unit 230 form one buffer, for example. In other embodiments, filtered blocks 221 and / or blocks or samples from decoded picture buffer 230 (the blocks or samples are not shown in FIG. 2) are used as inputs or references for intra prediction unit 254.

[0103] Loop filter unit 220 (briefly referred to as “loop filter” 220) is configured to filter reconstructed block 215 to obtain filtered block 221 to smooth sample transitions or improve video quality. Loop filter unit 220 is intended to represent one or more loop filters, including, for example, a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. Although loop filter unit 220 is illustrated in FIG. 2 as an in-loop filter, in another configuration, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstructed block 221. Decoded picture buffer 230 may store the reconstructed coding block after loop filter unit 220 performs the filtering operation on the reconstructed coding block.

[0104] One embodiment of encoder 20 (and correspondingly, loop filter unit 220) may be configured to output loop filter parameters (such as sample adaptive offset information), for example, immediately or after entropy coding performed by entropy coding unit 270 or any other entropy coding unit, so that, for example, decoder 30 may receive the same loop filter parameters and apply the same loop filter parameters for decoding.

[0105] The decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference picture data for encoding video data by the encoder 20. The DPB 230 may be formed by any one of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), and resistive RAM (RRAM)) or another type of memory device. The DPB 230 and the buffer 216 may be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is configured to store the filtered block 221. The decoded picture buffer 230 may be further configured to store another previously filtered block, e.g., the previously reconstructed and filtered block 221, e.g., a previously reconstructed picture, of the same current picture or of a different picture, and may provide, for example, a previously reconstructed complete, i.e., decoded, picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples) for inter prediction. In one example, if the reconstructed block 215 is reconstructed without in-loop filtering, the decoded picture buffer (DPB) 230 is configured to store the reconstructed block 215.

[0106] The prediction processing unit 260, also referred to as block prediction processing unit 260, is configured to receive or obtain the image block 203 (the current image block 203 of the current picture 201) and reconstructed picture data, e.g., reference samples of the same (current) picture from the buffer 216 and / or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, and 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.

[0107] 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 to be used as the prediction block 265 to calculate the residual block 205 and reconstruct the reconstructed block 215.

[0108] One embodiment of mode selection unit 262 may be configured to select a prediction mode (e.g., from prediction modes supported by prediction processing unit 260) where the prediction mode results in the best match or smallest residual (smallest residual means better compression for transmission or storage), or smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or considers both or balances both. Mode selection unit 262 may be configured to determine the prediction mode based on rate distortion optimization (RDO), i.e., select a prediction mode that results in smallest rate distortion optimization, or select a prediction mode for which the associated rate distortion meets at least a prediction mode selection criterion.

[0109] The prediction processing unit 260 may be further configured to partition the image block 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning, triple-tree (TT) partitioning, or any combination thereof, and perform, for example, prediction on each of the block partitions or sub-blocks, where the mode selection includes selecting a tree structure of the partitioned image block 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.

[0110] The inter prediction unit 244 may include a motion estimation (ME) unit (not shown in FIG. 2) and a motion compensation (MC) unit (not shown in FIG. 2). The motion estimation unit is configured to receive or obtain the picture image block 203 (the current picture image block 203 of the current picture 201) and the decoded picture 231, or at least one or more previously reconstructed blocks, e.g., one or more reconstructed blocks of one or more other / different pictures 231 previously decoded, for motion estimation. For example, a video sequence may include the current picture and the previously decoded picture 31. In other words, the current picture and the previously decoded picture 31 may be part of or form a sequence of pictures that form a video sequence.

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

[0112] The motion compensation unit is configured to obtain inter prediction parameters and perform inter prediction based on or by using the inter prediction parameters to obtain inter prediction blocks 245. Motion compensation performed by the motion compensation unit (not shown in FIG. 2 ) may include fetching or generating predictive blocks based on motion / block vectors determined through motion estimation (possibly performing interpolation to obtain sub-sample accuracy). Interpolation filtering may generate additional representative samples from known representative samples, thereby potentially increasing the number of candidate predictive blocks that can be used to code the picture block. Upon receiving the motion vector for the PU of the current picture block, the motion compensation unit 246 may locate the predictive block to which the motion vector points within a reference picture list. The motion compensation unit 246 may further generate syntax elements associated with the blocks and video slices for decoding the picture blocks of the video slices by the decoder 30.

[0113] The intra prediction unit 254 is configured to obtain the picture image block 203 (current picture block) and one or more previously reconstructed blocks, e.g., reconstructed neighboring blocks, of the same picture for intra estimation. For example, the encoder 20 may be configured to select an intra prediction mode (e.g., an LM prediction mode) from multiple intra prediction modes.

[0114] For example, for the chroma components of an image in a video sequence, H.265 allows five intra-prediction modes for the chroma components of the image: planar mode, vertical mode, horizontal mode, DC mode, and derived mode (DM). In next-generation video coding standards (e.g., H.266), the intra-prediction modes for the chroma components of an image further include a cross component prediction (CCP) mode, which is also referred to as a cross component intra prediction (CCIP) mode or a cross component linear mode (CCLM) prediction mode. The CCLM prediction mode may also be briefly referred to as a linear model mode (LM mode). The LM mode is a chroma intra-prediction method that uses texture correlation between luma and chroma.

[0115] For another example, for the luma component of an image in a video sequence, H.265 has a total of 35 intra prediction modes for the luma component, where the 35 intra prediction modes include 33 directional prediction modes, a DC prediction mode, and a planar prediction mode. A directional prediction mode refers to mapping a reference sample to a sample position in a current block in a specific direction (using an intra mode index flag) to obtain a predicted value of the current sample, or to inversely mapping each sample position in the current block to a reference sample in a specific direction (using an intra mode index flag), where the sample value of the corresponding reference sample is the predicted value of the current sample. Unlike directional prediction modes, DC prediction modes use the average of the reference samples as the predicted value of a sample in the current block, and planar modes use the sample values of the reference samples above and to the left of the current sample, and the sample values of the reference samples to the upper right and lower left of the current block to jointly derive a predicted value of the current sample.

[0116] Intra prediction unit 254 is further configured to determine intra-predicted block 255 based on, for example, intra-prediction parameters of the selected intra-prediction mode. In either case, after selecting the intra-prediction mode for the block, intra-prediction unit 254 is further configured to provide the intra-prediction parameters, i.e., information indicative of the selected intra-prediction mode for the block, to entropy coding unit 270.

[0117] In this embodiment of the present invention, the intra prediction unit 254 may further include a filter set. The filter set includes multiple filter types, each representing a different luma block downsampling algorithm, and each filter type corresponds to one chroma sample position. The intra prediction unit 254 may be further configured to determine chroma sample positions of the current video sequence, determine a filter type to be used for the current encoding based on the chroma sample positions, and generate display information based on the filter type. The display information is used to indicate the filter type to be used in the downsampling process of the luma image in the LM prediction mode during encoding or decoding of the current video sequence (e.g., during encoding or reconstruction of the picture 201 or the image block 203). The intra prediction unit 254 is further configured to provide the filter type display information to the entropy encoding unit 270.

[0118] Specifically, the intra prediction unit 254 may send a syntax element to the entropy encoding unit 270, where the syntax element includes intra prediction parameters (e.g., display information of an intra prediction mode, e.g., an LM mode, selected for prediction for a current block after multiple intra prediction modes have been traversed) and display information of a filter type. In a possible application scenario, if there is only one intra prediction mode, i.e., only the LM prediction mode, the intra prediction parameters may not be carried in the syntax element. In this case, the decoder side 30 may immediately use the LM prediction mode by default for decoding. In one example, the intra prediction unit 254 may be configured to perform any combination of the following inter prediction techniques:

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

[0120] Other structural variations of the encoder 20 may be configured to encode the video stream. For example, a non-transform-based encoder 20 may directly quantize the residual signal 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 a single unit.

[0121] Specifically, in one embodiment of the present invention, the encoder 20 may be configured to set a filter type value based on the sample position type of the chroma block, generate, based on the value, first display information used to indicate the filter type, where the filter type corresponds to a filter in the filter set, and encode the first display information into the bitstream as information in a syntax element, where the first display information is carried in the encoded picture data 21.

[0122] In one embodiment of the present invention, the encoder 20 may be further configured to select an LM mode from a plurality of intra prediction modes, generate second display information, where the second display information is used to indicate a linear model mode, and encode the second display information into the bitstream as information in a syntax element, where the second display information is carried in the encoded picture data 21.

[0123] In one embodiment of the present invention, during construction of the prediction block, encoder 20 may be further configured, in LM mode, to: determine a filter in the filter set corresponding to the filter type based on the first display information; downsample the first luma block by using the filter to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block; obtain a template chroma sample and a template luma sample, where the template chroma sample includes a plurality of neighboring chroma samples of the current chroma block and is obtained by downsampling the plurality of neighboring luma samples of the first luma block; obtain linear model coefficients based on the template chroma sample and the template luma sample; and obtain a prediction value of the current chroma block based on the second luma block and the linear model coefficients.

[0124] 3 is a schematic / conceptual block diagram of an exemplary decoder 30 configured to implement one embodiment of the present invention. Decoder 30 is configured to receive coded picture data 21, obtained, for example, through encoding by encoder 20, to obtain decoded pictures 231. During decoding, decoder 30 receives video data from encoder 20, for example, a coded video bitstream representing picture blocks of coded video slices and associated syntax elements.

[0125] 3, 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., adder 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, decoder 30 may perform a decoding process that is roughly the inverse of the encoding process described with reference to encoder 20 in FIG.

[0126] Entropy decoding unit 304 is configured to perform entropy decoding on coded picture data 21 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), e.g., any one or all of inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements (being decoded). 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. Decoder 30 may receive syntax elements at the video slice level and / or the video block level.

[0127] The inverse quantization unit 310 may have the same functionality as the inverse quantization unit 210. The inverse transform processing unit 312 may have the same functionality as the inverse transform processing unit 212. The reconstruction unit 314 may have the same functionality as the reconstruction unit 214. The buffer 316 may have the same functionality as the buffer 216. The loop filter 320 may have the same functionality as the loop filter 220. The decoded picture buffer 330 may have the same functionality as the decoded picture buffer 230.

[0128] Prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354. Inter prediction unit 344 may be similar in function to inter prediction unit 244, and intra prediction unit 354 may be similar in function to intra prediction unit 254. Prediction processing unit 360 performs block prediction and / or obtains prediction blocks 365 from encoded data 21, and is typically configured to receive or obtain (explicitly or implicitly) prediction-related parameters and / or information about a selected prediction mode, e.g., from entropy decoding unit 304.

[0129] 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 predictive block 365 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 (B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is configured to generate a predictive block 365 for a video block of the current video slice based on a motion vector and another syntax element received from entropy decoding unit 304. For inter prediction, the predictive block may be generated from one of the reference pictures in one reference picture list. Decoder 30 may construct the reference frame lists, i.e., List 0 and List 1, by using a default construction technique based on the reference pictures stored in DPB 330.

[0130] Prediction processing unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing the motion vectors and other syntax elements, and to use the prediction information to generate a predictive block for the current video block being decoded. For example, prediction processing unit 360 uses some of the received syntax elements to determine the prediction mode (e.g., intra-prediction or inter-prediction) to be used for coding the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the reference picture lists for the slice, the motion vector for each inter-coded video block of the slice, the inter-prediction status for each inter-coded video block of the slice, and other information for decoding the video blocks of the current video slice.

[0131] Inverse quantization unit 310 may be configured to inverse quantize (i.e., dequantize) 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 encoder 20 for each video block in a video slice to determine the degree of quantization to be applied, and similarly, to determine the degree of inverse quantization to be applied.

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

[0133] 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 and the sample values of the prediction block 365, to obtain a reconstructed block 315 in the sample domain.

[0134] The loop filter unit 320 (during or after the coding loop) is configured to filter the reconstructed block 315 to smooth sample transitions or improve video quality to obtain a filtered block 321. In one example, the loop filter unit 320 may be configured to perform any combination of the filtering techniques described below. The loop filter unit 320 is intended to represent one or more loop filters, including, for example, a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 320 is shown in FIG. 3 as an in-loop filter, in another configuration, the loop filter unit 320 may be implemented as a post-loop filter.

[0135] The decoded video 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.

[0136] The decoder 30 is arranged to output the decoded pictures 31, for example via an output 332, for presentation to or viewing by a user.

[0137] Other variations of the 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, a non-transform-based encoder 30 may directly inverse quantize the residual signal for some blocks or frames without using the inverse transform processing unit 312. In another implementation, the decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.

[0138] Specifically, in one embodiment of the present invention, the decoder 30 is configured to: parse the bitstream to obtain first display information and second display information, where the second display information is used to indicate that the intra-prediction mode currently used to decode the chroma block is LM mode, and the first display information is used to indicate a filter type; downsample the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block; obtain a template chroma sample and a template luma sample, where the template chroma sample includes a plurality of neighboring chroma samples of the current chroma block and is obtained by downsampling the plurality of neighboring luma samples of the first luma block; obtain linear model coefficients based on the template chroma sample and the template luma sample; and obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients.

[0139] 4 is a schematic structural diagram of a video coding device 400 (e.g., video encoding device 400 or video decoding device 400) according to an embodiment of the present invention. Video coding device 400 is suitable for implementing an embodiment described herein. In an embodiment, video coding device 400 may be a video decoder (e.g., decoder 30 in FIG. 1A) or a video encoder (e.g., encoder 20 in FIG. 1A). In another embodiment, video coding device 400 may be one or more components of decoder 30 in FIG. 1A or encoder 20 in FIG. 1A.

[0140] 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. Video coding device 400 may further include optical-electrical and electro-optical (EO) components coupled to ingress port 410, receiver unit 420, transmitter unit 440, and egress port 450 for the egress or ingress of optical or electrical signals.

[0141] The processor 430 is implemented using hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and 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 herein to implement the chroma block prediction methods provided in the embodiments of the present invention. For example, the encoding / decoding module 470 performs, processes, or provides various coding operations. Therefore, including the encoding / decoding module 470 significantly improves the functionality of the video coding device 400 and affects the switching of the video coding device 400 to different states. Alternatively, the encoding / decoding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.

[0142] Memory 460 may include one or more disks, tape drives, and solid-state drives and may be used as overflow data storage devices for storing programs when such programs are selectively executed and for storing instructions and data read 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).

[0143] 5 is a simplified block diagram of an apparatus 500 that may be used as any one or two of source device 12 and destination device 14 in FIG. 1A according to an example embodiment. Apparatus 500 may implement the techniques in the present application. Apparatus 500 for 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 a mobile phone, tablet computer, laptop computer, or desktop computer.

[0144] 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-developed device or devices capable of controlling or processing information. As shown, the disclosed implementations may be practiced using a single processor, such as the processor 502, although advantages in speed and efficiency may be achieved by using two or more processors.

[0145] In one implementation, the memory 504 in the device 500 may be a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 accessed by the processor 502 through 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 coding application that performs 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 contain a large amount of information, all or part of the information may be stored in secondary memory 514 and loaded into memory 504 for processing as needed.

[0146] 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 that operatively sense touch input. The display 518 may be coupled to the processor 502 through the bus 512. In addition to, or as an alternative to, the display 518, another output device may be provided that allows a user to program or otherwise use the device 500. When the output device is or includes a display, the display may be implemented in various ways, including by using a liquid crystal display (LCD), a cathode-ray tube (CRT) display, a plasma display, or a light emitting diode (LED) display such as an organic LED (OLED) display.

[0147] The apparatus 500 may further include or be in communication with an image sensing device 520. The image sensing device 520 is, for example, a camera or any other existing / futurely developed image sensing device 520 capable of sensing an image. The image is, for example, an image of a user operating the apparatus 500. The image sensing device 520 may be positioned to directly face the user operating the apparatus 500. In one example, the position and optical axis of the image sensing device 520 may be configured such that the field of view of the image sensing device 520 includes an area adjacent to the display 518, and the display 518 is visible from that area.

[0148] The apparatus 500 may further include or be in communication with a sound sensing device 522. The sound sensing device 522 may be, for example, a microphone or any other existing / futurely developed sound sensing device capable of transmitting sound in the vicinity of the apparatus 500. The sound sensing device 522 may be positioned directly facing a user operating the apparatus 500 and may be configured to receive sounds, e.g., speech or other sounds, made when the user operates the apparatus 500.

[0149] While FIG. 5 depicts the processor 502 and memory 504 of device 500 as integrated within a single unit, other configurations are possible. The implementation of processor 502 may be distributed across multiple machines (each machine having one or more processors) that may be directly coupled to each other, or may be distributed across a local area or another network. Memory 504 may be distributed across multiple machines; for example, memory 504 is a network-based memory or memory within multiple machines within which device 500 operates. While only a single bus is shown herein, bus 512 of device 500 may include multiple buses. Furthermore, secondary memory 514 may be directly coupled to other components of device 500 or may be accessed over a network. Secondary memory 514 may include a single integrated unit, such as a memory card, or multiple units, such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.

[0150] To better understand the technical solution in the embodiment of the present invention, the following will further describe the LM mode for intra prediction for YUV images (also called YCbCr images) and chroma components in the embodiment of the present invention.

[0151] Existing video is generally color video. In addition to the luma (Y) component, color video also includes chroma components (U, V). Therefore, such images are also called YUV images. In this case, coding of YUV images involves coding not only the luma component but also the chroma components. Research has shown that the human eye is more sensitive to luminance than color. Therefore, during coding, to save storage space and improve coding efficiency, the luma component may be sampled at full resolution, while the chroma components may not be sampled at full resolution. According to various sampling methods for the luma and chroma components in color video, video sequences generally include YUV images in 4:4:4 format, YUV images in 4:2:2 format, YUV images in 4:2:0 format, etc. Figure 6 shows examples of 4:4:4 format, 4:2:2 format, and 4:2:0 format, where cross symbols (×) in the figure represent luma component samples and circle symbols (○) in the figure represent chroma component samples.

[0152] The 4:4:4 format indicates that no downsampling is performed on the chroma components, and the 4:4:4 format is the format with the highest resolution for the chroma components. In other words, the data in four adjacent samples includes four Y components, four U components, and four V components.

[0153] The 4:2:2 format indicates that 2:1 horizontal downsampling and no vertical downsampling is performed on the chroma components compared to the luma component. For every two U samples or every two V samples, each row contains four Y samples. In other words, the data in four adjacent samples contains four Y components, two U components, and two V components.

[0154] The 4:2:0 format indicates that 2:1 horizontal downsampling and 2:1 vertical downsampling are performed on the chroma components compared to the luma components. The 4:2:0 format is the format with the lowest resolution for the chroma components and is also the most common format. In the 4:2:0 format, the number of chroma samples is only half the number of luma samples in each row (i.e., in the horizontal direction) and only half the number of luma samples in each column (i.e., in the vertical direction). When a video image uses the 4:2:0 format, if the luma component of an image block is an image block having a size of 2M*2N, the chroma component of the image block is an image block having a size of M*N. For example, if the resolution of the image block is 720*480, the resolution of the luma component of the image block is 720*480, and the resolution of the chroma component of the image block is 360*240.

[0155] For the 4:2:0 format, there can be six different chroma sample position types based on different chroma sample positions. Figure 7 shows an example relationship between the luma sample positions of the luma samples and the six different chroma sample position types of the chroma samples. The six different chroma sample position types are type 0 (type0), type 1 (type1), type 2 (type2), type 3 (type3), type 4 (type4), and type 5 (type5).

[0156] In this specification, a YUV image in 4:2:0 format is used as an example to describe the technical solutions in embodiments of the present invention. In this specification, the luma component of a current image block to be processed may also be referred to as a luma block (or a luma block corresponding to a current chroma block, a first luma block, a luma component block, or a luma block), and the chroma component of a current image block to be processed may also be referred to as a current chroma block (or a chrominance block, a chroma component block, or a chroma block).

[0157] Similar to intra-prediction for the luma component, intra-prediction for the chroma component uses boundary samples of reconstructed neighboring blocks surrounding the current chroma block as reference samples for the current chroma block, maps the reference samples to samples in the current chroma block in a specific prediction mode, and uses the values of the mapped reference samples as predicted values of samples in the current chroma block. Because the texture of chroma components is generally relatively simple, the number of intra-prediction modes for chroma components is generally smaller than the number of intra-prediction modes for the luma component. For example, in H.265, there are only five intra-prediction modes for chroma components: planar mode, vertical mode, horizontal mode, DC mode, and derived mode (DM). In next-generation video coding standards (e.g., H.266), intra-prediction modes for chroma components further include a cross-component prediction (CCP) mode.

[0158] It should be understood that in different application scenarios, the CCP mode may also be referred to as a cross component intra prediction mode (CCIP) or a cross component linear prediction mode (CCLM), or simply as a linear model mode (LM mode). The LM mode is used as an example for the purposes of explanation herein.

[0159] The LM mode is a chroma intra prediction method that uses texture correlation between luma and chroma. The LM mode derives a prediction value for the current chroma block based on a linear model using the reconstructed luma component, thereby providing a more accurate prediction value for the chroma component. The LM mode can be expressed as follows: pred C (i,j)=α*rec L '(i,j)+β

[0160] α and β represent the linear model coefficients, and pred C (i,j) represents the predicted value of the chroma sample at position (i,j), and rec L '(i,j) represents the value of the reconstructed luma sample at position (i,j) obtained after the luma block corresponding to the current chroma block is downsampled to the resolution of the chroma component. For a video sequence in 4:2:0 format, the resolution of the luma component is four times that of the chroma component. To obtain a luma block whose resolution is the same as that of the chroma block, the luma component needs to be downsampled to the resolution of the chroma component by using the same downsampling method of the chroma component before being used.

[0161] 8 is used as an example. Figure 8 shows, in a YUV image in 4:2:0 format, a luma block (i.e., the luma component of the image block) corresponding to a current chroma block, as well as adjacent upper and left reference samples of the luma block, a downsampled luma block (i.e., the downsampled luma component of the image block, or referred to as a second luma block), as well as adjacent upper and left reconstructed reference samples of the downsampled luma block, and a current chroma block (i.e., the chroma component of the image block), as well as adjacent upper and left reconstructed reference samples of the current chroma block. The resolution of the luma block corresponding to the current chroma block is 2W*2H, the resolution of the downsampled luma block is W*H, and the resolution of the current chroma block is W*H. In other words, the luma block and the adjacent reference samples of the luma block are downsampled to the resolution of the chroma components, so that a downsampled luma block can be obtained. There is a one-to-one correspondence between the neighboring reference samples of the downsampled luma block and the neighboring reference samples of the current chroma block.

[0162] See Figures 9 and 10. In this embodiment of the present invention, for ease of understanding, the adjacent upper and adjacent left sides used for calculating the linear model coefficients may be referred to as a template. A template is a set of luma samples or a set of chroma samples used for calculating the linear model coefficients. The set of luma samples used for calculating the linear model coefficients may also be referred to as template luma samples. The template luma samples are obtained by performing a downsampling operation on multiple adjacent luma samples of a luma block (because there may be no luma sample values at positions in the luma image corresponding to the template chroma samples). The set of chroma samples used for calculating the linear model coefficients may also be referred to as template chroma samples. The template chroma samples include multiple reconstructed neighboring chroma samples of the current chroma block.

[0163] In a possible embodiment, the template chroma samples specifically include one or more rows of neighboring chroma samples above the current chroma block and one or more columns of neighboring chroma samples to the left of the current chroma block. The template luma samples correspond one-to-one to the template chroma samples, and the values of samples in the template luma samples and the values of samples in the template chroma samples form value pairs.

[0164] 9, the template chroma samples include one row of adjacent chroma samples above and one column of adjacent chroma samples to the left of the current chroma block. Thus, the template luma samples include one row of luma samples and one column of luma samples to the left, where the row of luma samples and the column of luma samples to the left correspond to chroma sample positions in the template chroma samples.

[0165] 10, in one example, the template chroma samples include two rows of above-neighboring chroma samples and two columns of left-neighboring chroma samples of the current chroma block. Thus, the template luma samples include two rows of luma samples and two columns of luma samples, where the two rows of luma samples and the two columns of luma samples correspond to chroma sample positions in the template chroma samples.

[0166] Certainly, there can be various specific implementations of template chroma samples and template luma samples. In another example, the template chroma samples may include only one or more columns of neighboring chroma samples to the left of the current chroma block. The template luma samples may include only one or more columns of luma samples, and the template luma samples correspond one-to-one to the template chroma samples. In yet another example, the template chroma samples may alternatively include only one or more rows of neighboring chroma samples above the current chroma block. The template luma samples may include only one or more rows of luma samples, and the template luma samples correspond one-to-one to the template chroma samples.

[0167] As described above, the template luma sample is obtained by performing a downsampling operation on multiple neighboring luma samples of a luma block. The following describes an example of a method for performing a downsampling operation on a template luma sample.

[0168] 11 is an example diagram of the relationship between several chroma sample positions and several luma sample positions. For a YUV image in 4:2:0 format, if the upper left vertex of the luma image is used as the coordinate origin of the luma samples and the upper left vertex of the chroma image is used as the coordinate origin of the chroma samples, then the sample position (xb, yb) in the chroma image corresponding to a position in the luma image is (2*xb, 2*yb+0.5). To obtain the value of the luma sample among the template luma samples, i.e., the value of the luma sample corresponding to sample position (xb, yb), multiple neighboring luma samples of the luma block may first be selected. For example, the sample positions of multiple adjacent luma samples of a luma block are (2*xb,2*yb), (2*xb-1,2*yb), (2*xb+1,2*yb), (2*xb,2*yb+1), (2*xb-1,2*yb+1), and (2*xb+1,2*yb+1), and the value at position (2*xb,2*yb+0.5) is derived based on the luma sample values in the luma image corresponding to these positions, and that value is used as the value of the luma sample corresponding to sample position (xb,yb).

[0169] For example, in one example, the value L of the luma sample corresponding to the sample position (xb, yb) among the template luma samples is C To obtain (xb, yb), a downsampling calculation may be performed on multiple luma samples according to the following equation: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3 However, the symbol ">>" represents a move to the right.

[0170] It may be understood that downsampling may also be performed on the values of other luma samples (xb+1, yb-1), ..., (xb+i, yb-1)..., and (xb-1, yb), ..., and (xb-1, yb+j) among the template luma samples of the current block by using the same downsampling method.

[0171] It should be noted that downsampling in existing sampling methods is performed based on a fixed filter. Specifically, for images in various video sequences, existing LM modes use a fixed downsampling filter regardless of the chroma sample positions, but do not consider the cases where different chroma sample positions may actually exist in different video sequences and the effects caused by different chroma sample positions on the luma downsampling filter. If the luma downsampling positions do not match the chroma sample positions, the LM model coefficients α and β derived according to the LM model formula will be inaccurate, resulting in rec L The '(i,j)' and chroma sample positions are not aligned, thus reducing coding efficiency.

[0172] In order to overcome the above drawbacks, improve the accuracy of prediction for chroma blocks in LM mode, and improve coding efficiency, one embodiment of the present invention provides a chroma block prediction method used in LM mode based on the above-described system and device. First, the method is described from the encoder side perspective. Referring to Figure 12, the method includes, but is not limited to, the following steps:

[0173] Step 701: Determine that the intra prediction mode used for prediction for the current chroma block is LM mode.

[0174] In a specific implementation, the encoder side may preset only the LM mode for intra prediction. In other words, in this case, the encoder side immediately determines that the currently used intra prediction mode is the LM mode, and then continues to perform steps 702 to 704.

[0175] In another particular implementation, the encoder side may preset multiple intra prediction modes, where the multiple intra prediction modes include the LM mode, and the encoder side traverses the multiple intra prediction modes and determines that the optimal intra prediction mode for the current chroma block is the LM mode. In this case, the encoder side begins performing subsequent steps such as steps 702 to 704.

[0176] In addition, the encoder side may further set second display information, where the second display information is used to indicate the LM mode, so that the second display information is encoded into the bitstream in the subsequent step 704.

[0177] Step 702: Determine the filter type based on the sample position type of the current chroma block.

[0178] In other words, in the design of this embodiment of the present invention, when a current chroma block is predicted in LM mode, the luma downsampling filter to be used is not fixed but is determined based on the sample position type of the current chroma block, and each sample position type of the current chroma block corresponds to a filter type.

[0179] In a particular embodiment of the present invention, six sample position types may be designed (such a design may be referred to as design 1). As shown in FIG. 7 , the six sample position types include type 0, type 1, type 2, type 3, type 4, and type 5. Therefore, there are six types of luma downsampling filters corresponding to the six sample position types, namely, filter 0, filter 1, filter 2, filter 3, filter 4, and filter 5. In one example, the downsampling algorithms of these filters may be set separately as follows:

[0180] For filter 0: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3

[0181] For Filter 1: LC(xb,yb)=(L(2*xb,2*yb)+L(2*xb+1,2*yb)+L(2*xb,2*yb+1)+L(2*xb+1,2*yb+1)+2)>>2

[0182] For filter 2: LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4

[0183] For filter 3: LC(xb,yb)=(2*L(2*xb,2*yb)+2*L(2*xb+1,2*yb)+L(2*xb,2*yb-1)+L(2*xb+1,2*yb-1)+L(2*xb,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3

[0184] For filter 4: LC(xb,yb)=(4*L(2*xb,2*yb+1) +2*L(2*xb,2*yb+2)+2*L(2*xb,2*yb)+2*L(2*xb-1,2*yb+1)+2*L(2*xb+1,2*yb+1) +L(2*xb+1,2*yb+2)+L(2*xb-1,2*yb+2)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+8)>>4

[0185] For filter 5: LC(xb,yb)=(2*L(2*xb,2*yb+1)+2*L(2*xb+1,2*yb+1)+L(2*xb,2*yb)+L(2*xb+1,2*yb)+L(2*xb,2*yb+2)+L(2*xb+1,2*yb+2)+4)>>3

[0186] It should be noted that the downsampling algorithm of the filter is only an example and not a limitation.

[0187] In another specific embodiment of the present invention, considering that chroma sample positions type0 and type2 are currently the most common, two sample position types may be designed as alternatives (such a design may be referred to as design 2). In other words, the two sample position types only include type0 and type2. Therefore, there are two types of luma downsampling filters corresponding to the two sample position types, namely filter 0 and filter 2. In one example, the downsampling algorithms of these filters may be set separately as follows:

[0188] For filter 0: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3

[0189] For filter 2: LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4

[0190] It should be noted that the downsampling algorithm of the filter is only an example and not a limitation.

[0191] It should be further noted that in addition to the above two designs, this embodiment of the present invention may alternatively include another design. For example, three chroma sample positions are designed, and the three chroma sample positions correspond to three types of filters, respectively. This is not limited herein.

[0192] In this way, the encoder side may first determine the sample position type of the current chroma block, and then determine the corresponding filter type based on the sample position type of the current chroma block, i.e., determine the luma downsampling filter to be used for prediction for the current chroma block in LM mode.

[0193] Step 703: Set first display information, where the first display information is used to indicate a filter type.

[0194] In this embodiment of the present invention, a sequence parameter set (SPS) parameter is newly added, and the value of the SPS parameter is used to indicate the type of luma downsampling filter in LM mode during encoding or decoding of a current video sequence. At the encoder side, this parameter may be set based on the chroma sample position in the current sequence. Specifically, the first display information may be set based on the filter type. The first display information includes the value of the SPS parameter, where the value is used to indicate the type of luma downsampling filter used for prediction for a chroma block during encoding or decoding.

[0195] In a particular implementation of the present invention, the newly added SPS parameter syntax element may be named as "lm_mode_downsampling_filter_type_idc", where lm_mode_downsampling_filter_type_idc is used to specify the downsampling filter type in LM mode.

[0196] For example, for design 1 described in step 702, six filter types are designed, namely, filter 0, filter 1, filter 2, filter 3, filter 4, and filter 5. In this case, the sequence parameter sets may be designed as follows:

[0197] [Table 1]

[0198] The values of lm_mode_downsampling_filter_type_idc range from 0 to 5, with different values corresponding to different filters. For example, a value of 0 corresponds to filter 0, a value of 1 corresponds to filter 1, a value of 2 corresponds to filter 2, a value of 3 corresponds to filter 3, a value of 4 corresponds to filter 4, and a value of 5 corresponds to filter 5. Indeed, the above setting of values and the correspondence between each value and filter are merely examples and not limitations.

[0199] In another example, two filter types, Filter 0 and Filter 2, are designed for Design 2 described in step 702. In this case, the sequence parameter sets may be designed as follows:

[0200] [Table 2]

[0201] The value of lm_mode_downsampling_filter_type_idc can be 0 or 1, with different values corresponding to different filters. For example, a value of 0 corresponds to filter 0, and a value of 1 corresponds to filter 2. Indeed, the above settings of values and the correspondence between each value and filter are merely examples and not limitations.

[0202] Step 704: Encode the first display information into a bitstream, and send the bitstream to the decoder side. In a specific implementation, the second display information set in the above step 701 may be further encoded into the bitstream, and then the bitstream is sent to the decoder side. The second display information is used to indicate the LM mode, so that the decoder side is informed that the LM mode should be used.

[0203] It should be noted that the above embodiment only describes that the encoder side performs the encoding process and the bitstream sending process. According to the above description, those skilled in the art can understand that the encoder side may further perform other methods described in the embodiments of the present invention in other procedures. For example, in chroma block prediction, for a specific implementation form of the chroma block reconstruction performed by the encoder side, please refer to the related method described below from the decoder side. Details will not be described herein.

[0204] In this embodiment of the present invention, for the LM mode, it is possible for the encoder to know that it may determine the luma downsampling filter to be used for the current luma block based on the sample position type of the current chroma sample, and may specify the type of downsampling filter for the decoder through display information (e.g., the value of the newly added SPS parameter). This ensures that both the encoder side and the decoder side can obtain the filter corresponding to the chroma sample position. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby ensuring consistency between the downsampled luma sample positions and the chroma sample positions, and improving the coding accuracy and coding efficiency on the encoder side.

[0205] Based on the above system and device, one embodiment of the present invention provides another chroma block prediction method. The method is described from the decoder side perspective. Referring to Figure 13, the method includes, but is not limited to, the following steps:

[0206] Step 801: Parse the bitstream to obtain first display information.

[0207] Specifically, the decoder side may obtain the first display information by parsing a sequence parameter set (SPS) parameter in the bitstream. For example, the SPS parameter in the bitstream may specifically be a newly added SPS parameter.

[0208] In one embodiment, the first display information is used to indicate the filter type.

[0209] Specifically, the decoder side parses the bitstream sent from the encoder side to obtain the first indication information used to indicate the filter type. For detailed content of the first indication information, please refer to the description in step 703 in the embodiment of Figure 12.

[0210] The encoder side and the decoder side may use the same filter type design. For example, six filter types (corresponding to six chroma sample positions) are designed for the encoder side, and six filter types are also designed for the decoder side. In addition, the downsampling algorithms of the six filter types on the decoder side are matched to the downsampling algorithms of the six filter types on the encoder side, respectively. The six filter types are filter 0, filter 1, filter 2, filter 3, filter 4, and filter 5. In this case, the first display information received by the decoder side is used to indicate one of the six filter types. For example, when the first display information is an SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 2, this indicates that the first display information indicates that the filter type is filter 2.

[0211] In another example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms of the two filter types on the decoder side are respectively matched to the downsampling algorithms of the two filter types on the encoder side. The two filter types are filter 0 and filter 2. In this case, the first display information received by the decoder side is used to indicate one of the two filter types. For example, when the first display information is an SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 0, this indicates that the first display information indicates that the filter type is filter 0.

[0212] In another embodiment, the first display information is used to indicate the sample position of the current chroma block, and the sample position of the current chroma block is associated with a filter type. Therefore, the decoder side may determine the filter type based on the sample position of the current chroma block.

[0213] Furthermore, the first display information may be specifically used to indicate the sample position type of the current chroma block, and thus the sample position type of the current chroma block is associated with the filter type. Therefore, the decoder side may determine the filter type based on the sample position type of the current chroma block.

[0214] For example, two filter types (corresponding to two chroma sample positions) are designed for the encoder side, and two filter types are also designed for the decoder side. In addition, the downsampling algorithms of the two filter types on the decoder side are respectively matched to the downsampling algorithms of the two filter types on the encoder side. The two filter types are filter 0 and filter 2. In this case, the first display information received by the decoder side is used to indicate one of the two chroma sample positions. For example, when the first display information is an SPS parameter lm_mode_downsampling_filter_type_idc and the value of the SPS parameter is 0, a first chroma sample position, e.g., type 0, is indicated. Because the sample position type is associated with the filter type, the decoder side may immediately determine that the filter type is filter 0 based on the first sample position type, type 0. In another example, when the value of the SPS parameter is 1, a second chroma sample position, e.g., type 2, is indicated. Since the sample position type is associated with the filter type, the decoder side may immediately determine that the filter type is filter2 based on the second sample position type type2.

[0215] In addition, in certain embodiments, during parsing of the bitstream, second indication information may be further obtained by parsing the bitstream. The second indication information is used to indicate that the intra-prediction mode used by the decoder side to decode the current chroma block is LM mode, so that the decoder side determines that LM mode should be used for intra-prediction for the current image in the video sequence. Furthermore, the decoder side continues to perform related steps 802 to 805.

[0216] Step 802: Perform a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block.

[0217] In certain embodiments, the filter corresponding to the first display information may be used to downsample the luma block corresponding to the current chroma block of the current image (i.e., the first luma block) to obtain the value of each luma sample in the downsampled luma block (i.e., the second luma block). In this way, the rec in the algorithm formula of the LM mode L '(i,j) is obtained.

[0218] For example, if six filter types are designed for the decoder side and the value currently indicated by the first display information is 0, the luma downsampling filter used is filter 0, and the sampling algorithm is as follows: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3

[0219] In this case, filter 0 may be used to downsample the first luma block to obtain a value for each luma sample in the second luma block.

[0220] In another example, if two filter types (e.g., filter 0 and filter 2) are designed for the decoder side and the value currently indicated by the first display information is 1, the luma downsampling filter used is filter 2, and the sampling algorithm is as follows: LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4

[0221] In this case, filter 2 may be used to downsample the first luma block to obtain a value for each luma sample in the second luma block.

[0222] Step 803: Obtain a template chroma sample and a template luma sample. The template chroma sample includes multiple neighboring chroma samples of a current chroma block, and the template luma sample is obtained by performing a downsampling operation on multiple neighboring luma samples of a first luma block. For specific implementation forms of step 803, please refer to the related descriptions in the embodiments in Figures 9 and 10. For the sake of brevity, the details will not be described again herein.

[0223] It should be noted that steps 802 and 803 are not sequential, ie, step 802 may be performed before or after step 803, or steps 802 and 803 may be performed simultaneously.

[0224] Step 804: Obtain linear model coefficients α and β based on the template chroma samples and the template luma samples.

[0225] For example, in one implementation, the linear model coefficients α and β may be calculated by using the least squares method. Specifically, a system of linear equations may be constructed, for example, by using the template luma samples and template chroma samples of the downsampled luma block shown in FIG. 9. The number of neighboring reference samples of the template chroma samples or template luma samples is denoted as N, and L(n) and C(n) represent the value of the nth luma sample and the value of the nth chroma sample, respectively. In this case, the linear model coefficients α and β are as follows:

[0226]

number

[0227] For another example, in another implementation, the linear model coefficients α and β may be calculated by using the extreme value method. Specifically, the number of neighboring reference samples of a template chroma sample or a template luma sample is denoted as N, and L(n) and C(n) represent the value of the nth luma sample and the value of the nth chroma sample, respectively, and L(n) and C(n) form a sample value pair. If the set of sample value pairs is as follows, i.e., {(L0,C0),(L1,C1),(L2,C2)...(L n ,C n )...(LN-1,CN-1)}, where N represents the number of neighboring samples of the current chroma block used to determine the linear model coefficients. Figure 14 shows the distribution of a set of sample value pairs in the luma-chroma coordinate system. The maximum luma value L max and the minimum luma value L min The value pair corresponding to L is found in the set of sample value pairs. It is found that the i-th sample B corresponds to the maximum luma value, i.e., L i =L max , and the jth sample A corresponds to the smallest luma value, i.e., L j =L min Assuming that, the linear model coefficients α and β are respectively

[0228]

number

[0229] β=C j -α*L j This becomes:

[0230] It should be understood that the above is merely an example and not a limitation. After the values of each luma sample of the template chroma sample and the values of each chroma sample of the template luma sample are obtained, the manner of deriving the linear model coefficients α and β of the LM mode based on the template chroma sample and the template luma sample is not limited in this embodiment of the present invention.

[0231] Step 805: Obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficients.

[0232] rec L After '(i,j) and the linear model coefficients α and β are obtained, the algorithm formula of LM mode is given as follows: pred C (i,j)=α*rec L According to '(i,j)+β, Predicted values of each chroma sample in the current chroma block. C It can be seen that (i,j) can be obtained.

[0233] In this embodiment of the present invention, it can be known that the decoder side can determine the filter used to downsample the luma block corresponding to the current chroma block in LM mode based on display information in the bitstream (e.g., the value of the newly added SPS parameter). In this way, the filter corresponding to the chroma sample position can be obtained. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby ensuring consistency between the downsampled luma sample positions and the chroma sample positions.

[0234] Based on the above-described system and device, one embodiment of the present invention provides yet another chroma block prediction method. The method is described from the decoder side perspective. Please refer to Figure 15. Compared with Figure 13, step 903 in the embodiment of Figure 15 is different from step 803 in the embodiment of Figure 13. The method is briefly described as follows:

[0235] Step 901: Parse the bitstream to obtain first display information, where the first display information is used to indicate a filter type. For a specific implementation, refer to the description of step 801 in the embodiment of Figure 13. The details will not be described again in this specification.

[0236] Step 902: Perform a downsampling operation on the first luma block by using a filter corresponding to the filter type to obtain a second luma block, where the first luma block is a luma block corresponding to the current chroma block, and the second luma block represents a set of downsampled luma samples in the first luma block. For a specific implementation form, please refer to the description of step 802 in the embodiment of Figure 13. The details will not be described again in this specification.

[0237] Step 903: Obtain a template chroma sample, and obtain a template luma sample based on the first display information.

[0238] In this embodiment of the present invention, for a template luma sample, the first display information indicates a filter type, so that a downsampling operation may be performed on multiple adjacent luma samples of the first luma block by using a filter corresponding to the filter type to obtain the template luma sample.

[0239] For example, if six filter types are designed for the decoder side and the value currently indicated by the first display information is 0, the luma downsampling filter used is filter 0, and the sampling algorithm is as follows: LC(xb,yb)=(2*L(2*xb,2*yb)+L(2*xb-1,2*yb)+L(2*xb+1,2*yb)+2*L(2*xb,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb+1,2*yb+1)+4)>>3

[0240] In this case, Filter 0 may be used to perform a downsampling operation on multiple neighboring luma samples of the first luma block to obtain a value of each luma sample among the template luma samples.

[0241] In another example, two filter types (e.g., filter 0 and filter 2) are designed for the decoder side, the value currently indicated by the first display information is 1, the luma downsampling filter used is filter 2, and the sampling algorithm is as follows: LC(xb,yb)=(4*L(2*xb,2*yb) +2*L(2*xb,2*yb+1)+2*L(2*xb,2*yb-1)+2*L(2*xb-1,2*yb)+2*L(2*xb+1,2*yb) +L(2*xb+1,2*yb+1)+L(2*xb-1,2*yb+1)+L(2*xb-1,2*yb-1)+L(2*xb+1,2*yb-1)+8)>>4

[0242] In this case, Filter 2 may be used to perform a downsampling operation on multiple neighboring luma samples of the first luma block to obtain a value of each luma sample among the template luma samples.

[0243] It should be noted that the above is by way of example only and not limitation.

[0244] In this embodiment of the present invention, for the template chroma sample, the template chroma sample includes multiple adjacent chroma samples of the current chroma block. For specific methods for obtaining the template chroma sample, please refer to the related descriptions in the embodiments of Figures 9 and 10. The details will not be described again in this specification.

[0245] Step 904: Obtain linear model coefficients α and β based on the template chroma sample and the template luma sample. For a specific implementation, please refer to the description of step 804 in the embodiment of Figure 13. The details will not be described again in this specification.

[0246] Step 905: Obtain a predicted value of the current chroma block based on the second luma block and the linear model coefficient. For a specific implementation, please refer to the description of step 805 in the embodiment of Figure 13. The details will not be described again in this specification.

[0247] In particular, the following embodiments are provided herein:

[0248] Embodiment 1. A chroma block prediction method, comprising: parsing the bitstream to obtain first indication information, the first indication information being used to indicate a filter type; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to a current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; A method for providing the above.

[0249] Embodiment 2. The step of obtaining template luma samples comprises: performing the downsampling operation on the plurality of neighboring luma samples of the first luma block by using the filter corresponding to the filter type to obtain the template luma sample. 2. The method of embodiment 1.

[0250] Embodiment 3. The template chroma sample comprises: comprising one or more columns of left adjacent chroma samples of the current chroma block. 3. The method of embodiment 1 or 2.

[0251] Embodiment 4. The template chroma sample: comprising one or more rows of adjacent chroma samples above the current chroma block. 3. The method of embodiment 1 or 2.

[0252] Embodiment 5. The template chroma sample: the one or more rows of adjacent chroma samples above the current chroma block and the one or more columns of adjacent chroma samples to the left of the current chroma block; 5. The method of any one of embodiments 1 to 4.

[0253] Embodiment 6. Prior to the step of obtaining template chroma samples and template luma samples, and further comprising parsing the bitstream to obtain second indication information, the second indication information being used to indicate that an intra prediction mode used for current decoding is a linear model LM mode. 6. The method of any one of embodiments 1 to 5.

[0254] Embodiment 7. The method is used to decode a current image block in a video sequence, the current image block comprising the first luma block and the current chroma block, and an image in the video sequence is in 4:2:0 format or 4:2:2 format. 7. The method of any one of embodiments 1 to 6.

[0255] Embodiment 8. A chroma block prediction method, comprising: determining a filter type based on a sample position of the current chroma block; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; A method for providing the above.

[0256] Embodiment 9. Prior to the step of determining a filter type based on a sample position of the current chroma block, and parsing the bitstream to obtain first display information, the first display information being used to indicate the sample positions of the current chroma block. 9. The method of embodiment 8.

[0257]

[0023] Embodiment 10. The step of parsing the bitstream to obtain first display information comprises: parsing a sequence parameter set (SPS) parameter in the bitstream to obtain the first display information. 10. The method of embodiment 9.

[0258] Embodiment 11. A chroma block prediction method, comprising: determining a filter type based on a sample position type of the current chroma block; setting first display information, the first display information being used to indicate the filter type; encoding the first display information into a bitstream; A method for providing the above.

[0259]

[0033] Embodiment 12. The sample position type of the current chroma block is one of the following sample position types: at least one of sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5; 12. The method of embodiment 11.

[0260]

[0033] Embodiment 13. The sample position type of the current chroma block is one of the following sample position types: At least one of sample location type type0 and sample location type type2; 12. The method of embodiment 11.

[0261] Embodiment 14. A method for selecting a linear model LM mode from a plurality of intra prediction modes; setting second display information, the second display information being used to indicate the linear model LM mode; encoding the second display information into the bitstream; 14. The method of any one of embodiments 11 to 13, further comprising:

[0262]

[0023] Embodiment 15. The method includes: determining a filter corresponding to the filter type based on the first display information; downsampling a first luma block by using the filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, and the template luma sample obtained by downsampling a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; 15. The method of any one of embodiments 11 to 14, further comprising:

[0263] In this embodiment of the present invention, for the LM mode, it can be known that in the downsampling process of deriving a template luma sample and the downsampling process of a current block, the decoder side can determine the filter used to downsample the luma block corresponding to the current chroma block in the LM mode based on display information in the bitstream (e.g., the value of the newly added SPS parameter). In this way, the filter corresponding to the chroma sample position can be obtained. This takes into account the case where different chroma sample positions may actually exist in different video sequences, thereby ensuring consistency between the downsampled luma sample positions and the chroma sample positions.

[0264] The following describes application examples of the encoding and decoding methods described in the above embodiments, as well as systems in which the encoding and decoding methods are used.

[0265] 16 is a block diagram of a content delivery system 3100 for implementing a content distribution service. The content delivery system 3100 includes a capture device 3102 and a terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 through a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, Wi-Fi, Ethernet, cable, wireless (3G / 4G / 5G), USB, any type of combination thereof, etc.

[0266] The capture device 3102 may generate data and encode the data by using an encoding method as described in the above embodiments. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone, a tablet computer, a computer, a notebook computer, a video conferencing system, a PDA, an in-vehicle device, a combination thereof, and the like. For example, the capture device 3102 may include the source device 12 as described above. When the data includes video, a video encoder 20 included in the capture device 3102 may actually perform the video encoding process. When the data includes audio (e.g., voice), an audio encoder included in the capture device 3102 may actually perform the audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video data and the encoded audio data by multiplexing them together. In other practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .

[0267] In the content delivery system 3100, a terminal device 3106 receives and plays encoded data. The terminal device 3106 may be a device having data reception and recovery capabilities, such as a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof capable of decoding the above encoded data. For example, the terminal device 3106 may include the destination device 14 described above. When the encoded data includes video, a video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, an audio decoder included in the terminal device is prioritized to perform audio decoding.

[0268] In the case of a terminal device equipped with a display, for example, a smartphone or tablet computer 3108, a computer or notebook computer 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device may provide the decoded data to a display of the terminal device. In the case of a terminal device not equipped with a display, for example, an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is connected to receive and display the decoded data.

[0269] When each device in this system performs encoding or decoding, an image encoding device or an image decoding device as described in the above-described embodiments may be used.

[0270] 17 is a diagram of an example structure of the terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live streaming protocol (HLS), MPEG-DASH, Real-time Transport protocol (RTP), Real Time Messaging Protocol (RTMP), any kind of combination thereof, etc.

[0271] After processing the stream, the protocol progression unit 3202 generates a stream file. The file is output to the demultiplexer unit 3204. The demultiplexer unit 3204 may separate the multiplexed data into encoded audio data and encoded video data. As explained above, in other practical scenarios, such as in a video conferencing system, the encoded audio data and encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexer unit 3204.

[0272] A video elementary stream (ES), an audio ES, and optionally subtitles are generated through the demultiplexing process. The video decoder 3206 includes the video decoder 30 described in the above embodiment, decodes the video ES to generate video frames by using the decoding method shown in the above embodiment, and supplies the data to a synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames and supplies the data to the synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown) before being supplied to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown) before being supplied to the synchronization unit 3212.

[0273] The synchronization unit 3212 synchronizes video and audio frames and provides the video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. The information may be encoded in syntax elements by using timestamps related to the presentation of the encoded audio and video data and timestamps related to the delivery of the data stream.

[0274] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216.

[0275] The present invention is not limited to the above system, and the image encoding device or the image decoding device in the above embodiments may be incorporated into another system, for example, a vehicle system.

[0276] All or part of the above embodiments may be implemented by software, hardware, firmware, or any combination thereof. When software is used for implementation, the present embodiments may be implemented entirely or partially 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 on a computer, all or part of the procedures or functions according to the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or another programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, or digital subscriber line) or wireless (e.g., infrared, microwave, etc.) methods. The computer-readable storage medium may be any available medium accessible by a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, or magnetic tape), optical media (eg, DVD), semiconductor media (eg, solid state drive), and the like.

[0277] In the above embodiments, the description in this embodiment has different emphasis, and for the parts not described in detail in one embodiment, please refer to the related descriptions in other embodiments. [Explanation of symbols]

[0278] 10. Video Coding System 12 Source Devices 13 Links 14 Destination Device 16 Picture Source 17 Raw Picture Data 18 Picture Preprocessor 19 Preprocessed Picture Data, Preprocessed Picture 20 Encoder 21 Encoded Picture Data 22 Communication Interface 28 Communication Interface 30 Decoder 31 Decoded Picture Data, Decoded Picture 32 Picture Post Processor 33 Post-processed picture data 34 Display Devices 40 Video Coding System 41 Imaging Devices 42 Antenna 43 processors 44 memory 45 Display Devices 46 Processing Unit 47 Logic Circuits 201 Pictures 202 Input section 203 Image Block, Picture Image Block 204 Residual Calculation Unit 205 Residual Blocks 206 Conversion Processing Unit 207 Conversion Factor 208 quantization units 209 Quantized Transform Coefficients, Quantized Residual Coefficients 210 Inverse Quantization Unit 211 Dequantized Coefficients, Dequantized Residual Coefficients 212 Inverse Transformation Processing Unit 213 Inverse Transform Block, Inverse Transform Dequantized Block, Inverse Transform Residual Block, Reconstructed Residual Block 214 Reconstruction Unit, Adder 215 reconstructed blocks 216 Buffers, Line Buffers, Buffer Units 220 Loop Filter Unit 221 Filtered Blocks 230 Decoded Picture Buffer 231 Reference Picture Data, Decoded Picture 244 Inter Prediction Units 245 Inter Prediction Blocks 246 Motion Compensation Unit 254 intra prediction units 255 intra-prediction blocks 260 Block Prediction Processing Unit, Prediction Processing Unit 262 Mode Selection Unit 265 predicted blocks 270 Entropy Coding Unit 272 Output section 304 Entropy Decoding Unit 309 Quantization Coefficients 310 Inverse Quantization Unit 312 Inverse Transformation Processing Unit 313 Reconstructed residual block, inverse transform block 314 Reconstruction Unit, Adder 315 reconstructed blocks 316 buffers 320 Loop Filter 321 filtered blocks, decoded video blocks 330 Decoded Picture Buffer 332 Output section 344 Inter Prediction Unit 354 intra prediction units 360 Prediction Processing Unit 362 Mode Selection Unit 365 predicted blocks 400 Video coding device, video encoding device, video decoding device 410 Inlet Port 420 receiver unit 430 Processors, Logic Units, Central Processing Units 440 transmitter unit 450 outlet port 460 memory 470 Coding Module, Encoding Module, Decoding Module 500 devices 502 processor 504 memory 506 Data 508 Operating Systems 510 Application Program 512 Bus 514 Secondary Memory 518 Display 520 Image sensing device 522 Sound sensing device 3100 Contents Supply System 3102 Capture Device 3104 Communication Links 3106 Terminal Device 3108 Smartphones and tablet computers 3110 Computers, Notebook Computers 3112 Network video recorder, digital video recorder 3114 TV 3116 Set-top Box 3118 Video Conference System 3120 Video Surveillance System 3122 Mobile Information Terminals 3124 In-Vehicle Devices 3126 Display 3202 Protocol Processing Unit 3204 Demultiplexer Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display

Claims

1. 1. A chroma block prediction method, comprising: parsing the bitstream to obtain first indication information, the first indication information being used to indicate a filter type; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to a current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; A method for providing the above.

2. said step of obtaining template luma samples comprising: performing the downsampling operation on the plurality of neighboring luma samples of the first luma block by using the filter corresponding to the filter type to obtain the template luma sample. The method of claim 1.

3. The template chroma sample is comprising one or more columns of left adjacent chroma samples of the current chroma block.

3. The method according to claim 1 or 2.

4. The template chroma sample is comprising one or more columns of adjacent chroma samples above the current chroma block.

3. The method according to claim 1 or 2.

5. The template chroma sample is the one or more rows of adjacent chroma samples above the current chroma block and the one or more columns of adjacent chroma samples to the left of the current chroma block; 5. The method according to any one of claims 1 to 4.

6. before said step of obtaining template chroma samples and template luma samples, and further comprising parsing the bitstream to obtain second indication information, the second indication information being used to indicate that an intra prediction mode used for current decoding is a linear model LM mode.

6. The method according to any one of claims 1 to 5.

7. the method is used to decode a current image block in a video sequence, the current image block comprising the first luma block and the current chroma block, and an image in the video sequence is in 4:2:0 format or 4:2:2 format; 7. The method according to any one of claims 1 to 6.

8. 1. A chroma block prediction method, comprising: determining a filter type based on a sample position of the current chroma block; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; A method for providing the above.

9. before the step of determining a filter type based on a sample position of the current chroma block, and parsing the bitstream to obtain first display information, the first display information being used to indicate the sample positions of the current chroma block. The method of claim 8.

10. said step of parsing the bitstream to obtain first display information further comprising: parsing a sequence parameter set (SPS) parameter in the bitstream to obtain the first display information. The method of claim 9.

11. 1. A chroma block prediction method, comprising: determining a filter type based on a sample position type of the current chroma block; setting first display information, the first display information being used to indicate the filter type; encoding the first display information into a bitstream; A method for providing the above.

12. The sample position type of the current chroma block is one of the following sample position types: at least one of sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5; The method of claim 11.

13. The sample position type of the current chroma block is one of the following sample position types: At least one of sample location type type0 and sample location type type2; The method of claim 11.

14. selecting a linear model LM mode from a plurality of intra prediction modes; setting second display information, the second display information being used to indicate the linear model LM mode; encoding the second display information into the bitstream; 14. The method of any one of claims 11 to 13, further comprising:

15. determining a filter corresponding to the filter type based on the first display information; downsampling a first luma block by using the filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, and the template luma sample obtained by downsampling a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; 15. The method of any one of claims 11 to 14, further comprising:

16. 1. A video data decoding device, comprising: a memory configured to store video data in a bitstream format; and a decoder, the decoder comprising: Parsing the bitstream to obtain first indication information, the first indication information being used to indicate a filter type; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to a current chroma block; and obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; configured to: device.

17. The decoder: configured to perform the downsampling operation on the plurality of neighboring luma samples of the first luma block by using the filter corresponding to the filter type to obtain the template luma sample.

17. The device of claim 16.

18. the template chroma samples comprise one or more columns of left neighboring chroma samples of the current chroma block; 17. A device according to claim 15 or 16.

19. the template chroma samples comprise one or more columns of adjacent chroma samples above the current chroma block; 17. A device according to claim 15 or 16.

20. the template chroma samples comprise the one or more rows of adjacent chroma samples above the current chroma block and the one or more columns of adjacent chroma samples to the left of the current chroma block.

20. A device according to any one of claims 16 to 19.

21. The decoder: and further configured to parse the bitstream to obtain second indication information, the second indication information being used to indicate that an intra prediction mode used for current decoding is a linear model LM mode.

21. A device according to any one of claims 16 to 20.

22. the decoder is configured to decode a current image block in a video sequence, the current image block comprising the first luma block and the current chroma block, and an image in the video sequence is in 4:2:0 format or 4:2:2 format; 22. A device according to any one of claims 16 to 21.

23. 1. A video data decoding device, comprising: a memory configured to store video data in a bitstream format; and a decoder, the decoder comprising: determining a filter type based on a sample position of the current chroma block; performing a downsampling operation on a first luma block by using a filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; and obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, the template luma sample being obtained by performing a downsampling operation on a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; configured to: device.

24. 24. The device of claim 23, wherein the decoder is configured to parse the bitstream to obtain first display information before determining the filter type based on the sample positions of the current chroma block, the first display information being used to indicate the sample positions of the current chroma block.

25. 25. The device of claim 24, wherein the decoder is configured to parse a sequence parameter set (SPS) parameter in the bitstream to obtain the first display information.

26. 1. A video data encoding device, comprising: a memory configured to store video data in a bitstream format; and an encoder, the encoder comprising: determining a filter type based on a sample position type of the current chroma block; setting first display information, the first display information being used to indicate the filter type; encoding the first display information into a bitstream; configured to: device.

27. The sample position type of the current chroma block is one of the following sample position types: at least one of sample position type type0, sample position type type1, sample position type type2, sample position type type3, sample position type type4, and sample position type type5; 27. The device of claim 26.

28. The sample position type of the current chroma block is one of the following sample position types: At least one of sample location type type0 and sample location type type2; 27. The device of claim 26.

29. The encoder selecting a linear model LM mode from a plurality of intra prediction modes; setting second display information, wherein the second display information is used to indicate the linear model LM mode; and encoding said second display information into said bitstream; further configured to:

29. A device according to any one of claims 26 to 28.

30. The encoder determining a filter corresponding to the filter type based on the first display information; downsampling a first luma block by using the filter corresponding to the filter type to obtain a second luma block, the first luma block being a luma block corresponding to the current chroma block; and obtaining a template chroma sample and a template luma sample, the template chroma sample comprising a plurality of neighboring chroma samples of the current chroma block, and the template luma sample being obtained by downsampling a plurality of neighboring luma samples of the first luma block; obtaining linear model coefficients based on the template chroma samples and the template luma samples; obtaining a prediction of the current chroma block based on the second luma block and the linear model coefficients; further configured to:

30. A device according to any one of claims 26 to 29.

31. 11. A decoding device comprising a non-volatile memory and a processor coupled to each other, wherein the memory is configured to store program instructions that enable the processor to perform a method according to any one of claims 1 to 7, or wherein the program instructions enable the processor to perform a method according to any one of claims 8 to 10.

32. 13. An encoding device comprising a non-volatile memory and a processor coupled to each other, the memory configured to store program instructions that enable the processor to execute the method of any one of claims 8 to 12.

Citation Information

Patent Citations

  • Linear model chroma intra prediction for video coding

    WO2018053293A1