Context-based Intra Prediction

The method addresses the increasing bandwidth demand for digital video by employing a cross-component linear model prediction mode in video encoding, enhancing efficiency and reducing bandwidth requirements.

JP7688066B2Active Publication Date: 2025-06-03DOUYIN VISION CO LTD +1

Patent Information

Application Number
JP2023065710
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-03-26
Filing Date
2023-04-13
Publication Date
2025-06-03
Estimated Expiration
2039-12-05

AI Technical Summary

Technical Problem

Current video compression technologies face challenges in efficiently managing bandwidth demand for digital video, particularly as the number of connected devices increases, leading to higher bandwidth requirements.

Method used

The proposed solution involves a method for digital video processing that uses a cross-component linear model (CCLM) prediction mode. This method determines parameters based on chroma samples from adjacent groups to convert video blocks between their chroma form and encoded representation, enhancing encoding efficiency.

Benefits of technology

This approach improves encoding efficiency and reduces bandwidth demand by effectively predicting chroma components from luma components using a simplified linear model, which can be applied to existing and future video encoding standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007688066000017
    Figure 0007688066000017
  • Figure 0007688066000018
    Figure 0007688066000018
  • Figure 0007688066000019
    Figure 0007688066000019
Patent Text Reader

Abstract

To provide a method for video processing.SOLUTION: The method includes: performing downsampling on chroma and luma samples of a neighboring block of the current video block; determining, for a conversion between a current video block of a video that is a chroma block and a coded representation of the video, parameters of cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling; applying the CCLM to luma samples located in a luma block corresponding to the current video block to derive prediction values of the current video block; and performing the conversion based on the prediction values.SELECTED DRAWING: Figure 18
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application is a divisional application of Japanese Patent Application No. 2021-531144, which is a national phase application of International Application PCT / CN2019 / 123229 filed on December 5, 2019. The International Application claims priority to and the benefit of International Patent Application No. PCT / CN2018 / 119709 filed on December 7, 2018, International Patent Application No. PCT / CN2018 / 125412 filed on December 29, 2018, International Patent Application No. PCT / CN2019 / 070002 filed on January 1, 2019, International Patent Application No. PCT / CN2019 / 075874 filed on February 22, 2019, International Patent Application No. PCT / CN2019 / 075993 filed on February 24, 2019, International Patent Application No. PCT / CN2019 / 076195 filed on February 26, 2019, International Patent Application No. PCT / CN2019 / 079396 filed on March 24, 2019, International Patent Application No. PCT / CN2019 / 079431 filed on March 25, 2019, and International Patent Application No. PCT / CN2019 / 079769 filed on March 26, 2019. The entire disclosure of the above applications is incorporated herein by reference as part of the disclosure of this application.

[0002] This patent document relates to video processing technologies, apparatuses, and systems.

Background Art

[0003] Despite the progress of video compression, digital video still occupies the largest bandwidth usage in the Internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video use is expected to continue to increase.

Summary of the Invention

[0004] An apparatus, system, and method related to digital video processing are described, and, for example, a simplified linear model derivation related to a cross-component linear model (CCLM) prediction mode in video encoding is described. The described method can be applied to both existing video encoding standards (e.g., HEVC (High Efficiency Video Coding)) and future video encoding standards (e.g., VVC (Versatile Video Coding)) or codecs.

[0005] In a representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model based on two chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the two chroma samples are selected from the group based on a position rule, and executing the conversion based on the determination.

[0006] In a representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model based on a chroma sample selected based on the position of chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the selected chroma sample is selected from a group of adjacent chroma samples, and executing the conversion based on the determination.

[0007] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining, for a current video block, a group of adjacent chroma samples used to derive a set of values for parameters of a linear model, where the width and height of the current video block are W and H respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples; and performing a conversion between the current video block and an encoded representation of the video including the current video block based on the linear model.

[0008] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method is a method for video processing, and includes determining, for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, a plurality of sets of parameters, where each set of parameters defines a cross-component linear model (CCLM) and is derived from a group of corresponding chroma samples at corresponding chroma sample positions; determining parameters for a final CCLM based on the plurality of sets of parameters; and performing the conversion based on the final CCLM.

[0009] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on minimum and maximum chroma and luma samples among N groups of chroma and luma samples selected from adjacent luma and chroma samples of the current video block for conversion between the current video block of the video and an encoded representation of the video; and performing the conversion using the CCLM.

[0010] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model that can be completely determined by two chroma samples and corresponding two luma samples for conversion between a current video block of a video that is a chroma block and the encoded representation of the video, and performing the conversion based on the determination.

[0011] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method is a step of determining parameters of a cross-component linear model using a parameter table for conversion between a current video block of a video that is a chroma block and the encoded representation of the video, wherein entries in the parameter table are retrieved according to two chroma sample values and two luma sample values, and performing the conversion based on the determination.

[0012] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method is a step of determining a final prediction P(x,y) of a chroma sample at a position (x,y) within the current video block as a combination of prediction results of a plurality of cross-component linear models (MCCLMs), wherein the MCCLMs are selected based on the position (x,y) of the chroma sample, and performing the conversion based on the final prediction.

[0013] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing a first determination as to whether a first cross-component linear model (CCLM) that uses only left adjacent samples is used to predict samples of the current video block for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and / or performing a second determination as to whether a second cross-component linear model (CCLM) that uses only upper adjacent samples is used to predict samples of the current video block, and performing the conversion based on the first determination and / or the second determination.

[0014] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a context used to encode a flag for use in arithmetic encoding the current video block into the encoded representation of the video for conversion between the current video block of the video and the encoded representation of the video, the context being based on whether an upper left adjacent block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode, and performing the conversion based on the determination, wherein the flag is signaled to indicate whether the CCLM prediction mode is applied to the current video block, and the CCLM prediction mode derives a predicted value of a chroma component from another component using a linear mode.

[0015] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining an encoding order for one or more indications of a derived mode (DM mode) and a linear mode (LM mode) based on the encoding modes of one or more adjacent blocks of the current video block for conversion between the current video block of the video and the encoded representation of the video, and performing the conversion based on the determination. The LM mode derives a predicted value of a chroma component from another component using a linear mode, and the DM mode derives an intra prediction mode of the chroma component from another component.

[0016] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction based on refined adjacent luma samples and chroma samples of the current video block for conversion between the current video block of the video and the encoded representation of the video, deriving a predicted value of the chroma component of the current video block based on the parameters and the refined internal luma samples of the current video block, and performing the conversion based on the predicted value.

[0017] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction by selecting adjacent samples based on the positions of maximum adjacent samples or minimum adjacent samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, deriving a predicted value of the chroma samples of the current video block based on the parameters and the internal luma samples of the current video block, and performing the conversion based on the predicted value.

[0018] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction based on a main color component and a subordinate color component for conversion between a current video block of a video and an encoded representation of the video, where the main color component is selected as one of a luma color component and a chroma color component, and the subordinate color component is selected as the other of the luma color component and the chroma color component; and performing the conversion based on the predicted value.

[0019] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing downsampling on chroma and luma samples of adjacent blocks of a current video block; determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between a current video block of the video, which is a chroma block, and an encoded representation of the video; applying the CCLM to luma samples located within a luma block corresponding to the current video block to derive a predicted value of the current video block; and performing the conversion based on the predicted value.

[0020] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on two or more chroma samples from a group of adjacent chroma samples for conversion between a current video block of the video, which is a chroma block, and an encoded representation of the video, where the two or more chroma samples are selected based on an encoding mode of the current video block; and performing the conversion based on the determination.

[0021] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper adjacent samples, where W is an integer, and executing the conversion based on the determination.

[0022] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on H available left adjacent samples of the current video block, and executing the conversion based on the determination.

[0023] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples, and executing the conversion based on the determination.

[0024] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes selecting chroma samples based on a position rule for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the chroma samples are used to derive parameters of a cross-component linear model (CCLM), and performing the conversion based on the determination, and the position rule is defined to select chroma samples located in the row above and / or the left column of the current video block.

[0025] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a position where a luma sample is downsampled for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the downsampled luma sample is used to determine parameters of a cross-component linear model (CCLM) based on chroma samples and the downsampled luma sample, and the downsampled luma sample is at a position corresponding to the position of the chroma sample used to derive the parameters of the CCLM, and performing the conversion based on the determination.

[0026] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a method for deriving parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on encoding conditions associated with the current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, and performing the conversion based on the determination.

[0027] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining whether to derive the maximum value and / or minimum value of the luma component and the chroma component to be used to derive the parameters of the cross-component linear model (CCLM) based on the availability of the left adjacent block and the upper adjacent block of the current video block of the video for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and performing the conversion based on the determination.

[0028] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining the parameters of an encoding tool using a linear model based on the selected adjacent samples of the current video block of the video and the corresponding adjacent samples of a reference block for conversion between the current video block of the video and the encoded representation of the video, and performing the conversion based on the determination.

[0029] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining the parameters of a local illumination compensation (LIC) tool based on N adjacent samples of the current video block of the video and N corresponding adjacent samples of a reference block for conversion between the current video block of the video and the encoded representation of the video, where the N adjacent samples of the current video block are selected based on the positions of the N adjacent samples, and performing the conversion based on the determination, and the LIC tool uses a linear model of illumination change in the current video block during the conversion.

[0030] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on chroma samples and corresponding luma samples for conversion between a current video block of a video that is a chroma block and the encoded representation of the video, and performing the conversion based on the determination. A portion of the chroma samples is obtained by a padding operation. The chroma samples and the corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and the corresponding luma samples.

[0031] In yet another representative aspect, the above-described method is embodied in the form of processor-executable code and stored in a computer-readable program medium.

[0032] In yet another representative aspect, an apparatus configured or operable to execute the above-described method is disclosed. The apparatus may include a processor programmed to implement this method.

[0033] In yet another representative aspect, a video decoder device may implement the method described herein.

[0034] The above and other aspects and features of the disclosed technology are described in more detail in the drawings, the specification, and the claims.

Brief Description of the Drawings

[0035]

Figure 1

Figure 2

Figure 3A

Figure 3B

Figure 4A

Figure 4B

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19A

Figure 19B

Figure 20A

Figure 20B

Figure 21

Figure 22

Figure 23A

Figure 23B

Figure 24A

Figure 24B

Figure 24C

Figure 24D

Figure 24E

Figure 25A

Figure 25B

Figure 26A

Figure 26B

Figure 27A

Figure 27B

Figure 28A

Figure 28B

Figure 28C

Figure 29A

Figure 29B

Figure 29C

Figure 30A

Figure 30B

Figure 31A

Figure 31B

Figure 32

Modes for Carrying Out the Invention

[0036] Due to the increasing demand for higher-resolution videos, video encoding methods and technologies have become ubiquitous in modern technology. A video codec typically includes electronic circuitry or software that compresses or decompresses digital video and is constantly being improved to provide higher encoding efficiency. A video codec converts uncompressed video into a compressed format or vice versa. There is a complex relationship among video quality, the amount of data used to represent the video (determined by the bitrate), the complexity of the encoding and decoding algorithms, the sensitivity to data loss and errors, ease of editing, random access, and end-to-end latency. Compression formats usually conform to standard video compression specifications such as, for example, the HEVC (High Efficiency Video Coding) standard (also known as H.265 or MPEG-H Part 2), the upcoming VVC (Versatile Video Coding) standard, or other current and / or future video encoding standards.

[0037] Embodiments of the disclosed technology can be applied to existing video encoding standards (e.g., HEVC, H.265) and future standards to improve runtime performance. In this document, section headings are used to improve readability of the description, but those section headings do not limit the description or embodiments (and / or implementations) to only their respective sections.

[0038] 1 Embodiments of Cross-Component Prediction Cross-component prediction is a form of chroma-to-luma prediction approach that has a well-balanced trade-off between complexity and compression efficiency improvement.

[0039] 1.1 Example of Cross-Component Linear Model (CCLM) In some embodiments, also, to reduce cross-component redundancy, a cross-component linear model (CCLM) prediction mode (also referred to as LM) is used in JEM, where chroma samples are predicted based on the reconstructed luma samples of the same CU by using a linear model as follows:

Number

[0040] (i,j) represents the predicted chroma sample within the CU, recL’(i,j) represents the downsampled reconstructed luma sample of the same CU in the case of color format 4:2:0 or 4:2:2, and recL’(i,j) represents the reconstructed luma sample of the same CU in the case of color format 4:4:4. The CCLM parameters α and β are derived by minimizing the regression error between the adjacent reconstructed luma and chroma samples around the current block as follows: C (i,j) represents the predicted chroma sample within the CU, recL’(i,j) represents the downsampled reconstructed luma sample of the same CU in the case of color format 4:2:0 or 4:2:2, and recL’(i,j) represents the reconstructed luma sample of the same CU in the case of color format 4:4:4. The CCLM parameters α and β are

Number

Number

[0041] Here, L(n) represents the up and left adjacent reconstructed luma samples that are downsampled (in the case of color format 4:2:0 or 4:2:2) or original (in the case of color format 4:4:4), C(n) represents the up and left adjacent reconstructed chroma samples, and the value of N is equal to twice the minimum of the width and height of the current chroma coded block.

[0042] In some embodiments, the two above equations are directly applied to the coded block of square shape. In other embodiments, for a coded block that is not square, first, the adjacent samples of the longer boundary are subsampled so that they have the same number of samples as the shorter boundary. FIG. 1 shows the sample arrangement of the current block involved in the CCLM mode and the positions of the left and upper reconstructed samples.

[0043] In some embodiments, this regression error minimization calculation is performed not simply as an encoder search process but as part of the decoding process, and thus there is no syntax used to convey the α and β values.

[0044] In some embodiments, the CCLM prediction mode also includes prediction between two chroma components. For example, the Cr (red difference) component is predicted from the Cb (blue difference) component. Instead of using the reconstructed sample signal, the CCLM Cb-to-Cr prediction is applied in the residual domain. This adds the weighted reconstructed Cb residual to the original Cr intra prediction to obtain the final Cr prediction:

Number

[0045] Here, resi Cb ’(i,j) represents the reconstructed Cb residual sample at position (i,j).

[0046] In some embodiments, the scaling coefficient α can be derived in a similar way as in the CCLM luma-to-chroma prediction. The only difference is the addition of the regression cost to the default α value in the error function, and as a result, the derived scaling coefficient is:

Number

[0047] Here, Cb(n) represents adjacent reconstructed Cb samples, Cr(n) represents adjacent reconstructed Cr samples, and λ is equal to Σ(Cb(n)·Cb(n)) >> 9.

[0048] In some embodiments, the CCLM luma-to-chroma prediction mode is added as one additional chroma intra prediction mode. On the encoder side, in order to select the chroma intra prediction mode, one more RD cost check for the chroma component is added. When an intra prediction mode other than the CCLM luma-to-chroma prediction mode is used for the chroma component of the CU, the CCLM Cb-to-Cr prediction is used for the Cr component prediction.

[0049] 1.2 Examples of Multiple-Model CCLM In JEM, there are two CCLM modes: the single-model CCLM mode and the multiple-model CCLM mode (MMLM). As the name indicates, the single-model CCLM mode uses one linear model to predict chroma samples from luma samples for the entire CU, while in MMLM, two models can exist.

[0050] In MMLM, the adjacent luma samples and adjacent chroma samples of the current block are classified into two groups, and each group is used as a training set for deriving a linear model (i.e., specific α and β are derived for a specific group). Furthermore, the samples of the current luma block are also classified based on the same rules as the classification of the adjacent luma samples.

[0051] Figure 2 shows an example of classifying adjacent samples into two groups. A threshold is calculated as the average value of the adjacent reconstructed luma samples. Adjacent samples where Rec’L[x,y] ≤ Threshold are classified into group 1, and adjacent samples where Rec’L[x,y] > Threshold are classified into group 2.

Number

[0052] 1.3 Examples of Downsampling Filters in CCLM In some embodiments, for the 4:2:0 chroma format where 4 luma samples correspond to 1 chroma sample, in order to perform chroma prediction, the reconstructed luma block needs to be downsampled to match the size of the chroma signal. The default downsampling filter used in the CCLM mode is as follows:

Number

[0053] Here, for downsampling, a "Type 0" phase relationship as shown in FIG. 3A, such as horizontal collocated sampling and vertical inter-grid sampling, is assumed for the position of the chroma sample with respect to the position of the luma sample.

[0054] The exemplary 6-tap downsampling filter defined in (6) is used as the default filter in both the single-model CCLM mode and the multi-model CCLM mode.

[0055] In some embodiments, in the case of the MMLM mode, the encoder can selectively select one of the 4 additional luma downsampling filters for application to prediction in the CU and send a filter index indicating which of them is used. The 4 selectable luma downsampling filters for the MMLM mode, as shown in FIG. 3B, are as follows:

Number

[0056] 1.4 Multi-Directional LM (MDLM) This existing implementation proposes a multi-directional LM (MDLM). In the MDLM, two additional CCLM modes are proposed, namely, LM-A where the linear model parameters are derived based only on the top (or above) adjacent samples as shown in Figure 4A, and LM-L where the linear model parameters are derived based only on the left adjacent samples as shown in Figure 4B.

[0057] 1.5 Simplification of the Cross-Component Linear Model This existing implementation proposes replacing the LMS algorithms for the linear model parameters α and β with a linear equation, the so-called two-point method. The two points (a couple of Luma and Chroma) (A, B) are the minimum and maximum values within a set of adjacent Luma samples as shown in Figure 5.

[0058] Here, the linear model parameters α and β are obtained according to the following equations: α=(y B -y A ) / (x B -x A ), and β=y A -αx A and are obtained according to the following equations:

[0059] In some embodiments, the division operation required for the derivation of α is avoided and replaced by multiplication and shift as follows: a = 0; Shift = 16; intshift=(uiInternalBitDepth>8)?uiInternalBitDepth - 9:0; intadd=shift?1<<(shift - 1):0; intdiff=(MaxLuma - MinLuma+add)>>shift; if(diff>0) { intdiv=((MaxChroma - MinChroma)*g_aiLMDivTableLow[diff - 1]+32768)>>16; a = (((MaxChroma - MinChroma) * g_aiLMDivTableHigh[diff - 1] + div + add) >> shift); } b = MinLuma[1] - ((a * MinLuma[0]) >> iShift);

[0060] Here, S is set equal to iShift, α is set equal to a, and β is set equal to b. Also, g_aiLMDIVTableLow and g_ailLMDIVTableHigh are two tables each having 512 entries, and each entry stores a 16 - bit integer.

[0061] To derive the chroma predictor, for the current VTM implementation, the multiplication is

Equation

[0062] Since the shift S always has the same value, this implementation is also simpler than the current VTM implementation.

[0063] 1.6 Examples of CCLM in VVC A CCLM similar to that in JEM is adopted in VTM - 2.0, but the MM - CCLM in JEM is not adopted in VTM - 2.0. MDLM and a simplified CCLM are adopted in VTM - 3.0.

[0064] 1.7 Examples of Local Illumination Compensation in JEM Local Illumination Compensation (LIC) is based on a linear model for illumination change using scaling factor a and offset b. Also, it is adaptively enabled or disabled for each coding unit (CU) that is inter - mode coded.

[0065] When LIC is applied to a CU, the least-squares error method is adopted to derive parameters a and b by using the currently adjacent samples of the CU and their corresponding reference samples. More specifically, as illustrated in FIG. 32, the subsampled (2:1 subsampling) adjacent samples of the CU and the corresponding pixels in the reference picture (identified by the motion information of the current CU or the current sub-CU) are used. The IC parameters are derived and applied separately for each prediction direction.

[0066] When the CU is encoded in 2N×2N merge mode, the LIC flag is copied from the adjacent block in the same way as the motion information copy in the merge mode. Otherwise, for the CU, the LIC flag is signaled to indicate whether LIC is applied or not.

[0067] When LIC is enabled for a picture, an additional CU-level RD check is required to determine whether LIC is applied to the CU. When LIC is enabled for the CU, for integer-pixel motion search and fractional-pixel motion search, the mean-removed sum of absolute difference (MR-SAD) and the mean-removed sum of absolute Hadamard-transformed difference (MR-SATD) are used instead of SAD and SATD, respectively.

[0068] To reduce the complexity of symbolization, in JEM, an encoding scheme is applied where the LIC is disabled for the entire picture when there is no obvious illumination change between the current picture and its reference pictures. To identify this situation, the histogram of the current picture and the histograms of all reference pictures of the current picture are calculated at the encoder. If the histogram difference between the current picture and all reference pictures of the current picture is smaller than a given threshold, the LIC is disabled for the current picture; otherwise, the LIC is enabled for the current picture.

[0069] 2 Examples of Deficiencies in Existing Implementations The current implementation introduces a two-point method to replace the LMS approach in the LM mode in JEM. This new method reduces the number of additions and multiplications in CCLM but introduces the following problems.

[0070] 1) Comparisons are introduced to find the minimum and maximum luma values, which are not friendly to single instruction multiple data (SIMD) software design.

[0071] 2) Two look-up tables with a total of 1024 entries for storing 16-bit numbers are introduced, requiring 2K ROM memory, which is not desirable in hardware design.

[0072] Exemplary Method for Cross-Component Prediction in Video Encoding The embodiments of the technology disclosed herein overcome the drawbacks of existing implementations, thereby providing video coding with higher coding efficiency and lower computational complexity. The simplified linear model derivation for cross-component prediction based on the disclosed technology can enhance both existing and future video coding standards, as will become apparent in the following examples described for various implementations. The examples of the disclosed technology provided below are for illustrative purposes of general concepts and are not meant to be construed as limiting. In one example, unless explicitly stated otherwise, the various features described in these examples can be combined.

[0073] In the following examples and methods, the term "LM method" includes, but is not limited to, the LM mode in JEM or VTM, the MMLM mode in JEM, the left LM mode that uses only the left adjacent sample to derive a linear model, the upper LM mode that uses only the upper adjacent sample to derive a linear model, or other types of methods that utilize luma reconstruction samples to derive a chroma prediction block. All LM modes that are neither LM-L nor LM-A are referred to as the normal LM mode.

[0074] In the following examples and methods, Shift(x, s) is defined as Shift(x, s) = (x + off) >> s, and SignShift(x, s) is

Equation

[0075] where off is an integer such as 0 or 2 s-1 and so on.

[0076] The height and width of the current chroma block are denoted as H and W, respectively.

[0077] Figure 6 shows an example of an adjacent sample group of the current chroma block. Let the coordinates of the sample in the upper left of the current chroma block be denoted as (x, y). Then, the adjacent chroma sample group (shown in Figure 6) is A: Upper left sample on the left: [x - 1, y], B: Upper middle left sample on the left: [x - 1, y + H / 2 - 1], C: Lower middle left sample on the left: [x - 1, y + H / 2], D: Lower left sample on the left: [x - 1, y + H - 1], E: Upper extended lower sample on the left: [x - 1, y + H], F: Upper extended middle lower sample on the left: [x - 1, y + H + H / 2 - 1], G: Lower extended middle lower sample on the left: [x - 1, y + H + H / 2], I: Lower extended lower sample on the left: [x - 1, y + H + H - 1], J: Left upper sample on the upper side: [x, y - 1], K: Left middle upper sample on the upper side: [x + W / 2 - 1, y - 1], L: Right middle upper sample on the upper side: [x + W / 2, y - 1], M: Right upper sample on the upper side: [x + W - 1, y - 1], N: Upper extended left sample on the upper side: [x + W, y - 1], O: Upper extended left middle sample on the upper side: [x + W + W / 2 - 1, y - 1], P: Upper extended right middle sample on the upper side: [x + W + W / 2, y - 1], and Q: Upper extended right sample on the upper side: [x + W + W - 1, y - 1] are denoted as.

