Intra prediction method and device

By determining chroma reference sample availability to derive luma reference samples, the method addresses coding errors in video compression, enhancing coding efficiency and compression ratios.

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

Patent Information

Application Number
JP2025067989
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-10-06
Filing Date
2025-04-17
Publication Date
2025-08-13
Estimated Expiration
2039-09-30

AI Technical Summary

Technical Problem

Existing video compression methods face challenges in determining reference samples for linear model coefficients, leading to coding errors when available luma reference samples lack corresponding chroma reference samples, particularly in scenarios where chroma reference samples are outside the current picture, slice, or title, or have been omitted.

Method used

The method determines the availability of chroma reference samples to derive luma reference samples, using downsampling and linear model coefficients based on available chroma samples within specific ranges, ensuring accurate prediction of chroma blocks by incorporating reconstructed neighboring samples.

Benefits of technology

This approach reduces coding errors by ensuring availability checks for chroma reference samples, improving video coding efficiency and compression ratios without sacrificing image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025118675000001_ABST
    Figure 2025118675000001_ABST
Patent Text Reader

Abstract

To provide an intra prediction device and method for encoding and decoding an image.SOLUTION: An intra prediction method by using cross component liner prediction mode (CCLM), includes: determining a luma block corresponding to a current chroma block; obtaining luma reference samples of the luma block based on determining L available chroma reference samples of the current chroma block, wherein the obtained luma reference samples of the luma block are down-sampled luma reference samples; calculating linear model coefficients based on the luma reference samples and chroma reference samples that correspond to the luma reference samples; and obtaining a prediction for the current chroma block based on the linear model coefficients and values of a down-sampled luma block of the luma block.SELECTED DRAWING: Figure 20
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This patent application claims the benefit of priority to U.S. Provisional Patent Application No. 62 / 742,266, filed October 5, 2018, U.S. Provisional Patent Application No. 62 / 742,355, filed October 6, 2018, U.S. Provisional Patent Application No. 62 / 742,275, filed October 6, 2018, and U.S. Provisional Patent Application No. 62 / 742,356, filed October 6, 2018. The aforementioned patent applications are incorporated herein by reference in their entireties.

[0002] FIELD Embodiments of the present disclosure relate generally to the field of video coding, and more specifically to the field of intra prediction using cross-component linear model prediction (CCLM). [Background technology]

[0003] The amount of video data required to render even a relatively short video can be substantial, which can create difficulties when streaming or otherwise communicating the data over communication networks with limited bandwidth capacity. Thus, video data is typically compressed before being communicated over modern telecommunications networks. When storing video on a storage device, video size can also be an issue because memory resources can be limited. Video compression devices often use software and / or hardware at the source to code video data before transmission or storage, thereby reducing the amount of data needed to represent a digital video image. The compressed data is then received at the destination by a video decompressor, which decodes the video data. Due to limited network resources and the ever-increasing demand for higher video quality, improved compression and decompression techniques that increase compression ratios with little or no sacrifice in image quality are desirable. High Efficiency Video Coding (HEVC), published by the ISO / IEC Moving Image Experts Group and the ITU-T Video Coding Experts Group as ISO / IEC 23008-2 MPEG-H Part 2, or ITU-T H.265, is a state-of-the-art video compression standard that roughly doubles the data compression rate at the same level of video quality, or significantly improves video quality at the same bit rate. Summary of the Invention

[0004] Examples of the present disclosure provide an intra-prediction apparatus and method for encoding and decoding images, which can improve the efficiency of cross-component linear model prediction (CCLM), thereby improving the coding efficiency of video signals. This disclosure is further described in the examples and claims included in this file.

[0005] These and other objects are achieved by the subject matter of the independent claims. Further embodiments are evident from the dependent claims, the description and the figures.

[0006] Particular embodiments are outlined in the accompanying independent claims, while other embodiments are outlined in the dependent claims.

[0007] According to a first aspect, the present disclosure relates to a method for performing intra prediction using a linear model. The method includes: determining a luma (luma) block corresponding to a current chroma (chroma) block; obtaining a luma reference sample for the luma block based on determining L available chroma reference samples of the current chroma block, where the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculating linear model coefficients based on the luma reference sample and a chroma reference sample corresponding to the luma reference sample; and obtaining a prediction for the current chroma block based on the linear model coefficients and a value of the downsampled luma block of the luma block. The chroma reference sample for the current chroma block includes reconstructed neighboring samples of the current chroma block. The L available chroma reference samples are determined from the reconstructed neighboring samples. Similarly, the neighboring samples of the luma block are also reconstructed neighboring samples of the luma block (i.e., reconstructed neighboring luma samples). In one example, the obtained luma reference samples of a luma block are obtained by downsampling reconstructed neighboring luma samples selected based on the available chroma reference samples.

[0008] In existing methods, luma reference samples are used to determine the availability of reference samples to determine linear model coefficients. However, in some scenarios, available luma reference samples do not have corresponding chroma reference samples, which may result in coding errors. The technology presented herein addresses this issue by determining the availability of a reference sample via checking the availability of a chroma reference sample. In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title and the reference sample has been reconstructed. In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title and the reference sample has been reconstructed, the reference sample has not been omitted based on an encoding decision, etc. The available reference sample of the current chroma block may be an available reconstructed neighboring sample of the chroma block. The luma reference sample corresponding to the available chroma reference sample is used to determine the linear model coefficients.

[0009] In a possible embodiment of the method according to the first aspect itself, determining the L available chroma reference samples comprises determining that L upper-neighboring chroma samples of the current chroma block are available, where 1<=L<=W2, W2 indicates the upper reference sample range, and L and W2 are positive integers, and the L upper-neighboring chroma samples are used as the available chroma reference samples.

[0010] In possible embodiments of the method according to the first aspect itself or any preceding implementation of the first aspect, W2 is equal to either 2*W or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0011] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, determining the L available chroma reference samples comprises determining that L left-neighboring chroma samples of the current chroma block are available, where 1<=L<=H2, H2 indicates a left reference sample range, and L and H2 are positive integers, and the L left-neighboring chroma samples are used as the available chroma reference samples.

[0012] In possible embodiments of the method according to the first aspect itself or any preceding implementation of the first aspect, H2 is equal to either 2*H or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0013] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, determining the L available chroma reference samples comprises determining that L1 upper-neighboring chroma samples and L2 left-neighboring chroma samples of the current chroma block are available, where 1<=L1<=W2 and 1<=L2<=H2, W2 denotes the upper reference sample range and H2 denotes the left reference sample range, L1, L2, W2, and H2 are positive integers, and L1+L2=L, and the L1 upper-neighboring chroma samples and the L2 left-neighboring chroma samples are used as the available chroma reference samples.

[0014] In possible embodiments of the method according to the first aspect itself or any preceding implementation of the first aspect, the luma reference sample is obtained by downsampling only neighboring samples that are above the luma block and selected based on the L available chroma reference samples, or by downsampling only neighboring samples that are to the left of the luma block and selected based on the L available chroma reference samples. For example, if L is 4, the luma reference sample is obtained by downsampling 24 neighboring samples that are above the luma block and selected based on the 4 available chroma reference samples, or by downsampling 24 neighboring samples that are to the left of the luma block and selected based on the 4 available chroma reference samples, and a 6-tap filter is used for the downsampling process.

[0015] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, the downsampled luma block of the luma block is obtained by downsampling a reconstructed luma block of the luma block that corresponds to the current chroma block.

[0016] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, when the luma reference sample is obtained based only on neighboring samples above the luma block, and when the top row of the current chroma block overlaps with the top row of the current coding tree unit (CTU), only one row of reconstructed neighboring luma samples of the reconstructed version of the luma block is used to obtain the luma reference sample.

[0017] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, calculating linear model coefficients based on luma reference samples and chroma reference samples corresponding to the luma reference samples includes: determining a maximum luma value and a minimum luma value based on the luma reference samples; obtaining a first chroma value based at least in part on a position of the luma reference sample associated with the maximum luma value; obtaining a second chroma value based at least in part on a position of the luma reference sample associated with the minimum luma value; and calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.

[0018] In possible embodiments of the method according to the first aspect itself or any preceding implementation of the first aspect, obtaining the first chroma value based at least in part on a position of the luma reference sample associated with the maximum luma value comprises obtaining the first chroma value based at least in part on one or more positions of the one or more luma reference samples associated with the maximum luma value, and obtaining the second chroma value based at least in part on a position of the luma reference sample associated with the minimum luma value comprises obtaining the second chroma value based at least in part on one or more positions of the one or more luma reference samples associated with the minimum luma value.

[0019] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αx A where x B represents the maximum luma value, and y B represents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0020] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, the prediction of the current chroma block is obtained based on: pred C (i,j)=α·rec' L (i,j)+β, where pred C (i,j) represents the predicted value of the chroma sample of the current chroma block, and rec' L (i,j) represents the sample value of the corresponding luma sample of the downsampled luma block of the reconstructed luma block of the luma block.

[0021] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, when the luma reference sample is obtained based only on neighboring samples to the left of the luma block and the current chroma block is at the left boundary of the current coding tree unit (CTU), only one column of reconstructed neighboring luma samples of the reconstructed luma block is used to obtain the luma reference sample.

[0022] In a possible embodiment of the method according to the first aspect itself or any preceding implementation of the first aspect, the linear model comprises a multi-directional linear model (MDLM).

[0023] According to a second aspect, the present disclosure relates to a method for performing intra prediction using a linear model. The method includes: determining a luma block corresponding to a current chroma block; obtaining a luma reference sample for the luma block based on determining L available chroma reference samples of the current chroma block, where the obtained luma reference sample for the luma block is a downsampled luma reference sample obtained by downsampling neighboring samples (i.e., reconstructed neighboring luma samples) of the luma block corresponding to the L available chroma reference samples; calculating linear model coefficients based on the luma reference sample and the chroma reference sample corresponding to the luma reference sample; and obtaining a prediction of the current chroma block based on the linear model coefficients and values of the downsampled luma block of the luma block. The chroma reference sample for the current chroma block includes the reconstructed neighboring samples of the current chroma block. The L available chroma reference samples are determined from the reconstructed neighboring samples. Similarly, the neighboring samples of the luma block are also reconstructed neighboring samples (i.e., reconstructed neighboring luma samples) of the luma block. The obtained luma reference samples of a luma block are obtained by downsampling the reconstructed neighboring luma samples corresponding to the available chroma reference samples.

[0024] With regard to "reconstructed adjacent luma samples corresponding to available chroma reference samples," it can also be understood that the correspondence between the reconstructed adjacent luma samples and the available chroma reference samples is not limited to a "one-to-one correspondence," and the correspondence between the reconstructed adjacent luma samples and the available chroma reference samples can be an "M-to-N correspondence." For example, when a 6-tap filter is used for downsampling, M=24 and N=4.

[0025] According to a third aspect, the present invention relates to an apparatus for encoding video data, the apparatus comprising: a video data memory; and a video encoder configured to: determine a luma block corresponding to a current chroma block; obtain a luma reference sample for the luma block based on determining L available chroma reference samples of the current chroma block (or by determining the L available chroma reference samples of the current chroma block), where the obtained luma reference sample of the luma block is a downsampled luma reference sample obtained by downsampling neighboring samples of the luma block (i.e., reconstructed neighboring luma samples) corresponding to the L available chroma reference samples; calculate linear model coefficients of a linear model based on the luma reference sample and the chroma reference sample corresponding to the luma reference sample; and obtain a prediction of the current chroma block based on the linear model coefficients and values of the downsampled version of the luma block. For example, when L is 4, the obtained luma reference samples of the luma block are 4 downsampled luma reference samples obtained by downsampling 24 neighboring samples (i.e., reconstructed neighboring luma samples) of the luma block, corresponding to the 4 available chroma reference samples, and a 6-tap filter is used in the downsampling process.

[0026] According to a fourth aspect, the present invention relates to an apparatus for decoding video data, the apparatus comprising: a video data memory; and a video decoder configured to: determine a luma block corresponding to a current chroma block; obtain a luma reference sample for the luma block based on determining L available chroma reference samples of the current chroma block, where the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculate linear model coefficients based on the luma reference sample and a chroma reference sample corresponding to the luma reference sample; and obtain a prediction of the current chroma block based on the linear model coefficients and values of the downsampled luma block of the luma block.

[0027] In existing approaches, luma reference samples are used to determine the availability of reference samples to determine linear model coefficients. However, in some scenarios, available luma reference samples do not have corresponding chroma reference samples, which may result in coding errors. The technology presented herein addresses this issue by determining the availability of a reference sample via checking the availability of a chroma reference sample. In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title and the reference sample has been reconstructed. In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title and the reference sample has been reconstructed, the reference sample has not been omitted based on an encoding decision, etc. The available chroma reference sample of the current chroma block may be the available reconstructed neighboring sample of the chroma block (i.e., the available reconstructed neighboring chroma sample). The luma reference sample corresponding to the available chroma reference sample is used to determine the linear model coefficients.

[0028] In a possible embodiment of the apparatus according to the third or fourth aspect itself, determining the L available chroma reference samples comprises determining that L upper-neighboring chroma samples of the current chroma block are available, where 1<=L<=W2, W2 indicates the upper reference sample range, and L and W2 are positive integers, and the L upper-neighboring chroma samples are used as the available chroma reference samples.

[0029] In possible embodiments of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, W2 is equal to either 2*W or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0030] In a possible embodiment of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, determining the L available chroma reference samples comprises determining that L left-neighboring chroma samples of the current chroma block are available, where 1<=L<=H2, H2 indicates a left reference sample range, and L and H2 are positive integers, and the L left-neighboring chroma samples are used as the available chroma reference samples.

[0031] In possible embodiments of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, H2 is equal to either 2*H or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0032] In a possible embodiment of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, determining the L available chroma reference samples comprises determining that L1 upper-neighboring chroma samples and L2 left-neighboring chroma samples of the current chroma block are available, where 1<=L1<=W2 and 1<=L2<=H2, W2 denotes the upper reference sample range and H2 denotes the left reference sample range, L1, L2, W2, and H2 are positive integers, and L1+L2=L, and the L1 upper-neighboring chroma samples and the L2 left-neighboring chroma samples are used as the available chroma reference samples.

[0033] In possible embodiments of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, the luma reference sample is obtained by downsampling only neighboring samples that are above the luma block and selected based on the L available chroma reference samples, or by downsampling only neighboring samples that are to the left of the luma block and selected based on the L available chroma reference samples.

[0034] In a possible embodiment of the device according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, the downsampled luma block of the luma block is obtained by downsampling a reconstructed luma block of the luma block that corresponds to the current chroma block.

[0035] In a possible embodiment of the device according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, when the luma reference sample is obtained based only on neighboring samples above the luma block, and when the top row of the current chroma block overlaps with the top row of the current coding tree unit (CTU), only one row of reconstructed neighboring luma samples of the reconstructed version of the luma block is used to obtain the luma reference sample.

[0036] In a possible embodiment of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αx A where x B represents the maximum luma value, and y B represents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0037] In a possible embodiment of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, the prediction of the current chroma block is obtained based on: pred C (i,j)=α·rec' L (i,j)+β, where pred C (i,j) represents the predicted value of the chroma sample of the current chroma block, and rec' L (i,j) represents the sample value of the corresponding luma sample of the downsampled luma block of the reconstructed luma block of the luma block.

[0038] In a possible embodiment of the device according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, when the luma reference sample is obtained based only on neighboring samples to the left of the luma block and the current chroma block is at the left boundary of the current coding tree unit (CTU), only one column of reconstructed neighboring luma samples of the reconstructed luma block is used to obtain the luma reference sample.

[0039] In a possible embodiment of the apparatus according to the third or fourth aspect itself or any preceding implementation of the third or fourth aspect, the linear model comprises a multi-directional linear model (MDLM).

[0040] According to a fifth aspect, the present invention relates to a method for coding an intra-chroma prediction mode in a bitstream of a video signal, the method including: performing intra-prediction of a chroma block of the video signal based on an intra-chroma prediction mode selected from a first mode set, a second mode set including at least one of a CCLM_L mode or a CCLM_T mode, or a third mode set; and generating a bitstream of the video signal by including a syntax element indicating the intra-chroma prediction mode, wherein the number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set.

[0041] The proposed method for encoding intra-chroma prediction modes allows CCLM_L and CCLM_T to be represented using binary strings and included in the bitstream of the video signal.

[0042] In a possible embodiment of the method according to the fifth aspect itself, the first set of modes comprises at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode, and the third set of modes comprises at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0043] In possible embodiments of the method according to the fifth aspect itself or any preceding implementation of the fifth aspect, the syntax element for DM mode is 0; the syntax element for CCLM mode is 10; the syntax element for CCLM_L mode is 1110; the syntax element for CCLM_T mode is 1111; the syntax element for planar mode is 11000; the syntax element for vertical mode is 11001; the syntax element for horizontal mode is 11010; and the syntax element for DC mode is 11011.

[0044] In possible embodiments of the method according to the fifth aspect itself or any preceding implementation of the fifth aspect, the syntax element for DM mode is 00; the syntax element for CCLM mode is 10; the syntax element for CCLM_L mode is 110; the syntax element for CCLM_T mode is 111; the syntax element for planar mode is 0100; the syntax element for vertical mode is 0101; the syntax element for horizontal mode is 0110; and the syntax element for DC mode is 0111.

[0045] According to a sixth aspect, the present invention relates to a method for decoding an intra-chroma prediction mode in a bitstream of a video signal, the method including the steps of: parsing a plurality of syntax elements from the bitstream of the video signal; determining an intra-chroma prediction mode based on the syntax element from the plurality of syntax elements, where the intra-chroma prediction mode is determined from one of a first mode set, a second mode set including at least one of a CCLM_L mode or a CCLM_T mode, or a third mode set, wherein a number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is smaller than a number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and a number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is smaller than a number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set; and performing intra prediction of a current chroma block of the video signal based on the intra-chroma prediction mode.

[0046] According to a seventh aspect, the present invention relates to an apparatus for encoding video data, the apparatus comprising: a video data memory; and a video encoder configured to: perform intra prediction of a chroma block of a video signal based on an intra-chroma prediction mode selected from a first mode set, a second mode set including at least one of CCLM_L mode or CCLM_T mode, or a third mode set; and generate a bitstream of the video signal by including a syntax element indicating the intra-chroma prediction mode, wherein the number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set.

[0047] According to an eighth aspect, the present invention relates to an apparatus for decoding video data. The apparatus includes a video data memory; and a video decoder, wherein the video decoder is configured to: parse a plurality of syntax elements from a bitstream of the video signal; determine an intra-chroma prediction mode based on the syntax element from the plurality of syntax elements, where the intra-chroma prediction mode is determined from one of a first mode set, a second mode set including at least one of a CCLM_L mode or a CCLM_T mode, or a third mode set, wherein a number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is less than a number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and a number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is less than a number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set; and perform intra-prediction of a current chroma block of the video signal based on the intra-chroma prediction mode.

[0048] The proposed apparatus for encoding video data and apparatus for decoding video data represent CCLM_L and CCLM_T using binary strings, allowing them to be included in the bitstream of the video signal by the encoding device and decoded by the decoding device. In possible embodiments of the apparatus according to the seventh and eighth aspects themselves, the first set of modes comprises at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode, and the third set of modes comprises at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0049] In possible embodiments of the apparatus according to the seventh and eighth aspects themselves or any preceding implementation of the seventh and eighth aspects, the syntax element for DM mode is 0; the syntax element for CCLM mode is 10; the syntax element for CCLM_L mode is 1110; the syntax element for CCLM_T mode is 1111; the syntax element for planar mode is 11000; the syntax element for vertical mode is 11001; the syntax element for horizontal mode is 11010; and the syntax element for DC mode is 11011.

[0050] In possible embodiments of the methods according to the seventh and eighth aspects themselves or any preceding implementation of the seventh and eighth aspects, the syntax element for DM mode is 00; the syntax element for CCLM mode is 10; the syntax element for CCLM_L mode is 110; the syntax element for CCLM_T mode is 111; the syntax element for planar mode is 0100; the syntax element for vertical mode is 0101; the syntax element for horizontal mode is 0110; and the syntax element for DC mode is 0111.

[0051] According to a ninth aspect, the present invention relates to a method for performing intra prediction using a cross-component linear model (CCLM) prediction mode. The method includes the steps of: determining a luma block corresponding to a current chroma block; obtaining luma reference samples for the luma block by downsampling neighboring samples of the luma block, where the luma reference samples include only luma reference samples obtained based on neighboring samples above the luma block or only luma reference samples obtained based on neighboring samples to the left of the luma block; determining a maximum luma value and a minimum luma value based on the luma reference samples; obtaining a first chroma value based at least in part on one or more positions of the one or more luma reference samples associated with the maximum luma value; obtaining a second chroma value based at least in part on one or more positions of the one or more luma reference samples associated with the minimum luma value; calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; and generating a prediction of the current chroma block based on the linear model coefficients and values of a downsampled version of the luma block.

[0052] In a possible embodiment of the method according to the ninth aspect itself, the number of luma reference samples is greater than or equal to the width of the current chroma block or greater than or equal to the height of the current chroma block.

[0053] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the luma reference samples used in determining the maximum luma value and the minimum luma value are the available luma reference samples of the luma block.

[0054] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the available luma reference samples of the luma block are determined based on the available chroma reference samples of the current chroma block.

[0055] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, up to 2*W luma reference samples are used to derive the linear model coefficients when the luma reference samples are obtained based only on neighboring samples above the luma block, where W represents the width of the current chroma block.

[0056] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, up to 2*H luma reference samples are used to derive the linear model coefficients when the luma reference samples are obtained based only on neighboring samples to the left of the luma block, where H represents the height of the current chroma block.

[0057] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, up to N available luma reference samples are used to derive the linear model coefficients, where N is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0058] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αx A where x B represents the maximum luma value, and y B represents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0059] In a possible embodiment of a method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the prediction of the current chroma block is obtained based on: pred C (i,j)=α·rec'L (i,j)+β, where pred C (i,j) represents the predicted value of the chroma sample of the current chroma block, and rec' L (i,j) represents the sample value of the corresponding luma sample of the downsampled version of the reconstructed version of the luma block.

[0060] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the downsampled version of the luma block is obtained by downsampling a reconstructed version of the luma block that corresponds to the current chroma block.

[0061] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, when the luma reference sample is obtained based only on neighboring samples above the luma block, and when the top row of the current chroma block overlaps with the top row of the current coding tree unit (CTU) or the current chroma block is at the top boundary of the current coding tree unit (CTU), only one row of reconstructed neighboring luma samples of the reconstructed version of the luma block is used to obtain the luma reference sample.

[0062] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, when the luma reference sample is obtained based only on neighboring samples to the left of the luma block and the current chroma block is at the left boundary of the current coding tree unit (CTU), only one column of reconstructed neighboring luma samples of the reconstructed luma block is used to obtain the luma reference sample.

[0063] In a possible embodiment of the method according to the ninth aspect itself or any preceding implementation of the ninth aspect, the CCLM comprises a multi-directional linear model (MDLM).

[0064] According to a tenth aspect, the present invention relates to an encoder configured to carry out a method according to the ninth aspect itself or any preceding implementation of the ninth aspect.

[0065] According to an eleventh aspect, the present invention relates to a decoder configured to carry out a method according to the ninth aspect itself or any preceding implementation of the ninth aspect.

[0066] According to an eleventh aspect, the present invention relates to a method for intra prediction by using cross-component linear prediction mode (CCLM), the method including: obtaining a reference sample for a current luma block, where the reference sample belongs only to an upper template of the current luma block; obtaining a maximum luma value and a minimum luma value according to the reference sample; obtaining a first chroma value based on a sample position of the maximum luma value; obtaining a second chroma value based on a sample position of the minimum luma value; calculating a linear model coefficient based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; and obtaining a predictor for the current chroma block based on the linear model coefficient; wherein the current chroma block corresponds to the current luma block.

[0067] In a possible embodiment of the method according to the eleventh aspect itself, the number of reference samples is greater than or equal to the width of the current chroma block.

[0068] In possible embodiments of the method according to the eleventh aspect itself or any preceding embodiment of the eleventh aspect, a reference sample is available.

[0069] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the method further comprises checking the availability of reference samples within a range, wherein the length of the range is 2*W, or the length of the range is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0070] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, up to 2*W available reference samples are used to derive the linear model coefficients, where W represents the width of the current chroma block.

[0071] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, a maximum of N available reference samples are used to derive the linear model coefficients, where N is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0072] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αx A where x B represents the maximum luma value, and y B represents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0073] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the predictor for the current chroma block is obtained based on: pred C (i,j)=α·rec L '(i,j)+β, where pred C (i,j) represents the chroma sample, and rec L (i,j) denotes the corresponding reconstructed luma sample.

[0074] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the number of reference samples is equal to or greater than the size of the current chroma block.

[0075] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the reference sample is a downsampled luma sample.

[0076] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, when the current chroma block is at the top boundary, only one row of reconstructed neighboring luma samples is used to obtain the reference sample.

[0077] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the CCLM is a multi-directional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0078] In a possible embodiment of the method according to the eleventh aspect itself or any preceding implementation of the eleventh aspect, the method is referred to as CCIP_T.

[0079] According to a twelfth aspect, the present invention relates to a method for intra prediction by using a cross-component linear prediction mode (CCLM), the method comprising: Obtaining a reference sample for a current luma block, where the reference sample belongs only to a left template of the current luma block; obtaining a maximum luma value and a minimum luma value based on a reference sample; obtaining a first chroma value based on a sample location of the maximum luma value; obtaining a second chroma value based on the sample location of the minimum luma value; calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; obtaining a predictor for a current chroma block based on the linear model coefficients, wherein the current chroma block corresponds to the current luma block.

[0080] In a possible embodiment of the method according to the twelfth aspect itself, the number of reference samples is greater than or equal to the height of the current chroma block.

[0081] In possible embodiments of the method according to the twelfth aspect itself or any preceding embodiment of the twelfth aspect, a reference sample is available.

[0082] In possible embodiments of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the method further comprises checking the availability of reference samples within a range, wherein the length of the range is 2*H, or the length of the range is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0083] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, up to 2*H available reference samples are used to derive the linear model coefficients, where H represents the height of the current chroma block.

[0084] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, up to N available reference samples are used to derive the linear model coefficients, where N is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0085] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αxA where x B represents the maximum luma value, and y B represents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0086] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the predictor for the current chroma block is obtained based on: pred C (i,j)=α·rec L '(i,j)+β where pred C (i,j) represents the chroma sample, and rec L (i,j) denotes the corresponding reconstructed luma sample.

[0087] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the number of reference samples is equal to or greater than the size of the current chroma block.

[0088] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the reference sample is a downsampled luma sample.

[0089] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, when the current block of the current chroma block is at the left boundary, only one column of reconstructed neighboring luma samples is used to obtain the reference sample.

[0090] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the CCLM is a multi-directional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0091] In a possible embodiment of the method according to the twelfth aspect itself or any preceding implementation of the twelfth aspect, the method is referred to as CCIP_L.

[0092] According to a thirteenth aspect, the present invention relates to a method for intra prediction by using a cross-component linear prediction mode (CCLM), the method comprising: Obtaining a reference sample of a current luma block, where the reference sample belongs only to a top template of the current luma block or only to a left template of the current luma block; obtaining chroma samples of a current chroma block, the current chroma block corresponding to the current luma block; calculating linear model coefficients based on the reference samples and the chroma samples; obtaining a predictor for the current chroma block based on the linear model coefficients;

[0093] In a possible embodiment of the method according to the thirteenth aspect itself, a maximum of N reference samples are used to derive the linear model coefficients, where N is the sum of W and H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0094] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, the number of reference samples is greater than or equal to the width of the current chroma block when the reference samples belong only to the upper template of the current luma block.

[0095] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, when the reference samples belong only to the upper template of the current luma block, up to 2*W reference samples are used to derive the linear model coefficients, where W represents the width of the current chroma block.

[0096] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, when the reference samples belong only to the left template of the current luma block, the number of reference samples is equal to or greater than the height of the current luma block.

[0097] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, when the reference samples belong only to the left template of the current luma block, up to 2*H reference samples are used to derive the linear model coefficients, where W represents the height of the current chroma block.

[0098] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, the number of reference samples is equal to or greater than the size of the current chroma block.

[0099] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, the reference sample is a downsampled luma sample.

[0100] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, when the reference sample belongs only to the top template of the current luma block and the current block of the current chroma block is at the top boundary, only one row of reconstructed neighboring luma samples is used to obtain the reference sample.

[0101] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, when the reference sample belongs only to the left template of the current luma block and the current block of the current chroma block is at the left boundary, only one column of reconstructed neighboring luma samples is used to obtain the reference sample.

[0102] In a possible embodiment of the method according to the thirteenth aspect itself or any preceding implementation of the thirteenth aspect, the CCLM is a multi-directional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0103] In possible embodiments of the method according to the thirteenth aspect itself or any preceding embodiment of the thirteenth aspect, a reference sample is available.

[0104] According to a fourteenth aspect, the present invention relates to a decoder including processing circuitry for carrying out the method according to the eleventh aspect itself or any one of the preceding embodiments of the eleventh aspect.

[0105] According to a fifteenth aspect, the present invention relates to a decoder including processing circuitry for carrying out a method according to the twelfth aspect itself or according to any one of the preceding implementations of the twelfth aspect.

[0106] According to a sixteenth aspect, the present invention relates to a decoder including processing circuitry for carrying out the method according to the thirteenth aspect itself or any one of the preceding implementations of the thirteenth aspect.

[0107] According to a seventeenth aspect, the present invention relates to a method for intra prediction by using a cross-component linear prediction mode (CCLM), the method comprising: Obtaining a reference sample for a current luma block, where the reference sample belongs only to an upper template of the current luma block; obtaining a maximum luma value and a minimum luma value based on a reference sample; obtaining a first chroma value and a second chroma value based on the maximum luma value and the minimum luma value; calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; obtaining a predictor for the current block based on the linear model coefficients;

[0108] In a possible embodiment of the method according to the seventeenth aspect itself, the number of reference samples is greater than or equal to the width of the current chroma block.

[0109] In possible embodiments of the method according to the seventeenth aspect itself or any preceding embodiment of the seventeenth aspect, a reference sample is available.

[0110] In a possible embodiment of the method according to the seventeenth aspect itself or any preceding implementation of the seventeenth aspect, up to 2*W reference samples are used to derive the model coefficients.

[0111] In a possible embodiment of the method according to the seventeenth aspect itself or any preceding implementation of the seventeenth aspect, the method is referred to as CCIP_T.

[0112] According to an eighteenth aspect, the present invention relates to a method for intra prediction by using a cross-component linear prediction mode (CCLM), the method comprising: Obtaining a reference sample for a current luma block, where the reference sample belongs only to a left template of the current luma block; obtaining a maximum luma value and a minimum luma value based on a reference sample; obtaining a first chroma value and a second chroma value based on the maximum luma value and the minimum luma value; calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; obtaining a predictor for the current block based on the linear model coefficients;

[0113] In a possible embodiment of the method according to the eighteenth aspect itself, the number of reference samples is greater than or equal to the height of the current chroma block.

[0114] In possible embodiments of the method according to the eighteenth aspect itself or any preceding embodiment of the eighteenth aspect, a reference sample is available.

[0115] In a possible embodiment of the method according to the eighteenth aspect itself or any preceding implementation of the eighteenth aspect, up to 2*H reference samples are used to derive the model coefficients.

[0116] In a possible embodiment of the method according to the eighteenth aspect itself or any preceding implementation of the eighteenth aspect, the method is referred to as CCIP_L.

[0117] According to a nineteenth aspect, the present invention relates to a decoder for carrying out the method according to the seventeenth aspect itself or any preceding implementation of the seventeenth aspect.

[0118] According to a twentieth aspect, the present invention relates to a decoder for carrying out the method according to the eighteenth aspect itself or any preceding implementation of the eighteenth aspect.

[0119] According to a twenty-first aspect, the present invention relates to a method for intra prediction using a linear model. The method includes the steps of: obtaining a reference sample for a current luma block; obtaining a maximum luma value and a minimum luma value based on the reference sample; obtaining a first chroma value and a second chroma value based on the position of the luma sample having the maximum luma value and the position of the luma sample having the minimum luma value; calculating a linear model coefficient based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; and obtaining a predictor for the current block based on the linear model coefficient. The step of obtaining the reference sample for the current luma block includes the step of determining L available chroma template samples for the current luma block, where the reference samples for the current luma block are the L luma template samples corresponding to the L available chroma template samples, or determining L available neighboring chroma samples for the current chroma block, where the reference samples for the current luma block are the L neighboring luma samples corresponding to the L available neighboring chroma samples, where L>=1 and L is a positive integer.

[0120] In a possible embodiment of the method according to the 21st aspect itself, the step of determining the L available chroma template samples of the current chroma block comprises checking the availability of upper neighboring chroma samples of the current chroma block, and if the L upper neighboring chroma samples are available, the reference samples of the current luma block are the L neighboring luma samples corresponding to the L upper neighboring chroma samples, where L>=1 and L<=W2, W2 indicates the upper template sample range, and L and W2 are positive integers.

[0121] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the step of determining the L available chroma template samples of the current chroma block comprises checking the availability of left-side neighboring chroma samples of the current chroma block, and if the L left-side neighboring chroma samples are available, the reference samples of the current luma block are the L neighboring luma samples corresponding to the L left-side neighboring chroma samples, where L >= 1 and L <= H2, H2 indicates the left-side template sample range, and L and H2 are positive integers.

[0122] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, determining the L available chroma template samples of the current chroma block includes checking the availability of top neighboring chroma samples of the current chroma block and the availability of left neighboring chroma samples of the current chroma block, where if L1 top neighboring chroma samples are available and L2 left neighboring chroma samples are available, the reference samples of the current luma block include or are the L1 neighboring luma samples corresponding to the L1 top neighboring chroma samples and the L2 neighboring luma samples corresponding to the L2 left neighboring chroma samples, where L2>=1 and L2<=H2, H2 denotes the left template sample range, L and H2 are positive integers, L1>=1 and L1<=W2, W2 denotes the top template sample range, L1 and W2 are positive integers, and L=L1+L2.

[0123] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, if L adjacent chroma samples are available in the template range, then L template luma samples and L template chroma samples are used to obtain the model coefficients.

[0124] In possible embodiments of the method according to the 21st aspect itself or any preceding embodiment of the 21st aspect, a reference sample is available.

[0125] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the linear model coefficients α and β are calculated based on: α=(y B -y A ) / (x B -x A ), β=y A -αx A where x B represents the maximum luma value, and y Brepresents the first chroma value, and x A represents the minimum luma value, and y A represents the second chroma value.

[0126] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the predictor for the current chroma block is obtained based on: pred C (i,j)=α·rec L '(i,j)+β, where pred C (i,j) represents the chroma sample, and rec L (i,j) denotes the corresponding reconstructed luma sample.

[0127] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the number of reference samples is equal to or greater than the size of the current luma block.

[0128] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the reference sample is a downsampled luma sample.

[0129] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, when the current block of the current chroma block is at the top boundary, only one row of reconstructed neighboring luma samples is used to obtain the reference sample.

[0130] In a possible embodiment of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the linear model is a multi-directional linear model (MDLM), and the linear model coefficients are used to obtain the MDLM.

[0131] In possible embodiments of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the method is referred to as CCIP_T or the method is referred to as CCIP_L.

[0132] In possible embodiments of the method according to the 21st aspect itself or any preceding implementation of the 21st aspect, the reference sample belongs only to the top template of the current luma block, or only to the left template of the current luma block, or the reference sample belongs to the top template of the current luma block and the left template of the current luma block.

[0133] According to a twenty-second aspect, the present invention relates to a decoder including processing circuitry for carrying out the method according to the twenty-first aspect itself or a preceding embodiment of the twenty-first aspect.

[0134] According to a twenty-third aspect, the present invention relates to an encoder including processing circuitry for carrying out the method according to the twenty-first aspect per se or a preceding embodiment of the twenty-first aspect.

[0135] According to a twenty-fourth aspect, the present invention relates to a binarization method for chroma mode, said method comprising: Performing intra prediction using a linear model (e.g., multi-directional linear model, MDLM); generating a bitstream including a plurality of syntax elements, the plurality of syntax elements indicating or including a CCLM mode, a CCIP_L mode, or a CCIP_T mode;