[0078] Example 1. The parameters α and β in the LM method are derived from chroma samples at two or more specific positions. a. The derivation also depends on the corresponding downsampled luma samples of the selected chroma samples. Alternatively, the derivation depends on the corresponding luma samples of the selected chroma samples, for example, when it is in the 4:4:4 color format. b. For example, the parameters α and β in CCLM are, for example, 2 S (For example, S = 2 or 3) derived from the chroma samples at the positions of: i. Positions {A, D, J, M}; ii. Positions {A, B, C, D, J, K, L, M}; iii. Positions {A, I, J, Q}; iv. Positions {A, B, D, I, J, K, M, Q}; v. Positions {A, B, D, F, J, K, M, O}; vi. Positions {A, B, F, I, J, K, O, Q}; vii. Positions {A, C, E, I, J, L, N, Q}; viii. Positions {A, C, G, I, J, L, P, Q}; ix. Positions {A, C, E, G, J, L, N, P}; x. Positions {A, B, C, D}; xi. Positions {A, B, D, I}; xii. Positions {A, B, D, F}; xiii. Positions {A, C, E, I}; xiv. Positions {A, C, G, I}; xv. Positions {A, C, E, G}; xvi. Positions {J, K, L, M}; xvii. Positions {J, K, M, Q}; xviii. Positions {J, K, M, O}; xix. Positions {J, K, O, Q}; xx. Positions {J, L, N, Q}; xxi. Positions {J, L, P, Q}; xxii. Positions {J, L, N, P}; xxiii. Positions {A, B, C, E, E, F, G, I}; xxiv. Positions {J, K, L, M, N, O, P, Q}; etc. are derived from c. For example, the parameters α and β in CCLM are derived from the chroma samples at the following positions: i. Any combination between {A, B, C, D, E, F, G, I} and {J, K, L, M, N, O, P, Q}, such as the following (a) Positions A and J; (b) Positions B and K; (c) Positions C and L; (d) Positions D and M; (e) Positions E and N; (f) Positions F and O; (g) Positions G and P; (h) Positions I and Q; ii. Any two different positions fetched from {A, B, C, D, E, F, G} (a) Positions A and B; (b) Positions A and C; (c) Positions A and D; (d) Positions A and E; (e) Positions A and F; (f) Positions A and G; (g) Positions A and I; (h) Positions D and B; (i) Positions D and C; (j) Positions E and B; (k) Positions E and C; (l) Positions I and B; (m) Positions I and C; (n) Positions I and D; (o) Positions I and E; (p) Positions I and F; (q) Positions I and G; iii. Any two different positions fetched from {J, K, L, M, N, O, P, Q} (a) Positions J and K; (b) Positions J and L; (c) Positions J and M; (d) Positions J and N; (e) Positions J and O; (f) Positions J and P; (g) Positions J and Q; (h) Positions M and K; (i) Positions M and L; (j) Positions N and K; (k) Positions N and L; (l) Positions Q and K; (m) Positions Q and L; (n) Positions Q and M; (o) Positions Q and N; (p) Positions Q and O; (q) Positions Q and P; (r) Positions Q and Q; iv. In one example, if two selected positions have the same luma value, more positions can be further checked. d. For example, in order to derive parameters α and β in CCLM by the two-point method, not all available chroma samples are searched to find the minimum and maximum luma values.

[0079] i. One of the K chroma samples (and their corresponding downsampled luma samples) is included in the search set T. K can be 2, 4, 6, or 8.

[0080] (a) For example, if Rec[x, y] is the upper adjacent sample, it is included in the search set only if x % K == 0. If Rec[x, y] is the left adjacent sample, it is included in the search set only if y % K == 0.

[0081] ii. Only chroma samples at specific positions such as those defined in 1.a.i.-1.a.xxiv are included in the search set. e. In mode LM-L, all selected samples must be the left adjacent samples. f. In mode LM-A, all selected samples must be the upper adjacent samples. g. The selected positions may be fixed or adaptive.

[0082] i. In one example, which positions are selected may depend on the width and height of the current chroma block; ii. In one example, which positions are selected may be signaled from the encoder to the decoder, for example, within VPS / SPS / PPS / slice header / tile group header / tile / CTU / CU / PU, etc. h. The selected chroma samples are used to derive the parameters α and β by the least squares average method shown in formulas (2) and (3). In formulas (2) and (3), N is set to the number of selected samples. i. A pair of selected chroma samples are used to derive the parameters α and β by the two-point method. j. In one example, how the samples are selected may depend on the availability of adjacent blocks.

[0083] i. For example, when both the left and upper adjacent blocks are available, positions A, D, J, and M are selected; when only the left adjacent block is available, positions A and D are selected; and when only the upper adjacent block is available, positions J and M are selected.

[0084] Example 2. The set of parameters in the CCLM mode is first derived and then combined to form the final linear model parameters used to encode one block. α 1 and β 1 are derived from a group of chroma samples at specific positions denoted as group 1, α 2 and β 2 are derived from a group of chroma samples at specific positions denoted as group 2, α N and β N are derived from a group of chroma samples at specific positions denoted as group N. Then, the final α and β can be derived from (α 1 , β 1 ), …, (α N , β N ). a. In one example, α is calculated as the average of α 1 , …, α N , and β is calculated as the average of β 1 , …, β N .

[0085] i. In one example, α = SignShift(α 1 + α 2 , 1), β = SignShift(β 1 + β 2 , 1).

[0086] ii. In one example, α = Shift(α 1 + α 2 , 1), β = Shift(β 1 + β 2 , 1).

[0087] iii. When (α 1 , β 1 ) and (α 2 , β 2 ) have different precisions, for example, to obtain the chroma prediction CP from its corresponding downsampled luma sample LR, it is calculated as (α 1 , β 1 ) is used, CP = SignShift(α 1 × LR + β 1 , SH 1 ) but when (α 2 , β 2 ) is used, CP = SignShift(α 2 × LR + β 2 , SH 2 ) is calculated, and Sh 1 is not equal to Sh 2 , and the parameters need to be shifted before being combined. If Sh 1 > Sh 2 , then before being combined, the parameters should be shifted as (a) α 1 = SignShift(α 1 , Sh 1 - Sh 2 ), β 1 = SignShift(β 1 , Sh 1 - Sh 2 ). Then the final precision is (α 2 , β 2 ).

[0088] (b) α 1 = Shift(α 1 , Sh 1 - Sh 2 ), β 1 = Shift(β 1 , Sh 1 - Sh 2 ) should be shifted as such. Then, the final accuracy is (α 2 , β 2 ).

[0089] (c) α 2 = α 2 << (Sh 1 - Sh 2 ), β 2 = β 2 << (Sh 1 - Sh 2 ) should be shifted as such. Then, the final accuracy is (α 1 , β 1 ). b. Some examples of the positions of Group 1 and Group 2: i. Group 1: Positions A and D, Group 2: Positions J and M ii. Group 1: Positions A and I, Group 2: Positions J and Q iii. Group 1: Positions A and D, Group 2: Positions E and I, and the two groups are used in mode LM-L iv. Group 1: Positions J and M, Group 2: Positions N and Q, and the two groups are used in mode LM-A v. Group 1: Positions A and B, Group 2: Positions C and D, and the two groups are used in mode LM-L vi. Group 1: Positions J and K, Group 2: Positions L and M, and the two groups are used in mode LM-A.

[0090] Example 3. Assume that the input is two chroma sample values denoted as C0 and C1, and their corresponding luma sample values denoted as L0 and L1 (L0 < L1). The two-point method uses these inputs to α = (C1 - C0) / (L1 - L0), and β = C0 - αL0 As such, α and β can be derived.

[0091] The bit depths of the luma sample and the chroma sample are denoted as BL and BC. One or more simplifications for this implementation are a. When L1 is equal to L0, α is output as 0. Alternatively, when L1 is equal to L0, instead of using the CCLM mode, a specific intra prediction mode (e.g., DM mode, DC, or planar) is used to derive the prediction block.

[0092] b. The division operation is replaced with other operations that do not use a lookup table. The log2 operation can be performed by checking the position of the most significant digit.

[0093] i. α = Shift(C1 - C0, Floor(log 2 (L1 - L0))), or α = SignShift(C1 - C0, Floor(log 2 (L1 - L0))) ii. α = Shift(C1 - C0, Ceiling(log 2 (L1 - L0))), or α = SignShift(C1 - C0, Ceiling(log 2 (L1 - L0))) iii. Example i or example ii can be selected based on the value of L1 - L0.

[0094] (a) For example, when L1 - L0 < T, example i is used; otherwise, example ii is used. For example, T can be (Floor(log 2 (L1 - L0)) + Ceiling(log 2 (L1 - L0))) / 2 and can be set as such.

[0095] (b) For example, 3×(L1 - L0) < 2 Floor(log2(L1-L0))+2If it is the case, Example i is used; otherwise, Example ii is used.

[0096] (c) For example, (L1 - L0) 2 <2 2×Floor(log2(L1-L0))+1 If it is the case, Example i is used; otherwise, Example ii is used.

[0097] c. The division operation is replaced by a single lookup table denoted as M[k].

[0098] i. The size of the lookup table denoted as V is less than 2 P where P is an integer such as, for example, 5, 6, or 7.

[0099] ii. Each entry of the lookup table stores an F-bit integer, where, for example, F = 8 or 16.

[0100] (a) In one example, M[k - Z] = ((1 << S) + Off) / k, where S is an integer that determines the precision, for example, S = F. Off is the offset, for example, Off = (k + Z) >> 1. Z determines the starting value of the table, for example, Z = 1, or Z = 8, or Z = 32, etc. The valid key k for querying the table must satisfy k >= Z.

[0101] iii. k = Shift(L1 - L0, W) is used as the key for querying the lookup table.

[0102] (a) In one example, W depends on BL, V, and Z.

[0103] (b) In one example, W also depends on the value of L1 - L0.

[0104] iv. If k is not a valid key for querying the lookup table (k - Z < 0, or k - Z >= V), α is output as 0.

[0105] v. For example, α = Shift((C1 - C0) × M[k - Z], D), or α = SignShift((C1 - C0) × M[k - Z], D) vi. To obtain the chroma prediction CP from its corresponding (e.g., downsampled in the case of 4:2:0) luma sample LR, it is calculated as follows: CP = SignShift(α × LR + β, Sh), or CP = Shift(α × LR + β, Sh) vii. Sh may be a fixed number or may depend on the values of C0, C1, L0, and L1 used to calculate α and beta.

[0106] (a) Sh may depend on BL, BC, V, S, and D.

[0107] (b) D may depend on Sh.

[0108] viii. The size of the lookup table denoted as V is equal to 2 P where P is an integer such as, for example, 5, 6, 7, or 8. Alternatively, V is set to 2P - M (e.g., M is equal to 0).

[0109] ix. Assuming α = P / Q (e.g., Q = L1 - L0, P = C1 - C0, or they are derived in other ways), α is calculated using a lookup table as α = Shift(P × M[k - Z], D), or α = SignShift(P × M[k - Z], D), where k is the key (index) for querying the entry in the lookup table.

[0110] (a) In one example, k is derived from Q using the function: k = f(Q).

[0111] (b) In one example, k is derived from Q and P using the function: k = f(Q, P).

[0112] (c) In one example, k is valid within a specific range [kMin, kMax]. For example, kMin = Z and kMax = V + Z.

[0113] (d) In one example, k = Shift(Q, W), and a. W may depend on BL, V, and Z.

[0114] b. W may depend on the value of Q.

[0115] c. In one example, when k is calculated as Shift(Q, W), α is calculated using a lookup table as α = (Shift(P × M[k - Z], D)) << W, or α = (SignShift(P × M[k - Z], D)) << W as follows.

[0116] (e) In one example, k is derived in different ways for different values of Q.

[0117] a. For example, when Q <= kMax, k = Q, and when Q > kMax, k = Shift(Q, W). For example, W is selected as the smallest positive integer that makes Shift(Q, W) less than or equal to kMax.

[0118] b. For example, k = Min(kMax, Q).

[0119] c. For example, k = Max(kMin, Min(kMax, Q)).

[0120] (f) In one example, when Q < 0, -Q is used to replace Q in the calculation. And -α is output.

[0121] (g) In one example, when Q is equal to 0, α is set to a default value such as 0 or 1.

[0122] (h) In one example, when Q is 2 EWhen E >= 0, α = Shift(P, E) or α = SignShift(P, E).

[0123] d. All operations for deriving the LM parameter must be within K bits, and K can be 8, 10, 12, 16, 24, or 32.

[0124] i. If an intermediate variable can exceed the range represented by the constraint bits, it should be clipped or right-shifted so that it is within the constraint bits.

[0125] Example 4. One single chroma block may use multiple linear models, and the selection of the multiple linear models depends on the positions of the chroma samples within the chroma block.

[0126] a. In one example, the LM-L mode and the LM-A mode can be combined within a single chroma block.

[0127] b. In one example, some samples are predicted in the LM-L mode and other samples are predicted in the LM-A mode.

[0128] i. Figure 7 shows an example. Assume the top-left sample is at position (0, 0). Samples at positions (x, y) where x > y (or x >= y) are predicted by LM-A, and other samples are predicted by LM-L.

[0129] c. Let the predictions for the sample at position (x, y) in LM-L and LM-A be P1(x, y) and P2(x, y) respectively. Then the final prediction P(x, y) is calculated as a weighted sum of P1(x, y) and P2(x, y).

[0130] i. P(x, y) = w1 * P1(x, y) + w2 * P2(x, y) (a) w1 + w2 = 1 ii. P(x, y) = (w1 * P1(x, y) + w2 * P2(x, y) + Offset) >> shift, where offset is 0 or 1 << (shift - 1), and shift is an integer such as 1, 2, 3, ….

[0131] (a) w1 + w2 = 1 << shift iii. P(x, y) = (w1 * P1(x, y) + ((1 << shift) - w1) * P2(x, y) + Offset) >> shift, where offset is 0 or 1 << (shift - 1), and shift is an integer such as 1, 2, 3, ….

[0132] iv. w1 and w2 may depend on the position (x, y).

[0133] (a) For example, when x < y, w1 > w2 (e.g., w1 = 3, w2 = 1), (b) For example, when x > y, w1 < w2 (e.g., w1 = 1, w2 = 3), (c) For example, when x == y, w1 = w2 (e.g., w1 = 2, w2 = 2), (d) For example, when y - x increases when x < y, w1 - w2 increases, (e) For example, when x - y increases when x > y, w2 - w1 increases.

[0134] Example 5. It is proposed to divide adjacent samples (including chroma samples and their corresponding luma samples, which may be downsampled) into N groups. The maximum luma value and minimum luma value of the k-th group (k = 0, 1, …, N - 1) are denoted as MaxL k and MinL k respectively, and their corresponding chroma values are denoted as MaxC k and MinC k respectively.

[0135] a. In one example, MaxL = f1(MaxL S0 , MaxL S1, …, MaxL Sm ) is calculated as, MaxC is, MaxC = f2(MaxC S0 , MaxC S1 , …, MaxC Sm ) is calculated as, MinL is, MinL = f3(MinL S0 , MinL S1 , …, MinL Sm ) is calculated. MinC is, MinC = f4(MinC S0 , MinC S1 , …, MinC Sm ) is calculated. f1, f2, f3 and f4 are functions. The two - point method calculates α and β as follows using these inputs: α = (MaxC - MinC) / (MaxL - MinL) β = MinC - αMinL i. In one example, f1, f2, f3, f4 all represent averaging functions.

[0136] ii. S0, S1, …, Sm are the selected group indices used to calculate α and β.

[0137] (1) For example, all groups are used, for example, S0 = 0, S1 = 1, …, Sm = N - 1.

[0138] (2) For example, two groups are used, for example, m = 1, S0 = 0, S1 = N - 1.

[0139] (3) For example, not all groups are used, for example, m < N - 1, S0 = 0, S1 = 2, S3 = 4, …, etc.

[0140] b. In one example, the samples (or down - sampled samples) located in the upper row can be classified into one group, and the samples (or down - sampled samples) located in the left column of the block can be classified into another group.

[0141] c. In one example, samples (or downsampled samples) are classified based on their positions or coordinates.

[0142] i. For example, the samples can be classified into two groups.

[0143] (1) For samples with coordinates (x, y) located in the upper row, it is classified into group S0 when x % P = Q, where P and Q are integers, for example, P = 2, Q = 1, P = 2, Q = 0, or P = 4, Q = 0, and into group S1 otherwise.

[0144] (2) For samples with coordinates (x, y) located in the left column, it is classified into group S0 when y % P = Q, where P and Q are integers, for example, P = 2, Q = 1, P = 2, Q = 0, or P = 4, Q = 0, and into group S1 otherwise.

[0145] (3) Only the samples within one group, such as S0, are used to find MaxC and MaxL. For example, MaxL = MaxLS0, and MaxC = MaxCS0.

[0146] d. In one example, only some of the adjacent samples (or downsampled samples) are used to be divided into N groups.

[0147] e. The number of groups (e.g., N) and / or the index of the selected groups and / or the functions (f1 / f2 / f3 / f4) may be predefined, or may be signaled within SPS / VPS / PPS / picture header / slice header / tile group header / LCU group / LCU / CU.

[0148] f. In one example, how to select the samples of each group may depend on the availability of adjacent blocks.

[0149] i. For example, when both the left and upper adjacent blocks are available, MaxL 0 / MaxC 0 and MinL 0 / MinC 0 are found from positions A and D, and MaxL 1 / MaxC 1 and MinL 1 / MinC 1 are found from positions J and M, and MaxL = (MaxL 0 + MaxL 1 ) / 2, MaxC = (MaxC 0 + MaxC 1 ) / 2, MinL = (MinL 0 + MinL 1 ) / 2, MinC = (MinC 0 + MinC 1 ) / 2.

[0150] ii. For example, when only the left adjacent block is available, MaxL / MaxC and MinL / MinC are directly found from positions A and D.

[0151] (1) Alternatively, when the upper adjacent block is not available, α and β are set equal to some default values. For example, α = 0, and β = 1 << (bitDepth - 1), where bitDepth is the bit depth of the chroma sample.

[0152] iii. For example, when only the upper adjacent block is available, MaxL / MaxC and MinL / MinC are directly found from positions J and M.

[0153] (1) Alternatively, when the left adjacent block is not available, α and β are set equal to some default values. For example, α = 0, and β = 1 << (bitDepth - 1), where bitDepth is the bit depth of the chroma sample.

[0154] g. In one example, how the samples of each group are selected may depend on the width and height of the block.

[0155] h. In one example, how the samples of each group are selected may depend on the values of the samples.

[0156] i. In one example, two samples with the maximum and minimum luma values are selected to be in the first group. And all other samples are made to be in the second group.

[0157] Example 6. It is proposed that whether to apply the LM-L mode and the LM-A mode, and how to apply them, may depend on the current width (W) and height (H) of the block.

[0158] (a) For example, when W > K × H, LM-L cannot be applied, for example, K = 2.

[0159] (b) For example, when H > K × W, LM-A cannot be applied, for example, K = 2.

[0160] (c) When one of LM-L and LM-A cannot be applied, a flag indicating which of LM-L or LM-A is used should not be signaled.

[0161] Example 7. A flag indicating whether the CCLM mode is applied is signaled. The context used for arithmetic coding to encode the flag may depend on whether the upper left adjacent block shown in FIG. 8 applies the CCLM mode.

[0162] (a) In one example, when the upper left adjacent block applies the CCLM mode, the first context is used, and when the upper left adjacent block does not apply the CCLM mode, the second context is used. (b) In one example, if the upper left adjacent block is not available, this is considered as not applying the CCLM mode. (c) In one example, if the upper left adjacent block is not available, this is considered as applying the CCLM mode. (d) In one example, if the upper left adjacent block is not intra-coded, this is considered as not applying the CCLM mode. (e) In one example, if the upper left adjacent block is not intra-coded, this is considered as applying the CCLM mode.

[0163] Example 8. Indications or codewords for the DM mode and the LM mode can be coded in a different order for each sequence / for each picture / for each tile / for each block.

[0164] (a) The coding order of the LM and DM indications (e.g., first coding whether it is in the LM mode, and if not, then coding whether it is in the DM mode; or first coding whether it is in the DM mode, and if not, then coding whether it is in the LM mode) can depend on the mode information of one or more adjacent blocks.

[0165] (b) In one example, if the block above and to the left of the current block is available and is coded in the LM mode, the indication of the LM mode is coded first.

[0166] (c) Alternatively, if the block above and to the left of the current block is available and is coded in the DM mode, the indication of the DM mode is coded first.

[0167] (d) Alternatively, if the block above and to the left of the current block is available and is coded in non-LM (e.g., the DM mode, or another intra prediction mode other than LM), the indication of the DM mode is coded first.

[0168] (e) In one example, the indication of this order may be signaled within SPS / VPS / PPS / picture header / slice header / tile group header / LCU group / LCU / CU.

[0169] Example 9. In the above example, the sample (or downsampled sample) may be located beyond the range of 2×W upper adjacent samples or 2×H left adjacent samples shown in FIG. 6.

[0170] (a) In the LM mode or LM-L mode, the adjacent sample RecC[x−1,y + d] can be used, where d is within the range of [T,S]. T may be less than 0, and S may be greater than 2H−1. For example, T = −4, S = 3H. In another example, T = 0, S = max(2H,W + H). In yet another example, T = 0 and S = 4H.

[0171] (b) In the LM mode or LM-A mode, the adjacent sample RecC[x + d,y] can be used, where d is within the range of [T,S]. T may be less than 0, and S may be greater than 2W−1. For example, T = −4, S = 3W. In another example, T = 0, S = max(2W,W + H). In yet another example, T = 0 and S = 4W.

[0172] Example 10. In one example, the chroma adjacent samples and their corresponding luma samples (which may be downsampled) are downsampled before deriving the linear model parameters α and β as disclosed in Examples 1-7. Let the current width and height of the chroma block be W and H.

[0173] (a) In one example, whether to perform downsampling and how to perform it may depend on W and H.

[0174] (b) In one example, the number of adjacent samples used to derive the parameter to the left of the current block and the number of adjacent samples used to derive the parameter above the current block should be the same after the downsampling process.

[0175] (c) In one example, when W is equal to H, the chroma adjacent samples and their corresponding luma samples (which may be downsampled) are not downsampled.

[0176] (d) In one example, when W < H, the chroma adjacent samples to the left of the current block and their corresponding luma samples (which may be downsampled) are downsampled.

[0177] (i) In one example, for every H / W chroma samples, one chroma sample is picked up to be used for deriving α and β. The other chroma samples are discarded. For example, assuming R[0,0] represents the top-left sample of the current block, for K from 0 to W - 1, R[-1, K*H / W] is picked up to be used for deriving α and β.

[0178] (e) In one example, when W > H, the chroma adjacent samples above the current block and their corresponding luma samples (which may be downsampled) are downsampled.

[0179] (i) In one example, for every W / H chroma samples, one chroma sample is picked up to be used for deriving α and β. The other chroma samples are discarded. For example, assuming R[0,0] represents the top-left sample of the current block, for K from 0 to H - 1, R[K*W / H, -1] is picked up to be used for deriving α and β.

[0180] (ii) FIG. 9 shows an example of a sample picked up when positions D and M in FIG. 6 are used to derive α and β, and downsampling performed when W > H.