[0136] In a possible embodiment of the method according to the 24th aspect itself, The first indicator (77) indicates CCLM mode, with an intra_chroma_pred_mode index of 4; A second indicator (78) indicates CCIP_L mode, with an intra_chroma_pred_mode index of 5; The third indicator (79) indicates CCIP_T mode, with an intra_chroma_pred_mode index of 6.

[0137] In a possible embodiment of the method according to the 24th aspect itself or any preceding implementation of the 24th aspect, when sps_cclm_enabled_flag is equal to 1, IntraPredModeC[xCb][yCb] depends on intra_chroma_pred_mode[xCb][yCb] and IntraPredModeY[xCb][yCb].

[0138] According to a twenty-fifth aspect, the present invention relates to a method of decoding implemented by a decoding device, the method comprising: parsing a plurality of syntax elements from the bitstream, the plurality of syntax elements indicating or including a CCLM mode, a CCIP_L mode, or a CCIP_T mode; and performing intra prediction using the indicated linear model.

[0139] In a possible embodiment of the method according to the 25th aspect itself, The first indicator (77) indicates CCLM mode, with an intra_chroma_pred_mode index of 4; A second indicator (78) indicates CCIP_L mode, with an intra_chroma_pred_mode index of 5; The third indicator (79) indicates CCIP_T mode, with an intra_chroma_pred_mode index of 6.

[0140] In a possible embodiment of the method according to the 25th aspect itself or any preceding implementation of the 25th aspect, when sps_cclm_enabled_flag is equal to 1, IntraPredModeC[xCb][yCb] depends on intra_chroma_pred_mode[xCb][yCb] and IntraPredModeY[xCb][yCb].

[0141] According to a twenty-sixth aspect, the present invention relates to a decoder including processing circuitry for carrying out the methods according to the twenty-fourth and twenty-fifth aspects themselves or any preceding implementations of the twenty-fourth and twenty-fifth aspects.

[0142] According to a twenty-seventh aspect, the present invention relates to an encoder including processing circuitry for carrying out the methods according to the twenty-fourth and twenty-fifth aspects themselves or any preceding implementations of the twenty-fourth and twenty-fifth aspects.

[0143] According to a twenty-eighth aspect, the present invention relates to a computer-readable medium storing instructions which, when executed on a processor, cause the processor to perform a method according to the twenty-fourth and twenty-fifth aspects themselves or any preceding implementation of the twenty-fourth and twenty-fifth aspects.

[0144] According to a twenty-eighth aspect, the present invention relates to a decoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming executed by the processor, the programming, when executed by the processor, configuring the decoder to perform a method according to the twenty-fourth and twenty-fifth aspects themselves or any preceding implementation of the twenty-fourth and twenty-fifth aspects.

[0145] According to a twenty-eighth aspect, the present invention relates to an encoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming executed by the processor, the programming, when executed by the processor, configuring the encoder to perform a method according to the twenty-fourth and twenty-fifth aspects themselves or any preceding implementation of the twenty-fourth and twenty-fifth aspects.

[0146] According to a twenty-ninth aspect, the present invention relates to a method for intra prediction by using a cross-component linear prediction mode (CCLM), the method comprising: obtaining a reference sample for the current luma block; obtaining a maximum luma value and a minimum luma value based on a reference sample; obtaining a first chroma value and a second chroma value based on the maximum luma value and the minimum luma value; calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value; obtaining a predictor for the current block based on the linear model coefficients; The availability of a template sample is determined by checking the adjacent chroma samples.

[0147] According to a thirtieth aspect, the invention relates to a decoder for carrying out the method according to the twenty-eighth aspect itself.

[0148] According to a thirty-first aspect, the present invention relates to a decoder for carrying out the method according to the twenty-ninth aspect itself.

[0149] According to a thirty-second aspect, the present invention relates to a decoder for carrying out the method according to the twenty-eighth or twenty-ninth aspect.

[0150] According to a thirty-third aspect, there is provided an apparatus including a module / unit / component / circuit for performing at least some of the steps of the above method according to any preceding aspect itself or any preceding implementation of any preceding aspect.

[0151] The apparatus according to the thirty-third aspect can be extended to embodiments corresponding to embodiments of the method according to any preceding aspect, such that embodiments of the apparatus include features of corresponding embodiments of the method according to any preceding aspect.

[0152] The advantages of the apparatus according to any preceding aspect are the same as the advantages of the corresponding embodiment of the method according to any preceding aspect.

[0153] For clarity, any one of the above examples may be combined with any one or more of the other above examples to create new examples within the scope of the present disclosure.

[0154] These and other features will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings and claims. [Brief explanation of the drawings]

[0155] For a more complete understanding of the present disclosure, reference is now made to the following brief description taken in conjunction with the accompanying drawings and detailed description, wherein like reference numerals represent like parts. [Figure 1A] 1 is a block diagram illustrating an exemplary coding system in which examples of the present invention may be implemented. [Figure 1B] FIG. 2 is a block diagram illustrating another exemplary coding system in which examples of the present invention may be implemented. [Figure 2] 1 is a block diagram illustrating an exemplary video encoder in which examples of the present invention may be implemented; [Figure 3] 1 is a block diagram illustrating an example of a video decoder in which examples of the present invention can be implemented; [Figure 4] 1 is a schematic diagram of a video coding device; [Figure 5] 5 is a simplified block diagram of an apparatus 500 that can be used as either or both of source device 12 and destination device 14 according to FIG. 1A, according to an illustrative example. [Figure 6A] FIG. 1 is a conceptual diagram illustrating the nominal relative vertical and horizontal positions of luma and chroma samples. [Figure 6B] FIG. 1 is a conceptual diagram illustrating examples of luma and chroma positions for downsampling samples of a luma block to generate a predictive block. [Figure 6C] FIG. 10 is a conceptual diagram illustrating another example of luma and chroma positions for downsampling samples of a luma block to generate a predictive block. [Figure 6D]FIG. 1 is a diagram of intra-prediction modes in H.265 / HEVC. [Figure 7] FIG. 10 is a diagram of the reference sample of the current block. [Figure 8] 10 is a diagram of the locations of the reference samples to the left and top of the current luma and chroma blocks involved in CCLM mode. [Figure 9] FIG. 1 is a diagram of a line between a minimum luma value and a maximum luma value. [Figure 10] 1 is a diagram of a template of a chroma block (including reference samples) and the corresponding downsampled luma block. [Figure 11] FIG. 10 is a diagram of an example template with unavailable reference samples. [Figure 12] FIG. 10 is a diagram of a reference sample used in CCLM_T mode. [Figure 13] FIG. 10 is a diagram of a reference sample used in CCLM_L mode. [Figure 14] FIG. 10 is a schematic diagram illustrating an example of determining model coefficients using a top template that is larger than the width of the downsampled luma block of the current luma block or a left template that is larger than the height of the downsampled luma block of the current luma block, where the top template contains reference samples above the downsampled luma block and the left template contains reference samples to the left of the downsampled luma block. [Figure 15] FIG. 10 is a schematic diagram illustrating an example of determining model coefficients using a top template having the same size as the width of a downsampled luma block of a current luma block or a left template having the same size as the height of a downsampled luma block of a current luma block. [Figure 16] FIG. 10 is a schematic diagram illustrating an example of determining model coefficients for intra prediction using available reference samples. [Figure 17] FIG. 10 is a schematic diagram illustrating an example of downsampling a luma sample using multiple rows or columns of neighboring luma samples. [Figure 18]FIG. 10 is a schematic diagram illustrating another example of downsampling a luma sample using multiple rows or columns of neighboring luma samples. [Figure 19] 10 is a schematic diagram illustrating an example of downsampling using a single row of adjacent luma samples for a luma block at the top boundary of a CTU. [Figure 20] 1 is a flowchart of a method for performing intra prediction using a linear model according to some aspects of the present disclosure. [Figure 21] 10 is a flowchart of a method for performing intra prediction using a linear model according to another aspect of the present disclosure. [Figure 22] FIG. 2 is a block diagram illustrating an example structure of an apparatus for performing intra prediction using a linear model. [Figure 23] 1 is a flowchart of a method for coding a chrominance intra-coding mode in a bitstream of a video signal according to some aspects of the present disclosure. [Figure 24] 1 is a flowchart of a method for decoding a chrominance intra-coding mode in a bitstream of a video signal according to some aspects of the present disclosure. [Figure 25] 1 is a block diagram illustrating an exemplary structure of a device for generating a video bitstream. [Figure 26] 1 is a block diagram illustrating an exemplary structure of a device for decoding a video bitstream. [Figure 27] 1 is a block diagram illustrating an exemplary structure of a content supply system that provides content distribution services. [Figure 28] FIG. 2 is a block diagram showing the structure of an example of a terminal device. DETAILED DESCRIPTION OF THE INVENTION

[0156] While one or more example exemplary implementations are provided below, it should be understood at the outset that the disclosed systems and / or methods may be implemented using any number of technologies, whether currently known or in existence. The present disclosure should in no way be limited to the exemplary implementations, drawings, and technologies set forth below, including the exemplary designs and implementations shown and described herein, but may be modified within the scope of the appended claims, along with their full range of equivalents.

[0157] 1A is a block diagram illustrating an exemplary coding system 10 that can utilize bidirectional prediction techniques. As shown in FIG. 1A, coding system 10 includes a source device 12 that provides encoded video data that is later decoded by a destination device 14. In particular, source device 12 can provide the video data to destination device 14 via a computer-readable medium 16. Source device 12 and destination device 14 can include any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, so-called "smart" pads, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 12 and destination device 14 can be equipped for wireless communication.

[0158] The destination device 14 can receive the encoded video data via a computer-readable medium 16 and decode the encoded video data. The computer-readable medium 16 may include any type of medium or device capable of moving the encoded video data from the source device 12 to the destination device 14. In one example, the computer-readable medium 16 may include a communication medium that enables the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard, such as a wireless communication protocol, and transmitted to the destination device 14. The communication medium may include any wireless or wired communication medium, such as the radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may help facilitate communication from the source device 12 to the destination device 14.

[0159] In some examples, the encoded data may be output to a storage device through output interface 22. Similarly, the encoded data may be accessed from a storage device through an input interface. The storage device may include any of a variety of distributed or locally accessible data storage media, such as a hard drive, Blu-ray disc, digital video disc (DVD), compact disc read-only memory (CD-ROM), flash memory, volatile or non-volatile memory, or other suitable digital storage media for storing encoded video data. In a further example, the storage device may correspond to a file server or another intermediate storage device that may store the encoded video generated by source device 12. Destination device 14 may access the stored video data from the storage device via streaming or download. The file server may be any type of server capable of storing encoded video data and transmitting the encoded video data to destination device 14. Examples of file servers include a web server (e.g., for a website), a file transfer protocol (FTP) server, a network-attached storage (NAS) device, or a local disk drive. Destination device 14 may access the encoded video data via any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection) (suitable for accessing encoded video data stored on a file server), a wired connection (Digital Subscriber Line (DSL), cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device may be a streaming transmission, a download transmission, or a combination thereof.

[0160] The techniques of this disclosure are not necessarily limited to wireless applications or settings. The techniques may be applied to video coding in supporting any of a variety of multimedia applications, such as terrestrial television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded to data storage media, decoding of digital video stored on data storage media, or other applications. In some examples, coding system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.

[0161] In the example of FIG. 1A , source device 12 includes video source 18, video encoder 20, and output interface 22. Destination device 14 includes input interface 28, video decoder 300, and display device 32. Consistent with this disclosure, video encoder 200 of source device 12 and / or video decoder 300 of destination device 14 may be configured to apply techniques for bidirectional prediction. In other examples, source device and destination device may include other components or configurations. For example, source device 12 may receive video data from an external video source, such as an external camera. Similarly, destination device 14 may interface with an external display device rather than including an integrated display device.

[0162] The illustrated coding system 10 of FIG. 1A is merely an example. The techniques for bidirectional prediction may be performed by any digital video encoding and / or decoding device. While the techniques of this disclosure are generally performed by a video coding device, the techniques may also be performed by a video encoder / decoder, typically referred to as a "CODEC." Additionally, the techniques of this disclosure may also be performed by a video preprocessor. The video encoder and / or decoder may be a graphics processing unit (GPU) or similar device.

[0163] Source device 12 and destination device 14 are merely examples of such coding devices that generate coded video data for source device 12 to transmit to destination device 14. In some examples, source device 12 and destination device 14 may operate in a substantially symmetric manner, such that each of source and destination devices 12, 14 includes video encoding and decoding components. As such, coding system 10 may support one-way or two-way video transmission between video devices 12, 14, for example, video streaming, video playback, video broadcasting, or video telephony.

[0164] Video source 18 of source device 12 may include a video capture device such as a video camera, a video archive containing previously captured video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 18 may generate computer graphics-based data as the source video or a combination of live video, archived video, and computer-generated video.

[0165] In some cases, when video source 18 is a video camera, source device 12 and destination device 14 may form a so-called camera phone or video telephone. However, as noted above, the techniques described in this disclosure may be applicable to video coding generally, and may be applied to wireless and / or wired applications. In either case, captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video information may then be output onto computer-readable medium 16 by output interface 22.

[0166] Computer-readable medium 16 may include a transitory medium, such as an over-the-air broadcast or a wired network transmission, or a storage medium (i.e., a non-transitory storage medium), such as a hard disk, flash drive, compact disc, digital video disc, Blu-ray disc, or other computer-readable medium. In some examples, a network server (not shown) may receive the encoded video data from source device 12 and provide the encoded video data to destination device 14, e.g., via a network transmission. Similarly, a computing device of a media production facility, such as a disc stamping facility, may receive the encoded video data from source device 12 and manufacture discs including the encoded video data. Accordingly, computer-readable medium 16 may be understood to include one or more computer-readable media of various forms in various examples.

[0167] An input interface 28 of destination device 14 receives information from computer-readable medium 16. The information on computer-readable medium 16 may include syntax information defined by video encoder 20, which is also used by video decoder 30, including syntax elements that describe the characteristics and / or processing of blocks and other coded units, such as groups of pictures (GOPs). Display device 32 displays the decoded video data to a user and may include any of a cathode ray tube (CRT), liquid crystal display (LCD), plasma display, organic light emitting diode (OLED) display, or another type of display device.

[0168] Video encoder 200 and video decoder 300 may operate according to a video coding standard, such as the High Efficiency Video Coding (HEVC) standard currently under development, and may conform to the HEVC Test Model (HM). Alternatively, video encoder 200 and video decoder 300 may operate according to other corporate or industry standards, such as the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) H.264 standard, or Advanced Video Coding (AVC), H.265 / HEVC, or extensions to such standards, known as Motion Picture Expert Group (MPEG)-4, Part 10. However, the techniques of this disclosure are not limited to any particular coding standard. Other examples of video coding standards include MPEG-2 and ITU-T H.263. 1A , in some aspects, video encoder 200 and video decoder 300 may be integrated with an audio encoder and decoder, respectively, and may include appropriate multiplexer-demultiplexer (MUX-DEMUX) units or other hardware and software to handle both audio and video encoding in a common data stream or separate data streams. Where applicable, the MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol or other protocols, such as the User Datagram Protocol (UDP).

[0169] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are implemented partially in software, a device may store software instructions on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) within the respective device. A device including the video encoder 200 and / or the video decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device, such as a mobile phone.

[0170] 1B is an illustrative diagram of an example video coding system 40 including the encoder 200 of FIG. 2 and / or the decoder 300 of FIG. 3 according to an example embodiment. System 40 may implement techniques of the present application, such as merge estimation with inter-prediction. In the illustrated implementation, video coding system 40 may include an imaging device 41, a video encoder 20, a video decoder 300 (and / or a video coder implemented via logic 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memory stores 44, and / or a display device 45.

[0171] As shown, imaging device 41, antenna 42, processing unit 46, logic circuitry 47, video encoder 20, video decoder 30, processor 43, memory store 44, and / or display device 45 may be in communication with one another. As explained, although both video encoder 200 and video decoder 30(0) are shown, video coding system 40 may include only video encoder 200 or only video decoder 300 in various practical scenarios.

[0172] As shown, in some examples, video coding system 40 may include antenna 42. Antenna 42 may be configured to transmit or receive, for example, an encoded bitstream of video data. Further, in some examples, video coding system 40 may include display device 45. Display device 45 may be configured to present the video data. As shown, in some examples, logic circuitry 47 may be implemented via 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, which may also include application specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, etc. In some examples, logic circuitry 47 may be implemented via hardware, dedicated video coding hardware, etc., and processor 43 may be implemented with general-purpose software, an operating system, etc. Furthermore, memory store 44 may be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.), or non-volatile memory (e.g., flash, etc.). In a non-limiting example, memory store 44 may be implemented by a cache memory. In some examples, logic circuitry 47 may access memory store 44 (e.g., for implementing an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include a memory store (e.g., a cache, etc.) for implementing an image buffer, etc.

[0173] In some examples, video encoder 200 implemented via logic circuitry may include an image buffer (e.g., via either processing unit 46 or memory store 44) and a graphics processing unit (e.g., via processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video encoder 200 implemented via logic circuitry 47 to embody various modules such as those described with respect to FIG. 2 and / or any other encoder system or subsystem described herein. The logic circuitry may be configured to perform various operations as discussed herein.

[0174] Video decoder 300 may be implemented in a manner similar to that implemented via logic circuitry 47 to embody various modules as described with respect to decoder 300 of FIG. 3 and / or any other decoder system or subsystem described herein. In some examples, video decoder 300 may be implemented via logic circuitry and may include an image buffer (e.g., via either processing unit 46 or memory store 44) and a graphics processing unit (e.g., via processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video decoder 300 implemented via logic circuitry 47 to embody various modules as described with respect to FIG. 3 and / or any other decoder system or subsystem described herein.

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

[0176] 2 is a block diagram illustrating an example of a video encoder 200 capable of implementing the techniques of the present application. The video encoder 200 can perform intra-coding and inter-coding of video blocks within video slices. Intra-coding relies on spatial prediction to reduce or remove spatial redundancy in video within a given video frame or picture. Inter-coding relies on temporal prediction to reduce or remove temporal redundancy in video within adjacent frames or pictures of a video sequence. Intra-mode (I-mode) may refer to any of several spatial-based coding modes. Inter-mode, such as unidirectional prediction (P-mode) or bidirectional prediction (B-mode), may refer to any of several temporal-based coding modes.

[0177] Figure 2 shows a schematic / conceptual block diagram of an example video encoder 200 configured to implement the techniques of this disclosure. In the example of Figure 2, the video encoder 200 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 210, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy coding unit 270. The prediction processing unit 260 may include an inter estimation unit 242, an inter prediction unit 244, an intra estimation unit 252, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may further include a motion compensation unit (not shown). The video encoder 200 shown in Figure 2 may also be referred to as a hybrid video encoder or a video encoder using a hybrid video codec.

[0178] 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 200, 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, where the backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 300 in FIG. 3).

[0179] The encoder 200 is configured to receive an image, e.g., a video or a series of images forming a video sequence, e.g., via an input 202, an image 201, or a block 203 of image 201. The image block 203 may also be called a current image block or an image block to be coded, and the image 201 may also be called a current image or an image to be coded (particularly in video coding to distinguish the current image from other images, e.g., previously coded and / or decoded images of the same video sequence, i.e., a video sequence that also includes the current image).

[0180] Partitioning

[0181] An embodiment of encoder 200 may include a partitioning unit (not shown in FIG. 2) configured to partition image 201 into a number of blocks, such as block 203, typically a number of non-overlapping blocks. The partitioning unit may be configured to use the same block size and corresponding grid defining the block size for all images in the video sequence, or to vary the block size among images or subsets or groups of images, and partition each image into corresponding blocks.

[0182] In HEVC and other video coding specifications, a set of coding tree units (CTUs) may be generated to generate a coded representation of an image. Each CTU may include a coding tree block for luma samples, two corresponding coding tree blocks for chroma samples, and syntax structures used to code the coding tree block samples. For monochrome images or images with three distinct color planes, a CTU may include a single coding tree block and syntax structures used to code the coding tree block samples. A coding tree block may be an N×N block of samples. A CTU may also be referred to as a "tree block" or "largest coding unit" (LCU). A CTU in HEVC may be roughly similar to a macroblock in other standards such as H.264 / AVC. However, a CTU is not necessarily limited to a particular size and may include one or more coding units (CUs). A slice may include an integer number of CTUs ordered consecutively in raster scan order.

[0183] In HEVC, CTUs are divided into CUs using a quadtree structure, denoted as a coding tree, to adapt to various local characteristics. The decision of whether to code an image region using inter-picture (temporal) or intra-picture (spatial) prediction is made at the CU level. A CU may include a coding block of luma samples and two corresponding coding blocks of chroma samples of the image, each having a luma sample array, a Cb sample array, and a Cr sample array, as well as syntax structures used to code the samples of the coding block. In monochrome images or images with three separate color planes, a CU may include a single coding block and syntax structures used to code the samples of the coding block. A coding block is an N×N block of samples. In some examples, a CU may be the same size as a CTU. Each CU is coded in one coding mode, which may be, for example, an intra-coding mode or an inter-coding mode. Other coding modes are also possible. The encoder 200 receives video data. The encoder 200 may encode each CTU within a slice of an image of video data. As part of encoding the CTU, the prediction processing unit 260 of the encoder 200 or another processing unit (including, but not limited to, the units of the encoder 200 shown in FIG. 2) may perform partitioning to divide the CTB of the CTU into progressively smaller blocks 203. The smaller blocks may be coding blocks of a CU.

[0184] The syntax data in the bitstream may also specify the size of the CTU. A slice includes multiple consecutive CTUs in coding order. A video frame, image, or picture can be partitioned into one or more slices. As described above, each treeblock can be divided into coding units (CUs) according to a quadtree. Generally, a quadtree data structure includes one node for each CU, with the root node corresponding to the treeblock (e.g., a CTU). If a CU is divided into four sub-CUs, the node corresponding to the CU includes four child nodes, with each child node corresponding to one of the sub-CUs. The nodes in the quadtree structure include leaf nodes and non-leaf nodes. Leaf nodes have no child nodes in the tree structure (i.e., leaf nodes are not further divided). The non-leaf nodes include the root node of the tree structure. For each non-root node of the nodes, the non-root node corresponds to a sub-CU of the CU corresponding to the parent node in the tree structure of the non-root node. Each non-leaf node has one or more child nodes in the tree structure.

[0185] Each node in the quadtree data structure can provide syntax data for the corresponding CU. For example, a node in the quadtree can include a split flag that indicates whether the CU corresponding to the node is split into sub-CUs. The syntax elements of a CU can be specified recursively and can depend on whether the CU is split into sub-CUs. If a CU is not split further, it is called a leaf CU. If a block of CUs is further split, it may generally be called a non-leaf CU. Each level of partitioning is a quadtree split into four sub-CUs. CUs in black are examples of leaf nodes (i.e., blocks that are not further split).

[0186] A CU has a similar purpose to a macroblock in the H.264 standard, except that a CU does not have a size distinction. For example, a treeblock can be divided into four child nodes (also called sub-CUs), and then each child node can become a parent node and be divided into another four child nodes. The last undivided child node, called a leaf node of the quadtree, contains a coding node, also called a leaf CU. Syntax data associated with the coded bitstream may specify the maximum number of times a treeblock is divided (called the maximum CU depth) and may also specify the minimum size of a coding node. Therefore, the bitstream may also specify a minimum coding unit (SCU). The term "block" is used to refer to either a CU, PU, or TU in the context of HEVC, or to similar data structures in the context of other standards (e.g., a macroblock and its sub-blocks in H.264 / AVC).

[0187] In HEVC, each CU can be further divided into one, two, or four PUs according to a PU partition type. Within one PU, the same prediction process is applied, and related information is transmitted to the decoder on a PU-by-PU basis. After obtaining a residual block by applying a prediction process based on the PU partition type, the CU can be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree of a CU. One important feature of the HEVC structure is the concept of multiple partitions, including CUs, PUs, and TUs. A PU can be partitioned to be non-square in shape. Syntax data related to a CU may also describe, for example, the partitioning of the CU into one or more PUs. A TU can be square or non-square (e.g., rectangular) in shape, and syntax data related to a CU may describe, for example, the partitioning of the CU into one or more TUs according to a quadtree. The partitioning mode may differ depending on whether the CU is coded in skip or direct mode, in intra prediction mode, or in inter prediction mode.

[0188] Versatile Video Coding (VVC) eliminates the separation of the concepts of PU and TU while supporting greater flexibility in CU partition shape. The size of a CU corresponds to the size of a coding node and can be square or non-square (e.g., rectangular) in shape. The size of a CU can range from 4x4 pixels (or 8x8 pixels) up to the size of a treeblock of 128x128 pixels or more (e.g., 256x256 pixels).

[0189] After encoder 200 generates a predictive block (e.g., luma, Cb, and Cr predictive blocks) for a CU, encoder 200 may generate a residual block for the CU. For example, encoder 100 may generate a luma residual block for the CU. Each sample in the luma residual block for the CU indicates a difference between a luma sample in the predictive luma block for the CU and a corresponding sample in the original luma coding block for the CU. Further, encoder 200 may generate a Cb residual block for the CU. Each sample in the Cb residual block for the CU may indicate a difference between a Cb sample in the predictive Cb block for the CU and a corresponding sample in the original Cb coding block for the CU. Encoder 100 may also generate a Cr residual block for the CU. Each sample in the Cr residual block for the CU may indicate a difference between a Cr sample in the predictive Cr block for the CU and a corresponding sample in the original Cr coding block for the CU.

[0190] In some examples, encoder 100 skips applying a transform to a transform block. In such examples, encoder 200 may process residual sample values in the same manner as transform coefficients. Thus, in examples in which encoder 100 skips applying a transform, the following description of transform coefficients and coefficient blocks may be applicable to transform blocks of residual samples.

[0191] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the encoder 200 may quantize the coefficient block to possibly reduce the amount of data used to represent the coefficient block, potentially providing further compression. Quantization generally refers to a process in which a range of values is compressed into a single value. After the encoder 200 quantizes the coefficient block, the encoder 200 may entropy code syntax elements that indicate the quantized transform coefficients. For example, the encoder 200 may perform context-adaptive binary arithmetic coding (CABAC) or other entropy coding techniques on the syntax elements that indicate the quantized transform coefficients.

[0192] The encoder 200 can output a bitstream of coded image data 271, which includes a sequence of bits that form a representation of the coded image and associated data. Thus, the bitstream includes a coded representation of the video data.

[0193] In J. An et al., "Block partitioning structure for next generation video coding," International Telecommunication Union, COM16-C966, September 2015 (hereinafter referred to as "VCEG Proposal COM16-C966"), a quadtree-binary tree (QTBT) partitioning technique was proposed for future video coding standards beyond HEVC. Simulations show that the proposed QTBT structure is more efficient than the HEVC quadtree structure used. HEVC restricts inter-prediction for small blocks to reduce memory access for motion compensation. Therefore, bidirectional prediction is not supported for 4x8 and 8x4 blocks, and inter-prediction is not supported for 4x4 blocks. JEM's QTBT removes these restrictions.

[0194] In QTBT, a CU can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quadtree structure. The quadtree leaf nodes can be further partitioned by a binary tree structure. There are two types of binary tree partitioning: horizontal symmetric partitioning and vertical symmetric partitioning. In either case, the node is divided by splitting it horizontally or vertically in the middle. The binary tree leaf node is called a coding unit (CU), and its segmentation is used for prediction and transform processes without further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. A CU may be composed of coding blocks (CBs) of different color components, for example, in the case of P slices and B slices in 4:2:0 chroma format, one CU contains one luma CB and two chroma CBs, or may be composed of CBs of a single component, for example, in the case of an I slice, one CU contains only one luma CB (b) or only two chroma CBs.

[0195] The following parameters are defined for the QTBT partitioning scheme:

[0196] - CTU size: Root node size of the quadtree, same concept as HEVC.

[0197] - MinQT Size: Minimum allowed quadtree leaf node size.

[0198] - MaxBT size: Maximum allowed binary tree root node size.

[0199] - MaxBT Depth: The maximum allowed binary tree depth.

[0200] MinBT size: The minimum allowed binary tree leaf node size.

[0201] In one example of a QTBT partitioning structure, the CTU size is set as 128x128 luma samples containing two corresponding 64x64 blocks of chroma samples, the MinQT size is set as 16x16, the MaxBT size is set as 64x64, the MinBT size (both width and height) is set as 4x4, and the MaxBT depth is set as 4. First, quadtree partitioning is applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes can have sizes from 16x16 (i.e., the MinQT size) to 128x128 (i.e., the CTU size). If a quadtree node has a size equal to the MinQT size, no further quadtrees are considered. If a quadtree leaf node is 128x128, it will not be further partitioned by binary trees because its size exceeds the MaxBT size (i.e., 64x64). Otherwise, the leaf quadtree node may be further partitioned by binary trees. Therefore, a quadtree leaf node is also the root node of the binary tree, which has a binary tree depth of 0. When the binary tree depth reaches the MaxBT depth (i.e., 4), no further splits are considered. When a binary tree node has a width equal to the MinBT size (i.e., 4), no further horizontal splits are considered. Similarly, when a binary tree node has a height equal to the MinBT size, no further vertical splits are considered. The leaf nodes of a binary tree are further processed by prediction and transform processes without further partitioning. In JEM, the maximum CTU size is 256x256 luma samples. The leaf nodes of a binary tree (CU) can be further processed (e.g., by performing prediction and transform processes) without further partitioning.

[0202] Furthermore, the QTBT scheme supports the ability for luma and chroma to have separate QTBT structures. Currently, for P slices and B slices, the luma CTB and chroma CTB in one CTU may share the same QTBT structure. However, for I slices, the luma CTB may be partitioned into CUs by a QTBT structure, and the chroma CTB may be partitioned into chroma CUs by a different QTBT structure. This means that a CU in an I slice consists of a coding block for a luma component or a coding block for two chroma components, and a CU in a P slice or B slice consists of coding blocks for all three color components.

[0203] The encoder 200 applies a rate-distortion optimization (RDO) process to the QTBT structure to determine the block partitioning.

[0204] Furthermore, a block partitioning structure named Multi-Type Tree (MTT) has been proposed in U.S. Patent Application Publication No. 2017 / 0208336 to replace the QT-, BT-, and / or QTBT-based CU structures. The MTT partitioning structure is still a recursive tree structure. In MTT, multiple different partitioning structures (e.g., three or more) are used. For example, according to the MTT technique, three or more different partitioning structures may be used for each non-leaf node of the tree structure at each depth of the tree structure. The depth of a node in the tree structure may refer to the length of the path from the node to the root of the tree structure (e.g., the number of partitions). The partitioning structure may generally refer to how many different blocks a block can be divided into. The partitioning structures may be such that a quadtree partitioning structure may divide a block into four blocks, a binary tree partitioning structure may divide a block into two blocks, a ternary tree partitioning structure may divide a block into three blocks, and a ternary tree partitioning structure may be a structure that may not divide a block in the middle. A partition structure can have several different partition types, which can further define how the blocks are divided, including symmetric or asymmetric partitioning, uniform or non-uniform partitioning, and / or horizontal or vertical partitioning.

[0205] In MTT, at each depth of the tree structure, the encoder 200 may be configured to further partition the subtree using a specific partition type from among three more partitioning structures. For example, the encoder 100 may be configured to determine a specific partition type from QT, BT, ternary tree (TT), and other partitioning structures. In one example, the QT partitioning structure may include a square quadtree or rectangular quadtree partitioning type. The encoder 200 may use square quadtree partitioning to partition a square block by dividing the block into four equally sized square blocks along its center both horizontally and vertically. Similarly, the encoder 200 may use rectangular quadtree partitioning to partition a rectangular (e.g., non-square) block by dividing the rectangular block into four equally sized rectangular blocks along its center both horizontally and vertically.

[0206] The BT partitioning structure may include at least one of a horizontally symmetric binary tree, a vertically symmetric binary tree, a horizontally asymmetric binary tree, or a vertically asymmetric binary tree partition type. In the case of the horizontally symmetric binary tree partition type, the encoder 200 may be configured to divide the block horizontally along the center of the block into two symmetric blocks of the same size. In the case of the vertically symmetric binary tree partition type, the encoder 200 may be configured to divide the block vertically along the center of the block into two symmetric blocks of the same size. In the case of the horizontally asymmetric binary tree partition type, the encoder 100 may be configured to divide the block horizontally into two blocks of different sizes. For example, one block may be 1 / 4 the size of the parent block, and the other block may be 3 / 4 the size of the parent block, similar to the PART_2N×nU or PART_2N×nD partition type. In the case of the vertically asymmetric binary tree partition type, the encoder 100 may be configured to divide the block vertically into two blocks of different sizes. For example, one block may be 1 / 4 the size of the parent block, and the other block may be 3 / 4 the size of the parent block, similar to a PART_nL×2N or PART_nR×2N partition type. In another example, an asymmetric binary tree partition type may divide a parent block into fractions of different sizes. For example, one sub-block may be 3 / 8 the size of the parent block, and the other sub-block may be 5 / 8 the size of the parent block. Of course, such partition types may be either vertical or horizontal.

[0207] The TT partition structure differs from the partitioning of QT or BT structures in that the TT partition structure does not split blocks down the middle. The central regions of the blocks remain together in the same subblock. Unlike QT, which produces four blocks, or a binary tree, which produces two blocks, a division according to the TT partition structure produces three blocks. Examples of partition types according to the TT partition structure include symmetric partition types (both horizontally and vertically) and asymmetric partition types (both horizontally and vertically). Furthermore, the symmetric partition type according to the TT partition structure can be irregular / uneven or regular / uniform. The asymmetric partition type according to the TT partition structure is irregular / uneven. In one example, the TT partition structure may include at least one of the following partition types: horizontal regular / uniform symmetric ternary tree, vertical regular / uniform symmetric ternary tree, horizontal irregular / ununiform symmetric ternary tree, vertical irregular / ununiform symmetric ternary tree, horizontal irregular / ununiform asymmetric ternary tree, or vertical irregular / ununiform asymmetric ternary tree partition type.

[0208] In general, an irregular / non-uniform symmetric ternary tree partition type is a partition type that is symmetric about the centerline of the block, but at least one of the three resulting blocks is not the same size as the other two. One preferred example is when the side blocks are 1 / 4 the size of the block and the center block is 1 / 2 the size of the block. A regular / uniform symmetric ternary tree partition type is a partition type that is symmetric about the centerline of the block, and all resulting blocks are the same size. Such partitions are possible when the height or width of the block is a multiple of three, depending on the vertical or horizontal division. An irregular / non-uniform asymmetric ternary tree partition type is a partition type that is not symmetric about the centerline of the block, and at least one of the resulting blocks is not the same size as the other two.

[0209] In examples where a block (e.g., at a subtree node) is divided into an asymmetric ternary tree partition type, the encoder 200 and / or decoder 300 apply a constraint that two of the three partitions have the same size. Such a constraint may correspond to a constraint that the encoder 200 must follow when encoding video data. Furthermore, in some examples, the encoder 200 and decoder 300 may apply a constraint that, when dividing according to an asymmetric ternary tree partition type, the sum of the areas of two partitions is equal to the area of the remaining partition.

[0210] In some examples, the encoder 200 may be configured to select from among all of the aforementioned partition types for each of the QT, BT, and TT partition structures. In other examples, the encoder 200 may be configured to determine only a partition type from among a subset of the aforementioned partition types. For example, a subset of the partition types discussed above (or other partition types) may be used for a particular block size or a particular depth of the quadtree structure. The subset of supported partition types may be signaled in the bitstream for use by the decoder 200, or may be pre-defined so that the encoder 200 and decoder 300 can determine the subset without signaling.

[0211] In another example, the number of supported partitioning types may be fixed for all depths of all CTUs. That is, the encoder 200 and decoder 300 may be pre-configured to use the same number of partitioning types for any depth of CTUs. In other examples, the number of supported partitioning types may vary and may depend on the depth, slice type, or other previously coded information. In one example, at depth 0 or depth 1 of the tree structure, only the QT partitioning structure is used. At depths greater than 1, each of the QT, BT, and TT partitioning structures may be used.

[0212] In some examples, the encoder 200 and / or decoder 300 may apply pre-configured constraints on the supported partitioning types to avoid overlapping partitioning for specific regions of a video image or CTU. In one example, when a block is partitioned using an asymmetric partition type, the encoder 200 and / or decoder 300 may be configured to not further divide the largest sub-block divided from the current block. For example, when a square block is partitioned according to an asymmetric partition type (similar to the PART_2N×nU partition type), the largest sub-block of all sub-blocks (similar to the largest sub-block in the PART_2N×nU partition type) is annotated leaf node and cannot be further divided. However, smaller sub-blocks (similar to the smaller sub-blocks in the PART_2N×nU partition type) can be further divided.

[0213] As another example of how constraints may be applied to supported partitioning types to avoid overlapping partitioning for a particular region, when a block is partitioned with an asymmetric partition type, the largest sub-block divided from the current block cannot be further divided in the same direction. For example, when a square block is partitioned with an asymmetric partition type (similar to the PART_2N×nU partition type), the encoder 200 and / or decoder 300 may be configured to not divide the largest sub-block of all sub-blocks (similar to the largest sub-block of the PART_2N×nU partition type) horizontally.

[0214] As another example of applying constraints to the supported partitioning types to avoid further partitioning difficulties, the encoder 200 and / or decoder 300 may be configured to not split a block either horizontally or vertically if the width / height of the block is not a power of two (e.g., if the width / height is not 2, 4, 8, 16, etc.).

[0215] The above examples illustrate how the encoder 200 can be configured to perform MTT partitioning. The decoder 300 can then apply the same MTT partitioning performed by the encoder 200. In some examples, how a picture of the video data was partitioned by the encoder 200 can be determined by applying the same set of predefined rules in the decoder 300. However, in many situations, the encoder 200 can determine the particular partition structure and partition type to use based on the rate-distortion criteria of the particular picture of the video data being coded. Thus, in order for the decoder 300 to determine the partitioning for a particular picture, the encoder 200 can signal syntax elements in the encoded bitstream that indicate how the picture and the CTUs of the picture should be partitioned. The decoder 200 can parse such syntax elements and partition the picture and the CTUs accordingly.

[0216] In one example, prediction processing unit 260 of video encoder 200 may be configured to perform any combination of the above partitioning techniques, particularly for motion estimation, as described in more detail below.

[0217] Similar to image 201, block 203 can also be considered as a two-dimensional array or matrix of samples having intensity values (sample values), albeit with smaller dimensions than image 201. In other words, block 203 may include, for example, one sample array (e.g., a luma array in the case of monochrome image 201), or three sample arrays (e.g., a luma array and two chroma arrays in the case of color image 201), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axial directions) of block 203 defines the size of block 203.

[0218] An encoder 200 as shown in FIG. 2 is arranged to encode an image 201 block by block, for example encoding and prediction is performed block by block 203 .

[0219] Residual calculation

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

[0221] conversion

[0222] The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in a transform domain. The transform coefficients 207, which may also be referred to as transform residual coefficients, represent the residual block 205 in the transform domain.

[0223] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for HEVC / H.265. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a particular factor. To maintain the norm of the residual blocks processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is typically selected based on particular constraints, such as a scaling factor that is a power of two for a shift operation, the bit depth of the transform coefficients, or a trade-off between accuracy and implementation cost. For example, a particular scaling factor is specified for an inverse transform, e.g., by the inverse transform processing unit 212 in the decoder 300 (and a corresponding inverse transform, e.g., by the inverse transform processing unit 212 in the decoder 300), and a corresponding scaling factor for a forward transform, e.g., by the transform processing unit 206 in the encoder 200, can be specified accordingly.

[0224] quantization

[0225] 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 the 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 changed by adjusting a quantization parameter (QP). For example, in the case of scalar quantization, various scalings may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, and a larger quantization step size corresponds to coarser quantization. An applicable quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size), and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include division by the quantization step size and a corresponding inverse inverse quantization, e.g., multiplication by the quantization step size, e.g., by inverse quantization 210. Some standards, e.g., HEVC, embodiments may be configured to use the quantization parameter to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation involving division. To recover the norm of the residual block, an additional scaling factor may be introduced in the quantization and inverse quantization, which may change due to the scaling used in the fixed-point approximation of the quantization step size and quantization parameter equations. In one example implementation, the scaling of the inverse transform and the inverse quantization may be combined. Alternatively, customized quantization tables may be used and signaled, e.g., in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and the loss increases with increasing quantization step size.