[0181] Example 11. Adjacent downsampled / original reconstructed samples, and / or downsampled / original reconstructed samples may be further refined before being used in a linear model prediction process or a cross-color component prediction process.

[0182] (a) “Refined” may refer to a filtering process.

[0183] (b) “Refined” may refer to some non-linear process.

[0184] (c) To derive α and β, for example α = (C1 - C0) / (L1 - L0) and β = C0 - αL0, it is proposed to pick up several adjacent samples (including chroma samples and their corresponding luma samples, which can be downsampled) and calculate C1, C0, L1, and L0.

[0185] (d) In one example, S adjacent luma samples (which can be downsampled) denoted as Lx1, Lx2,..., LxS and their corresponding chroma samples denoted as Cx1, Cx2,..., CxS are used to derive C0 and L0 as follows, and T adjacent luma samples (which can be downsampled) denoted as Ly1, Ly2,..., LyT and their corresponding chroma samples denoted as Cy1, Cy2,..., CyT are used to derive C1 and L1 as follows: (i) C0 = f0(Cx1, Cx2,..., CxS), L0 = f1(Lx1, Lx2,..., LxS), C1 = f2(Cy1, Cy2,..., CyT), L1 = f4(Ly1, Ly2,..., LyT). f0, f1, f2, and f3 are some functions.

[0186] (ii) In one example, f0 is the same as f1.

[0187] (iii) In one example, f2 is the same as f3.

[0188] (iv) In one example, f0, f1, f2, and f3 are the same.

[0189] 1. For example, they are all averaging functions.

[0190] (v) In one example, S is equal to T.

[0191] 1. In one example, the set {x1, x2, …, xS} is the same as the set {y1, y2, …, yT}.

[0192] (vi) In one example, Lx1, Lx2, …, LxS are selected as the smallest S luma samples among a group of luma samples.

[0193] 1. For example, the group of luma samples includes all adjacent samples used in VTM-3.0 to derive CCLM linear parameters.

[0194] 2. For example, the group of luma samples includes some adjacent samples used in VTM-3.0 to derive CCLM linear parameters.

[0195] a. For example, the group of luma samples includes the four samples shown in FIG. 2-5.

[0196] (vii) In one example, Ly1, Ly2, …, LyS are selected as the largest S luma samples among a group of luma samples.

[0197] 1. For example, the group of luma samples includes all adjacent samples used in VTM-3.0 to derive CCLM linear parameters.

[0198] 2. For example, the group of luma samples includes some of the adjacent samples used in VTM-3.0 to derive the CCLM linear parameters.

[0199] a. For example, the group of luma samples includes the four samples shown in FIG. 2-5.

[0200] Example 12. It is proposed to select other adjacent samples or downsampled adjacent samples based on the maximum adjacent sample or downsampled adjacent sample within a given set of adjacent samples or downsampled adjacent samples.

[0201] (a) In one example, denote that the maximum adjacent sample or downsampled adjacent sample is at position (x0, y0). Then, other samples can be selected using the samples in the regions (x0 - d1, y0), (x0, y0 - d2), (x0 + d3, y0), (x0, y0 + d4). The integers {d1, d2, d3, d4} may depend on the position (x0, y0). For example, if (x0, y0) is on the left of the current block, d1 = d3 = 1, and d2 = d4 = 0. If (x0, y0) is on the top of the current block, d1 = d3 = 0, and d2 = d4 = 1.

[0202] (b) In one example, denote that the minimum adjacent sample or downsampled adjacent sample is at position (x1, y1). Then, other samples can be selected using the samples in the regions (x1 - d1, y1), (x1, y1 - d2), (x1 + d3, y1), (x1, y1 + d4). The integers {d1, d2, d3, d4} may depend on the position (x1, y1). For example, if (x1, y1) is on the left of the current block, d1 = d3 = 1, and d2 = d4 = 0. If (x1, y1) is on the top of the current block, d1 = d3 = 0, and d2 = d4 = 1.

[0203] (c) In one example, the sample represents a sample of one color component (e.g., the luma color component). Samples used in the CCLM / cross-color component process can be derived by the corresponding coordinates of the second color component.

[0204] (d) Using a similar method, the minimum sample can be derived.

[0205] Example 13. In the above example, luma and chroma may be exchanged. Alternatively, the luma color component may be replaced by a primary color component (e.g., G), and the chroma color component may be replaced by a secondary color component (e.g., B or R).

[0206] Example 14. The selection of the position of the chroma sample (and / or the corresponding luma sample) may depend on the encoded mode information.

[0207] (a) Alternatively, furthermore, it may depend on the availability of adjacent samples, such as whether the left column or the top row or the top-right row or the bottom-left column is available, for example. Figure 10 depicts the concept of the left column / top row / top-right row / bottom-left column for a block.

[0208] (b) Alternatively, furthermore, it may depend on the availability of samples at specific positions, such as whether the first top-right sample and / or the first bottom-left sample is available, for example.

[0209] (c) Alternatively, furthermore, it may depend on the block size.

[0210] (i) Alternatively, furthermore, it may depend on the ratio between the current width and height of the chroma (and / or luma) block.

[0211] (ii) Alternatively, furthermore, it may depend on whether the width and / or height is equal to K (e.g., K = 2).

[0212] (d) In one example, when the current mode is the normal LM mode, the following method may be applied to select chroma samples (and / or downsampled or non-downsampled luma samples).

[0213] (i) If both the left column and the top row are available, two samples from the left column and two samples from the top row may be selected. They may be located as follows (assuming the top left coordinates of the current block are (x, y)).

[0214] 1. (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - 1, y - 1).

[0215] 2. (x - 1, y), (x, y - 1), (x - 1, y + H - H / W - 1), and (x + W - 1, y - 1). For example, when H is greater than W.

[0216] 3. (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - W / H - 1, y - 1). For example, when H is less than W.

[0217] 4. (x - 1, y), (x, y - 1), (x - 1, y + H - max(1, H / W)), and (x + W - max(1, W / H), y - 1).

[0218] (ii) If only the top row is available, the samples are selected only from the top row.

[0219] 1. For example, four samples from the top row may be selected.

[0220] 2. For example, two samples may be selected.

[0221] 3. How the samples are selected may depend on the width / height. For example, when W > 2, four samples are selected, and when W = 2, two samples are selected.

[0222] 4. The selected samples may be located as follows (assuming that the upper left coordinates of the current block are (x, y)).

[0223] a. (x, y - 1), (x + W / 4, y - 1), (x + 2*W / 4, y - 1), (x + 3*W / 4, y - 1).

[0224] b. (x, y - 1), (x + W / 4, y - 1), (x + 3*W / 4, y - 1), (x + W - 1, y - 1).

[0225] c. (x, y - 1), (x + (2W) / 4, y - 1), (x + 2*(2W) / 4, y - 1), (x + 3*(2W) / 4, y - 1). For example, when the upper right row is available, or when the first upper right sample is available.

[0226] d. (x, y - 1), (x + (2W) / 4, y - 1), (x + 3*(2W) / 4, y - 1), (x + (2W) - 1, y - 1). For example, when the upper right row is available, or when the first upper right sample is available.

[0227] (iii) If only the left column is available, the samples are selected only from the left column.

[0228] 1. For example, four samples from the left column may be selected.

[0229] 2. For example, two samples from the left column may be selected.

[0230] 3. How the samples are selected may depend on the width / height. For example, if H > 2, four samples are selected, and if H = 2, two samples are selected.

[0231] 4. The selected samples may be located as follows.

[0232] a. (x - 1, y), (x - 1, y + H / 4), (x - 1, y + 2*H / 4), (x - 1, y + 3*H / 4).

[0233] b. (x - 1, y), (x - 1, y + 2*H / 4), (x - 1, y + 3*H / 4), (x - 1, y + H - 1).

[0234] c. (x - 1, y), (x - 1, y + (2H) / 4), (x - 1, y + 2*(2H) / 4), (x - 1, y + 3*(2H) / 4). For example, when the left - lower column is available, or when the first left - lower sample is available.

[0235] d. (x - 1, y), (x - 1, y + 2*(2H) / 4), (x - 1, y + 3*(2H) / 4), (x - 1, y + (2H) - 1). When the left - lower column is available, or when the first left - lower sample is available.

[0236] (iv) In the above example, only two of the four samples may be selected.

[0237] (e) In one example, when the current mode is the LM - A mode, samples can be selected according to Example 11(d)(ii).

[0238] (f) In one example, when the current mode is the LM - L mode, samples can be selected according to Example 11(d)(iii).

[0239] (g) The selected luma samples (e.g., according to the positions of the selected chroma) may be grouped into two groups, one having the maximum and minimum values among all the selected samples, and the other having all the remaining samples.

[0240] (i) To derive the LM parameters, the two maximum values of the two groups are averaged as the maximum value in the two - point method, and the two minimum values of the two groups are averaged as the minimum value in the two - point method.

[0241] (ii) If there are only four selected samples, the two larger sample values are averaged, the two smaller sample values are averaged, and the averaged values are used as inputs to the two-point method for deriving the LM parameter.

[0242] Example 15. In the above example, luma and chroma may be exchanged. Alternatively, the luma color component may be replaced by the main color component (e.g., G), and the chroma color component may be replaced by the subordinate color component (e.g., B or R).

[0243] Example 16. It is proposed to select the above adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) based on a first position offset value (denoted as F) and a step value (denoted as S). Let the width of the available above adjacent samples to be used be W.

[0244] a. In one example, W can be set equal to the width of the current block.

[0245] b. In one example, W may be set to (L times the width of the current block), where L is an integer value.

[0246] c. In one example, if both the above and left blocks are available, W can be set to the width of the current block.

[0247] i. Alternatively, if the left block is not available, W may be set to (L times the width of the current block), where L is an integer value.

[0248] ii. In one example, L may depend on the availability of the upper right block. Alternatively, L may depend on the availability of one upper left sample.

[0249] d. In one example, W may depend on the coding mode.

[0250] i. In one example, when the current block is encoded as the LM mode, W can be set to the width of the current block.

[0251] ii. When the current block is encoded as the LM-A mode, W may be set to (L times the width of the current block), where L is an integer value.

[0252] (a) L may depend on the availability of the upper-right block. Alternatively, L may depend on the availability of one upper-left sample.

[0253] e. Assuming the upper-left coordinates of the current block are (x0, y0), for K = 0, 1, 2, … kMax, the upper adjacent sample at the position (x0 + F + K × S, y0 - 1) is selected.

[0254] f. In one example, F = W / P. P is an integer.

[0255] i. For example, P = 2 i and i is an integer such as 1 or 2, for example.

[0256] ii. Alternatively, F = W / P + offset.

[0257] g. In one example, S = W / Q. Q is an integer.

[0258] i. For example, Q = 2 j and j is an integer such as 1 or 2, for example.

[0259] h. In one example, F = S / R. R is an integer.

[0260] i. For example, R = 2 m and m is an integer such as 1 or 2, for example.

[0261] i. In one example, S = F / Z. Z is an integer.

[0262] i. For example, Z = 2 n and n is an integer such as 1 or 2, for example.

[0263] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (such as LM, LM-A, or LM-L, etc.).

[0264] k. kMax and / or F and / or S and / or offset may depend on the width and / or height of the current block.

[0265] l. kMax and / or F and / or S and / or offset may depend on the availability of adjacent samples.

[0266] m. kMax and / or F and / or S and / or offset may depend on W.

[0267] n. For example, kMax = 1, F = W / 4, S = W / 2, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, both left and upper adjacent samples are available, and W >= 4.

[0268] o. For example, kMax = 3, F = W / 8, S = W / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, only the upper adjacent sample is available, and W >= 4.

[0269] p. For example, kMax = 3, F = W / 8, S = W / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-A encoded and W >= 4.

[0270] q. For example, kMax = 1, F = 0, S = 1, offset = 0. Alternatively, furthermore, these settings are made when W is equal to 2.

[0271] Example 17. It is proposed to select the left adjacent chroma sample (and / or their corresponding luma samples that can be downsampled) based on a first position offset value (denoted as F) and a step value (denoted as S). Let H be the height of the available left adjacent samples to be used.

[0272] a. In one example, H can be set equal to the height of the current block.

[0273] b. In one example, H may be set to (L times the height of the current block), where L is an integer value.

[0274] c. In one example, if both the upper and left blocks are available, H can be set to the height of the current block.

[0275] i. Alternatively, if the upper block is not available, H may be set to (L times the height of the current block), where L is an integer value.

[0276] ii. In one example, L may depend on the availability of the lower left block. Alternatively, L may depend on the availability of one lower left sample.

[0277] iii. Alternatively, if the required upper right adjacent block is available, H may be set to (the height of the current block + the width of the current block).

[0278] (a) In one example, if the left adjacent sample is not available, the same H upper adjacent samples are selected for the LM-A mode and the LM mode.

[0279] d. In one example, H may depend on the coding mode.

[0280] i. In one example, if the current block is coded as the LM mode, H can be set to the height of the current block.

[0281] ii. If the current block is encoded in the LM-L mode, H can be set to (L times the height of the current block).

[0282] (a) L may depend on the availability of the bottom-left block. Alternatively, L may depend on the availability of one top-left sample.

[0283] (b) Alternatively, if the required bottom-left adjacent block is available, W may be set to (the height of the current block + the width of the current block).

[0284] (c) In one example, if the upper adjacent sample is not available, the same W left adjacent samples are selected for the LM-L mode and the LM mode.

[0285] e. Assuming the top-left coordinates of the current block are (x0, y0), with K = 0, 1, 2, …, kMax, the left adjacent sample at position (x0 - 1, y0 + F + K × S) is selected.

[0286] f. In one example, F = H / P. P is an integer.

[0287] i. For example, P = 2 i and i is an integer such as 1 or 2, for example.

[0288] ii. Alternatively, F = H / P + offset.

[0289] g. In one example, S = H / Q. Q is an integer.

[0290] i. For example, Q = 2 j and j is an integer such as 1 or 2, for example.

[0291] h. In one example, F = S / R. R is an integer.

[0292] i. For example, R = 2 mwhere m is an integer such as 1 or 2, for example.

[0293] i. In one example, S = F / Z. Z is an integer.

[0294] i. For example, Z = 2 n where n is an integer such as 1 or 2, for example.

[0295] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (such as LM, LM-A, or LM-L, etc.).

[0296] k. kMax and / or F and / or S and / or offset may depend on the height and / or the height of the current block.

[0297] l. kMax and / or F and / or S and / or offset may depend on H.

[0298] m. kMax and / or F and / or S and / or offset may depend on the availability of adjacent samples.

[0299] n. For example, kMax = 1, F = H / 4, S = H / 2, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-encoded, both left and upper adjacent samples are available, and H >= 4.

[0300] o. For example, kMax = 3, F = H / 8, S = H / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-encoded, only the upper adjacent sample is available, and H >= 4.

[0301] p. For example, kMax = 3, F = H / 8, S = H / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-L encoded and H >= 4.

[0302] q. For example, H is equal to 2, kMax = 1, F = 0, S = 1, and offset = 0.

[0303] Example 18. It is proposed to select two or four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) to derive the linear model parameters.

[0304] a. In one example, maxY / maxC and minY / minC are derived from two or four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled), and then used to derive the linear model parameters using a two-point approach.

[0305] b. In one example, when two adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are selected to derive maxY / maxC and minY / minC, minY is set to the smaller luma sample value, minC is set to its corresponding chroma sample value, maxY is set to the larger luma sample value, and maxC is set to its corresponding chroma sample value.

[0306] c. In one example, when four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are selected to derive maxY / maxC and minY / minC, those luma samples and their corresponding chroma samples are divided into two arrays G0 and G1, each containing two chroma samples and their corresponding luma samples.

[0307] i. Assuming that the four luma samples and their corresponding chroma samples are denoted as S0, S1, S2, S3, they can be divided into two groups in any order. For example: (a) G0 = {S0, S1}, G1 = {S2, S3}; (b) G0 = {S1, S0}, G1 = {S3, S2}; (c) G0 = {S0, S2}, G1 = {S1, S3}; (d) G0 = {S2, S0}, G1 = {S3, S1}; (e) G0 = {S1, S2}, G1 = {S0, S3}; (f) G0 = {S2, S1}, G1 = {S3, S0}; (g) G0 = {S0, S3}, G1 = {S1, S2}; (h) G0 = {S3, S0}, G1 = {S2, S1}; (i) G0 = {S1, S3}, G1 = {S0, S2}; (j) G0 = {S3, S1}, G1 = {S2, S0}; (k) G0 = {S3, S2}, G1 = {S0, S1}; (l) G0 = {S2, S3}, G1 = {S1, S0}; (m) G0 and G1 may be exchanged.

[0308] ii. In one example, if the luma sample values of G0[0] and G0[1] are compared and the luma sample value of G0[0] is greater than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].

[0309] (a) Alternatively, if the luma sample value of G0[0] is greater than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].

[0310] (b) Alternatively, if the luma sample value of G0[0] is less than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].

[0311] (c) Alternatively, if the luma sample value of G0[0] is less than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].

[0312] iii. In one example, the luma sample values of G1[0] and G1[1] are compared. If the luma sample value of G1[0] is greater than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].

[0313] (a) Alternatively, if the luma sample value of G1[0] is greater than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].

[0314] (b) Alternatively, if the luma sample value of G1[0] is less than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].

[0315] (c) Alternatively, if the luma sample value of G1[0] is less than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].

[0316] iv. In one example, the luma sample values of G0[0] and G1[1] are compared. If the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0 and G1 are exchanged.

[0317] (a) In one example, the luma sample values of G0[0] and G1[0] are compared. If the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0 and G1 are exchanged.

[0318] (b) In one example, the luma sample values of G0[1] and G1[0] are compared. If the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0 and G1 are exchanged.

[0319] (c) In one example, the luma sample values of G0[1] and G1[1] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0 and G1 are exchanged.

[0320] v. In one example, the luma sample values of G0[0] and G1[1] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0[0] and G1[1] are exchanged.

[0321] (a) In one example, the luma sample values of G0[0] and G1[0] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0[0] and G1[0] are exchanged.

[0322] (b) In one example, the luma sample values of G0[1] and G1[0] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0[1] and G1[0] are exchanged.

[0323] (c) In one example, the luma sample values of G0[1] and G1[1] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0[1] and G1[1] are exchanged.

[0324] vi. In one example, maxY is calculated as the average of the luma sample values of G0[0] and G0[1], and maxC is calculated as the average of the chroma sample values of G0[0] and G0[1].

[0325] (a) Alternatively, maxY is calculated as the average of the luma sample values of G1[0] and G1[1], and maxC is calculated as the average of the chroma sample values of G1[0] and G1[1].

[0326] vii. In one example, minY is calculated as the average of the luma sample values of G0[0] and G0[1], and minC is calculated as the average of the chroma sample values of G0[0] and G0[1].

[0327] Alternatively, minY is calculated as the average of the luma sample values of G1[0] and G1[1], and minC is calculated as the average of the chroma sample values of G1[0] and G1[1].

[0328] d. In one example, if only two adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are available, they are first padded to become four chroma samples (and / or their corresponding luma samples), and the CCLM parameters are derived using those four chroma samples (and / or their corresponding luma samples).

[0329] i. In one example, the two padded chroma samples (and / or their corresponding luma samples) are copied from the two available adjacent chroma samples (and / or their corresponding luma samples that can be downsampled).

[0330] Example 19. In all of the above examples, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and / or the left column (i.e., having H samples) shown in FIG. 10, where W and H are the width and height of the current block.

[0331] a. Alternatively, the above constraints may apply when the current block is encoded in the normal LM mode.

[0332] b. Alternatively, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and the top - right row having H samples.

[0333] i. Alternatively, further, the above constraints may apply when the current block is encoded in the LM-A mode.

[0334] ii. Alternatively, further, the above constraints may apply when the above row is available but the left column is not available and the current block is encoded in the LM-A mode or the normal LM.

[0335] c. Alternatively, the selected chroma samples are to be located in the left column (i.e., having H samples) and in the lower left column having W samples.

[0336] i. Alternatively, further, the above constraints may apply when the current block is encoded in the LM-L mode.

[0337] ii. Alternatively, further, the above constraints may apply when the above row is not available but the left column is available and the current block is encoded in the LM-L mode or the normal LM.

[0338] Example 20 In one example, only the adjacent luma samples at the positions where the corresponding chroma samples are required to derive the CCLM parameters need to be downsampled.

[0339] Example 21 How to perform the method disclosed in this document may depend on the color format (e.g., 4:2:0 or 4:4:4, etc.).

[0340] a. Alternatively, how to perform the method disclosed in this document may depend on the bit depth (e.g., 8 bits or 10 bits, etc.).

[0341] b. Alternatively, how to perform the method disclosed in this document may depend on the color representation method (e.g., RGB or YCbCr, etc.).

[0342] c. Alternatively, how to perform the method disclosed in this document may depend on the color representation method (such as RGB or YCbCr, etc.).

[0343] d. Alternatively, how to perform the method disclosed in this document may depend on the chroma downsampling position.

[0344] Example 22 Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may depend on the availability of the adjacent ones on the left and above. For example, if neither of the adjacent blocks on the left and above is available, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters are not derived.

[0345] a. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters may depend on the number of available adjacent samples. For example, when numSampL == 0 and numSampT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In another example, when numSampL + numSampT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In these two examples, numSampL and numSampT are the numbers of available adjacent samples from the adjacent blocks on the left and above.

[0346] b. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters may depend on the number of selected samples used to derive those parameters. For example, when cntL == 0 and cntT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In another example, when cntL + cntT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In these two examples, cntL and cntT are the number of selected samples from the left and upper adjacent blocks.

[0347] Example 23 In one example, the proposed method for deriving the parameters used in CCLM may be used to derive the parameters used in LIC or other coding tools that rely on a linear model.

[0348] a. The examples disclosed above may be applicable to LIC, for example, by replacing "chroma adjacent samples" with "adjacent samples of the current block" and "corresponding luma samples" with "adjacent samples of the reference block".

[0349] b. In one example, the samples used for LIC parameter derivation may exclude samples at specific positions within the upper row and / or left column.

[0350] i. In one example, the samples used for LIC parameter derivation may exclude the first sample within the upper row.

[0351] (a) Assuming the coordinates of the upper left sample are (x0, y0), it is proposed to exclude (x0, y0 - 1) for the use of LIC parameters.

[0352] ii. In one example, the samples used for LIC parameter derivation may exclude the first sample within the left column.

[0353] (a) Assuming the coordinates of the upper left sample are (x0, y0), it is proposed to exclude (x0 - 1, y0) for the use of LIC parameters.

[0354] iii. Whether to apply the above method and / or how to determine a specific position may depend on the availability of the left column / upper row.

[0355] iv. Whether to apply the above method and / or how to determine a specific position may depend on the block size.

[0356] c. In one example, the parameters used for LIC can be derived using N adjacent samples (which can be downsampled) of the current block and N corresponding adjacent samples (which can be correspondingly downsampled) of the reference block.

[0357] i. For example, N is 4.

[0358] ii. In one example, the N adjacent samples can be defined as N / 2 samples from the upper row and N / 2 samples from the left column.

[0359] (a) Alternatively, the N adjacent samples may be defined as N samples from the upper row or the left column.

[0360] iii. In another example, N is equal to min(L, T), where T is the total number of available adjacent samples (which can be downsampled) of the current block.

[0361] (a) In one example, L is set to 4.

[0362] iv. In one example, the selection of the coordinates of the N samples may follow the rules for selecting N samples in the CCLM process.

[0363] v. In one example, the selection of the coordinates of the N samples may follow the rules for selecting the N samples in the LM-A process.