[0226] Inverse quantization unit 210 applies the inverse quantization of quantization unit 208 to the quantized coefficients, based on or using the same quantization step size as quantization unit 208, to obtain inverse quantized coefficients 211, e.g., by applying the inverse of the quantization scheme applied by quantization unit 208. The inverse quantized coefficients 211 may also be referred to as dequantized residual coefficients 211, and correspond to transform coefficients 207, although they are typically not identical to the transform coefficients due to loss in quantization.

[0227] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (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 transform inverse quantization block 213 or an inverse transform residual block 213.

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

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

[0230] Embodiments of encoder 200 may be configured, for example, such that buffer unit 216 is used not only for storing reconstructed blocks 215 for intra prediction 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. Further embodiments may be configured to use filtered blocks 221 and / or blocks or samples from decoded picture buffer 230 (both not shown in FIG. 2) as input or basis for intra prediction 254.

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

[0232] Embodiments of the encoder 200 (respectively, loop filter unit 220) may be configured to output direct or entropy-coded loop filter parameters (such as sample adaptive offset information), e.g., via the entropy encoding unit 270 or any other entropy coding unit, so that, e.g., the decoder 300 can receive and apply the same loop filter parameters for decoding.

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

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

[0235] The mode selection unit 262 may be configured to select a prediction mode (e.g., intra or inter prediction mode) and / or the corresponding prediction block 245 or 255 to be used as the prediction block 265 for the calculation of the residual block 205 and for the reconstruction of the reconstructed block 215.

[0236] Embodiments of mode selection unit 262 may be configured to select a prediction mode (e.g., from modes supported by prediction processing unit 260) that provides the best match, in other words, the smallest residual (smallest residual means better compression for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or consider or balance both. Mode selection unit 262 may be configured to determine the prediction mode based on rate-distortion optimization (RDO), i.e., to select a prediction mode that provides the smallest rate-distortion optimization, or whose associated rate-distortion at least meets a prediction mode selection criterion.

[0237] The prediction processing (eg, prediction processing unit 260 and mode selection (eg, by mode select unit 262)) performed by example encoder 200 is described in more detail below.

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

[0239] The intra-prediction mode set may include 35 different intra-prediction modes, e.g., omni-directional modes such as DC (i.e., average) mode and planar mode, or directional modes (e.g., as specified in H.265), or may include 67 different intra-prediction modes, omni-directional modes such as DC (i.e., average) mode and planar mode, or directional modes (e.g., as specified in H266, which is currently under development).

[0240] The set (or possible) inter prediction modes depends on the available reference images (i.e., previous at least partially decoded images, e.g., images stored in DBP 230) and other inter prediction parameters, such as whether the entire reference image or only a portion of the reference image (e.g., a search window area around the area of the current block in the reference image) is used to search for the best matching reference block, and / or whether pixel interpolation, e.g., half / semi-pel and / or quarter-pel interpolation, is or is not applied.

[0241] In addition to the above prediction modes, skip mode and / or direct mode can be applied.

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

[0243] The inter-prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (not shown in FIG. 2). The motion estimation unit is configured to receive or obtain the image block 203 (the current image block 203 of the current image 201) and the decoded image 331, or at least one or more previously reconstructed blocks, such as reconstructed blocks of one or more other / different previously decoded images 331 for motion estimation. For example, a video sequence may include the current image and the previously decoded image 331; in other words, the current image and the previously decoded image 331 may be part of or form a sequence of images forming a video sequence. The encoder 200 may be configured, for example, to select a reference block from multiple reference blocks of the same or different images among multiple other images and provide a reference image (or reference image index, . . . ) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter-prediction parameter to the motion estimation unit (not shown in FIG. 2). This offset is also called a motion vector (MV). Merging is an important motion estimation tool used in HEVC and carried over to VCC. To perform merge estimation, a merge candidate list must first be created, where each candidate includes information on whether one or two reference image lists are used, as well as all motion data, including reference indexes and motion vectors for each list. The merge candidate list is created based on a. up to four spatial merge candidates derived from five spatially adjacent blocks, b. one temporal merge candidate derived from two temporally co-located blocks, and c. additional merge candidates including combined bi-prediction candidates and zero motion vector candidates.

[0244] The intra prediction unit 254 is further configured to determine intra prediction parameters, e.g., a selected intra prediction mode, based on the intra prediction block 255. In either case, after selecting the intra prediction mode for the block, the intra prediction unit 254 is also configured to provide the intra prediction parameters, i.e., information indicating the selected intra prediction mode for the block, to the entropy coding unit 270. In one example, the intra prediction unit 254 may be configured to perform any combination of the intra prediction techniques described below.

[0245] The entropy encoding unit 270 is configured to apply an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CALVC), an arithmetic coding scheme, a context-adaptive binary arithmetic coding (CABAC), a syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy encoding method or technique) to the quantized residual coefficients 209, the inter-prediction parameters, the intra-prediction parameters, and / or the loop filter parameters, individually or jointly (or all together) to obtain coded image data 21, which can be output by output 272, e.g., in the form of a coded bitstream 21. The coded bitstream 271 may be transmitted to the video decoder 30 or archived for later transmission or retrieval by the video decoder 30. The entropy encoding unit 270 may further be configured to entropy encode other syntax elements of the current video slice being coded.

[0246] Other structural variations of the video encoder 200 may be used to encode the video stream. For example, a non-transform-based encoder 200 may directly quantize the residual signal for a particular block or frame, without the transform processing unit 206. In another implementation, the encoder 200 may combine the quantization unit 208 and the inverse quantization unit 210 into a single unit.

[0247] 3 shows an example video decoder 300 configured to implement the techniques of the present application. Video decoder 300 is configured to receive coded image data (e.g., coded bitstream) 271, e.g., coded by encoder 200, to obtain decoded image 331. During the decoding process, video decoder 300 receives video data from video encoder 200, e.g., coded video bitstream representing image blocks of coded video slices and associated syntax elements.

[0248] 3, the decoder 300 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 image buffer 330, and a prediction processing unit 360. The prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. The video decoder 300, in some examples, performs a decoding path that is approximately the reverse of the encoding path described with respect to the video encoder 200 according to FIG.

[0249] The entropy decoding unit 304 is configured to perform entropy decoding on the coded image data 271 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), e.g., any or all of (decoded) inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 is further configured to forward the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the prediction processing unit 360. The video decoder 300 may receive syntax elements at a video slice level and / or a video block level.

[0250] The inverse quantization unit 310 may be functionally identical to the inverse quantization unit 110, the inverse transform processing unit 312 may be functionally identical to the inverse transform processing unit 112, the reconstruction unit 314 may be functionally identical to the reconstruction unit 114, the buffer 316 may be functionally identical to the buffer 116, the loop filter 320 may be functionally identical to the loop filter 120, and the decoded image buffer 330 may be functionally identical to the decoded image buffer 130.

[0251] Prediction processing unit 360 may include inter prediction unit 344 and intra prediction unit 354, where inter prediction unit 344 may be similar in function to inter prediction unit 1 / 44 and intra prediction unit 354 may be similar in function to intra prediction unit 154. Prediction processing unit 360 is typically configured to perform block prediction and / or obtain prediction blocks 365 from coded data 21, and to receive or obtain (explicitly or implicitly) prediction-related parameters and / or information regarding a selected prediction mode from, for example, entropy decoding unit 304.

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

[0253] Prediction processing unit 360 is configured to determine prediction information for video blocks of the current video slice by analyzing motion vectors and other syntax elements, and 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- or inter-prediction) used to code the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information of one or more reference image lists of the slice, the motion vectors of each inter-coded video block of the slice, the inter-prediction status of each inter-coded video block of the slice, and other information for decoding the video blocks of the current video slice.

[0254] Inverse quantization unit 310 is configured to inverse quantize, or de-quantize, the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 100 for each video block in a video slice to determine the degree of quantization, and similarly, the degree of dequantization to apply.

[0255] 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 pixel domain.

[0256] 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 the reconstructed block 315 in the sample domain.

[0257] Loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter reconstructed block 315 to obtain filtered block 321, e.g., to smooth pixel transitions or otherwise improve video quality. In one example, loop filter unit 320 may be configured to perform any combination of the filtering techniques described below. Loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or other filters, e.g., a bilateral filter or an adaptive loop filter (ALF), or a sharpening or smoothing filter or a collaborative filter. While loop filter unit 320 is shown in FIG. 3 as an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.

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

[0259] The decoder 300 is arranged to output the decoded image 311, for example via an output 312, for presentation or display to a user.

[0260] Other variations of the video decoder 300 can be used to decode the compressed bitstream. For example, the decoder 300 can generate an output video stream without the loop filtering unit 320. For example, the non-transform-based decoder 300 can directly inverse quantize the residual signal for a particular block or frame without the inverse transform processing unit 312. In another implementation, the video decoder 300 can combine the inverse quantization unit 310 and the inverse transform processing unit 312 into a single unit.

[0261] 4 is a schematic diagram of a network device 400 (e.g., a coding device) according to one embodiment of the present disclosure. Network device 400 is suitable for implementing the disclosed embodiments described herein. In one embodiment, network device 400 may be a decoder, such as video decoder 300 of FIG. 1A, or an encoder, such as video encoder 200 of FIG. 1A. In one embodiment, network device 400 may be one or more components of video decoder 300 of FIG. 1A or video encoder 200 of FIG. 1A, as described above.

[0262] The network device 400 includes an input port 410 and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing the data, a transmitter unit (Tx) 440 and an output port 450 for transmitting the data, and a memory 460 for storing the data. The network device 400 may also include optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to the input port 410, the receiver unit 420, the transmitter unit 440, and the output port 450 for inputting or outputting optical or electrical signals.

[0263] The processor 430 is implemented in hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 is in communication with the input port 410, the receiver unit 420, the transmitter unit 440, the output port 450, and the memory 460. The processor 430 includes a coding module 470. The coding module 470 implements the above-disclosed embodiments. For example, the coding module 470 performs, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 provides substantial improvements to the functionality of the network device 400 and results in the transformation of the network device 400 into different states. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.

[0264] Memory 460 may include one or more disks, tape drives, and solid state drives, may be used as overflow data storage, may store programs when such programs are selected for execution, and may store instructions and data read during the execution of programs. 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).

[0265] 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of source device 12 and destination device 14 according to FIG. 1A, according to an exemplary embodiment. Apparatus 500 is capable of implementing the techniques of the present application. Apparatus 500 may be in the form of a computing system including multiple computing devices, or in the form of a single computing device, such as a mobile phone, tablet computer, laptop computer, notebook computer, desktop computer, etc.

[0266] Processor 502 in device 500 may be a central processing unit. Alternatively, processor 502 may be any other type of device, or multiple devices, now existing or later developed, capable of manipulating or processing information. While various disclosed embodiments may be implemented with a single processor, such as processor 502, as shown, advantages of speed and efficiency may be achieved using multiple processors.

[0267] The memory 504 in the device 500 may, in embodiments, be a read-only memory (ROM) device or a random-access memory (RAM) device. Other suitable types of storage devices may be used as the memory 504. The memory 504 may include code and data 506 accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which 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 also include additional memory in the form of secondary storage 514, which may be, for example, a memory card used with a mobile computing device. Because video communication sessions may contain a significant amount of information, the sessions may be stored in whole or in part in the secondary storage 514 and loaded into the memory 504 as needed for processing.

[0268] Device 500 may also include one or more output devices, such as a display 518. Display 518, in one example, may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. Display 518 may be coupled to processor 502 via bus 512. Other output devices that enable a user to program or otherwise use device 500 may be provided in addition to, or as an alternative to, display 518. When an output device is or includes a display, the display may be implemented in a variety of ways, including 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.

[0269] Device 500 may also include or be in communication with image sensing device 520, such as a camera or any other now existing or later developed image sensing device 520 that is capable of sensing images, such as an image of a user operating device 500. Image sensing device 520 may be positioned to be pointed toward a user operating device 500. In one example, the position and optical axis of image sensing device 520 is such that the field of view is immediately adjacent to display 518 and includes an area from which display 518 is viewable.

[0270] Device 500 may also include or communicate with a sound sensing device 522, such as a microphone or any other now existing or later developed sound sensing device that can sense sounds near device 500. Sensing device 522 may be positioned to face a user operating device 500 and may be configured to receive sounds, such as voice or other utterances, made by the user while the user is operating device 500.

[0271] While FIG. 5 depicts the processor 502 and memory 504 of device 500 as integrated into a single unit, other configurations may be utilized. The operations of processor 502 may be distributed across multiple machines (each having one or more processors) that may be directly coupled or coupled via a local area or other network. Memory 504 may be distributed across multiple machines, such as a network-based memory or memory within multiple machines that perform the operations of device 500. While shown here as a single bus, bus 512 of device 500 may be comprised of multiple buses. Furthermore, secondary storage 514 may be directly coupled to other components of device 500 or may be accessible over a network, and 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.

[0272] In 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array. The nominal relative vertical and horizontal positions of the luma and chroma samples within the image are shown in Figure 6A.

[0273] 8 is a conceptual diagram illustrating an example location where scaling parameters used to scale a downsampled, reconstructed luma block are derived. For example, FIG. 8 shows an example of 4:2:0 sampling, where the scaling parameters are α and β.

[0274] In general, when the LM prediction mode is applied, the video encoder 20 and the video decoder 30 may invoke the following steps: The video encoder 20 and the video decoder 30 may downsample neighboring luma samples. The video encoder 20 and the video decoder 30 may derive linear parameters (i.e., α and β) (also called scaling parameters). The video encoder 20 and the video decoder 30 may downsample the current luma block and derive a prediction (e.g., a prediction block) from the downsampled luma block and the linear parameters. There are various ways to perform downsampling.

[0275] 6B is a conceptual diagram illustrating an example of luma and chroma positions for downsampling samples of a luma block to generate a prediction block of the chroma block. As shown in FIG. 6B, a chroma sample represented by a filled (i.e., solid black) triangle is predicted from two luma samples represented by two filled circles by applying a [1, 1] filter. The [1, 1] filter is an example of a 2-tap filter.