[0364] vi. In one example, the selection of the coordinates of the N samples may follow the rules for selecting the N samples in the LM-L process.

[0365] vii. In one example, how the N samples are selected may depend on the availability of the upper row / left column.

[0366] d. In one example, N adjacent samples (which may be downsampled) of the current block and N corresponding adjacent samples (which may be downsampled) of the reference block are used to derive the parameters used in the LIC and may be picked up based on the sample positions.

[0367] i. The pickup method may depend on the width and height of the current block.

[0368] ii. The pickup method may depend on the availability of the adjacent blocks.

[0369] iii. For example, if both upper and left adjacent samples are available, K1 adjacent samples may be picked up from the left adjacent sample and K2 adjacent samples may be picked up from the upper adjacent sample. For example, K1 = K2 = 2.

[0370] iv. For example, if only the left adjacent sample is available, K1 adjacent samples may be picked up from the left adjacent sample. For example, K1 = 4.

[0371] v. For example, if only the upper adjacent sample is available, K2 adjacent samples may be picked up from the upper adjacent sample. For example, K2 = 4.

[0372] vi. For example, the above sample can be picked up using a first position offset value (denoted as F) and a step value (denoted as S) that may depend on the dimensions of the current block and the availability of adjacent blocks.

[0373] (a) For example, the method disclosed in Example 16 can be applied to derive F and S.

[0374] vii. For example, the left sample can be picked up using a first position offset value (denoted as F) and a step value (denoted as S) that may depend on the dimensions of the current block and the availability of adjacent blocks.

[0375] (a) For example, the method disclosed in Example 17 can be applied to derive F and S.

[0376] e. In one example, the method proposed to derive the parameters used in CCLM can also be used to derive the parameters used in LIC when the current block is affine coded.

[0377] f. The above method may be used to derive the parameters used in other coding tools that rely on a linear model.

[0378] In another example, a cross-component prediction mode is proposed where the chroma sample is predicted using the corresponding reconstructed luma sample according to a prediction model as shown in Equation (12). In Equation (12), Pred C (x,y) represents the predicted chroma sample. α and β are two model parameters. Rec’L(x,y) is the downsampled luma sample.

Number

[0379] As shown in Equation (13), a 6-tap filter is introduced into the luma downsampling process for block A in FIG. 11.

Number

[0380] As shown in Equation (14), the upper surrounding luma reference samples shaded in FIG. 11 are downsampled by a 3-tap filter. The left surrounding luma reference samples are downsampled according to Equation (15). If the left or upper samples are not available, a 2-tap filter defined by Equations (16) and (17) will be used.

Number

[0381] In particular, the surrounding luma reference samples are downsampled to the same size as the chroma reference samples. Let its size (width and height) be denoted as width and height. Only two or four adjacent samples are involved in deriving α and β. A look-up table is applied to avoid the division operation when deriving α and β. The derivation method is shown below.

[0382] 3.1 Exemplary method using at most two samples (1) The ratio r of width to height is calculated as shown in Equation (18).

Number

[0383] (2) If both the upper and left blocks are available, two samples located at posA of the first upper line and posL of the first left line are selected. To simplify the explanation, assume that the width is the long side. The derivation of posA and posL is shown in Equation (19) (the position index starts from 0). Figure 12 shows some examples of different width-to-height ratios (1, 2, 4, and 8 respectively). The selected samples are shaded.

Number

[0384] (3) If the upper block is available but the left block is not, as shown in Figure 13, the first point of the upper line and the point of posA are selected.

[0385] (4) If the left block is available but the upper block is not, as shown in Figure 14, the first point of the left line and the point of posL are selected.

[0386] (5) A chroma prediction model is derived according to the luminance values and chrominance values of the selected samples.

[0387] (6) If neither the left nor the upper block is available, a default prediction model where α is equal to 0 and β is equal to 1<<(BitDepth - 1) is used, where BitDepth represents the bit depth of the chroma samples.

[0388] 3.2 Exemplary method using up to four samples (1) The ratio r of width to height is calculated as in Equation (18).

[0389] (2) When both the upper and left blocks are available, four samples located at the beginning of the first upper line and posA, and at the beginning of the first left line and posL are selected. The derivation of posA and posL is shown in Equation (19). Figure 15 shows some examples of different width-to-height ratios (1, 2, 4, and 8 respectively). The selected samples are shaded.

[0390] (3) When the upper block is available but the left block is not, as shown in Figure 13, the first point of the upper line and the point of posA are selected.

[0391] (4) When the left block is available but the upper block is not, as shown in Figure 14, the first point of the left line and the point of posL are selected.

[0392] (5) When neither the left nor the upper block is available, a default prediction model where α is equal to 0 and β is equal to 1<<(BitDepth - 1) is used, where BitDepth represents the bit depth of the chroma sample.

[0393] 3.3 Exemplary Method of Using a Lookup Table in LM Derivation Figure 16 shows an example of a lookup table with 128, 64, and 32 entries, where each entry is represented by 16 bits. The two-point LM derivation process is simplified with 64 entries as shown in Table 1 and Figure 17. It should be noted that the first entry may not be stored in the table.

[0394] It should also be noted that each entry of these exemplary tables is designed to be 16 bits, but can be easily converted to a smaller number of bits (e.g., 8 bits or 12 bits). For example, a table with 8-bit entries can be achieved as follows: g_aiLMDivTableHighSimp_64_8[i] = (g_aiLMDivTableHighSimp_64[i] + 128) >> 8

[0395] For example, a table with 12-bit entries can be achieved as follows: g_aiLMDivTableHighSimp_64_12[i] = (g_aiLMDivTableHighSimp_64[i] + 8) >> 4 [Table 1]

[0396] Note that maxLuma and minLuma may indicate the maximum and minimum luma sample values at the selected positions. Alternatively, they may indicate a function of the maximum and minimum luma sample values at the selected positions, such as averaging. If only four positions are selected, they may also be the average of the two larger luma values and the average of the two smaller luma values. Further note that in Figure 17, maxChroma and minChroma represent the chroma values corresponding to maxLuma and minLuma.

[0397] 3.3 Method #4 Using a Maximum of 4 Samples Let the block width and height of the current chroma block be W and H respectively. Also, let the top-left coordinates of the current chroma block be [0,0].

[0398] If both the upper and left blocks are available and the current mode is the normal LM mode (excluding LM-A and LM-L), two chroma samples located in the upper row and two chroma samples located in the left column are selected.

[0399] The coordinates of the two upper samples are [Floor(W / 4), -1] and [Floor(3*W / 4), -1].

[0400] The coordinates of the two left samples are [-1, Floor(H / 4)] and [-1, Floor(3*H / 4)].

[0401] The selected samples are painted red as shown in Figure 31A.

[0402] Subsequently, these four samples are sorted according to the luma sample intensity and classified into two groups. The two larger samples and the two smaller samples are each averaged. Using these two average points, a cross-component prediction model is derived. Alternatively, using the maximum and minimum values of the four samples, the LM parameter is derived.

[0403] If the upper block is available but the left block is not, when W > 2, four chroma samples are selected from the upper block, and when W = 2, two chroma samples are selected.

[0404] The coordinates of the four selected upper samples are [W / 8, -1], [W / 8 + W / 4, -1], [W / 8 + 2*W / 4, -1], and [W / 8 + 3*W / 4, -1].

[0405] The selected samples are painted red as shown in Figure 31B.

[0406] If the left block is available but the upper block is not, when H > 2, four chroma samples are selected from the left block, and when H = 2, two chroma samples are selected.

[0407] The coordinates of the four selected left samples are [-1, H / 8], [-1, H / 8 + H / 4], [-1, H / 8 + 2*H / 4], and [-1, H / 8 + 3*H / 4].

[0408] If neither the left nor the upper block is available, a default prediction where α is equal to 0 and β is equal to 1<<(BitDepth-1) is used, where BitDepth represents the bit depth of the chroma samples.

[0409] When the current mode is the LM-A mode, four chroma samples from the upper block are selected when W’>2, and two chroma samples are selected when W’=2. W’ is the number of available upper adjacent samples, which can be 2*W.

[0410] The coordinates of those four selected upper samples are [W’ / 8, -1], [W’ / 8 + W’ / 4, -1], [W’ / 8 + 2*W’ / 4, -1], and [W’ / 8 + 3*W’ / 4, -1].

[0411] When the current mode is the LM-L mode, four chroma samples from the left block are selected when H’>2, and two chroma samples are selected when H’=2. H’ is the number of available left adjacent samples, which can be 2*H.

[0412] The coordinates of those four selected left samples are [-1, H’ / 8], [-1, H’ / 8 + H’ / 4], [-1, H’ / 8 + 2*H’ / 4], and [-1, H’ / 8 + 3*H’ / 4].

[0413] 3.5 Embodiment for Modifying the Current VVC Standard for the Use of CCLM Prediction

[0414] 8.3.4.2.8 Specifications of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes In this section, equations are described using equation numbers corresponding to those in the current draft of the VVC standard.

[0415] The input to this process is as follows: - Intra prediction mode predModeIntra, - The sample positions (xTbC, yTbC) of the top - left sample of the current conversion block with respect to the top - left sample of the current picture, - The variable nTbW that defines the width of the conversion block, - The variable nTbH that defines the height of the conversion block, - The chroma adjacent samples p[x][y] for x = - 1, y = 0..2*nTbH - 1, and x = 0..2*nTbW - 1, y = - 1.

[0416] The output of this process is the predicted samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1.

[0417] The current luma position (xTbY, yTbY) is derived as follows: (xTbY, yTbY)=(xTbC<<1, yTbC<<1) (8 - 155)

[0418] The variables avalL, avalT and avalTL are derived as follows: ... - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8 - 156) numSampL=availL? nTbH:0 (8 - 157) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+numTopRight):0 (8 - 158) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+numLeftBelow):0 (8 - 159)

[0419] The variable bCTUbordery is derived as follows: bCTUboundary = (yTbC & (1 << (CtbLog2SizeY - 1) - 1) == 0)? TRUE : FALSE (8 - 160)

[0420] For prediction samples predSamples[x][y] where x = 0..nTbW - 1 and y = 0..nTbH - 1, they are derived as follows: - When both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y] = 1 << (BitDepthC - 1) (8 - 161) - Otherwise, the following ordered steps apply: 1. ...[No change to the current specification] 2. ... 3. ... 4. ... 5. ... 6. [No change to the current specification] 7. Variables minY, maxY, minC, and maxC are derived as follows: - Variable minY is set equal to 1 << (BitDepth Y ) + 1, and variable maxY is set equal to -1 - When avalL is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, variable aboveIs4 is set equal to 0; otherwise, it is set equal to 1 - When avallT is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, variable LeftIs4 is set equal to 0; otherwise, it is set equal to 1 - The variable arrays startPos[] and pickStep[] are derived as follows: - startPos[0] = actualTopTemplateSampNum >> (2 + aboveIs4); - pickStep[0]=std::max(1, actualTopTemplateSampNum>>(1+aboveIs4)); - startPos[1]=actualLeftTemplateSampNum>>(2+leftIs4); - pickStep[1]=std::max(1, actualLeftTemplateSampNum>>(1+leftIs4)); - The variable cnt is set equal to 0 - When predModeIntra is equal to INTRA_LT_CCLM, the variable nSX is set equal to nTbW, nSY is set equal to nTbH, otherwise, nSX is set equal to numSampLT, and nSY is set equal to numSampL - When avallT is equal to TRUE and predModeIntra is not equal to INTRA_L_CCLM, the variables selectLumaPix and selectChromaPix are derived as follows: - While startPos[0]+cnt*pickStep[0]<nSX and cnt<4, the following applies: - selectLumaPix[cnt]=pTopDsY[startPos[0]+cnt*pickStep[0]]; - selectChromaPix[cnt]=p[startPos[0]+cnt*pickStep[0]][-1]; - cnt++; - When avalL is equal to TRUE and predModeIntra is not equal to INTRA_T_CCLM, the variables selectLumaPix and selectChromaPix are derived as follows: - While startPos[1]+cnt*pickStep[1]<nSY and cnt<4, the following applies: - selectLumaPix[cnt]=pLeftDsY[startPos[1]+cnt*pickStep[1]]; - selectChromaPix[cnt] = p[-1][startPos[1] + cnt * pickStep[1]]; - cnt++; - When cnt is equal to 2, the following applies: - If selectLumaPix[0] > selectLumaPix[1], minY is set equal to selectLumaPix[1], minC is set equal to selectChromaPix[1], maxY is set equal to selectLumaPix[0], and maxC is set equal to selectChromaPix[0]; otherwise, maxY is set equal to selectLumaPix[1], maxC is set equal to selectChromaPix[1], minY is set equal to selectLumaPix[0], and minC is set equal to selectChromaPix[0]. - Otherwise, when cnt is equal to 4, the following applies: - The variable arrays minGrpIdx and maxGrpIdx are - initialized as minGrpIdx[0] = 0, minGrpIdx[1] = 1, maxGrpIdx[0] = 2, maxGrpIdx[1] = 3 and - the following applies: - If selectLumaPix[minGrpIdx[0]] > selectLumaPix[minGrpIdx[1]], exchange minGrpIdx[0] and minGrpIdx[1]; - If selectLumaPix[maxGrpIdx[0]] > selectLumaPix[maxGrpIdx[1]], exchange maxGrpIdx[0] and maxGrpIdx[1]; - If selectLumaPix[minGrpIdx[0]] > selectLumaPix[maxGrpIdx[1]], exchange minGrpIdx and maxGrpIdx; - If selectLumaPix[minGrpIdx[1]] > selectLumaPix[maxGrpIdx[0]], then exchange minGrpIdx[1] and maxGrpIdx[0]; - maxY, maxC, minY, and minC are derived as follows: - maxY = (selectLumaPix[maxGrpIdx[0]] + selectLumaPix[maxGrpIdx[1]] + 1) >> 1; - maxC = (selectChromaPix[maxGrpIdx[0]] + selectChromaPix[maxGrpIdx[1]] + 1) >> 1; - maxY = (selectLumaPix[minGrpIdx[0]] + selectLumaPix[minGrpIdx[1]] + 1) >> 1; - maxC = (selectChromaPix[minGrpIdx[0]] + selectChromaPix[minGrpIdx[1]] + 1) >> 1; - 8. Variables a, b, and k are derived as follows: [End of change]

[0421] 3.6 Another exemplary working draft for the proposed CCLM prediction In this section, another exemplary embodiment showing changes that can be made to the current working draft of the VVC standard is described. The equation numbers here refer to the corresponding equation numbers in the VVC standard.

[0422] Specifications of the INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes.

[0423] [Additions to the current VVC working draft are as follows] The number of available adjacent chroma samples numTopSamp on the right and upper right, and the number of available adjacent chroma samples nLeftSamp on the left and lower left are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT = availT? nTbW:0 (8-157) numSampL = availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight, nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow, nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variables cntN, and the array pickPosN[] with L and T replaced for N, are derived as follows: - The variable numIs4N is set equal to ((availN&&predModeIntra==INTRA_LT_CCLM)? 0:1) - The variable startPosN is set equal to numSampN>>(2+numIs4N) - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)) - When availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to (1+numIs4N)<<1, and pickPosN[pos] is set equal to (startPosN+pos*pickStepN) for pos = 0..(cntN-1) - Otherwise, cntN is set equal to 0 The predicted samples predSamples[x][y] for x = 0..nTbW-1, y = 0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY+x, yTbY+y), the collocated luma samples pY[x][y] for x = 0..nTbW*2-1, y = 0..nTbH*2-1 are set equal to the reconstructed luma samples 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent left luma samples pY[x][y] for x = -1..-3, y = 0..2*numSampL-1 are set equal to the reconstructed luma samples - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper luma samples pY[x][y] for x = 0..2*numSampT-1, y = -1,-2 are set equal to the reconstructed luma samples - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper left luma samples pY[x][y] for x = -1, y = -1,-2 are set equal to the reconstructed luma samples 3. The downsampled collocated luma samples pDsY[x][y] for x = 0..nTbW-1, y = 0..nTbH-1 are derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For \(x = 1..nTbW - 1\) and \(y = 1..nTbH - 1\), \(pDsY[x][y]\) is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+ pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+ pY[2*x][2*y + 1]+4)>>3 (8 - 163) - When \(availL\) is equal to TRUE, for \(y = 1..nTbH - 1\), \(pDsY[0][y]\) is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y + 1]+4)>>3 (8 - 164) - Otherwise, for \(y = 1..nTbH - 1\), \(pDsY[0][y]\) is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+2*pY[0][2*y]+pY[0][2*y + 1]+2)>>2 (8 - 165) - When \(availT\) is equal to TRUE, for \(x = 1..nTbW - 1\), \(pDsY[x][0]\) is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x - 1][0]+4*pY[2*x][0]+pY[2*x + 1][0]+ pY[2*x][1]+4)>>3 (8 - 166) - Otherwise, for \(x = 1..nTbW - 1\), \(pDsY[x][0]\) is derived as follows: pDsY[x][0]=(pY[2*x - 1][0]+2*pY[2*x][0]+pY[2*x + 1][0]+2)>>2 (8 - 167) - When \(availL\) is equal to TRUE and \(availT\) is equal to TRUE, \(pDsY[0][0]\) is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ (pY[0][1]+4)>>3 (8 - 168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8 - 169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8 - 170) - In other cases (when availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8 - 171) - In other cases, the following applies: - For pDsY[x][y] where x = 1..nTbW - 1 and y = 0..nTbH - 1, it is derived as follows: pDsY[x][y]=(pY[2*x - 1][2*y]+pY[2*x - 1][2*y + 1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y + 1]+ pY[2*x + 1][2*y]+pY[2*x + 1][2*y + 1]+4)>>3 (8 - 172) - When availL is equal to TRUE, for pDsY[0][y] where y = 0..nTbH - 1, it is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[0][2*y]+2*pY[0][2*y + 1]+ pY[1][2*y]+pY[1][2*y + 1]+4)>>3 (8 - 173) - In other cases, for pDsY[0][y] where y = 0..nTbH - 1, it is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8 - 174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL - 1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL - 1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0 || availTL == TRUE, pSelDsY[idx]=(pY[-2][2*y - 1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y + 1]+4)>>3 (8 - 175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8 - 177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[-2][2*y]+2*pY[-2][2*y + 1]+ pY[-3][2*y]+pY[-3][2*y + 1]+4)>>3 (8 - 178) 5. When numSampT is greater than 0, the selected adjacent top chroma sample pSelC[idx] for idx = 0..(cntT - 1) is set equal to p[pickPosT[idx]][-1], and the downsampled adjacent top luma sample pSelDsY[idx] for idx = cntL..(cntL + cntT - 1) is defined as follows: - x is set equal to pickPosT[idx - cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8-181) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8-182) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8-183) - Otherwise (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 184) - Otherwise, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x - 1][-2]+pY[2*x - 1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x + 1][-2]+pY[2*x + 1][-1]+4)>>3 (8 - 185) - Otherwise (bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 186) - Otherwise - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8 - 187) - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 188) - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8 - 189) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 190) 6. The variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, for idx = 0 and 1, set pSelC[idx + 2]=pSelC[idx] and pSelDsY[idx + 2]=pSelDsY[idx]. - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]]>pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx ). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY = (pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[1]] + 1) >> 1. - minC = (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[1]] + 1) >> 1. 7. Variables a, b, and k are derived as follows: - When numSampL is equal to 0 and numSampT is equal to 0, the following applies: k = 0 (8 - 208) a = 0 (8 - 209) b = 1 << (BitDepthC - 1) (8 - 210) - Otherwise, the following applies: diff = maxY - minY (8 - 211) - When diff is not equal to 0, the following applies: diffC = maxC - minC (8 - 212) x = Floor(Log2(diff)) (8 - 213) normDiff = ((diff << 4) >> x) & 15 (8 - 214) x += (normDiff!= 0)? 1 : 0 (8 - 215) y = Floor(Log2(Abs(diffC))) + 1 (8 - 216) a = (diffC * (divSigTable[normDiff] | 8) + 2y - 1) >> y (8 - 217) k = ((3 + x - y) < 1)? 1 : 3 + x - y (8 - 218) a = ((3 + x - y) < 1)? Sign(a) * 15 : a (8 - 219) b = minC - ((a * minY) >> k) (8 - 220) Here, divSigTable[] is defined as follows: divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (8 - 221) - Otherwise (when diff is equal to 0), the following applies: k = 0 (8 - 222) a = 0 (8 - 223) b = minC (8 - 224) 8. For prediction samples predSamples[x][y] where x = 0..nTbW - 1 and y = 0..nTbH - 1, they are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) (8 - 225) [End of Embodiment Example]

[0424] 3.7 Another Exemplary Working Draft for the Proposed CCLM Prediction In this section, another exemplary embodiment showing the changes that can be made to the current working draft of the VVC standard is described. The equation numbers here refer to the corresponding equation numbers in the VVC standard.

[0425] Specifications of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes … The number of available adjacent chroma samples numTopSamp on the right and upper - right, and the number of available adjacent chroma samples nLeftSamp on the left and lower - left are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT = availT? nTbW:0 (8 - 157) numSampL = availL? nTbH:0 (8 - 158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW + Min(numTopRight,nTbH)):0 (8 - 159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH + Min(numLeftBelow, nTbW)):0 (8 - 160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variables cntN, and the array pickPosN[] with N replaced by L and T are derived as follows: - The variable numIs4N is set equal to ((availN&&predModeIntra==INTRA_LT_CCLM)? 0:1) - The variable startPosN is set equal to numSampN>>(2+numIs4N) - The variable pickStepN is set equal to Max(1,numSampN>>(1+numIs4N)) - When availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to Min(numSampN,(1+numIs4N)<<1), and pickPosN[pos] is set equal to (startPosN+pos*pickStepN), with pos=0..(cntN-1) - Otherwise, cntN is set equal to 0 The prediction samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - When both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY+x,yTbY+y), the collocated luma samples pY[x][y] for x=0..nTbW*2-1, y=0..nTbH*2-1 are set equal to the reconstructed luma samples 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent left luma samples pY[x][y] with x = -1..-3, y = 0..2*numSampL - 1 are set equal to the reconstructed luma samples. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper luma samples pY[x][y] with x = 0..2*numSampT - 1, y = -1,-2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper left luma samples pY[x][y] with x = -1, y = -1,-2 are set equal to the reconstructed luma samples. 3. The collocated luma samples pDsY[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 that are downsampled are derived as follows: - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x = 1..nTbW - 1, y = 1..nTbH - 1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+ pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+ pY[2*x][2*y + 1]+4)>>3 (8 - 163) - When availL is equal to TRUE, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y + 1]+4)>>3 (8 - 164) - Otherwise, for y = 1..nTbH-1, pDsY[0][y] is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-165) - When availT is equal to TRUE, for x = 1..nTbW-1, pDsY[x][0] is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+ pY[2*x][1]+4)>>3 (8-166) - Otherwise, for x = 1..nTbW-1, pDsY[x][0] is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-167) - When availL is equal to TRUE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ pY[0][1]+4)>>3 (8-168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-170) - Otherwise (availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise, the following applies: - For pDsY[x][y] where x = 1..nTbW-1 and y = 0..nTbH-1, it is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+ pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-172) - When availL is equal to TRUE, for pDsY[0][y] where y = 0..nTbH-1, it is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[0][2*y]+2*pY[0][2*y+1]+ pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-173) - Otherwise, for pDsY[0][y] where y = 0..nTbH-1, it is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL-1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL-1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y-1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y+1]+4)>>3 (8-175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx]][-1] for idx = 0..(cntT-1), and the downsampled adjacent upper luma sample pSelDsY[idx] for idx = cntL..(cntL+cntT-1) is defined as follows: - x is set equal to pickPosT[idx-cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x>0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 180) - Otherwise, - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8 - 181) - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 182) - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8 - 183) - Otherwise (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 184) - Otherwise, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x - 1][-2]+pY[2*x - 1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x + 1][-2]+pY[2*x + 1][-1]+4)>>3 (8 - 185) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 186) - Otherwise - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8 - 187) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 188) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8 - 189) - Otherwise (when availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 190) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, replace Comp with DsY and C, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], and set pSelComp[1] equal to pSelComp[3]. - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0] = 0, minGrpIdx[1] = 1, maxGrpIdx[0] = 2, maxGrpIdx[1] = 3 - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx). - If pSelDsY[minGrpIdx[1]] > pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY = (pSelDsY[maxGrpIdx[0]] + pSelDsY[maxGrpIdx[1]] + 1) >> 1. - maxC = (pSelC[maxGrpIdx[0]] + pSelC[maxGrpIdx[1]] + 1) >> 1. - minY = (pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[1]] + 1) >> 1. - minC = (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[1]] + 1) >> 1. 7. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k = 0 (8 - 208) a = 0 (8 - 209) b = 1 << (BitDepthC - 1) (8 - 210) - Otherwise, the following applies: diff = maxY - minY (8 - 211) - If diff is not equal to 0, the following applies: diffC = maxC - minC (8 - 212) x = Floor(Log2(diff)) (8 - 213) normDiff = ((diff << 4) >> x) & 15 (8 - 214) x += (normDiff!= 0)? 1 : 0 (8 - 215) y = Floor(Log2(Abs(diffC))) + 1 (8 - 216) a = (diffC * (divSigTable[normDiff] | 8) + 2y - 1) >> y (8 - 217) k = ((3 + x - y) < 1)? 1 : 3 + x - y (8 - 218) a = ((3 + x - y) < 1)? Sign(a) * 15 : a (8 - 219) b = minC - ((a * minY) >> k) (8 - 220) Here, divSigTable[] is defined as follows: divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (8 - 221) - Otherwise (diff is equal to 0), the following applies: k = 0 (8 - 222) a = 0 (8 - 223) b = minC (8 - 224) 8. The predicted samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) (8-225)