[0276] 6C is a conceptual diagram illustrating another example of luma and chroma positions for downsampling samples of a luma block to generate a prediction block. As shown in FIG. 6C, a chroma sample represented by a filled (i.e., solid black) triangle is predicted from six luma samples represented by six filled circles by applying a 6-tap filter.

[0277] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, including any medium that facilitates transfer of a computer program from one place to another, for example, according to a communications protocol. As such, computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0278] Video compression techniques such as motion compensation, intra prediction, and loop filters have proven effective and have thus been adopted in various video coding standards, such as H.264 / AVC and H.265 / HEVC. Intra prediction can be used when no reference picture is available or when inter-predictive coding is not used for the current block or image, for example, in an I-frame or I-slice. Reference samples for intra prediction are usually derived from previously coded (i.e., reconstructed) neighboring blocks within the same image. For example, in both H.264 / AVC and H.265 / HEVC, boundary samples of neighboring blocks are used as references for intra prediction. There are many different intra prediction modes to cover different texture or structural characteristics. Each mode uses a different prediction signal derivation method. For example, as shown in FIG. 6D, H.265 / HEVC supports a total of 35 intra prediction modes.

[0279] Explanation of the intra prediction algorithm in H.265 / HEVC

[0280] For intra prediction, the decoded boundary samples of neighboring blocks are used as references. The encoder selects the best luma intra prediction mode (i.e., the mode that provides the most accurate prediction for the current block) for each block from 35 options (33 directional prediction modes, DC mode, and planar mode). The mapping between intra prediction directions and intra prediction mode numbers is specified in FIG. 6D. It should be noted that in the latest video coding technologies, such as VVC (Versatile Video Coding), more than 65 intra prediction modes have been developed, and VVC (Versatile Video Coding) can capture any edge direction presented in natural video. Among these prediction modes, a mode with a horizontal direction (e.g., mode 10 in FIG. 6D) is also called a "horizontal mode," and a mode with a vertical direction (e.g., mode 26 in FIG. 6D) is also called a "vertical mode."

[0281] Figure 7 shows the reference samples of a block. As shown in Figure 7, block "CUR" is the current block to be predicted, and the dark samples along the boundaries of the current block are reference samples used to predict the current block. These reference samples are samples in reconstructed blocks adjacent to the current block, also called neighboring blocks. Block "CUR" can be a luma block or a chroma block depending on the type of block to be predicted. The prediction signal can be derived by mapping the reference samples according to a specific method indicated by the intra prediction mode.

[0282] Substituting the reference sample

[0283] Some or all of the reference samples may be unavailable for intra prediction for several reasons. For example, samples outside a picture, slice, or tile are considered unavailable for prediction. Furthermore, when constrained intra prediction is enabled, reference samples belonging to inter-predicted PUs are omitted to avoid error propagation from previous pictures that may have been erroneously received and reconstructed. As used herein, a reference sample for a current coding block is available if it is not outside the current picture, slice, or tile; if the reference sample was reconstructed before the current coding block was decoded; and / or if the reference sample was not omitted due to a coding decision at the encoder. In HEVC, all prediction modes can be used after replacing unavailable reference samples. In the extreme case where no reference samples are available, all reference samples are replaced with the nominal average sample value for a given bit depth (e.g., 128 for 8-bit data). If there is at least one reference sample marked as available for intra prediction, the unavailable reference sample is replaced using an available reference sample. Unavailable reference samples are replaced by scanning the reference samples clockwise and using the latest available sample value for the unavailable sample. If the first sample in the clockwise scan is unavailable, the unavailable reference sample is replaced with the first available reference sample encountered when scanning the samples in clockwise order. Here, "replacement" may also be referred to as padding, and the replaced sample may also be referred to as a padded sample.

[0284] Constrained Intra Prediction

[0285] Constrained intra prediction is a tool to avoid spatial noise propagation caused by spatial intra prediction using encoder-decoder mismatched reference pixels. Encoder-decoder mismatched reference pixels can occur when packet loss occurs during the transmission of inter-coded slices. They can also occur when lossy decoder-side memory compression is used. When constrained intra prediction is enabled, inter-predicted samples are marked as unavailable or unavailable for intra prediction, and these unavailable samples can be padded using the padding methods described above to achieve full intra prediction estimation at the encoding side or intra prediction at the decoding side.

[0286] Cross-Component Linear Model Prediction (CCLM)

[0287] Cross-component linear model prediction (CCLM), also known as cross-component intra prediction (CCIP), is a type of intra prediction mode used to reduce cross-component redundancy during intra prediction mode. Figure 8 (including Figures 8A and 8B) is a schematic diagram illustrating an example of a mechanism for performing CCLM intra prediction. Figure 8 illustrates an example of 4:2:0 sampling. Figure 8 illustrates an example of the locations of samples of a current block and its neighboring samples to the left and top in CCLM mode. The white squares are samples of the current block, and the shaded circles are reconstructed samples of neighboring blocks. Figure 8A illustrates an example of neighboring reconstructed pixels of a chroma block. Figure 8B illustrates an example of neighboring reconstructed pixels of a co-located luma block. When the video format is YUV4:2:0, there is then one 16x16 luma block and two 8x8 chroma blocks.

[0288] CCLM intra prediction may be performed by the intra estimation unit 254 of the encoder 200 and / or the intra prediction unit 354 of the decoder 300. CCLM intra prediction predicts a chroma sample 803 within a chroma block 801. The chroma sample 803 occurs at an integer position, indicated by a square. The prediction is based in part on neighboring reference samples, indicated by a black circle. The chroma sample 803 is not predicted solely based on the neighboring chroma reference sample 805. The chroma sample 803 is also predicted based on a luma reference sample 813 and a neighboring luma reference sample 815. Specifically, a CU includes a luma block 811 and two chroma blocks 801. A model is generated that correlates the chroma sample 803 and the luma reference sample 813 within the same CU. The linear coefficients of the model are determined by comparing the neighboring luma reference sample 815 to the neighboring chroma reference sample 805.

[0289] When the luma reference sample 813 is reconstructed, the luma reference sample 813 is denoted as a reconstructed luma sample (Rec'L). When the adjacent chroma reference sample 805 is reconstructed, the adjacent chroma reference sample 805 is denoted as a reconstructed adjacent chroma sample (Rec'C).

[0290] As shown, luma block 811 contains four times as many samples as chroma block 801. In the example shown in FIG. 8, chroma block 801 contains N×N samples, while luma block 811 contains 2N×2N samples. Thus, luma block 811 has four times the resolution of chroma block 801. For prediction to operate on luma reference sample 813 and adjacent luma reference sample 815, luma reference sample 813 and adjacent luma reference sample 815 are downsampled to provide an accurate comparison with adjacent chroma reference sample 805 and chroma sample 803. Downsampling is the process of reducing the resolution of a group of sample values. For example, if the YUV4:2:0 format is used, luma samples may be downsampled by a factor of four (e.g., 2 in width and 2 in height). YUV is a color encoding system that uses a color space in terms of a luma component Y and two chrominance components U and V.

[0291] In CCLM prediction, chroma samples are predicted based on the downsampled corresponding reconstructed luma samples (current luma block) using a linear model as follows: pred C (i,j)=α·rec L '(i,j)+β (1) where pred C (i,j) represents the predicted chroma sample, and rec' L (i,j) represents the corresponding downsampled reconstructed luma sample. The parameters α and β can be derived by minimizing the regression error between the reconstructed neighboring luma and chroma samples around the current luma block and the current chroma block, as follows: α=(N·Σ(L(n)·C(n))-ΣL(n)·ΣC(n)) / (N·Σ(L(n)·L(n))-ΣL(n)·ΣL(n)) (2) β=(ΣC(n)-α·ΣL(n)) / N (3) where L(n) represents the downsampled reconstructed neighboring luma samples above and to the left, C(n) represents the reconstructed neighboring chroma samples above and to the left, and the value of N is equal to the sample used to derive the coefficients. In the case of a square-shaped coding block, the above two equations are directly applied. Because this regression error minimization calculation is performed not only as an encoder search operation but also as part of the decoding process, no syntax is used to communicate the α and β values.

[0292] In addition to using the above-mentioned method for minimizing the regression error (also known as the least squares (LS) method), the linear model coefficients α and β can also be derived using the maximum and minimum luma sample values. This latter method is also known as the MaxMin method. In the MaxMin method, after the upper and left reconstructed neighboring luma samples are downsampled, a one-to-one relationship is obtained between each of these reconstructed neighboring luma samples and the upper and left reconstructed neighboring chroma samples. Thus, the linear model coefficient parameters α and β can be derived using luma and chroma sample pairs based on the one-to-one relationship. The luma and chroma sample pairs are obtained by identifying the minimum and maximum values of the downsampled upper and left reconstructed neighboring luma samples, and then identifying the corresponding samples from the upper and left reconstructed neighboring chroma templates. The luma and chroma sample pairs are shown as (A, B) in FIG. 9. The linear model parameters α and β are obtained according to the following equations: α=(y B -y A ) / (x B -x A ) (4) β=y A -αx A , (5) where (x A , y A ) are the coordinates of A in Figure 9, and (x B , y B ) are the coordinates of B.

[0293] The CCLM luma-to-chroma prediction mode is added as one additional chroma intra prediction mode. On the encoder side, one more rate-distortion (RD) cost check for the chroma component is added to select the chroma intra prediction mode.

[0294] For brevity, in this document, the term "template" is used to refer to reconstructed adjacent chroma samples and downsampled reconstructed adjacent luma samples. These reconstructed adjacent chroma samples and downsampled reconstructed adjacent luma samples are also referred to as reference samples in the template. Figure 10 is a diagram of a template of a chroma block and a corresponding downsampled luma block. In the example shown in Figure 10, luma' 1020 is a downsampled version of the current luma block and has the same spatial resolution as chroma block 1040. In other words, luma' 1020 is a collocated downsampled luma block of chroma block 1040. The top template 1002 includes the top reconstructed adjacent chroma samples above the current chroma block 1040 and the corresponding downsampled top reconstructed adjacent luma samples of luma' 1020. The downsampled top reconstructed adjacent luma samples of luma' 1020 are obtained based on the neighboring samples above the luma block. As used herein, neighboring samples above a luma block may include either neighboring samples immediately above the luma block, neighboring samples not adjacent to the luma block, or both. The left template 1004 includes left-side reconstructed neighboring chroma samples and corresponding downsampled left-side reconstructed neighboring luma samples. The top-side reconstructed neighboring chroma samples are also referred to as "top chroma templates," such as top chroma template 1006. The corresponding downsampled top-side reconstructed neighboring luma samples are referred to as "top luma templates," such as top luma template 1008. The left-side reconstructed neighboring chroma samples are also referred to as "left chroma templates," such as left chroma template 1010. The corresponding downsampled left-side reconstructed neighboring luma samples are referred to as "left luma templates," such as left luma template 1012. Elements included in a template are referred to as reference samples within that template.

[0295] In existing CCLM applications, if there is one reference sample marked as unavailable for the top or left template, the entire template is not used. Figure 11 is a diagram of an example of a template including an unavailable reference sample. In the example shown in Figure 11, if there is an unavailable reference sample in the top template, such as the reference sample in A2 1102 for chroma block 1140, then the top template is not used to derive the linear model coefficients. Similarly, if there is one unavailable reference sample in the left template, such as the reference sample in B2 1104, then the left template is not used to derive the linear model coefficients. This reduces the coding performance of intra prediction.

[0296] Multi-way linear models

[0297] In addition to being used to jointly calculate the linear model coefficients, the reference samples in the top template and the left template can also be used in two other CCLM modes, namely, CCLM_T and CCLM_L modes. CCLM_T and CCLM_L may collectively be referred to as multi-directional linear models (MDLMs). FIG. 12 is a diagram of the reference samples used in CCLM_T mode, and FIG. 13 is a diagram of the reference samples used in CCLM_L mode. As shown in FIG. 12, in CCLM_T mode, only reference samples in the top template, such as reference samples 1202 and 1204, are used to calculate the linear model coefficients. As shown in FIG. 13, in CCLM_L mode, only reference samples in the left template, such as reference samples 1212 and 1214, are used to calculate the linear model coefficients. The number of reference samples used in each of these modes is W+H, where W is the width of the chroma block and H is the height of the chroma block.

[0298] The CCLM mode and the MDLM mode (i.e., the CCLM_T mode and the CCLM_L mode) can be used together or alternatively. For example, only the CCLM mode is used in the codec, only the MDLM mode is used in the codec, or both the CCLM and the MDLM mode are used in the codec. In the last case where both the CCLM and the MDLM mode are used, three modes (i.e., CCLM, CCLM_T, and CCLM_L) are added as three additional chroma intra prediction modes. On the encoder side, three more RD cost checks for the chroma components are added to select the chroma intra prediction mode. In existing methods for MDLM, model parameters or model coefficients are derived using the LS method. When the number of available reference samples is insufficient, a padding operation is used to copy the furthest pixel value or fetch the sample value of the available reference sample.

[0299] However, using the LS method to obtain linear model coefficients for the MDLM mode increases computational complexity. Furthermore, in existing MDLM modes, the locations of some template samples may be far away from the current block, especially in the case of non-square blocks. For example, the reference sample at the right end of the top template and the reference sample at the bottom of the left template are far away from the current block. Therefore, these reference samples have low correlation with the current block, reducing the efficiency of chroma block prediction. The technology presented herein can reduce the complexity of MDLM and increase the correlation between template samples and the current block.

[0300] In one example, when determining model coefficients using the MaxMin method, in addition to using reference samples from the top template and the left template together, reference samples from only a portion of the template (either the left template or the top template) are used. For example, in the MaxMin method, only reference samples in the top luma template are examined to determine the maximum and minimum luma values. Alternatively, only reference samples in the left luma template are examined to determine the maximum and minimum luma values. After the sample locations of the maximum and minimum luma values are determined, the corresponding chroma sample values can be obtained based on the locations of the minimum and maximum luma values.

[0301] Figure 14 is a schematic diagram showing an example of reference samples used to determine the maximum and minimum luma values. In the example shown in Figure 14, the number of reference samples in the top luma template, denoted as W1, is greater than the width of the current chroma block, denoted as W. The number of reference samples in the left luma template, denoted as H1, is greater than the height of the current chroma block, denoted as H. Figure 15 is a schematic diagram showing another example of reference samples used to determine the maximum and minimum luma values. In the example shown in Figure 15, the number of top luma reference samples is equal to the width W of the current chroma block, and the number of left luma reference samples is equal to the height H of the current chroma block.

[0302] In summary, in addition to the LS method, the MaxMin method can also be used for the MDLM mode. In other words, the MaxMin method can be used to derive model coefficients for the CCLM_T and CCLM_L modes. Because the MaxMin method has lower computational complexity than the LS method, the proposed method improves MDLM by reducing its computational complexity. Furthermore, the existing MaxMin method uses both an upper template and a left template for the CCLM mode. The proposed method uses either an upper template or a left template to derive model coefficients, which further reduces the computational complexity of the modes.

[0303] According to a further example of the technique presented herein, reference samples in a template are selected to increase the correlation between the reference samples and the current block. A maximum of W2 reference samples are used in the top template. A maximum of H2 reference samples are used in the left template. In this way, reference samples further away than W2 reference samples in the top template or H2 reference samples in the left template are not used because they have low correlation with the current block.

[0304] Furthermore, when deriving model coefficients using the MaxMin method, only available reference samples are used, and no padding is used to replace unavailable reference samples. For example, to determine the maximum and minimum luma values for CCLM_T mode, only available samples in the top luma template are examined. Because W2 reference samples are used in the top template, the number of available samples, denoted as W3, is less than or equal to W2. Similarly, to determine the maximum and minimum values for CCLM_L mode, available samples in the left luma template are examined. The number of available samples, denoted as H3, can be less than or equal to H2. The relationship between W2 and W3 and H2 and H3 is shown in Figure 16, where W3 <= W2 and H3 <= H2. In one example, W2 = 2 × W and H2 = 2 × H.

[0305] Alternatively, W2 and H2 can each take the value W+H. In other words, up to W+H reference samples in the top luma template can be used to derive model coefficients for the CCLM_T mode, and up to W+H reference samples in the left luma template can be used to derive model coefficients for the CCLM_L mode. Among these reference samples, only luma template samples available in this range (i.e., W+H for both CCLM_T and CCLM_L) are examined to determine the maximum and minimum luma values. In this example, to determine the maximum and minimum values for the CCLM_T mode, the available samples in the top luma template (up to W+H) are examined. To determine the maximum and minimum values for the CCLM_L mode, the available samples in the left luma template (up to W+H) are examined.

[0306] Compared with the existing MDLM method in which exactly W+H reference samples are used to derive the model coefficients of CCLM_T and CCLM_L modes, the proposed method uses up to 2×W or W+H reference samples to derive the model coefficients of CCLM_T mode, and up to 2×H or W+H reference samples to derive the model coefficients of CCLM_L mode. Furthermore, to determine the maximum and minimum values, only luma reference samples available in the examined sample range (2×W or W+H for CCLM_T, and 2×H or W+H for CCLM_L) are used. In the above proposed method, determining the maximum and minimum luma values in the luma template can be sped up by sampling the reference samples with a step size greater than 1, such as 2, 4, or another value.

[0307] Downsampling Method

[0308] As discussed above, because the spatial resolution of the luma component of an image is greater than that of the chroma components, the luma component needs to be downsampled to the resolution of the chroma part in the MDLM mode. For example, in the case of the YUV4:2:0 format, the luma component needs to be downsampled by 4 (2 in width and 2 in height) to match the resolution of the chroma component. The downsampled luma block corresponding to the chroma block (which has the same spatial resolution as the chroma block) can be used to predict the chroma block using the MDLM mode. The size of the downsampled luma block is the same as the size of the chroma block (because the luma block is downsampled to the size of the chroma block).