[0426] 3.8 Alternative working draft for the proposed CCLM prediction In this section, alternative exemplary embodiments are described that show alternative changes that can be made to the current working draft of the VVC standard. The equation numbers here refer to the corresponding equation numbers in the VVC standard.

[0427] Specifications of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes … The number of available adjacent chroma samples numTopSamp on the right and upper right, and the number of available adjacent chroma samples nLeftSamp on the left and lower left are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-157) numSampL=availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variables cntN, and the array pickPosN[] with L and T substituted for N are derived as follows: - The variable numIs4N is set equal to ((availT && availL && predModeIntra == INTRA_LT_CCLM)? 0 : 1). - The variable startPosN is set equal to numSampN>>(2 + numIs4N). - The variable pickStepN is set equal to Max(1, numSampN>>(1 + numIs4N)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then cntN is set equal to Min(numSampN, (1 + numIs4N)<<1), and pickPosN[pos] is set equal to (startPosN + pos*pickStepN) for pos = 0..(cntN - 1). - Otherwise, cntN is set equal to 0. The predicted samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC - 1) (8 - 162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY + x, yTbY + y), the collocated luma samples pY[x][y] for x = 0..nTbW*2 - 1, y = 0..nTbH*2 - 1 are set equal to the reconstructed luma samples. 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent left luma samples pY[x][y] for x = -1..-3, y = 0..2*numSampL - 1 are set equal to the reconstructed luma samples. - When numSampT is greater than or equal to, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper luma samples pY[x][y] for x = 0..2*numSampT - 1, y = -1, -2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper - left luma samples pY[x][y] for x = -1, y = -1, -2 are set equal to the reconstructed luma samples. 3. The down - sampled collocated luma samples pDsY[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x = 1..nTbW - 1, y = 1..nTbH - 1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+ pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+ pY[2*x][2*y + 1]+4)>>3 (8 - 163) - When availL is equal to TRUE, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y + 1]+4)>>3 (8 - 164) - Otherwise, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+2*pY[0][2*y]+pY[0][2*y + 1]+2)>>2 (8 - 165) - When availT is equal to TRUE, pDsY[x][0] for x = 1..nTbW - 1 is derived as follows: pDsY[x][0] = (pY[2*x][-1] + pY[2*x - 1][0] + 4 * pY[2*x][0] + pY[2*x + 1][0] + pY[2*x][1] + 4) >> 3 (8 - 166) - Otherwise, for x = 1..nTbW - 1, pDsY[x][0] is derived as follows: pDsY[x][0] = (pY[2*x - 1][0] + 2 * pY[2*x][0] + pY[2*x + 1][0] + 2) >> 2 (8 - 167) - When availL is equal to TRUE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[0][-1] + pY[-1][0] + 4 * pY[0][0] + pY[1][0] + pY[0][1] + 4) >> 3 (8 - 168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[-1][0] + 2 * pY[0][0] + pY[1][0] + 2) >> 2 (8 - 169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[0][-1] + 2 * pY[0][0] + pY[0][1] + 2) >> 2 (8 - 170) - Otherwise (when availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0] = pY[0][0] (8 - 171) - Otherwise, the following applies: - For x = 1..nTbW - 1, y = 0..nTbH - 1, pDsY[x][y] is derived as follows: pDsY[x][y]=(pY[2*x - 1][2*y]+pY[2*x - 1][2*y + 1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y + 1]+ pY[2*x + 1][2*y]+pY[2*x + 1][2*y + 1]+4)>>3 (8 - 172) - When availL is equal to TRUE, pDsY[0][y] for y = 0..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[0][2*y]+2*pY[0][2*y + 1]+ pY[1][2*y]+pY[1][2*y + 1]+4)>>3 (8 - 173) - Otherwise, pDsY[0][y] for y = 0..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y + 1]+1)>>1 (8 - 174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL - 1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL - 1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y - 1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y + 1]+4)>>3 (8 - 175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx-cntL]][-1] for idx=cntL..(cntL+cntT-1), and the downsampled adjacent upper luma sample pSelDsY[idx] for idx=cntL..(cntL+cntT-1) is defined as follows: - x is set equal to pickPosT[idx-cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8 - 181) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 182) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8 - 183) - Otherwise (when availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 184) - Otherwise, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x - 1][-2]+pY[2*x - 1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x + 1][-2]+pY[2*x + 1][-1]+4)>>3 (8 - 185) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 186) - Otherwise - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8-187) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8-188) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8-189) - In other cases (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8-190) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, replace Comp with DsY and C, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], and set pSelComp[1] equal to pSelComp[3] - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=2, maxGrpIdx[0]=1, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx ). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. Variables a, b, and k are derived as follows: - When numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (8-208) a=0 (8-209) b=1<<(BitDepthC-1) (8-210) - Otherwise, the following applies: diff = maxY - minY (8 - 211) - If diff is not equal to 0, the following applies: diffC = maxC - minC (8 - 212) x = Floor(Log2(diff)) (8 - 213) normDiff = ((diff << 4) >> x) & 15 (8 - 214) x += (normDiff!= 0)? 1 : 0 (8 - 215) y = Floor(Log2(Abs(diffC))) + 1 (8 - 216) a = (diffC * (divSigTable[normDiff] | 8) + 2y - 1) >> y (8 - 217) k = ((3 + x - y) < 1)? 1 : 3 + x - y (8 - 218) a = ((3 + x - y) < 1)? Sign(a) * 15 : a (8 - 219) b = minC - ((a * minY) >> k) (8 - 220) Here, divSigTable[] is defined as follows: divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (8 - 221) - Otherwise (when diff is equal to 0), the following applies: k = 0 (8 - 222) a = 0 (8 - 223) b = minC (8 - 224) 8. The predicted samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: predSamples[x][y] = Clip1C(((pDsY[x][y] * a) >> k) + b) (8 - 225)

[0428] The above example can be incorporated in the context of methods such as method 1800 to 2930 described below, which can be implemented in a video encoder and / or decoder.

[0429] FIG. 18 shows a flowchart of an exemplary method for video processing. Method 1800 includes, at step 1802, determining parameters of a cross-component linear model based on R chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the R chroma samples are selected from the group based on a position rule and R is 2 or more. Method 1800 further includes, at step 1804, performing the conversion based on the determination.

[0430] FIG. 19A shows a flowchart of an exemplary method for video processing. Method 1900 includes, at step 1902, determining parameters of a cross-component linear model based on chroma samples selected based on the positions of the chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the selected chroma samples are selected from a group of adjacent chroma samples. Method 1900 further includes, at step 1904, performing the conversion based on the determination.

[0431] FIG. 19B shows a flowchart of an exemplary method for video processing. Method 1910 includes, at step 1912, determining a group of adjacent chroma samples used to derive a set of values for parameters of a linear model for a current video block, where the width and height of the current video block are W and H respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples. Method 1910 further includes, at step 1914, performing a conversion between the current video block and an encoded representation of the video including the current video block based on the linear model.

[0432] FIG. 20A shows a flowchart of an exemplary method for video processing. Method 2000 includes, at step 2002, determining a plurality of sets of parameters for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, each set of parameters defining a cross-component linear model (CCLM) and being derived from a corresponding group of chroma samples at corresponding chroma sample positions. Method 2000 further includes, at step 2004, determining parameters for a final CCLM based on the plurality of sets of parameters. Method 2000 further includes, at step 2006, performing the conversion based on the final CCLM.

[0433] FIG. 20B shows a flowchart of an exemplary method for video processing. Method 2010 includes, at step 2012, determining parameters of a cross-component linear model (CCLM) based on minimum and maximum chroma and luma samples among N groups of chroma and luma samples selected from adjacent luma and chroma samples of a current video block of a video for conversion between the current video block of the video and an encoded representation of the video. Method 2010 further includes, at step 2014, performing the conversion using the CCLM.

[0434] FIG. 21 shows a flowchart of an exemplary method for video processing. Method 2100 includes, at step 2102, determining parameters of a cross-component linear model that can be completely determined by two chroma samples and corresponding two luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video. Method 2100 further includes, at step 2104, performing the conversion based on the determination.

[0435] FIG. 22 shows a flowchart of an exemplary method for video processing. Method 2200 includes, at step 2202, determining parameters of a cross-component linear model using a parameter table for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein an entry of the parameter table is retrieved according to two chroma sample values and two luma sample values. Method 2100 further includes, at step 2204, performing the conversion based on the determination.

[0436] FIG. 23A shows a flowchart of an exemplary method for video processing. Method 2310 includes, at step 2312, determining a final prediction P(x, y) of a chroma sample at a position (x, y) within a current video block as a combination of prediction results of a plurality of cross-component linear models (MCCLMs) for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the MCCLMs are selected based on the position (x, y) of the chroma sample. Method 2310 further includes, at step 2314, performing the conversion based on the final prediction.

[0437] FIG. 23B shows a flowchart of an exemplary method for video processing. Method 2320 includes, at step 2322, performing a first determination as to whether a first cross-component linear model (CCLM) that uses only a left adjacent sample is used to predict samples of a current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, and / or performing a second determination as to whether a second cross-component linear model (CCLM) that uses only an upper adjacent sample is used to predict samples of the current video block. Method 2320 further includes, at step 2324, performing the conversion based on the first determination and / or the second determination.

[0438] FIG. 24A shows a flowchart of an exemplary method for video processing. Method 2410 includes, at step 2412, determining a context used for encoding a flag using arithmetic encoding into an encoded representation of a current video block for conversion between the current video block of the video and the encoded representation of the video, the context being based on whether an upper left adjacent block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode. Method 2410 further includes, at step 2414, performing the conversion based on the determination. In some implementations, the flag is signaled to indicate whether the CCLM prediction mode is applied to the current video block, and the CCLM prediction mode derives a predicted value of a chroma component from another component using a linear mode.

[0439] FIG. 24B shows a flowchart of an exemplary method for video processing. Method 2420 includes, at step 2422, determining an encoding order for one or more indications of a derived mode (DM mode) and a linear mode (LM mode) based on an encoding mode of one or more adjacent blocks of a current video block of the video for conversion between the current video block of the video and the encoded representation of the video. Method 2420 further includes, at step 2424, performing the conversion based on the determination. In some implementations, the linear mode derives a predicted value of a chroma component from another component, and the DM mode derives an intra prediction mode of the chroma component from another component.

[0440] FIG. 24C shows a flowchart of an exemplary method for video processing. Method 2430 includes, at step 2432, determining parameters related to linear model prediction or cross-color component prediction based on refined adjacent luma samples and chroma samples of a current video block for conversion between the current video block of the video and an encoded representation of the video. Method 2430 further includes, at step 2434, deriving a predicted value of a chroma component of the current video block based on the parameters and refined internal luma samples of the current video block. Method 2430 further includes, at step 2436, performing a conversion based on the predicted value.

[0441] FIG. 24D shows a flowchart of an exemplary method for video processing. Method 2440 includes, at step 2442, determining parameters related to linear model prediction or cross-color component prediction by selecting adjacent samples based on the positions of maximum adjacent samples or minimum adjacent samples for conversion between the current video block of the video, which is a chroma block, and an encoded representation of the video. Method 2440 further includes, at step 2444, deriving a predicted value of chroma samples of the current video block based on the parameters and internal luma samples of the current video block. Method 2440 further includes, at step 2446, performing a conversion based on the predicted value.

[0442] FIG. 24E shows a flowchart of an exemplary method for video processing. Method 2450 includes, at step 2452, determining parameters regarding linear model prediction or cross-color component prediction based on a primary color component and a secondary color component for conversion between a current video block of a video and an encoded representation of the video, the primary color component being selected as one of a luma color component and a chroma color component, and the secondary color component being selected as the other of the luma color component and the chroma color component. Method 2450 further includes, at step 2454, performing the conversion based on the determination.

[0443] FIG. 25A shows a flowchart of an exemplary method for video processing. Method 2510 includes, at step 2512, performing downsampling on chroma and luma samples of adjacent blocks of a current video block. Method 2510 further includes, at step 2514, determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between a current video block of the video that is a chroma block and an encoded representation of the video. Method 2510 further includes, at step 2516, applying the CCLM to luma samples located within a luma block corresponding to the current video block to derive a predicted value of the current video block. Method 2510 further includes, at step 2518, performing the conversion based on the predicted value.

[0444] FIG. 25B shows a flowchart of an exemplary method for video processing. Method 2520 includes, at step 2522, determining parameters of a cross-component linear model (CCLM) based on two or more chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the two or more chroma samples are selected based on an encoding mode of the current video block. Method 2520 further includes, at step 2524, applying the CCLM to luma samples located within a luma block corresponding to the current video block to derive a predicted value of the current video block. Method 2520 further includes, at step 2526, performing a conversion based on the predicted value.

[0445] FIG. 26A shows a flowchart of an exemplary method for video processing. Method 2610 includes, at step 2612, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper adjacent samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where W is an integer. Method 2520 further includes, at step 2524, performing a conversion based on the determination.

[0446] FIG. 26B shows a flowchart of an exemplary method for video processing. Method 2620 includes, at step 2622, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on H available left adjacent samples of the current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video. Method 2620 further includes, at step 2624, performing a conversion based on the determination.

[0447] FIG. 27A shows a flowchart of an exemplary method for video processing. Method 2710 includes, at step 2712, determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video. Method 2710 further includes, at step 2714, performing a conversion based on the determination.

[0448] FIG. 27B shows a flowchart of an exemplary method for video processing. Method 2720 includes, at step 2722, selecting chroma samples based on a position rule for conversion between a current video block of a video that is a chroma block and the encoded representation of the video, the chroma samples being used to derive parameters of a cross-component linear model (CCLM). Method 2720 further includes, at step 2724, performing a conversion based on the determination. In this example, the position rule is defined to select chroma samples located within the row above and / or the column to the left of the current video block.

[0449] FIG. 28A shows a flowchart of an exemplary method for video processing. Method 2810 includes, at step 2812, determining positions at which luma samples are downsampled for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, the downsampled luma samples being used to determine parameters of a cross-component linear model (CCLM) based on the chroma samples and the downsampled luma samples, and the downsampled luma samples being at positions corresponding to positions of the chroma samples used to derive the parameters of the CCLM. Method 2810 further includes, at step 2814, performing a conversion based on the determination.

[0450] Figure 28B shows a flowchart of an exemplary method for video processing. Method 2820 includes, at step 2822, determining a method for deriving parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on encoding conditions associated with a current video block for conversion between the current video block of the video, which is a chroma block, and an encoded representation of the video. Method 2820 further includes, at step 2824, performing the conversion based on the determination.

[0451] Figure 28C shows a flowchart of an exemplary method for video processing. Method 2830 includes, at step 2732, determining whether to derive maximum and / or minimum values of luma components and chroma components to be used for deriving parameters of a cross-component linear model (CCLM) based on the availability of the left adjacent block and the upper adjacent block of the current video block for conversion between the current video block of the video, which is a chroma block, and an encoded representation of the video. Method 2830 further includes, at step 2834, performing the conversion based on the determination.

[0452] Figure 29A shows a flowchart of an exemplary method for video processing. Method 2910 includes, at step 2912, determining parameters of an encoding tool using a linear model based on selected adjacent samples of a current video block of the video and corresponding adjacent samples of a reference block for conversion between the current video block of the video and an encoded representation of the video. Method 2910 further includes, at step 2914, performing the conversion based on the determination.

[0453] FIG. 29B shows a flowchart of an exemplary method for video processing. Method 2920 includes, at step 2922, determining parameters of a local illumination compensation (LIC) tool based on N adjacent samples of a current video block and N corresponding adjacent samples of a reference block for conversion between the current video block of the video and an encoded representation of the video, where the N adjacent samples of the current video block are selected based on the positions of the N adjacent samples. Method 2920 further includes, at step 2924, performing the conversion based on the determination. The LIC tool uses a linear model of illumination change in the current video block during the conversion.

[0454] FIG. 29C shows a flowchart of an exemplary method for video processing. Method 2930 includes, at step 2932, determining parameters of a cross-component linear model (CCLM) based on chroma samples and corresponding luma samples for conversion between a current video block of the video, which is a chroma block, and an encoded representation of the video. Method 2930 further includes, at step 2934, performing the conversion based on the determination. In this example, some of the chroma samples are obtained by a padding operation, and the chroma samples and corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and corresponding luma samples.

[0455] Implementation examples of the disclosed technology Figure 30A is a block diagram of a video processing apparatus 3000. The apparatus 3000 can be used to implement one or more of the methods described herein. The apparatus 3000 can be embodied in a smartphone, a tablet, a computer, or an Internet of Things (IoT) receiver. The apparatus 3000 can include one or more processors 3002, one or more memories 3004, and video processing hardware 3006. The (one or more) processors 3002 can be configured to execute one or more of the methods described in this document (including, but not limited to, the methods shown in FIGS. 18-29C). The (one or more) memories 3004 can be used to store data and code used to execute the methods and techniques described herein. The video processing hardware 3006 can be used to implement some of the techniques described in this document in hardware circuits.

[0456] Figure 30B is another example of a block diagram of a video processing system in which the disclosed technology can be implemented. Figure 30B is a block diagram showing an example of a video processing system 3100 in which various technologies disclosed herein can be implemented. Various implementations can include some or all of the components of the system 3100. The system 3100 can include an input 3102 for receiving video content. The video content can be received in a raw or uncompressed format, such as, for example, 8-bit or 10-bit multi-component pixel values, or in a compressed or encoded format. The input 3102 can represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet®, Passive Optical Network (PON), etc., and wireless interfaces such as Wi-Fi® or a cellular interface.

[0457] System 3100 may include an encoding component 3104 that can implement various coding or encoding methods described in this document. The encoding component 3104 may reduce the average bit rate of a video from input 3102 to the output of the encoding component 3104 to generate an encoded representation of the video. Encoding techniques are, therefore, sometimes referred to as video compression techniques or video transcoding techniques. The output of the encoding component 3104 may be stored or connected as represented by component 3106 and transmitted via communication. The stored or communicated bitstream (or encoded) representation of the video received at input 3102 may be used by component 3108 to generate pixel values or a displayable video that is sent to a display interface 3110. The process of generating a video that a user can view from the bitstream representation is sometimes referred to as video decompression. Also, although certain video processing operations may be referred to as "encoding" operations or tools, it is understood that encoding tools or operations are used in an encoder and corresponding decoding tools or operations that reverse the encoding result are executed in a decoder.

[0458] Examples of a peripheral bus interface or a display interface may include a Universal Serial Bus (USB) or a High-Definition Multimedia Interface (HDMI (registered trademark)) or a DisplayPort, etc. Examples of a storage interface include SATA (serial advanced technology attachment), PCI, an IDE interface, etc. The techniques described in this document may be embodied in various electronic devices such as, for example, a mobile phone, a laptop, a smartphone, or other devices capable of performing digital data processing and / or video display.

[0459] In some embodiments, the video encoding method may be executed using an apparatus implemented on a hardware platform as described with respect to FIGS. 30A or 30B.

[0460] Various techniques and embodiments may be described using the following section-based format.

[0461] The first set of sections describes specific features and aspects of the disclosed techniques listed in a preceding section, including, for example, Examples 1.a-d and j.

[0462] 1. A method of video processing, comprising: determining parameters of a cross-component linear model based on R chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the R chroma samples are selected from the group based on a position rule and R is 2 or more; and performing the conversion based on the determination.

[0463] 2. The method according to item 1, wherein the parameters have values determined based on luma samples of the R chroma samples.

[0464] 3. The method according to item 2, wherein the luma samples are downsampled and used to derive the parameters of the cross-component linear model.

[0465] 4. The method according to item 1, wherein the parameters have values determined based on chroma samples at position S, where S is an integer. S The method according to item 1, wherein the parameters have values determined based on chroma samples at position S, where S is an integer.

[0466] 5. The upper left sample of the chroma block is (x, y), the width and height of the chroma block are W and H respectively, and the group of adjacent chroma samples includes sample A with coordinates (x - 1, y), sample B with coordinates (x - 1, y + H / 2 - 1), sample C with coordinates (x - 1, y + H / 2), sample D with coordinates (x - 1, y + H - 1), sample E with coordinates (x - 1, y + H), sample F with coordinates (x - 1, y + H + H / 2 - 1), sample G with coordinates (x - 1, y + H + H / 2), sample I with coordinates (x - 1, y + H + H - 1), sample J with coordinates (x, y - 1), sample K with coordinates (x + W / 2 - 1, y - 1), sample L with coordinates (x + W / 2, y - 1), sample M with coordinates (x + W - 1, y - 1), sample N with coordinates (x + W, y - 1), sample O with coordinates (x + W + W / 2 - 1, y - 1), sample P with coordinates (x + W + W / 2, y - 1), and sample Q with coordinates (x + W + W - 1, y - 1). The method according to claim 1.

[0467] 6. The position rule stipulates that the two chroma samples are selected from samples A, D, J, and M. The method according to claim 5.

[0468] 7. The position rule stipulates that the two chroma samples are selected from samples A, B, C, D, J, K, L, and M. The method according to claim 5.

[0469] 8. The position rule stipulates that the two chroma samples are selected from samples A, I, J, and Q. The method according to claim 5.