[0309] Similarly, to derive linear model coefficients for the MDLM mode, the reference samples in the luma template need to be downsampled. For the CCLM_T mode, the top reconstructed neighboring luma samples are downsampled to generate reference samples of the top template corresponding to the reference samples in the top chroma template, i.e., the top reconstructed neighboring chroma samples. The downsampling of the top reconstructed neighboring luma samples typically includes multiple rows of top reconstructed neighboring luma samples. Figure 17 is a schematic diagram illustrating an example of downsampling a luma sample using multiple rows or columns of neighboring luma samples. As shown in Figure 17, for a luma block, two top neighboring rows A1 and A2 can be used during downsampling to obtain a downsampled neighboring row A. A[i] is shown as the i-th sample of A, A1[i] as the i-th sample of A1, and A2[i] as the i-th sample of A2, and a 6-tap downsampling filter can be used as follows: A[i]=(A2[2i]*2+A2[2i-1]+A2[2i+1]+A1[2i]*2+A1[2i-1]+A1[2i+1]+4)>>3; The number of neighboring samples can also be greater than the size of the current block. For example, as shown in Figure 18, the number of neighboring samples at the top of a downsampled luma block can be M, where M is greater than the width W of the downsampled block.

[0310] In the existing downsampling methods described above, multiple rows of top reconstructed neighboring luma samples are used to generate downsampled top reconstructed neighboring luma samples, which increases the size of the line buffer compared to regular intra-mode prediction, thus increasing memory costs.

[0311] The techniques presented herein reduce downsampling memory usage by using only one row of upper reconstructed neighboring luma samples for CCLM_T mode when the current block is at the top boundary of the current coding tree unit (CTU) (i.e., the top row of the current chroma block overlaps with the top row of the current CTU). Figure 19 is a schematic diagram illustrating an example of downsampling using a single row of neighboring luma samples for a luma block at the top boundary of a CTU. As shown in Figure 19, only A1 (containing one row of reconstructed neighboring luma samples) is used to generate the upper reconstructed neighboring luma samples downsampled by A.

[0312] While the above description focuses on the top reconstructed adjacent luma samples in CCLM_T mode, a similar method can be applied to the left reconstructed adjacent luma samples in CCLM_L mode. Neighboring It should be appreciated that this can be applied to luma samples, for example, instead of using multiple columns of left reconstructed neighboring luma samples for downsampling, when the current block is on the left boundary of the CTU (i.e., when the left row of the current chroma block overlaps with the left row of the CTU), a single column of left reconstructed neighboring luma samples is used for downsampling to generate a reference sample in the left template of the downsampled luma block.

[0313] Determining the availability of reference samples

[0314] In the above example, a luma template is used to determine the availability of reference samples for determining the maximum and minimum luma values. However, in some scenarios, an available luma reference sample does not have a corresponding chroma reference sample. For example, luma blocks and chroma blocks can be coded separately. Thus, when a reconstructed luma block is available, the corresponding chroma block is not yet available. As a result, an available luma reference sample does not have a corresponding available chroma reference sample, which may result in a coding error.

[0315] The technology presented herein addresses this issue by determining the availability of reference samples within a chroma template via examining the availability of reference samples within the template. In some examples, a chroma reference sample is available if it is not outside the current picture, slice, or title, and the reference sample has been reconstructed. In some examples, a chroma reference sample is available if it is not outside the current picture, slice, or title, and the reference sample has been reconstructed, and the reference sample has not been omitted based on an encoding decision, etc. The available reference sample of the current chroma block may be the available reconstructed neighboring sample of the chroma block. The luma reference sample corresponding to the available chroma reference sample is used to determine the maximum and minimum luma values. For example, if L reference samples are available in the chroma template, then the maximum and minimum luma values are determined using the reference samples in the luma template that correspond to the L available chroma reference samples. The luma reference samples corresponding to the chroma reference samples can be determined by identifying the chroma reference samples located within the chroma template and the luma reference samples located at the same positions within the luma template (i.e., co-located luma reference samples (position (x, y)); for example, the luma reference samples corresponding to the chroma reference samples may include adjacent luma reference samples (position (x-1, y)), luma reference samples (position (x, y)), and adjacent luma reference samples (position (x+1, y)). The luma reference samples having the maximum and minimum luma values and the chroma reference samples corresponding to the luma reference samples associated with the maximum and minimum luma values are then used to determine the model coefficients as described above.

[0316] In one example, L available chroma reference samples may be used to determine the model coefficients, e.g., L=4. In another example, a portion of the L available chroma reference samples or a subset of the L available chroma reference samples may be used to determine the model coefficients. For example, a fixed number of available chroma reference samples may be selected from the L available chroma reference samples. Luma reference samples corresponding to the selected chroma reference samples are identified and used to determine the model coefficients together with the selected chroma reference samples. For example, if the selected chroma reference samples are four available chroma reference samples, 24 reconstructed adjacent luma samples corresponding to the four available chroma reference samples are identified. The luma reference samples used to determine the model coefficients are obtained by downsampling the 24 reconstructed adjacent luma samples, where a 6-tap filter is used in the downsampling process.

[0317] In the example shown in Figure 16, the top template sample range for CCLM_T mode is W2. Next, the availability of reference samples in the top chroma template for the current chroma block is determined. If W3 chroma reference samples are available (W3 <= W2), then W3 or fewer corresponding luma reference samples are obtained. These obtained luma and chroma reference samples are used to derive model coefficients for CCLM_T mode.

[0318] Similarly, the example shown in FIG. 16 has the left template sample range as H2 for CCLM_L mode. The availability of reference samples in the left chroma template of the current chroma block is checked. If H3 chroma reference samples are available (H3<=H2), then H3 or fewer corresponding luma reference samples are obtained. These obtained luma and chroma reference samples are used to derive model coefficients for CCLM_L mode. The availability of reference samples for CCLM mode is determined similarly, i.e., the availability of reference samples in both the top chroma template and the left chroma template is determined, and then the corresponding luma reference samples can be found to determine the model coefficients as above.

[0319] The details of the proposed method are set out in the format of an INTRA_CCLM, INTRA_CCLM_L, or INTRA_CCLM_T intra prediction mode specification in Table 1. Table 2 shows an alternative implementation of the method proposed herein. [Table 1-1] [Table 1-2] [Table 1-3] [Table 1-4] [Table 1-5] [Table 2]

[0320] MDLM mode binarization

[0321] To encode the MDLM mode in the video signal bitstream, binarization of the MDLM mode is required so that the selected MDLM mode can be coded in the bitstream and the decoder can determine the selected mode for decoding. Existing binarization methods do not include the two chroma modes of MDLM, namely CCLM_L and CCLM_T. Here, we propose a new chroma mode coding method.

[0322] Tables 3 and 4 provide the binarization details of these two chroma modes. In Table 3, 77 indicates CCLM mode, with an intra_chroma_pred_mode index of 4. 78 indicates CCLM_L mode, with an intra_chroma_pred_mode index of 5. 79 indicates CCLM_T mode, with an intra_chroma_pred_mode index of 6. When the intra_chroma_pred_mode index is equal to 7, the selected mode is DM mode. The remaining index values 0, 1, 2, and 3 represent planar mode, vertical mode, horizontal mode, and DC mode, respectively. [Table 3] [Table 4]

[0323] Table 4 shows example bit strings or syntax elements used for each chroma intra prediction mode. As shown in Table 4, the syntax element for DM mode (index 7) is 0, the syntax element for CCLM mode (index 4) is 10, the syntax element for CCLM_L mode (index 5) is 1110, the syntax element for CCLM_T mode (index 6) is 1111, the syntax element for planar mode (index 0) is 11000, the syntax element for vertical mode (index 1) is 11001, the syntax element for horizontal mode (index 2) is 11010, and the syntax element for DC mode (index 3) is 11011. Table 5 shows another example bit strings or syntax elements used for each chroma intra prediction mode. Depending on the coding mode selected by the encoder, the corresponding syntax elements are included in the coded video bitstream. [Table 5]

[0324] When a video encoder, such as video encoder 20 of FIG. 1, performs intra-prediction of a chroma block of a video signal based on an intra-chroma prediction mode, the video encoder selects an intra-chroma prediction mode and generates a bitstream of the video signal by including a syntax element indicating the selected intra-chroma prediction mode in the bitstream. The video encoder can select the intra-chroma prediction mode from a plurality of mode sets. For example, the modes can include a first mode set including a derived mode (DM) or a cross-component linear model (CCLM) prediction mode, or both. The modes can also include a second mode set including at least one of a CCLM_L mode or a CCLM_T mode. The modes can further include a third mode set, which can include at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0325] In some examples, the number of bits of the syntax elements for the intra-chroma prediction mode when the intra-chroma prediction mode is selected from the first mode set is smaller than the number of bits of the syntax elements when the intra-chroma prediction mode is selected from the second mode set. Furthermore, the number of bits of the syntax elements for the intra-chroma prediction mode when the intra-chroma prediction mode is selected from the second mode set is smaller than the number of bits of the syntax elements when the intra-chroma prediction mode is selected from the third mode set. In some examples, the syntax elements for the various intra-chroma prediction modes are selected according to the examples shown in Table 4 or Table 5.

[0326] When a decoder receives an encoded bitstream of a video signal and decodes the video, the decoder, such as video decoder 30 of Figure 1, parses syntax elements from the bitstream of the video signal and determines an intra-chroma prediction mode to be used for a chroma block based on a syntax element selected from the parsed syntax elements. Based on the determined intra-chroma prediction mode, the decoder performs intra-prediction for a current chroma block of the video signal.

[0327] 20 is a flowchart of a method for performing intra prediction using a linear model according to some aspects of the present disclosure. In block 2002, a luma block (such as luma block 811) corresponding to a current chroma block (such as chroma block 801) is determined.

[0328] In block 2004, a luma reference sample for the luma block is obtained based on determining L available chroma reference samples for the current chroma block. The obtained luma reference sample for the luma block is a downsampled luma reference sample. In some examples, the obtained luma reference sample for the luma block is a downsampled luma reference sample obtained by downsampling a neighboring luma sample selected based on the L available chroma reference samples (e.g., based on some or all of the L available chroma reference samples). In other words, the obtained luma reference sample for the luma block is a downsampled luma reference sample obtained by downsampling a neighboring luma sample corresponding to the available chroma reference sample. In some examples, the obtained luma reference sample corresponds to the L available chroma reference samples. In additional examples, the obtained luma reference sample corresponds to a portion of the L available chroma reference samples. It can be understood that the correspondence between the obtained luma reference sample (i.e., the downsampled luma reference sample) and the L available chroma reference samples may not be limited to a "one-to-one correspondence," and it can also be understood that the correspondence between the obtained luma reference sample (i.e., the downsampled luma reference sample) and the L available chroma reference samples may be an "M-to-N correspondence," for example, M=4, N=4, or M=4, N>4.

[0329] In some examples, the chroma reference samples of the current chroma block include reconstructed neighboring samples of the current chroma block. The L available chroma reference samples are determined from the reconstructed neighboring samples. Similarly, the neighboring samples of the luma block are also reconstructed neighboring samples of the luma block. The obtained luma reference samples of the luma block are obtained by downsampling the reconstructed neighboring samples selected based on the L available chroma reference samples. Such that L=4.

[0330] In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title, and the reference sample has been reconstructed. In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title, and the reference sample has been reconstructed, and the reference sample has not been omitted based on an encoding decision, etc. The available reference sample of the current chroma block may be an available reconstructed neighboring sample of the chroma block. A luma reference sample corresponding to the available chroma reference sample is obtained.

[0331] In some examples, the L available chroma reference samples are determined by determining that L upper-neighboring chroma samples of the current chroma block are available, where 1<=L<=W2, and L and W2 are positive integers. W2 indicates the upper reference sample range, and the L upper-neighboring chroma samples are used as the available chroma reference samples. In some examples, W2 is equal to either 2*W or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0332] In other examples, the L available chroma reference samples are determined by determining the available L left-neighboring chroma samples of the current chroma block, where 1<=L<=H2, and L and H2 are positive integers. H2 indicates the left reference sample range. The L left-neighboring chroma samples are used as the available chroma reference samples. In some examples, H2 is equal to either 2*H or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0333] In further examples, the L available chroma reference samples are determined by determining the available L1 top-neighboring chroma samples and L2 left-neighboring chroma samples of the current chroma block, where 1<=L1<=W2 and 1<=L2<=H2. W2 indicates the top reference sample range, and H2 indicates the left reference sample range. L1, L2, W2, and H2 are positive integers, and L1+L2=L. In these examples, the L1 top-neighboring chroma samples and the L2 left-neighboring chroma samples are used as the available chroma reference samples.

[0334] In one example, the luma reference sample is obtained by downsampling only neighboring samples that are above the luma block and selected based on the L available chroma reference samples. In another example, the luma reference sample is obtained by downsampling only neighboring samples that are to the left of the luma block and selected based on the L available chroma reference samples.

[0335] In the above example, the downsampled luma block of a luma block is obtained by downsampling the reconstructed luma block of the luma block corresponding to the current chroma block. In some cases, for example, when the luma reference sample is obtained based only on neighboring samples above the luma block and when the top row of the current chroma block overlaps with the top row of the current coding tree unit (CTU), only one row of reconstructed neighboring luma samples of the reconstructed version of the luma block is used to obtain the luma reference sample.

[0336] In block 2006, linear model coefficients used for cross-component prediction are calculated based on the luma reference sample obtained in step 2004 and a chroma reference sample corresponding to the luma reference sample. In some examples, the chroma reference sample corresponding to the luma reference sample is a chroma reference sample co-located with the luma reference sample.

[0337] In block 2008, a prediction for the current chroma block is generated based on the calculated linear model coefficients and the values of a downsampled luma block obtained by downsampling a luma block (such as luma block 811).

[0338] 21 is a flowchart of a method for cross-component linear model (CCLM) prediction according to another aspect of the present disclosure. In block 2102, a luma block (such as luma block 811) corresponding to a current chroma block (such as chroma block 801) is determined.

[0339] In block 2104, luma reference samples for the luma block are obtained by downsampling neighboring samples of the luma block. In some examples, the luma reference samples include only luma reference samples obtained based on neighboring samples above the luma block. In other examples, the luma reference samples include only luma reference samples obtained based on neighboring samples to the left of the luma block.

[0340] In block 2106, a maximum luma value and a minimum luma value are determined based on the luma reference sample.

[0341] In block 2108, a first chroma value is obtained based at least in part on one or more positions of the one or more luma reference samples associated with the maximum luma value, and a second chroma value is also obtained based at least in part on one or more positions of the one or more luma reference samples associated with the minimum luma value.

[0342] In block 2110, linear model coefficients are calculated based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.

[0343] In block 2112, a prediction of the current chroma block is generated based on the linear model coefficients and the values of the downsampled luma block of the luma block.

[0344] 22 is a block diagram illustrating an example structure of an apparatus 2200 for performing intra prediction using a linear model. The apparatus 2200 may include a determining unit 2202 and an intra prediction processing unit 2204. In one example, the apparatus 2200 may correspond to the intra prediction unit 254 of FIG. 2. In another example, the apparatus 2200 may correspond to the intra prediction unit 354 of FIG. 3.

[0345] The determining unit 2202 is configured to determine a luma block (such as block 811) corresponding to a current chroma block (such as chroma block 801). The determining unit 2202 is further configured to obtain a luma reference sample of the luma block based on determining the L available chroma reference samples of the current chroma block. The obtained luma reference sample of the luma block is a downsampled luma reference sample.

[0346] In some examples, the chroma reference samples of the current chroma block include reconstructed neighboring samples of the current chroma block. The L available chroma reference samples are determined from the reconstructed neighboring samples. Similarly, the neighboring samples of the luma block are also reconstructed neighboring samples of the luma block. The obtained luma reference samples of the luma block are obtained by downsampling the reconstructed neighboring samples of the luma block. In some examples, the obtained luma reference samples of the luma block are downsampled luma reference samples obtained by downsampling the reconstructed neighboring samples of the luma block selected based on the L available chroma reference samples. In some examples, the obtained luma reference samples of the luma block are downsampled luma reference samples obtained by downsampling the reconstructed neighboring samples corresponding to the L available chroma reference samples.

[0347] In some examples, a chroma reference sample is available if the chroma reference sample is not outside the current picture, slice, or title, the reference sample is reconstructed, the reference sample is not omitted based on an encoding decision, etc. The available reference sample of the current chroma block may be the available reconstructed neighboring sample of the chroma block. A luma reference sample corresponding to the available chroma reference sample is obtained.

[0348] In some examples, the L available chroma reference samples are determined by determining that L upper-neighboring chroma samples of the current chroma block are available, where 1<=L<=W2, and L and W2 are positive integers. W2 indicates the upper reference sample range, and the L upper-neighboring chroma samples are used as the available chroma reference samples. In some examples, W2 is equal to either 2*W or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0349] In other examples, the L available chroma reference samples are determined by determining the available L left-neighboring chroma samples of the current chroma block, where 1<=L<=H2, and L and H2 are positive integers. H2 indicates the left reference sample range. The L left-neighboring chroma samples are used as the available chroma reference samples. In some examples, H2 is equal to either 2*H or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

[0350] In further examples, the L available chroma reference samples are determined by determining the available L1 top-neighboring chroma samples and L2 left-neighboring chroma samples of the current chroma block, where 1<=L1<=W2 and 1<=L2<=H2. W2 indicates the top reference sample range, and H2 indicates the left reference sample range. L1, L2, W2, and H2 are positive integers, and L1+L2=L. In these examples, the L1 top-neighboring chroma samples and the L2 left-neighboring chroma samples are used as the available chroma reference samples.

[0351] In one example, the luma reference sample is obtained by downsampling only the neighboring sample above the luma block and selected based on the L available chroma reference samples. In another example, the luma reference sample is obtained by downsampling only the neighboring sample to the left of the luma block and selected based on the L available chroma reference samples.

[0352] In the above example, the downsampled luma block of a luma block is obtained by downsampling the reconstructed luma block of the luma block corresponding to the current chroma block. In some cases, such as when the luma reference sample is obtained based only on neighboring samples above the luma block and when the top row of the current chroma block overlaps with the top row of the current coding tree unit (CTU), only one row of reconstructed neighboring luma samples of the reconstructed version of the luma block is used to obtain the luma reference sample.

[0353] The intra-prediction processing unit 2204 is configured to calculate linear model coefficients (such as α and β) based on the luma reference samples and the chroma reference samples corresponding to the luma reference samples. The intra-prediction processing unit 2204 is further configured to obtain a prediction of the current chroma block based on the linear model coefficients and values of a downsampled luma block of the luma block.