[0470] 9. The position rule stipulates that the two chroma samples are selected from samples A, B, D, I, J, K, M, and Q. The method according to claim 5.

[0471] 10. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, B, D, F, J, K, M, and O.

[0472] 11. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, C, G, I, J, L, P, and Q.

[0473] 12. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, C, E, G, J, L, N, and P.

[0474] 13. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, and M.

[0475] 14. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, L, N, and Q.

[0476] 15. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, M, N, O, P, and Q.

[0477] 16. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, B, C, D, E, F, G, and I.

[0478] 17. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, M, N, O, P, and Q.

[0479] 18. The method according to item 5, wherein the position rule stipulates that one of the two chroma samples is selected from the samples A, B, C, D, E, F, G, and I, and the other of the two chroma samples is selected from the samples J, K, L, M, N, O, P, and Q.

[0480] 19. The method according to any one of items 5 to 18, wherein the two chroma samples have equal corresponding luma values, and the method further includes checking additional chroma samples.

[0481] 20. The method according to item 1, wherein in order to determine the first set of values for the parameters, the chroma samples within the group of adjacent chroma samples are searched to find the two chroma samples having the minimum and maximum corresponding luma values.

[0482] 21. The method according to item 1, wherein the upper adjacent sample having coordinates (x, y) is within the group only when x%K = 0, assuming that K is 2, 4, 6, or 8 and % is the modulo operator.

[0483] 22. The method according to item 1, wherein the left adjacent sample having coordinates (x, y) is within the group only when y%K = 0, assuming that K is 2, 4, 6, or 8 and % is the modulo operator.

[0484] 23. The method according to item 1, wherein the two chroma samples are selected based on the availability of adjacent blocks.

[0485] 24. The method according to any one of items 1 to 23, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0486] 25. The method according to any one of items 1 to 23, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0487] 26. An apparatus in a video system having a processor and a non-transitory memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of claims 1 to 25.

[0488] 27. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 25.

[0489] The second set of claims describes specific features and aspects of the disclosed techniques recited in a preceding section including, for example, Examples 1.e-i and 9.

[0490] 1. A method for video processing, comprising: determining parameters of a cross-component linear model based on chroma samples selected based on the positions of chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the selected chroma samples are selected from a group of adjacent chroma samples; and performing the conversion based on the determination.

[0491] 2. The method according to claim 1, wherein at least one adjacent chroma sample does not belong to the selected chroma samples.

[0492] 3. The method according to claim 1, wherein when the prediction mode of the current video block is a first linear mode that uses only left adjacent samples, all of the selected chroma samples are to the left of the current block.

[0493] 4. The method according to claim 1, wherein when the prediction mode of the current video block is a second linear mode that uses only upper adjacent samples, all of the selected chroma samples are above the current block.

[0494] 5. The method according to any one of claims 1 to 4, wherein the position of the chroma sample is selected based on the width or height of the chroma block.

[0495] 6. The method according to claim 1, wherein the position of the chroma sample corresponds to signaling in a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, a tile group header, a tile, a coding unit (CU), a coding tree unit (CTU), or a prediction unit (PU).

[0496] 7. The method according to claim 1, wherein the determination of the parameter is further based on the least mean square method.

[0497] 8. The method according to claim 1, wherein the determination of the parameter is further based on the two-point method.

[0498] 9. A method for video processing, comprising: determining a group of adjacent chroma samples used to derive a set of values for parameters of a linear model for a current video block, wherein the width and height of the current video block are W and H respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples; and performing a conversion between the current video block and an encoded representation of a video including the current video block based on the linear model.

[0499] 10. The method according to claim 9, wherein the current video block is encoded using a linear intra prediction mode, the upper left sample of the current video block is (x, y), the at least one sample is (x - 1, y + d), d is an integer within the range [T, S], and T and S are integers.

[0500] 11. The method according to claim 9, wherein T < 0 and S > (2×H - 1).

[0501] 12. The method according to claim 9, wherein T = -4 and S = 3×H.

[0502] 13. The method according to claim 9, wherein T = 0 and S = max(2×W, W + H).

[0503] 14. The method according to claim 9, wherein T = 0 and S = 4×H.

[0504] 15. The method according to claim 9, wherein the current video block is encoded using a linear intra prediction mode, the top - left sample of the current video block is (x, y), the at least one sample is (x + d, y - 1), d is an integer within the range [T, S], and T and S are integers.

[0505] 16. The method according to claim 15, wherein T < 0 and S > (2×W - 1).

[0506] 17. The method according to claim 15, wherein T = -4 and S = 3×W.

[0507] 18. The method according to claim 15, wherein T = 0 and S = max(2×W, W + H).

[0508] 19. The method according to claim 15, wherein T = 0 and S = 4×W.

[0509] 20. The method according to any one of claims 1 to 19, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0510] 21. The method according to any one of claims 1 to 19, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0511] 22. An apparatus in a video system having a processor and a non - transient memory having instructions, which when executed by the processor cause the processor to execute the method according to any one of claims 1 to 21.

[0512] 23. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 21.

[0513] The third set of claims describes specific features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 2 and 5.

[0514] 1. A method for video processing, the method comprising: determining a plurality of sets of parameters for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, each set of parameters defining a cross-component linear model (CCLM) and being derived from a corresponding group of chroma samples at a corresponding chroma sample position; determining parameters for a final CCLM based on the plurality of sets of parameters; and performing the conversion based on the final CCLM.

[0515] 2. The method according to claim 1, wherein the parameters for the final CCLM are determined as an average of corresponding parameters in the plurality of sets of parameters.

[0516] 3. The method according to claim 1, wherein the plurality of sets of parameters includes a first set (α1, β1) and a second set (α2, β2), and chroma prediction is calculated based on the parameters α1, β1, α2, β2.

[0517] 4. The method according to claim 1, wherein the plurality of sets of parameters are shifted and combined to form the final CCLM.

[0518] 5. The method according to claim 1, wherein the plurality of sets of parameters includes a first set (α1, β1) derived from a first group of chroma samples and a second set (α2, β2) derived from a second group of chroma samples, and the first group and the second group correspond to different chroma sample positions.

[0519] 6. The upper left sample of the chroma block is (x, y), the width and height of the chroma block are W and H respectively, and the group of chroma samples is sample A having coordinates (x - 1, y), sample B having coordinates (x - 1, y + H / 2 - 1), sample C having coordinates (x - 1, y + H / 2), sample D having coordinates (x - 1, y + H - 1), sample E having coordinates (x - 1, y + H), sample F having coordinates (x - 1, y + H + H / 2 - 1), sample G having coordinates (x - 1, y + H + H / 2), sample I having coordinates (x - 1, y + H + H - 1), sample J having coordinates (x, y - 1), sample K having coordinates (x + W / 2 - 1, y - 1), sample L having coordinates (x + W / 2, y - 1), sample M having coordinates (x + W - 1, y - 1), sample N having coordinates (x + W, y - 1), sample O having coordinates (x + W + W / 2 - 1, y - 1), sample P having coordinates (x + W + W / 2, y - 1), or sample Q having coordinates (x + W + W - 1, y - 1), The method according to claim 5, comprising at least one of

[0520] 7. The method according to claim 6, wherein the first group includes samples A and D, and the second group includes samples J and M, or samples E and I.

[0521] 8. The method according to claim 6, wherein the first group includes samples A and I, and the second group includes samples J and Q.

[0522] 9. The method according to item 6, wherein the first group includes samples A and B, and the second group includes samples C and D.

[0523] 10. The method according to item 6, wherein the first group includes samples J and M, and the second group includes samples N and Q.

[0524] 11. The method according to item 6, wherein the first group includes samples J and K, and the second group includes samples L and M.

[0525] 12. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) based on the minimum and maximum chroma and luma samples among N groups of chroma and luma samples selected from adjacent luma and chroma samples of the current video block for conversion between the current video block of the video and the encoded representation of the video; and performing the conversion using the CCLM.

[0526] 13. The N groups of chroma and luma samples include S 0 , S 1 , …, S m , provided that 1 ≦ m ≦ N - 1, m and N are non-negative integers, the maximum luma value is calculated as maxL = f1(maxL S0 , maxL S1 , …, maxL Sm ), f1 is a first function, maxL Si is the maximum luma value of the group S i among the plurality of groups, the maximum chroma value is calculated as maxC = f2(maxC S0 , maxC S1 , …, maxC Sm ), f2 is a second function, maxC Si is the chroma value of the group S Si corresponding to maxL i , and the minimum luma value is calculated as minL = f3(minL S0 , minL S1 , …, minL Sm) is calculated as, f3 is the third function, and minL Si is the minimum luma value of group S i , and the minimum chroma value is minC = f4(minC S0 , minC S1 , …, minC Sm ) is calculated as, f4 is the fourth function, and minC Si is the chroma value of the group S Si corresponding to minL i , and the parameters of the linear model have α = (maxC - minC) / (maxL - minL) and β = minC - α × minL calculated as α and β, the method according to claim 12.

[0527] 14. The method according to claim 13, wherein f1, f2, f3, and f4 are averaging functions.

[0528] 15. The method according to claim 13 or 14, wherein m = N - 1 16. The method according to claim 13 or 14, wherein m = 1 and S 1 = S N-1 .

[0529] 17. The method according to claim 13 or 14, wherein m = 0.

[0530] 18. S 0 has samples from the row above the current video block, and S 1 has samples from the row to the left of the current video block, the method according to claim 13 or 14.

[0531] 19. The samples from the row above the current video block have coordinates (x, y), S 0 has the first part of the samples, and each sample in the first part satisfies x % P = Q, and S 1 has the second part of the samples, and each sample in the second part satisfies x % P ≠ Q, where % is the modulo operator, and P and Q are non - negative integers, the method according to claim 13 or 14.

[0532] 20. Samples from the row to the left of the current video block have coordinates (x, y), and S 0 has a first part of the sample, and each sample of the first part satisfies y%P = Q, and S 1 has a second part of the sample, and each sample of the second part satisfies y%P ≠ Q, where % is the modulo operator, and P and Q are non - negative integers, the method according to item 13 or 14.

[0533] 21. The method according to item 19 or 20, wherein P = 2 and Q = 1, or P = 2 and Q = 0, or P = 4 and Q = 0.

[0534] 22. The method according to any one of items 12 to 14, wherein the chroma and luma samples have only a part of the chroma and luma samples of adjacent blocks.

[0535] 23. N is predetermined, the method according to any one of items 13 to 22.

[0536] 24. N is signaled within a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a tile group header, one or more maximum coding units, or one or more coding units, the method according to any one of items 13 to 23.

[0537] 25. The method according to item 12, wherein the chroma and luma samples of each group are selected based on the availability of adjacent blocks of the current video block.

[0538] 26. The method according to item 12, wherein the chroma and luma samples of each group are selected based on the width and height of the current video block.

[0539] 27. The method according to item 12, wherein the chroma and luma samples of each group are selected based on the values of the chroma and luma samples.

[0540] 28. The method according to any one of claims 1 to 27, wherein the execution of the conversion includes generating the encoded representation from the current block.

[0541] 29. The method according to any one of claims 1 to 27, wherein the execution of the conversion includes generating the current block from the encoded representation.

[0542] 30. An apparatus in a video system having a processor and a non - transitory memory having instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1 to 29.

[0543] 31. A computer program product stored on a non - transitory computer - readable medium, comprising program code for performing the method according to any one of claims 1 to 29.

[0544] The fourth set of claims describes specific features and aspects of the disclosed techniques listed in the preceding sections, including, for example, Examples 3.a - b and 3.d.

[0545] 1. A method of video processing, comprising: determining parameters of a cross - component linear model that can be completely determined by two chroma samples and corresponding two luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination.

[0546] 2. The method according to claim 1, wherein the two chroma samples are denoted as C0 and C1, the corresponding luma samples are denoted as L0 and L1, the parameters of the cross - component linear model are denoted as α and β, and α and β are defined by the equations α=(C1 - C0) / (L1 - L0) and β = C0−α×L0.

[0547] 3. The method according to claim 2, wherein when L1 is equal to L0, α = 0.

[0548] 4. The method according to item 2, wherein when L1 is equal to L0, an intra prediction mode other than the mode of the cross-component linear model is used.

[0549] 5. The method according to item 2, wherein α is determined by eliminating the division operation.

[0550] 6. The method according to item 2, wherein α is determined using a process that does not use a lookup table and the process does not include a division operation.

[0551] 7. The method according to item 2, wherein the parameter of the cross-component linear model has a value determined based on the value of (L1 - L0).

[0552] 8. α = Shift(C1 - C0, Floor(log 2 (L1 - L0))), where Shift(x, s) = (x + off) >> s, off is an integer, and Floor(x) is a floor function that outputs the integer part of x. The method according to item 2.

[0553] 9. α = Shift(C1 - C0, Ceiling(log 2 (L1 - L0))), where Shift(x, s) = (x + off) >> s, off is an integer, Ceiling(x) is a ceiling function that outputs the smallest integer greater than or equal to x. The method according to item 2.

[0554] 10. The method according to item 8 or 9, wherein the process for obtaining the value of log2(x) is performed by examining the position of the most significant digit of x.

[0555] 11. The method according to item 1, wherein the determination of the parameter is performed within K bits, and K is 8, 10, 12, 16, 24, or 32.

[0556] 12. The method according to claim 11, wherein the intermediate variable is clipped or right-shifted so as to be within the K bits.

[0557] 13. The method according to any one of claims 1 to 12, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0558] 14. The method according to any one of claims 1 to 12, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0559] 15. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1 to 14.

[0560] 16. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 14.

[0561] The fifth set of claims describes specific features and aspects of the disclosed technology recited in the preceding sections, including, for example, Example 3.c.

[0562] 1. A method of video processing, comprising: determining parameters of a cross-component linear model using a parameter table for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein an entry of the parameter table is retrieved according to two chroma sample values and two luma sample values; and performing the conversion based on the determination.

[0563] 2. The method according to claim 1, wherein the parameter table has a size of V that is smaller than 2 P and P is an integer.

[0564] 3. The method according to claim 1, wherein the parameter table has a plurality of entries each storing an F-bit integer, and F is 8 or 16.

[0565] 4. The method according to claim 1, wherein the parameter table M[k] satisfies M[k-Z] = ((1<<S)+Off) / k, where S is an integer defining the precision, Off indicates the offset, and Z is the first value of the parameter table.

[0566] 5. The method according to claim 1, wherein the two chroma samples are denoted as C0 and C1, the luma samples are denoted as L0 and L1, the parameters of the cross-component linear model are denoted as α and β, and α and β are defined by the equations α = (C1 - C0) / (L1 - L0) and β = C0 - α×L0.

[0567] 6. The method according to claim 5, wherein k = Shift(L1 - L0, W), k is used to query an entry in the parameter table, Shift(x, s) = (x + off) >> s, off is an integer, and W is the width of the current video block.

[0568] 7. The method according to claim 6, wherein α is zero when k - Z < 0 or k - Z ≧ V, V indicates the size of the parameter table, and Z indicates the first value of the parameter table.

[0569] 8. The method according to claim 5, wherein α = Shift((C1 - C0)×M[k - Z], D) or α = SignShift((C1 - C0)×M[k - Z], D), Shift(x, s) = (x + off) >> s, SignShift(x, s) is (x + off) >> s when x ≧ 0 and -(-x + off) >> s when x < 0, off is an integer, and k indicates an index for querying an entry in the parameter table.

[0570] 9. The method according to item 8, wherein k is derived based on the value of (L1 - L0) without being based on the value of (C1 - C0).

[0571] 10. The method according to item 8, wherein k is derived based on both the value of (L1 - L0) and the value of (C1 - C0).

[0572] 11. The method according to item 6, wherein k is valid within the range between kMin and kMax.

[0573] 12. The method according to item 8, wherein k = Shift(L1 - L0, W), k is an index for querying an entry in the parameter table, Shift(x, s) = (x + off) >> s, off is an integer, and W is the width of the current video block.

[0574] 13. The method according to item 8, wherein k is valid within the range between kMin and kMax, k = L1 - L0 when (L1 - L0) ≤ kMax, and k = Shift(L1 - L0, W) when (L1 = L0) > kMax.

[0575] 14. The method according to item 8, wherein k is valid within the range between kMin and kMax, and k = Min(kMax, L1 - L0) or k = Max(kMin, Min(kMax, L1 - L0)).

[0576] 15. The method according to item 5, wherein (L1 - L0) < 0, and the determination is performed to derive the value of '-α' instead of α.

[0577] 16. The method according to item 5, wherein (L1 - L0) = 0, and α is set to a default value of 0 or 1.

[0578] 17. (L1 - L0) = 2 E, E ≥ 0, α = Shift((C1 - C0), E) or Signshift((C1 - C0), E), where Shift(x, s) = (x + off) >> s and SignShift(x, s) is (x + off) >> s when x ≥ 0 and -(-x + off) >> s when x < 0, the method according to item 5.

[0579] 18. The execution of the conversion includes generating the encoded representation from the current block, the method according to any one of items 1 to 17.

[0580] 19. The execution of the conversion includes generating the current block from the encoded representation, the method according to any one of items 1 to 17.

[0581] 20. An apparatus in a video system having a processor and a non - transient memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of items 1 to 19.

[0582] 21. A computer program product stored on a non - transient computer - readable medium, including program code for executing the method according to any one of items 1 to 19.

[0583] The sixth set of items describes specific features and aspects of the disclosed techniques enumerated in the preceding sections, including, for example, Examples 4 and 6.

[0584] 1. A method of video processing, comprising: determining a final prediction P(x, y) of a chroma sample at a position (x, y) within a current video block of a video, which is a chroma block, as a combination of prediction results of a plurality of cross - component linear models (MCCLMs), the MCCLMs being selected based on the position (x, y) of the chroma sample; and executing the conversion based on the final prediction.

[0585] 2. The plurality of cross-component linear models according to claim 1 includes a first linear model whose parameters are derived only from the left adjacent sample, and a second linear model whose parameters are derived only from the upper adjacent sample.

[0586] 3. The method according to claim 1, wherein a part of the chroma samples is predicted based only on the left adjacent sample, and a part of the chroma samples is predicted based only on the upper adjacent sample.

[0587] 4. The method according to claim 2 or 3, wherein the final prediction P(x, y) of the chroma sample is based on a weighted average of the prediction P1(x, y) by the first linear model and the prediction P2(x, y) by the second linear model.

[0588] 5. The method according to claim 4, wherein P(x, y) = w1 × P1(x, y) + w2 × P2(x, y), and w1 and w2 are weights constrained by w1 + w2 = 1.

[0589] 6. The method according to claim 4, wherein P(x, y) = (w1 * P1(x, y) + w2 * P2(x, y) + Offset) >> shift, where offset is an integer including 0 or 1 << (shift - 1), shift is an integer, and w1 and w2 are weights constrained by w1 + w2 = 1 << shift.

[0590] 7. The method according to claim 4, wherein P(x, y) = (w1 * P1(x, y) + ((1 << shift) - w1) * P2(x, y) + Offset) >> shift, where offset is an integer including 0 or 1 << (shift - 1), shift is an integer, and w1 and w2 are weights.

[0591] 8. The method according to any one of claims 5 to 7, wherein the values of w1 and w2 depend on the position (x, y).

[0592] 9. The method according to any one of items 5 to 7, wherein when x > y, w1 < w2; when x < y, w1 > w2; and when x = y, w1 = w2.

[0593] 10. The method according to any one of items 5 to 7, wherein when x < y, as the value of (y - x) increases, the value of (w1 - w2) increases.

[0594] 11. The method according to any one of items 5 to 7, wherein when x > y, as the value of (x - y) increases, the value of (w2 - w1) increases.

[0595] 12. A method for video processing, comprising: a first determination as to whether a first cross-component linear model (CCLM) that uses only left adjacent samples is used to predict samples of the current video block for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video; and / or a second determination as to whether a second cross-component linear model (CCLM) that uses only upper adjacent samples is used to predict samples of the current video block; and a step of performing the conversion based on the first determination and / or the second determination.

[0596] 13. The method according to item 12, wherein the first CCLM is not applied when W > K × H, and K is a non-negative integer.

[0597] 14. The method according to item 12, wherein the second CCLM is not applied when H > K × W, and K is a non-negative integer.

[0598] 15. The method according to item 12, wherein when one of the first CCLM and the second CCLM is not applied, a flag indicating the application of the first CCLM or the second CCLM is not signaled.

[0599] 16. The method according to any one of items 1 to 15, wherein the performing of the conversion includes generating the encoded representation from the current block.

[0600] 17. The method according to any one of claims 1 to 15, wherein performing the transformation includes generating the current block from the encoded representation.

[0601] 18. An apparatus in a video system having a processor and a non-transitory memory having instructions, which, when executed by the processor, cause the processor to perform the method according to any one of claims 1 to 17.

[0602] 19. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 17.

[0603] The seventh group of claims describes specific features and aspects of the disclosed technology recited in the preceding sections including, for example, Examples 7, 8, 11 - 13.

[0604] 1. A method of video processing, comprising determining a context used to encode a flag for arithmetic encoding of the current video block into the encoded representation for transformation between the current video block of a video and the encoded representation of the video, the context being based on whether an upper left adjacent block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode; and performing the transformation based on the determination, wherein the flag is signaled to indicate whether the CCLM prediction mode is applied to the current video block, and the CCLM prediction mode derives a predicted value of a chroma component from another component using a linear mode.

[0605] 2. The method according to item 1, wherein the context has a first context when the upper left adjacent block uses the CCLM prediction mode, and has a second context different from the first context when the upper left adjacent block does not use the CCLM prediction mode.

[0606] 3. The method according to item 1, wherein the upper left adjacent block is unavailable, and the CCLM prediction mode is considered valid.

[0607] 4. The method according to item 1, wherein the upper left adjacent block is unavailable, and the CCLM prediction mode is considered invalid.

[0608] 5. The method according to item 1, wherein the upper left adjacent block is intra-coded, and the CCLM prediction mode is considered valid.

[0609] 6. The method according to item 1, wherein the upper left adjacent block is intra-coded, and the CCLM prediction mode is considered invalid.

[0610] 7. A video processing method, comprising: determining an encoding order for one or more indications of a derived mode (DM mode) and a linear mode (LM mode) based on an encoding mode of one or more adjacent blocks of a current video block for conversion between the current video block of a video and an encoded representation of the video; and performing the conversion based on the determination, wherein the LM mode derives a predicted value of a chroma component from another component using a linear mode, and the DM mode derives an intra prediction mode of the chroma component from another component.

[0611] 8. The method according to item 7, wherein the upper left adjacent block among the one or more adjacent blocks is encoded in the LM mode, and the indication of the LM mode is encoded first.

[0612] 9. The method according to claim 7, wherein the upper left adjacent block among the one or more adjacent blocks is encoded in the DM mode, and the indication of the DM mode is encoded first.

[0613] 10. The method according to claim 7, wherein the upper left adjacent block among the one or more adjacent blocks is encoded in an encoding mode different from the LM mode, and the indication of the DM mode is encoded first.

[0614] 11. The method according to any one of claims 7 to 10, wherein the one or more indications are signaled within a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a tile group header, one or more maximum coding units, or one or more coding units.

[0615] 12. A method of video processing, comprising: determining parameters related to linear model prediction or cross-color component prediction based on refined adjacent luma samples and chroma samples of a current video block of a video for conversion between the current video block of the video and an encoded representation of the video; deriving a predicted value of a chroma component of the current video block based on the parameters and the refined intra luma samples of the current video block; and performing the conversion based on the predicted value.

[0616] 13. The method according to claim 12, wherein the adjacent luma samples and intra luma samples are downsampled before the refinement process.

[0617] 14. The method according to claim 12, wherein the refinement process comprises a filtering process or a non-linear process.

[0618] 15. The parameters of the linear model prediction are α and β, where α = (C1 - C0) / (L1 - L0) and β = C0 - αL0, C0 and C1 are derived from adjacent chroma samples, and L0 and L1 are derived from adjacent luma samples. The method according to claim 12.

[0619] 16. C0 and L0 are based on S adjacent chroma and luma samples denoted as {Cx1, Cx2, …, CxS} and {Lx1, Lx2, …, LxS} respectively, C1 and L1 are based on T adjacent chroma and luma samples denoted as {Cy1, Cy2, …, CyT} and {Ly1, Ly2, …, LyT} respectively, {Cx1, Cx2, …, CxS} corresponds to {Lx1, Lx2, …, LxS}, {Cy1, Cy2, …, CyT} corresponds to {Ly1, Ly2, …, LyT}, C0 = f0(Cx1, Cx2, …, CxS), L0 = f1(Lx1, Lx2, …, LxS), C1 = f2(Cy1, Cy2, …, CyT), and L1 = f3(Ly1, Ly2, …, LyT), where f0, f1, f2, and f3 are functions. The method according to claim 15.

[0620] 17. f0 and f1 are the first functions. The method according to claim 16.

[0621] 18. f2 and f3 are the second functions. The method according to claim 16.

[0622] 19. f0, f1, f2, and f3 are the third functions. The method according to claim 17.

[0623] 20. The third function is an averaging function. The method according to claim 19.

[0624] 21. S = T. The method according to claim 16 22. (Lx1, Lx2, …, LxS) is the minimum sample among a group of luma samples. The method according to claim 16.

[0625] 23. {Ly1, Ly2, …, LyT} is the maximum sample among a group of luma samples. The method according to claim 16.

[0626] 24. The method according to claim 22 or 23, wherein the group of luma samples has all adjacent samples used in VTM-3.0 to derive the parameters of the linear model prediction.

[0627] 25. The method according to claim 22 or 23, wherein the group of luma samples has a subset, not all, of the adjacent samples used in VTM-3.0 to derive the parameters of the linear model prediction.

[0628] 26. A method of video processing, comprising: determining parameters related to linear model prediction or cross-color component prediction by selecting adjacent samples based on the position of the maximum adjacent sample or the minimum adjacent sample for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; deriving a predicted value of the chroma samples of the current video block based on the parameters and internal luma samples of the current video block; and performing the conversion based on the predicted value.

[0629] 27. The method according to claim 26, wherein the maximum adjacent sample is at position (x0, y0), and samples in regions (x0 - d1, y0), (x0, y0 - d2), (x0 + d3, y0), (x0, y0 + d4) are used to select the adjacent samples, and {d1, d2, d3, d4} depends on the position (x0, y0).

[0630] 28. The method according to claim 26, wherein the minimum adjacent sample is at position (x1, y1), and samples in regions (x1 - d1, y1), (x1, y1 - d2), (x1 + d3, y1), (x1, y1 + d4) are used to select the adjacent samples, and {d1, d2, d3, d4} depends on the position (x1, y1).

[0631] 29. The method according to any one of claims 26 to 28, wherein the adjacent samples represent color components.

[0632] 30. A method of video processing, comprising: determining parameters related to linear model prediction or cross-color component prediction based on a main color component and a sub-color component for conversion between a current video block of a video and an encoded representation of the video, wherein the main color component is selected as one of a luma color component and a chroma color component, and the sub-color component is selected as the other of the luma color component and the chroma color component; and performing the conversion based on the determination.

[0633] 31. The method according to any one of claims 1 to 30, wherein the performing of the conversion includes generating the encoded representation from the current block.

[0634] 32. The method according to any one of claims 1 to 30, wherein the performing of the conversion includes generating the current block from the encoded representation.

[0635] 33. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1 to 32.

[0636] 34. A computer program product stored on a non-transitory computer-readable medium, comprising program code for performing the method according to any one of claims 1 to 32.

[0637] The eighth set of claims describes specific features and aspects of the disclosed technology enumerated in the preceding sections, including, for example, Examples 10 and 14.

[0638] 1. A method comprising: performing downsampling on chroma and luma samples of adjacent blocks of a current video block; determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between the current video block, which is a chroma block, of the video and an encoded representation of the video; applying the CCLM to luma samples located within a luma block corresponding to the current video block to derive a predicted value of the current video block; and performing the conversion based on the predicted value.

[0639] 2. The method according to claim 1, wherein the current video block has a height (H) and a width (W), and the downsampling is based on the height or the width.

[0640] 3. The method according to claim 1, wherein the downsampled chroma and luma samples are obtained before deriving the parameters of the CCLM including α and β, and α and β are defined by the formulas α = (C1 - C0) / (L1 - L0) and β = C0 - α × L0.

[0641] 4. The method according to claim 1, wherein the number of left adjacent samples used to derive the parameters of the CCLM is the same as the number of upper adjacent samples used to derive the parameters of the CCLM.

[0642] 5. The method according to claim 2, wherein W < H or W > H.

[0643] 6. The method according to claim 2, wherein whether to downsample the chroma and luma samples of the left adjacent block or the chroma and luma samples of the upper adjacent block depends on the relative sizes of W and H.

[0644] 7. The method according to claim 6, wherein the downsampling is performed on the chroma and luma samples of the left adjacent block when H > W.

[0645] 8. The method according to item 6, wherein when W > H, the downsampling is performed on the chroma and luma samples of the upper adjacent block.

[0646] 9. The method according to item 7, wherein the sample at the upper left of the current video block is R[0,0], and the downsampled chroma sample has a sample R[-1, K×H / W], where K is a non-negative integer in the range from 0 to W-1.

[0647] 10. The method according to item 8, wherein the sample at the upper left of the current video block is R[0,0], and the downsampled chroma sample has a sample R[K×H / W, -1], where K is a non-negative integer in the range from 0 to H-1.

[0648] 11. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) based on two or more chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the two or more chroma samples are selected based on an encoding mode of the current video block; applying the CCLM to luma samples located within a luma block corresponding to the current video block to derive a predicted value of the current video block; and performing the conversion based on the predicted value.

[0649] 12. The method according to item 11, wherein two or more luma samples corresponding to the two or more chroma samples are used to derive the parameters of the cross-component linear model.

[0650] 13. The method according to item 12, wherein the two or more luma samples are downsampled to derive the parameters of the cross-component linear model.

[0651] 14. The method according to claim 11, wherein the two or more chroma samples are selected based on the availability of adjacent samples.

[0652] 15. The method according to claim 11, wherein the two or more chroma samples are selected from one or more of the left column, the upper row, the upper right row, or the lower left column with respect to the current video block.

[0653] 16. The method according to claim 11, wherein the two or more chroma samples are selected based on the ratio of the height of the current video block to the width of the current video block.

[0654] 17. The method according to claim 11, wherein the two or more chroma samples are selected based on whether the width or height of the current video block is equal to K, where K is an integer.

[0655] 18. The method according to claim 17, wherein K = 2. 19. The encoding mode of the current video block is one of a first linear mode that uses two samples from the left adjacent sample and two samples from the upper adjacent sample, a second linear mode that uses only the left adjacent sample, and a third linear mode that uses only the upper adjacent sample. The coordinates of the upper left sample of the current video block are (x, y), and the width and height of the current video block are W and H, respectively. The method according to claim 11.

[0656] 20. The method according to claim 19, wherein in the first linear mode, the two or more chroma samples include samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - 1, y - 1).

[0657] 21. The method according to claim 19, wherein in the first linear mode, the two or more chroma samples include samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - H / W - 1), and (x + W - 1, y - 1), and H > W.

[0658] 22. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - W / H - 1, y - 1) in the first linear mode, and H < W.

[0659] 23. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - max(1, H / W)), and (x + W - max(1, W / H), y - 1) in the first linear mode.

[0660] 24. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x, y - 1), (x + W / 4, y - 1), (x + 2*W / 4, y - 1), and (x + 3*W / 4, y - 1) in the third linear mode.

[0661] 25. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x, y - 1), (x + W / 4, y - 1), (x + 3*W / 4, y - 1), and (x + W - 1, y - 1) in the third linear mode.

[0662] 26. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x, y - 1), (x + (2W) / 4, y - 1), (x + 2*(2W) / 4, y - 1), and (x + 3*(2W) / 4, y - 1) in the third linear mode.

[0663] 27. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x, y - 1), (x + (2W) / 4, y - 1), (x + 3*(2W) / 4, y - 1), and (x + (2W) - 1, y - 1) in the third linear mode.

[0664] 28. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x - 1, y), (x - 1, y + H / 4), (x - 1, y + 2*H / 4), and (x - 1, y + 3*H / 4) in the second linear mode.

[0665] 29. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y + 2*H / 4), (x-1, y + 3*H / 4), and (x-1, y + H-1) in the second linear mode.

[0666] 30. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y+(2H) / 4), (x-1, y + 2*(2H) / 4), and (x-1, y + 3*(2H) / 4) in the second linear mode.

[0667] 31. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y + 2*(2H) / 4), (x-1, y + 3*(2H) / 4), and (x-1, y+(2H)-1) in the second linear mode.

[0668] 32. The method according to any one of claims 20 to 31, wherein exactly two samples are selected to determine the parameters of the CCLM.

[0669] 33. The method according to any one of claims 1 to 32, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0670] 34. The method according to any one of claims 1 to 32, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0671] 35. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1 to 34.

[0672] 36. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 34.

[0673] The ninth group of claims describes certain features and aspects of the disclosed technology recited in the preceding sections including, for example, Examples 16 and 17.

[0674] 1. A method for video processing, the method comprising: determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper adjacent samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein W is an integer; and performing the conversion based on the determination.

[0675] 2. The method of claim 1, wherein W is set to i) the width of the current video block, ii) L times the width of the current video block, where L is an integer, iii) the sum of the height of the current video block and the width of the current video block, or iv) the sum of the width of the current video block and the number of available upper right adjacent samples.

[0676] 3. The method of claim 1, wherein W depends on the availability of at least one of an upper adjacent block or a left adjacent block of the current video block.

[0677] 4. The method of claim 1, wherein W depends on the encoding mode of the current video block.

[0678] 5. The method of claim 2, wherein L has a value that depends on the availability of an upper right block or an upper left sample located adjacent to the current video block.

[0679] 6. The method according to claim 1, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), and the first position offset value (F) and the step value (S) depend on W.

[0680] 7. The method according to claim 6, wherein the upper left sample has coordinates (x0, y0), and the selected chroma sample has coordinates (x0 + F + K × S, y0 - 1), where K is an integer between 0 and kMax.

[0681] 8. The method according to claim 6, wherein F = W / P or F = W / P + offset, and P is an integer.

[0682] 9. The method according to claim 8, wherein F = W >> (2 + numIs4T), and numIs4T is equal to 1 when four adjacent samples are selected in the adjacent row above, and numIs4T is equal to 0 otherwise.

[0683] 10. The method according to claim 6, wherein S = W / Q, and Q is an integer.

[0684] 11. The method according to claim 6, wherein S is greater than or equal to 1.

[0685] 12. The method according to claim 10 or 11, wherein S = Max(1, W >> (1 + numIs4T)), and numIs4T is equal to 1 when four adjacent samples are selected in the adjacent row above, and numIs4T is equal to 0 otherwise.

[0686] 13. The method according to claim 9 or 12, wherein numIs4T is equal to 1 when the adjacent sample above is available, the adjacent sample on the left is available, and the current video block is encoded with a normal CCLM different from a first CCLM that uses only the adjacent sample on the left and different from a second CCLM that uses only the adjacent sample above.

[0687] 14. The method according to claim 6, wherein F = S / R, and R is an integer.

[0688] 15. The method according to item 6, where S = F / Z and Z is an integer.

[0689] 16. The method according to any one of items 7 to 15, where at least one of Kmax, F, S, or offset depends on the prediction mode of the current video block, which is one of a first CCLM that uses only the left adjacent sample, a second CCLM that uses only the upper adjacent sample, a third CCLM that uses both the left adjacent sample and the upper adjacent sample, or another mode different from the first CCLM, the second CCLM, and the third CCLM.

[0690] 17. The method according to any one of items 7 to 15, where at least one of Kmax, F, S, or offset depends on the width and / or height of the current video block.

[0691] 18. The method according to any one of items 7 to 15, where at least one of Kmax, F, S, or offset depends on the availability of adjacent samples.

[0692] 19. The method according to any one of items 7 to 15, where at least one of Kmax, F, S, or offset depends on W.

[0693] 20. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on H available left adjacent samples of the current video block of the video, which is a chroma block, for conversion between the current video block and the encoded representation of the video; and performing the conversion based on the determination.

[0694] 21. The method according to claim 20, wherein H is set to i) the height of the current video block, ii) L times the height of the current video block, where L is an integer, iii) the sum of the height and the width of the current video block, or iv) the sum of the height of the current video block and the number of available lower left adjacent samples.

[0695] 22. The method according to claim 20, wherein H depends on the availability of at least one of the adjacent block above or the adjacent block to the left of the current video block.

[0696] 23. The method according to claim 20, wherein H depends on the encoding mode of the current video block.

[0697] 24. The method according to claim 21, wherein L has a value that depends on the availability of the lower left block or the lower left sample located adjacent to the current video block.

[0698] 25. The method according to claim 20, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), and the first position offset value (F) and the step value (S) depend on H.

[0699] 26. The method according to claim 25, wherein the upper left sample has coordinates (x0, y0), and the selected chroma sample has coordinates (x0 - 1, y0 + F + K × S), where K is an integer between 0 and kMax.

[0700] 27. The method according to claim 25, wherein F = H / P or F = H / P + offset, where P is an integer.

[0701] 28. The method according to claim 27, wherein F = H >> (2 + numIs4L), and numIs4L is equal to 1 when four adjacent samples are selected within the adjacent column to the left, and equal to 0 otherwise.

[0702] 29. The method according to claim 25, wherein S = H / Q, where Q is an integer.

[0703] 30. The method according to item 25, wherein S is 1 or more.

[0704] 31. The method according to item 29 or 30, wherein S = Max(1, H>>(1 + numIs4L)), and numIs4L is equal to 1 when four adjacent samples are selected in the left adjacent column, and numIs4L is equal to 0 otherwise.

[0705] 32. The method according to item 9 or 12, wherein numIs4L is equal to 1 when the upper adjacent sample is available, the left adjacent sample is available, and the current video block is encoded in a normal CCLM different from a first CCLM using only the left adjacent sample and different from a second CCLM using only the upper adjacent sample.

[0706] 33. The method according to item 25, wherein F = S / R and R is an integer.

[0707] 34. The method according to item 25, wherein S = F / Z and Z is an integer.

[0708] 35. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the prediction mode of the current video block, which is one of a first CCLM using only the left adjacent sample, a second CCLM using only the upper adjacent sample, a third CCLM using both the left adjacent sample and the upper adjacent sample, or another mode different from the first CCLM, the second CCLM, and the third CCLM.

[0709] 36. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the width and / or height of the current video block.

[0710] 37. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on H.

[0711] 38. The method according to any one of paragraphs 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the availability of adjacent samples.

[0712] 39. The method according to paragraph 20, wherein H is set to the sum of the height and the width of the current video block when the adjacent block to the upper right of the current video block is available.

[0713] 40. The method according to paragraph 20, wherein when the left adjacent sample is not available, the selected chroma sample has a height H regardless of whether the current video block has a first CCLM that uses only the upper adjacent sample.

[0714] 41. The method according to paragraph 1, wherein W is set to the sum of the height and the width of the current video block when the adjacent block to the lower left of the current video block is available.

[0715] 42. The method according to paragraph 1, wherein when the upper adjacent sample is not available, the selected chroma sample has a number of W regardless of whether the current video block has a first CCLM that uses only the left adjacent sample.

[0716] 43. The method according to any one of paragraphs 1 to 42, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0717] 44. The method according to any one of paragraphs 1 to 42, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0718] 45. An apparatus in a video system having a processor and a non-transitory memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of paragraphs 1 to 44.

[0719] 46. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 44.

[0720] The tenth group of claims describes specific features and aspects of the disclosed technology enumerated in the preceding section including, for example, Examples 18 and 19.

[0721] 1. A method for video processing, the method comprising: determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination.

[0722] 2. The method according to claim 1, wherein the corresponding luma samples are obtained by downsampling.

[0723] 3. The method according to claim 1, wherein the parameters of the CCLM include maxY / maxC and minY / minC.

[0724] 4. The method according to claim 3, wherein the two chroma samples are selected to derive maxY / maxC and minY / minC, minY is set to the smaller luma sample value, its corresponding chroma sample value is minC, maxY is set to the larger luma sample value, and its corresponding chroma sample value is maxC.

[0725] 5. The method according to claim 3, wherein the four chroma samples are selected to derive maxY / maxC and minY / minC, and the four chroma samples and the corresponding luma samples are divided into two arrays G0 and G1, each array including two chroma samples and their corresponding luma samples.

[0726] 6. The two arrays G0 and G1 are the following sets: i) G0 = {S0, S1}, G1 = {S2, S3}, ii) G0 = {S1, S0}, G1 = {S3, S2}, iii) G0 = {S0, S2}, G1 = {S1, S3}, iv) G0 = {S2, S0}, G1 = {S3, S1}, v) G0 = {S1, S2}, G1 = {S0, S3}, vi) G0 = {S2, S1}, G1 = {S3, S0}, vii) G0 = {S0, S3}, G1 = {S1, S2}, viii) G0 = {S3, S0}, G1 = {S2, S1}, ix) G0 = {S1, S3}, G1 = {S0, S2}, x) G0 = {S3, S1}, G1 = {S2, S0}, xi) G0 = {S3, S2}, G1 = {S0, S1}, or xii) Xii) G0 = {S2, S3}, G1 = {S1, S0}, including one of the following, where S0, S1, S2, and S3 each contain the four chroma samples and further contain their corresponding luma samples, the method according to item 5.

[0727] 7. The method according to item 6, wherein upon receiving a comparison of two luma sample values of G0[0] and G0[1], the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].

[0728] 8. The method according to item 7, wherein if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].

[0729] 9. The method according to item 6, wherein upon receiving a comparison of two luma sample values of G1[0] and G1[1], the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].

[0730] 10. The method according to item 9, wherein when the luma sample value of G1[0] is greater than the luma sample value of G1[1], the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].

[0731] 11. The method according to item 6, which receives a comparison of the two luma sample values of G0[0] and G1[1], and the chroma sample of G0[0] or G0[1] and its corresponding luma sample are exchanged with those of G1[0] or G1[1].

[0732] 12. The method according to item 11, wherein when the luma sample value of G0[0] is greater than the luma sample value of G1[1], the chroma sample of G0[0] or G0[1] and its corresponding luma sample are exchanged with those of G1[0] or G1[1].

[0733] 13. The method according to item 6, which receives a comparison of the two luma sample values of G0[1] and G1[0], and the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].

[0734] 14. The method according to item 13, wherein when the luma sample value of G0[1] is greater than the luma sample value of G1[0], the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].

[0735] 15. The method according to item 6, which receives a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1], and performs the following exchange operations in sequence: i) an exchange operation of the chroma sample of G0[0] and its corresponding luma sample with those of G0[1]; ii) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1]; iii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1]; and iv) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].

[0736] 16. The method according to item 6, where maxY is calculated as the average of the luma sample values of G0[0] and G0[1], or the average of the luma sample values of G1[0] and G1[1], and maxC is calculated as the average of the chroma sample values of G0[0] and G0[1], or the average of the chroma sample values of G1[0] and G1[1].

[0737] 17. The method according to item 6, where MinY is calculated as the average of the luma sample values of G0[0] and G0[1], or the average of the luma sample values of G1[0] and G1[1], and minC is calculated as the average of the chroma sample values of G0[0] and G0[1], or the average of the chroma sample values of G1[0] and G1[1].

[0738] 18. The calculation of maxY and maxC, or the calculation of minY and minC, is performed after any of the exchange operations in a plurality of exchange operations that are executed after receiving a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1]. The plurality of exchange operations include: i) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1]; ii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1]; and iii) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0], as described in item 16 or 17.

[0739] 19. The method according to claim 1, wherein when only two chroma samples are available, padding is performed on the two available chroma samples to provide four chroma samples.

[0740] 20. The method according to claim 19, wherein the four chroma samples include the two available chroma samples and two padding chroma samples copied from the two available chroma samples.

[0741] 21. The method according to claim 6, wherein S0, S1, S2, S3 are chroma samples, and the corresponding luma samples are selected in a given order within the row above and / or the column to the left of the current video block.

[0742] 22. A method for video processing, comprising: selecting chroma samples based on a position rule for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, the chroma samples being used to derive parameters of a cross-component linear model (CCLM); and performing the conversion based on the determination, wherein the position rule defines to select chroma samples located within the row above and / or the column to the left of the current video block.

[0743] 23. The method according to claim 22, wherein the row above and the column to the left each have W samples and H samples, respectively, and W and H are the width and height of the current video block, respectively.

[0744] 24. The position rule is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the adjacent sample above to derive the CCLM and different from a second CCLM mode that uses only the adjacent sample to the left to derive the CCLM.

[0745] 25. The method according to item 22, wherein the position rule is defined to select chroma samples located in the upper row and the upper right row of the current video block, and the upper row and the upper right row each have W samples and H samples, and W and H are the width and height of the current video block, respectively.

[0746] 26. The method according to item 25, wherein only available samples in the upper row and the upper right row are selected.

[0747] 27. The method according to item 25, wherein the position rule is applied to the current video block encoded in a first CCLM mode that uses only upper adjacent samples to derive the CCLM.

[0748] 28. The method according to item 25, wherein the position rule is applied when the upper row is available, the left column is not available, and the current video block is encoded in a normal CCLM mode that is different from both a first CCLM mode that uses only upper adjacent samples to derive the CCLM and a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0749] 29. numSampT is set based on a rule that sets numSampT equal to nTbW when upper adjacent samples are available and sets numSampT equal to 0 when upper adjacent samples are not available. numSampT represents the number of chroma samples in the upper adjacent row used to derive the parameter of the cross-component linear model, and nTbW represents the width of the current video block. The method according to any one of items 23 to 28.

[0750] 30. The method according to item 29, which is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the upper adjacent samples to derive the CCLM and is also different from a second CCLM mode that uses only the left adjacent samples to derive the CCLM.

[0751] 31. When the upper adjacent samples are available and the current video block is encoded in a first CCLM mode that uses only the upper adjacent samples to derive the CCLM, numSampT is set equal to nTbW + Min(numTopRight, nTbH), and in other cases, numSampT is set equal to 0, based on the rule that defines this. numSampT represents the number of chroma samples in the upper adjacent row used to derive the parameters of the cross-component linear model. nTbW and nTbH represent the width and height of the current video block, respectively, and numTopRight represents the number of available upper-right adjacent samples. The method according to any one of items 23 to 28.

[0752] 32. The method according to item 31, which is applied to the current video block not encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the upper adjacent samples to derive the CCLM and is also different from a second CCLM mode that uses only the left adjacent samples to derive the CCLM.

[0753] 33. The position rule is defined to select chroma samples located in the left column and the lower-left column of the current video block. The left column and the lower-left column have H samples and W samples, respectively, where W and H are the width and height of the current video block, respectively. The method according to item 22.

[0754] 34. The method according to item 33, where only the available samples in the left column and the lower-left column are selected.