[0354] FIG. 23 is a flowchart of a method for coding a chrominance intra-coding mode in a bitstream of a video signal according to some aspects of the present disclosure.

[0355] In block 2302, intra-prediction of a chroma block of the video signal is performed based on an intra-chroma prediction mode. The intra-chroma prediction mode can be selected from a plurality of modes. In some examples, the plurality of modes includes three sets: a first mode set including at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode, a second mode set including at least one of a CCLM_L mode or a CCLM_T mode, or a third mode set including at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0356] In block 2304, a bitstream of the video signal is generated by including in the bitstream a syntax element indicating an intra-chroma prediction mode. In some examples, the number of bits of the syntax element when the intra-chroma prediction mode is selected from a first mode set is less than the number of bits of the syntax element when the intra-chroma prediction mode is selected from a second mode set. The number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is less than the number of bits of the syntax element when the intra-chroma prediction mode is selected from a third mode set.

[0357] In one example, the syntax element for DM mode is 0. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 1110. The syntax element for CCLM_T mode is 1111. The syntax element for planar mode is 11000. The syntax element for vertical mode is 11001. The syntax element for horizontal mode is 11010. The syntax element for DC mode is 11011.

[0358] In another example, the syntax element for DM mode is 00. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 110. The syntax element for CCLM_T mode is 111. The syntax element for planar mode is 0100. The syntax element for vertical mode is 0101. The syntax element for horizontal mode is 0110. The syntax element for DC mode is 0111.

[0359] FIG. 24 is a flowchart of a method for decoding a chrominance intra-coding mode in a bitstream of a video signal according to some aspects of the present disclosure.

[0360] In block 2402, a plurality of syntax elements are parsed from a bitstream of a video signal. In block 2404, an intra-chroma prediction mode is determined based on a syntax element indicating an intra-chroma prediction mode from the plurality of syntax elements. In some examples, the intra-chroma prediction mode is determined from a plurality of modes. For example, the plurality of modes includes three sets: a first mode set including at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode, a second mode set including at least one of a CCLM_L mode or a CCLM_T mode, or a third mode set including at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode. Of these intra-chroma prediction mode sets, the number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set. The number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set.

[0361] In block 2406, intra prediction is performed for the current chroma block of the video signal based on the intra chroma prediction mode.

[0362] 25 is a block diagram illustrating an example structure of an apparatus 2500 for generating a video bitstream. The apparatus 2500 may include an intra-prediction processing unit 2502 and a binarization unit 2504. In one example, the intra-prediction processing unit 2502 may correspond to the intra-prediction unit 254 of FIG. 2. In one example, the binarization unit 2504 may correspond to the entropy encoding unit 270 of FIG. 2.

[0363] The intra-prediction processing unit 2502 is configured to perform intra-prediction of a chroma block of the video signal based on an intra-chroma prediction mode. The intra-chroma prediction mode is selected from a first mode set, a second mode set, or a third mode set. The first mode set includes at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode. The second mode set includes at least one of a CCLM_L mode or a CCLM_T mode. The third mode set includes at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0364] The binarization unit 2504 is configured to generate a bitstream of the video signal by including a syntax element indicating an intra-chroma prediction mode, wherein the number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is less than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is less than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set.

[0365] In one example, the syntax element for DM mode is 0. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 1110. The syntax element for CCLM_T mode is 1111. The syntax element for planar mode is 11000. The syntax element for vertical mode is 11001. The syntax element for horizontal mode is 11010. The syntax element for DC mode is 11011.

[0366] In another example, the syntax element for DM mode is 00. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 110. The syntax element for CCLM_T mode is 111. The syntax element for planar mode is 0100. The syntax element for vertical mode is 0101. The syntax element for horizontal mode is 0110. The syntax element for DC mode is 0111.

[0367] 26 is a block diagram illustrating an example structure of a device 2600 for decoding a video bitstream. The device may include a parsing unit 2602, a determining unit 2604, and an intra-prediction processing unit 2606. In one example, the parsing unit 2602 may correspond to the entropy encoding unit 304 of FIG. 3. In one example, the determining unit 2604 and the intra-prediction processing unit 2606 may correspond to the intra-prediction unit 354 of FIG. 3.

[0368] The parsing unit 2602 is configured to parse syntax elements from a bitstream of the video signal. The determining unit 2604 is configured to determine an intra-chroma prediction mode based on the syntax elements from the plurality of syntax elements. The intra-chroma prediction mode is determined from one of a first mode set, a second mode set, or a third mode set. The first mode set includes at least one of a derived mode (DM) or a cross-component linear model (CCLM) prediction mode. The second mode set includes at least one of a CCLM_L mode or a CCLM_T mode. The third mode set includes at least one of a vertical mode, a horizontal mode, a DC mode, or a planar mode.

[0369] The number of bits of the syntax element when the intra-chroma prediction mode is selected from the first mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set, and the number of bits of the syntax element when the intra-chroma prediction mode is selected from the second mode set is smaller than the number of bits of the syntax element when the intra-chroma prediction mode is selected from the third mode set.

[0370] In one example, the syntax element for DM mode is 0. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 1110. The syntax element for CCLM_T mode is 1111. The syntax element for planar mode is 11000. The syntax element for vertical mode is 11001. The syntax element for horizontal mode is 11010. The syntax element for DC mode is 11011.

[0371] In another example, the syntax element for DM mode is 00. The syntax element for CCLM mode is 10. The syntax element for CCLM_L mode is 110. The syntax element for CCLM_T mode is 111. The syntax element for planar mode is 0100. The syntax element for vertical mode is 0101. The syntax element for horizontal mode is 0110. The syntax element for DC mode is 0111.

[0372] The intra-prediction processing unit 2606 is configured to perform intra-prediction of a current chroma block of the video signal based on an intra-chroma prediction mode.

[0373] The following references are incorporated by reference to provide a better understanding of the present disclosure: JCTVC-H0544, Description of MDLM; JVET-G1001, Description of CCLM or LM, Section 2.2.4; and JVET-K0204, Description for Deriving Model Coefficients Using Maximum and Minimum Values.

[0374] The following is a description of applications of the encoding and decoding methods shown in the above embodiments, as well as systems that use these applications.

[0375] 27 is a block diagram showing a content delivery system 3100 for implementing a content distribution service. The content delivery system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 may include, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination thereof.

[0376] The capture device 3102 can generate data and encode it using the encoding method described in the above embodiment. Alternatively, the capture device 3102 can distribute the data to a streaming server (not shown), which then encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 can include, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 can include the source device 12, as described above. If the data includes video, the video encoder 20 included in the capture device 3102 can actually perform video encoding. If the data includes sound (i.e., audio), the audio encoder included in the capture device 3102 can actually perform audio encoding. In some practical scenarios, the capture device 3102 distributes the encoded video and audio data by multiplexing them (the video-encoded and audio-encoded data) 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.

[0377] In the content delivery system 3100, the terminal device 310 receives and plays the encoded data. The terminal device 3106 may be a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a television 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, all of which are capable of decoding the encoded data. For example, the terminal device 3106 may include the destination device 14, as described above. If the encoded data includes video, the video decoder 30 included in the terminal device prioritizes video decoding. If the encoded data includes audio, the audio decoder included in the terminal device prioritizes audio decoding.

[0378] In the case of a terminal device that includes a display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a television 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device can provide the decoded data to its display. In the case of a terminal device that does not have a display, such as an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is in contact with them to receive and display the decoded data.

[0379] When each device in this system performs encoding or decoding, it is possible to use an image encoding device or an image decoding device as shown in the above-described embodiments.

[0380] 28 is a diagram illustrating an example structure of the terminal device 3106. After the terminal device 3106 receives the 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), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, etc.

[0381] After the protocol processing unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into coded audio data and coded video data. As mentioned above, in some practical scenarios, for example, in a video conferencing system, the coded audio data and coded video data are not multiplexed. In this situation, the coded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.

[0382] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optional subtitles are generated. A video decoder 3206, which includes the video decoder 30 as described in the above-described embodiment, decodes the video ES using the decoding method as shown in the above-described embodiment to generate video frames, and supplies this data to a synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames, and supplies this data to the synchronization unit 3212. Alternatively, the video frames can be stored in a buffer (not shown in FIG. 28) before being supplied to the synchronization unit 3212. Similarly, the audio frames can be stored in a buffer (not shown in FIG. 28) before being supplied to the synchronization unit 3212.

[0383] The synchronization unit 3212 synchronizes the video and audio frames and provides the video / audio to a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information, which may be coded in a syntax using timestamps for the presentation of the coded audio and visual data and for the delivery of the data stream itself.

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

[0385] The present invention is not limited to the above-described system, and either the image encoding device or the image decoding device in the above-described embodiments can be incorporated into other systems, for example, automobile systems.

[0386] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, all connections are properly referred to as computer-readable media. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory, tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically while discs reproduce data optically using lasers, and combinations of the above should also be included within the scope of computer-readable media.

[0387] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, as used herein, the term "processor" may refer to any of the foregoing structures, or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules incorporated into a codec configured or combined for encoding and decoding. Alternatively, these techniques may be implemented entirely in one or more circuits or logic elements.

[0388] The techniques of this disclosure may be implemented in a wide variety of devices or equipment, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). While this disclosure describes various components, modules, or units to highlight functional aspects of devices configured to perform the disclosed techniques, the various components, modules, or units do not necessarily require realization by different hardware units. Rather, as noted above, the various units may be combined into a codec hardware unit or may be provided by a collection of inter-operative hardware units including one or more processors as described above in combination with appropriate software and / or firmware.

[0389] While several embodiments are provided in this disclosure, it should be understood that the disclosed systems and methods may be embodied in many other specific forms without departing from the spirit or scope of the disclosure. The examples should be considered illustrative and not limiting, and the intention should not be limited to the details provided herein. For example, various elements or components may be combined or integrated into another system, or certain features may be omitted or not implemented.

[0390] Furthermore, the techniques, systems, subsystems, and methods described and illustrated in various embodiments as discrete or separate may be combined or integrated with other systems, modules, techniques, or methods without departing from the scope of the present disclosure. Other items shown or discussed as coupled or directly coupled or in communication with each other may also be indirectly coupled or in communication through some interface, device, or intermediate component, whether electrical, mechanical, or otherwise. Other examples of modifications, substitutions, and alterations will be ascertainable by those skilled in the art and may be made without departing from the spirit and scope of the present disclosure.

Claims

1. 1. A method for encoding video data implemented by an encoding device, the method comprising: performing intra prediction of a current chroma block of the video data based on a chroma intra prediction mode, the chroma intra prediction mode being a selected CCLM_L mode, and the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available chroma reference samples of the current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; and obtaining a prediction of the current chroma block based on the linear model coefficients and downsampled luma block sample values of the luma block; generating a bitstream of the video data by including a syntax element indicating the chrominance intra-prediction mode. method.

2. Determining the L available chroma reference samples comprises:

2. The method of claim 1, comprising determining that the L left-neighboring chroma samples of the current chroma block are available by checking the availability of the left-neighboring chroma samples in a left-side reference sample range, wherein 1<L<H2, H2 denotes the left-side reference sample range, and L and H2 are positive integers, and the L left-neighboring chroma samples are used as the L available chroma reference samples.

3. 3. The method of claim 2, wherein H2 is equal to either 2*H or W+H, where W represents the width of the current chroma block and H represents the height of the current chroma block.

4. The method of claim 1 , wherein the luma reference sample is obtained by downsampling only neighboring samples to the left of the luma block and selected based on the L available chroma reference samples.

5. The method of claim 1 , wherein the downsampled luma block of the luma block is obtained by downsampling a reconstructed luma block of the luma block that corresponds to the current chroma block.

6. Calculating the linear model coefficients based on the luma reference samples and the chroma reference samples corresponding to the luma reference samples includes: determining a maximum luma value and a minimum luma value based on the luma reference samples; obtaining a first chroma value based at least in part on a position of a luma reference sample associated with the maximum luma value; obtaining a second chroma value based at least in part on a position of a luma reference sample associated with the minimum luma value; and The method of claim 1 , comprising calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.

7. Obtaining the first chroma value based at least in part on the position of the luma reference sample associated with the maximum luma value includes: obtaining the first chroma value based at least in part on one or more positions of one or more luma reference samples associated with the maximum luma value; Obtaining the second chroma value based at least in part on the position of the luma reference sample associated with the minimum luma value includes:

7. The method of claim 6, comprising obtaining the second chroma value based at least in part on one or more positions of one or more luma reference samples associated with the minimum luma value.

8. 1. A method of decoding video data implemented by a decoding device, the method comprising: Parsing a syntax element from the bitstream, the syntax element indicating a chrominance intra-prediction mode; determining the chrominance intra prediction mode based on the syntax element, the chrominance intra prediction mode being CCLM_L mode; performing intra prediction of a current chroma block of the video data based on the chroma intra prediction mode, the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available luma reference samples of the current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; and calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; obtaining a prediction of the current chroma block based on the linear model coefficients and sample values of a downsampled luma block of the luma block. method.

9. Determining the L available chroma reference samples comprises:

9. The method of claim 8, comprising determining that the L left-neighboring chroma samples of the current chroma block are available by checking the availability of the left-neighboring chroma samples in the left reference sample range, wherein 1<L<H2, H2 denotes the left reference sample range, and L and H2 are positive integers, and the L left-neighboring chroma samples are used as the available chroma reference samples.

10. 10. The method of claim 9, wherein H2 is equal to either 2*W or W+H, where H represents the width of the current chroma block and H represents the height of the current chroma block.

11. The method of claim 8 , wherein the luma reference sample is obtained by downsampling only neighboring samples to the left of the luma block and selected based on the determined L available chroma reference samples.

12. The method of claim 8 , wherein the downsampled luma block of the luma block is obtained by downsampling a reconstructed luma block of the luma block that corresponds to the current chroma block.

13. Calculating the linear model coefficients based on the luma reference samples and the chroma reference samples corresponding to the luma reference samples includes: determining a maximum luma value and a minimum luma value based on the luma reference samples; obtaining a first chroma value based at least in part on a position of a luma reference sample associated with the maximum luma value; obtaining a second chroma value based at least in part on a position of a luma reference sample associated with the minimum luma value; and The method of claim 8 , comprising calculating linear model coefficients based on the first chroma value, the second chroma value, the maximum luma value, and the minimum luma value.

14. Obtaining the first chroma value based at least in part on a position of a luma reference sample associated with the maximum luma value includes: obtaining a first chroma value based at least in part on one or more positions of one or more luma reference samples associated with the maximum luma value; Obtaining the second chroma value based at least in part on a position of a luma reference sample associated with the minimum luma value includes:

14. The method of claim 13, comprising obtaining a second chroma value based at least in part on one or more positions of one or more luma reference samples associated with the minimum luma value.

15. 1. An encoding device, comprising: at least one processor; one or more memories coupled to the at least one processor that store programming instructions; The programming instructions, when executed by the at least one processor, cause the encoding device to: performing intra prediction of a current chroma block of video data based on a chroma intra prediction mode, the chroma intra prediction mode being a selected CCLM_L mode, and the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available chroma reference samples of the current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; and obtaining a prediction of the current chroma block based on the linear model coefficients and downsampled luma block sample values of the luma block; generating a bitstream of the video data by including a syntax element indicating the chrominance intra-prediction mode. Encoding device.

16. The encoding device of claim 15 , wherein the luma reference sample is obtained by downsampling only neighboring samples to the left of the luma block and selected based on the L available chroma reference samples.

17. A decoding device, the decoding device comprising: at least one processor; one or more memories coupled to the at least one processor that store programming instructions; The programming instructions, when executed by the at least one processor, cause the decoding device to: Parsing a syntax element from the bitstream, the syntax element indicating a chrominance intra-prediction mode; determining the chrominance intra prediction mode based on the syntax element, the chrominance intra prediction mode being CCLM_L mode; performing intra prediction of a current chroma block of video data based on the chroma intra prediction mode, the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available luma reference samples of the current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; and calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; obtaining a prediction of the current chroma block based on the linear model coefficients and sample values of a downsampled luma block of the luma block. Decoding device.

18. 18. The decoding apparatus of claim 17, wherein the luma reference sample is obtained by downsampling only neighboring samples to the left of the luma block and selected based on the L available chroma reference samples.

19. A non-transitory computer-readable medium bearing program instructions that, when executed by a computing device or one or more processors, cause the computing device or one or more processors to: Parsing a syntax element from the bitstream, the syntax element indicating a chrominance intra-prediction mode; determining the chrominance intra prediction mode based on the syntax element, the chrominance intra prediction mode being CCLM_L mode; performing intra prediction of a current chroma block of video data based on the chroma intra prediction mode, the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available luma reference samples of the current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; obtaining a prediction of the current chroma block based on the linear model coefficients and sample values of a downsampled luma block of the luma block. Non-transitory computer-readable medium.

20. A non-transitory computer-readable medium bearing program instructions that, when executed by a computing device or processor, cause the computing device or processor to: performing intra prediction of a current chroma block of video data based on a chroma intra prediction mode, the chroma intra prediction mode being a selected CCLM_L mode, and the intra prediction of the current chroma block comprising: determining a luma block corresponding to the current chroma block; determining L available chroma reference samples of a current chroma block by checking the availability of neighboring chroma samples to the left of the current chroma block, where L is a positive integer; obtaining a luma reference sample for the luma block based on the determined L available chroma reference samples of the current chroma block, wherein the obtained luma reference sample for the luma block is a downsampled luma reference sample; calculating linear model coefficients based on the luma reference samples and corresponding chroma reference samples; and obtaining a prediction of the current chroma block based on the linear model coefficients and downsampled luma block sample values of the luma block; generating a bitstream of the video data by including a syntax element indicating a chrominance intra-prediction mode. Non-transitory computer-readable medium.

Citation Information

Patent Citations

  • Intra-Frame Prediction and Decoding Methods and Apparatuses for Image Signal

    US20140233650A1

  • Luma-based chroma intra-prediction for video coding

    US20170359597A1

  • Linear model chroma intra prediction for video coding

    US20180077426A1

  • Linear model prediction mode with sample accessing for video coding

    US20180176594A1

  • Method and apparatus of advanced intra prediction for chroma components in video coding

    WO2017140211A1