[0755] 35. The method according to item 33, wherein the position rule is applied to the current video block encoded in a second CCLM mode that uses only the left adjacent sample to derive the CCLM.

[0756] 36. The method according to item 33, wherein the position rule is applied when the upper row is not available, the left column is available, and the current video block is encoded in a normal CCLM mode that is different from both a first CCLM mode that uses only the upper adjacent sample to derive the CCLM and a second CCLM mode that uses only the left adjacent sample to derive the CCLM.

[0757] 37. numSampL is set based on a rule that numSampL is set equal to nTbH when the left adjacent sample is available and numSampL is set equal to 0 otherwise, where numSampL represents the number of chroma samples in the left adjacent column used to derive the parameters of the cross-component linear model, and nTbH represents the height of the current video block. The method according to any one of items 33 to 36.

[0758] 38. The method according to item 37, wherein the rule is applied to the current video block encoded in a normal CCLM mode that is different from both a first CCLM mode that uses only the upper adjacent sample to derive the CCLM and a second CCLM mode that uses only the left adjacent sample to derive the CCLM.

[0759] 39. When the left adjacent sample is available and the current video block is encoded in a second CCLM mode that uses only the left adjacent sample to derive the CCLM, numSampL is set equal to nTbH + Min(numLeftBelow, nTbW), and in other cases, numSampL is set equal to 0. Based on the rule that defines this, numSampL is set. numSampL represents the number of chroma samples in the left adjacent column used to derive the parameters of the cross-component linear model. nTbW and nTbH represent the width and height of the current video block, respectively, and numLeftBelow represents the number of available lower left adjacent samples. The method according to any one of items 33 to 36.

[0760] 40. The rule is applied to the current video block that is not encoded in the normal CCLM mode, which is different from both the first CCLM mode that uses only the upper adjacent sample to derive the CCLM and the second CCLM mode that uses only the left adjacent sample to derive the CCLM. The method according to item 39.

[0761] 41. The luma sample corresponding to the selected chroma sample is used to derive the parameters of the cross-component linear model. The method according to any one of items 22 to 40.

[0762] 42. The luma sample is derived by downsampling. The method according to item 41.

[0763] 43. The execution of the transformation includes generating the encoded representation from the current block. The method according to any one of items 1 to 42.

[0764] 44. The execution of the transformation includes generating the current block from the encoded representation. The method according to any one of items 1 to 42.

[0765] 45. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor cause the processor to execute the method according to any one of items 1 to 44.

[0766] 46. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for executing the method according to any one of items 1 to 44.

[0767] The items in Group 11 describe certain features and aspects of the disclosed technology enumerated in the preceding sections including, for example, Examples 20 - 22.

[0768] 1. A method for video processing, the method comprising: determining a position at which luma samples are downsampled for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, the downsampled luma samples being used to determine parameters of a cross-component linear model (CCLM) based on chroma samples and the downsampled luma samples, the downsampled luma samples being at positions corresponding to positions of the chroma samples used to derive the parameters of the CCLM; and performing the conversion based on the determination.

[0769] 2. The method according to item 1, wherein luma samples are not downsampled at positions outside the current video block that are not used to determine the parameters of the CCLM.

[0770] 3. A method for video processing, comprising: determining a method for deriving parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on encoding conditions associated with a current video block of a video for conversion between the current video block, which is a chroma block, and an encoded representation of the video; and performing the conversion based on the determination.

[0771] 4. The method according to item 3, wherein the encoding conditions correspond to a color format of the current video block.

[0772] 5. The method according to item 4, wherein the color format is 4:2:0 or 4:4:4.

[0773] 6. The method according to item 3, wherein the encoding conditions correspond to a color representation method of the current video block.

[0774] 7. The method according to item 6, wherein the color representation method is RGB or YCbCr.

[0775] 8. The method according to item 3, wherein the chroma samples are downsampled and the determination depends on positions of the downsampled chroma samples.

[0776] 9. The method according to item 3, wherein the method for deriving the parameters includes determining the parameters of the CCLM based on the chroma samples and the luma samples selected based on a position rule from a group of adjacent chroma samples.

[0777] 10. The method according to item 3, wherein the method for deriving the parameters includes determining the parameters of the CCLM based on maximum and minimum values of the chroma samples and the luma samples.

[0778] 11. The method for deriving the parameters, the method according to item 3, comprising determining the parameters of the CCLM that can be completely determined by two chroma samples and two corresponding luma samples.

[0779] 12. The method for deriving the parameters, the method according to item 3, comprising determining the parameters of the CCLM using a parameter table in which an entry is searched according to two chroma sample values and two luma sample values.

[0780] 13. A method for video processing, comprising: determining whether to derive the maximum value and / or the minimum value of the luma component and the chroma component used to derive the parameters of a cross-component linear model (CCLM) based on the availability of the left adjacent block and the upper adjacent block of the current video block of the video, which is a chroma block, for conversion between the current video block and the encoded representation of the video; and performing the conversion based on the determination.

[0781] 14. The method according to item 13, wherein when the left adjacent block and the upper adjacent block are not available, the maximum value and / or the minimum value are not derived.

[0782] 15. The method according to item 13, wherein the determination is made based on the number of available adjacent samples of the current video block, and the available adjacent samples are used to derive the parameters of the cross-component linear model.

[0783] 16. When numSampL == 0 and numSampT == 0, the maximum value and / or the minimum value are not derived, and numSampL and numSampT respectively indicate the number of available adjacent samples from the left adjacent block and the number of available adjacent samples from the upper adjacent block. The available adjacent samples from the left adjacent block and the available adjacent samples from the upper adjacent block are used to derive the parameters of the cross-component linear model, according to the method described in item 15.

[0784] 17. When numSampL + numSampT == 0, the maximum value and / or the minimum value are not derived, and numSampL and numSampT respectively indicate the number of available adjacent samples from the left adjacent block and the number of available adjacent samples from the upper adjacent block. The available adjacent samples from the left adjacent block and the available adjacent samples from the upper adjacent block are used to derive the parameters of the cross-component linear model, according to the method described in item 15.

[0785] 18. The execution of the conversion includes generating the encoded representation from the current block, according to the method described in any one of items 1 to 17.

[0786] 19. The execution of the conversion includes generating the current block from the encoded representation, according to the method described in any one of items 1 to 17.

[0787] 20. An apparatus in a video system having a processor and a non-transitory memory having instructions, where when the instructions are executed by the processor, the processor is caused to execute the method described in any one of items 1 to 19.

[0788] 21. A computer program product stored in a non-transitory computer-readable medium, including program code for executing the method described in any one of items 1 to 19.

[0789] The twelfth group of items describes specific features and aspects of the disclosed technology listed in the preceding sections including, for example, Example 23.

[0790] 1. A method for video processing, comprising: determining parameters of an encoding tool using a linear model based on selected adjacent samples of a current video block of the video and corresponding adjacent samples of a reference block for conversion between the current video block of the video and an encoded representation of the video; and performing the conversion based on the determination.

[0791] 2. The method according to item 1, wherein the encoding tool is a local illumination compensation (LIC) tool including using a linear model of illumination change in the current video block during the conversion.

[0792] 3. The method according to item 2, wherein the adjacent samples of the current video block and the adjacent samples of the reference block are selected based on a position rule.

[0793] 4. The method according to item 3, wherein the parameters of the encoding tool are determined based on maximum and minimum values of the adjacent samples of the current video block and the adjacent samples of the reference block.

[0794] 5. The method according to item 2, wherein the parameters of the encoding tool are determined using a parameter table in which entries are searched according to two adjacent samples of the current video block and two adjacent samples of the reference block.

[0795] 6. The method according to item 2, wherein the adjacent samples of the current video block and the adjacent samples of the reference block are downsampled to derive the parameters of the encoding tool.

[0796] 7. The method according to claim 2, wherein the adjacent samples used to derive the parameters of the LIC tool do not include samples at specific positions within the row above and / or the left column of the current video block.

[0797] 8. The method according to claim 2, wherein the top left sample of the current video block has coordinates (x0, y0), and the sample having coordinates (x0, y0 - 1) is not used to derive the parameters of the LIC tool.

[0798] 9. The method according to claim 2, wherein the top left sample of the current video block has coordinates (x0, y0), and the sample having coordinates (x0 - 1, y0) is not used to derive the parameters of the LIC tool.

[0799] 10. The method according to claim 7, wherein the specific position depends on the availability of the row above and / or the left column.

[0800] 11. The method according to claim 7, wherein the specific position depends on the block size of the current video block.

[0801] 12. The method according to claim 1, wherein the determination depends on the availability of the row above and / or the left column.

[0802] 13. The method according to claim 2, wherein N adjacent samples of the current video block and N adjacent samples of the reference block are used to derive the parameters of the LIC tool.

[0803] 14. The method according to claim 13, wherein N is 4.

[0804] 15. The method according to claim 13, wherein the N adjacent samples of the current video block include N / 2 samples from the row above the current video block and N / 2 samples from the left column of the current video block.

[0805] 16. The method according to claim 13, wherein N is equal to min(L, T), T is the total number of available adjacent samples of the current video block, and L is an integer.

[0806] 17. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the CCLM.

[0807] 18. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the first mode of the CCLM that uses only upper adjacent samples.

[0808] 19. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the second mode of the CCLM that uses only left adjacent samples.

[0809] 20. The method according to claim 13, wherein the N adjacent samples of the current video block are selected based on the availability of the upper row or the left column of the current video block.

[0810] 21. A method for video processing, comprising: determining parameters of a local illumination compensation (LIC) tool based on N adjacent samples of a current video block of a video and N corresponding adjacent samples of a reference block for conversion between the current video block of the video and an encoded representation of the video, wherein the N adjacent samples of the current video block are selected based on the positions of the N adjacent samples; and performing the conversion based on the determination, wherein the LIC tool uses a linear model of illumination change in the current video block during the conversion.

[0811] 22. The method according to claim 21, wherein the N adjacent samples of the current video block are selected based on the width and height of the current video block.

[0812] 23. The method according to claim 21, wherein the N adjacent samples of the current video block are selected based on the availability of adjacent blocks of the current video block.

[0813] 24. The method according to claim 21, wherein the N adjacent samples of the current video block are selected with a first position offset value (F) and a step value (S) that depend on the dimensions of the current video block and the availability of adjacent blocks.

[0814] 25. The method according to any one of claims 1 to 24, wherein the current video block is affine-encoded.

[0815] 26. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) based on chroma samples and corresponding luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination, wherein a part of the chroma samples is obtained by a padding operation, and the chroma samples and the corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and corresponding luma samples.

[0816] 27. When the sum of cntT and cntL is equal to 2, the following operations are sequentially performed: i) pSelComp[3] is set equal to pSelComp[0]; ii) pSelComp[2] is set equal to pSelComp[1]; iii) pSelComp[0] is set equal to pSelComp[1]; and iv) pSelComp[1] is set equal to pSelComp[3], where cntT and cntL respectively indicate the number of samples selected from the upper adjacent block and the left adjacent block, and pSelComp[0] to pSelComp[3] indicate the pixel values of the color components of the corresponding selected samples. The method according to claim 26.

[0817] 28. The method according to claim 26, wherein said determination of said parameter includes initializing the values of G0[0], G0[1], G1[0], and G1[1].

[0818] 29. The method according to claim 28, wherein G0[0]=0, G0[1]=2, G1[0]=1, and G1[1]=3.

[0819] 30. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G0[0] and G0[1], and exchanging the chroma sample of G0[0] and its corresponding luma sample with those of G0[1].

[0820] 31. The method according to claim 30, wherein if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].

[0821] 32. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G1[0] and G1[1], and exchanging the chroma sample of G1[0] and its corresponding luma sample with those of G1[1].

[0822] 33. The method according to claim 32, wherein if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].

[0823] 34. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G0[0] and G1[1], and exchanging the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G1[0] or G1[1].

[0824] 35. The method according to paragraph 34, wherein when the luma sample value of G0[0] is greater than the luma sample value of G1[1], the chroma samples of G0[0] or G0[1] and their corresponding luma samples are exchanged with those of G1[0] or G1[1].

[0825] 36. The method according to paragraph 28, wherein the determination of the parameter further includes, after the initialization of the value, receiving a comparison of two luma sample values of G0[1] and G1[0], and exchanging the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].

[0826] 37. The method according to paragraph 36, wherein when the luma sample value of G0[1] is greater than the luma sample value of G1[0], the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].

[0827] 38. The method according to paragraph 28, wherein the determination of the parameter further includes, after the initialization of the value, receiving a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1], and performing the following exchange operations in sequence, namely, i) an exchange operation of the chroma sample of G0[0] and its corresponding luma sample with those of G0[1], ii) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1], iii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1], and iv) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].

[0828] 39. The method according to any one of paragraphs 1 to 38, wherein the execution of the transformation includes generating the encoded representation from the current block.

[0829] 40. The method according to any one of paragraphs 1 to 38, wherein the execution of the transformation includes generating the current block from the encoded representation.

[0830] 41. An apparatus in a video system having a processor and a non-transitory memory having instructions, the instructions, when executed by the processor, causing the processor to execute the method according to any one of claims 1 to 40.

[0831] 42. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 40.

[0832] It is to be understood from the above that, for purposes of explanation here, specific embodiments of the technology disclosed herein have been described, but various changes can be made without departing from the scope of the invention. Accordingly, the technology disclosed herein is not limited except as by the appended claims.

[0833] The matters and functional operations described in this patent document can be implemented in various systems, digital electronic circuits, or computer software, firmware, or hardware, or a combination of one or more of these, including the structures disclosed in this specification and those that are structurally equivalent thereto. The implementation of the matters described in this specification can be implemented as one or more computer program products, that is, as one or more modules of computer program instructions encoded on a tangible, non-transitory computer-readable medium for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter that generates a machine-readable propagated signal, or a combination of one or more of these. The term "data processing unit" or "data processing apparatus" includes, by way of example, any apparatus, device, and machine that processes data, including programmable processors, computers, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, such as code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of these.

[0834] A computer program (also known as a program, software, software application, script, or code) may be written in any form of programming language, including compiled or interpreted languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. The program may be stored as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple related files (e.g., files that hold one or more modules, subprograms, or portions of code). A computer program may be deployed to execute on one computer or may be deployed to execute on multiple computers, which may be located in one place or distributed across multiple places and interconnected by a communication network.

[0835] The processes and logical flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data to produce output. These processes and logical flows can also be performed by, for example, a special purpose logic circuit, such as an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit), and the apparatus can also be implemented as such special purpose logic circuits.

[0836] Processors suitable for the execution of a computer program include, by way of example, any one or more processors of both general and special purpose microprocessors, and any kind of digital computer. In general, a processor receives instructions and data from a read only memory or a random access memory or both. Essential elements of a computer are a processor for executing instructions and one or more memory devices for storing the instructions and data. In general, a computer also includes one or more mass storage devices for storing data, such as, by way of example, magnetic disks, magneto-optical disks, or optical disks, or is operatively coupled to receive data from or transfer data to such mass storage devices. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices including, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices. The processor and the memory may be supplemented or incorporated by dedicated logic circuitry.

[0837] The specification, together with the drawings, is intended to be considered as merely illustrative, and illustrative means exemplary. As used herein, the use of "or" is intended to include "and / or" unless the context clearly indicates otherwise.

[0838] This patent document contains many details, but they should not be construed as limitations on the scope of any invention or what may be claimed. Rather, they should be construed as descriptions of mechanisms that may be specific to particular embodiments of a particular invention. The specific plurality of mechanisms described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various mechanisms described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. Furthermore, although a plurality of mechanisms may be described as acting in a particular combination and may even initially be claimed as such, in some cases, one or more mechanisms may be excluded from the claimed combination, and the claimed combination may be led to a sub-combination or variation of a sub-combination.

[0839] Similarly, although the drawings show the operations in a particular order, this should not be understood as requiring that the operations be performed in or in the order shown, or that all of the operations shown be performed, in order to achieve the desired result. Also, the separation of the various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[0840] Only a few implementations and examples are described, and other implementations, extensions, and variations may be made based on what is described and illustrated in this patent document.

Claims

Claim 1 A method for processing video data, comprising: determining values of parameters of a cross-component linear model based on at least R chroma samples and downsampled adjacent luma samples for conversion between a current video block of a video, which is a chroma block, and a bitstream of the video, wherein the R chroma samples are selected from a group of adjacent chroma samples based on a position rule, R is 2 or more, and the downsampled adjacent luma samples are generated by a downsampling process based on a color format of the current video block; performing the conversion based on the values of the parameters; wherein based on the size of the current video block, at least one adjacent chroma sample of the group of adjacent chroma samples does not belong to the R chroma samples, and adjacent luma samples corresponding to the at least one adjacent chroma sample that does not belong to the R chroma samples are not subjected to the downsampling process; the group of adjacent chroma samples includes a left adjacent chroma sample and an upper adjacent chroma sample; a maximum value and / or a minimum value of a luma component and a chroma component are derived for generating the values of the parameters, and the maximum value and / or the minimum value are derived based on the left adjacent chroma sample and the upper adjacent chroma sample; the maximum value and / or the minimum value are not derived when the left adjacent chroma sample and the upper adjacent chroma sample are not available; in the position rule, positions of the R chroma samples are selected based on a first position offset value (F) and a step value (S), and the F and S are derived based on at least availability of the group of adjacent chroma samples and the size of the current video block; F = Floor(numSampL / 2i) or F = Floor(numSampT / 2i), where the Floor operation is used to obtain the integer part of a number, i is an integer, and numSampL and numSampT respectively indicate the number of available left adjacent chroma samples and the number of available upper adjacent chroma samples; a method. Claim 2 The method according to claim 1, wherein the maximum value and / or the minimum value are not derived when numSampL + numSampT == 0.

3. The method according to claim 1, wherein the maximum value and / or the minimum value are not derived when cntL == 0 and cntT == 0, and the cntL and the cntT respectively indicate the number of selected chroma samples from the left adjacent chroma samples and the number of selected chroma samples from the upper adjacent chroma samples.

4. The method according to claim 1, wherein the maximum value and / or the minimum value are not derived when cntL + cntT == 0, and the cntL and the cntT respectively indicate the number of selected chroma samples from the left adjacent chroma samples and the number of selected chroma samples from the upper adjacent chroma samples.

5. S = Max(1, Floor(numSampL / 2 j )) or S = Max(1, Floor(numSampT / 2 j )) and the Max operation is used to obtain the maximum value among a plurality of numbers, and j is an integer. The method according to claim 1.

6. The method according to claim 5, wherein i is equal to 2 or 3, and j is equal to 1 or 2.

7. The method according to any one of claims 1 to 6, wherein the conversion includes encoding the current video block into the bitstream.

8. The method according to any one of claims 1 to 6, wherein the conversion includes decoding the current video block from the bitstream.

9. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions, wherein when the instructions are executed by the processor, the processor is caused to determine values of parameters of a cross-component linear model based on at least R chroma samples and downsampled adjacent luma samples for conversion between a current video block of a video that is a chroma block and the bitstream of the video, the R chroma samples being selected from a group of adjacent chroma samples based on a position rule, R being 2 or more, and the downsampled adjacent luma samples being generated by a downsampling process based on the color format of the current video block, execute the conversion based on the values of the parameters. Based on the size of the current video block, at least one of the adjacent chroma sample groups of the adjacent chroma samples does not belong to the R chroma samples, and the adjacent luma samples corresponding to the at least one adjacent chroma sample that does not belong to the R chroma samples are not applied with the downsampling process. The group of the adjacent chroma samples includes a left adjacent chroma sample and an upper adjacent chroma sample. The maximum value and / or minimum value of the luma component and the chroma component are derived to generate the value of the parameter, and the maximum value and / or the minimum value are derived based on the left adjacent chroma sample and the upper adjacent chroma sample. The maximum value and / or the minimum value are not derived when the left adjacent chroma sample and the upper adjacent chroma sample are not available. In the position rule, the positions of the R chroma samples are selected based on a first position offset value (F) and a step value (S), and the F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block. F = Floor(numSampL / 2^i) or F = Floor(numSampT / 2^i), where the Floor operation is used to obtain the integer part of a number, i is an integer, and the numSampL and the numSampT respectively indicate the number of available left adjacent chroma samples and the number of available upper adjacent chroma samples. Device.

10. A non-transitory computer-readable storage medium storing instructions, the instructions causing a processor to, For the conversion between the current video block of a video that is a chroma block and the bitstream of the video, at least determine the value of the parameter of the cross-component linear model based on R chroma samples and downsampled adjacent luma samples, the R chroma samples are selected from a group of adjacent chroma samples based on a position rule, R is 2 or more, and the downsampled adjacent luma samples are generated by a downsampling process based on the color format of the current video block. Execute the conversion based on the value of the parameter. Based on the size of the current video block, at least one adjacent chroma sample among the groups of adjacent chroma samples does not belong to the R chroma samples, and the adjacent luma samples corresponding to the at least one adjacent chroma sample that does not belong to the R chroma samples are not applied with the downsampling process. The group of adjacent chroma samples includes a left adjacent chroma sample and an upper adjacent chroma sample. The maximum value and / or minimum value of the luma component and the chroma component are derived to generate the value of the parameter, and the maximum value and / or the minimum value are derived based on the left adjacent chroma sample and the upper adjacent chroma sample. The maximum value and / or the minimum value are not derived when the left adjacent chroma sample and the upper adjacent chroma sample are not available. In the position rule, the positions of the R chroma samples are selected based on a first position offset value (F) and a step value (S), and the F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block. F = Floor(numSampL / 2^i) or F = Floor(numSampT / 2^i), where the Floor operation is used to obtain the integer part of a number, i is an integer, and numSampL and numSampT respectively indicate the number of available left adjacent chroma samples and the number of available upper adjacent chroma samples. Computer-readable storage medium.

11. A method for storing a bitstream of a video, comprising: For the current video block of the video that is a chroma block, determining a value of a parameter of a cross-component linear model based on at least R chroma samples and downsampled adjacent luma samples, wherein the R chroma samples are selected from a group of adjacent chroma samples based on a position rule, R is 2 or more, and the downsampled adjacent luma samples are generated by a downsampling process based on the color format of the current video block; Generating the bitstream based on the value of the parameter. storing the bitstream in a non-transitory computer-readable recording medium; having, based on the size of the current video block, at least one of the adjacent chroma samples in the group of adjacent chroma samples does not belong to the R chroma samples, and the adjacent luma samples corresponding to the at least one adjacent chroma sample that does not belong to the R chroma samples are not applied with the downsampling process; the group of adjacent chroma samples includes a left adjacent chroma sample and an upper adjacent chroma sample; the maximum value and / or minimum value of the luma component and the chroma component are derived to generate the value of the parameter, and the maximum value and / or the minimum value are derived based on the left adjacent chroma sample and the upper adjacent chroma sample; the maximum value and / or the minimum value are not derived when the left adjacent chroma sample and the upper adjacent chroma sample are not available; in the position rule, the positions of the R chroma samples are selected based on a first position offset value (F) and a step value (S), and the F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block; F = Floor(numSampL / 2i) or F = Floor(numSampT / 2i), the Floor operation is used to obtain the integer part of a number, i is an integer, and the numSampL and the numSampT respectively indicate the number of available left adjacent chroma samples and the number of available upper adjacent chroma samples; method.

Citation Information

Patent Citations

  • Image processing device and image processing method

    JP2013034163A

  • Context-based intra prediction

    JP2022508294A

  • JPP7651649B

Cited By

  • Adjacent sample selection for intra prediction

    JP2023160996A