Position dependent intra prediction

JP2025036709A5Pending Publication Date: 2026-05-21DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
DOUYIN VISION CO LTD
Filing Date
2025-01-06
Publication Date
2026-05-21

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a method for video processing.SOLUTION: The method includes: 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 a cross-component linear model based on chroma samples selected based on positions of the chroma samples, in which the selected chroma samples are selected from a group of neighboring chroma samples; and performing the conversion based on the determination.SELECTED DRAWING: Figure 18
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application is a national phase application of International Patent Application No. PCT / CN2019 / 115992 filed on November 6, 2019, which includes International Patent Application No. PCT / CN2018 / 114158 filed on November 6, 2018, International Patent Application No. PCT / CN2018 / 118799 filed on December 1, 2018, 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, and International Patent Application No. PCT / CN2019 / 070002 filed on February 1, 2019. This application claims priority to and the benefit of International Patent Application No. PCT / CN2019 / 075874, filed on May 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 disclosures of the above applications are incorporated herein by reference in their entireties.

[0002] This patent document relates to image processing techniques, devices and systems. [Background technology]

[0003] Despite advances in video compression, digital video still accounts for the largest bandwidth usage in the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demands for digital video usage are expected to continue to increase. Summary of the Invention

[0004] Apparatuses, systems, and methods related to digital video processing are described, including a simplified linear model derivation for cross-component linear model (CCLM) prediction modes in video coding. The described methods may be applied to both existing video coding standards (e.g., High Efficiency Video Coding (HEVC)) and future video coding standards (e.g., Versatile Video Coding (VVC)) or codecs.

[0005] In one exemplary aspect, the disclosed techniques may be used to provide a method for video processing, the method including: determining parameters of a cross-component linear model for transforming between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, based on two chroma samples from a group of adjacent chroma samples, the two chroma samples being selected from the group based on a position rule, and performing the transform based on the determining.

[0006] In one exemplary aspect, the disclosed techniques may be used to provide a method for video processing that includes determining parameters of a cross-component linear model based on a chroma sample selected based on a position of the chroma sample for transforming between a current video block of a video that is a chroma block and a coded representation of the video, the selected chroma sample being selected from a group of neighboring chroma samples, and performing the transform based on the determination.

[0007] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining, for a current video block, a group of neighboring chroma samples used to derive a set of values ​​for parameters of a linear model, the current video block having a width and height W and H, respectively, the group of neighboring chroma samples including at least one sample located beyond 2×W above neighboring chroma samples or 2×H left neighboring chroma samples, and performing a conversion between the current video block and a coded representation of a video including the current video block based on the linear model.

[0008] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining sets of parameters for transforming between a current video block of a video that is a chroma block and a coded representation of the video, each set of parameters defining a cross-component linear model (CCLM) and derived from a corresponding group of chroma samples at corresponding chroma sample locations, determining parameters for a final CCLM based on the sets of parameters, and performing the transform based on the final CCLM.

[0009] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters of a cross-component linear model (CCLM) based on minimum and maximum chroma and luma samples of N groups of selected chroma and luma samples from neighboring luma and chroma samples of a current video block of a video for conversion between the current video block and a coded representation of the video, and performing the conversion using the CCLM.

[0010] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters of a cross-component linear model fully determinable by two chroma samples and corresponding two luma samples for transforming between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, the cross-component linear model being fully determinable by two chroma samples and corresponding two luma samples, and performing the transform based on the determination.

[0011] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including: determining parameters of a cross-component linear model for a conversion between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, using a parameter table, where entries of the parameter table are searched 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 techniques may be used to provide a method for video processing, the method including: determining a final prediction P(x,y) of a chroma sample at a position (x,y) in a current video block of a video, the current video block being a chroma block, for conversion between the current video block and a coded representation of the video, as a combination of prediction results of multiple cross-component linear models (MCCLMs), the MCCLMs being 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 techniques may be used to provide a method for video processing, the method including: performing a first decision as to whether a first cross-component linear model (CCLM) using only left neighboring samples is used to predict samples of a current video block of a video that is a chroma block and / or a second decision as to whether a second cross-component linear model (CCLM) using only top neighboring samples is used to predict samples of the current video block, and performing the conversion based on the first decision and / or the second decision.

[0014] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining a context to be used for encoding a flag for converting between a current video block of a video and a coded representation of the video using arithmetic coding of the current video block into the coded representation, the context being based on whether an upper-left neighboring block of the current video block is coded using a cross-component linear model (CCLM) prediction mode, and performing the conversion based on the determination.

[0015] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining an encoding order for one or more indications of a direct intra-prediction mode (DM mode) and a linear intra-prediction mode (LM mode) for converting between a current video block of a video and a coded representation of the video based on coding modes of one or more neighboring blocks of the current video block, and performing the conversion based on the determination.

[0016] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters for linear model prediction or cross-color component prediction based on refined chroma and luma samples of a current video block of a video for conversion between the current video block and a coded representation of the video, and performing the conversion based on the determination.

[0017] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters for linear model prediction or cross-color component prediction by selecting neighboring samples based on a position of a maximum or minimum neighboring sample for conversion between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, and performing the conversion based on the determination.

[0018] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including: determining parameters for a linear model prediction or a cross-color component prediction based on a primary color component and a secondary color component for a conversion between a current video block of a video and a coded 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, and performing the conversion based on the determination.

[0019] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including performing downsampling on chroma and luma samples of neighboring 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 a video being a chroma block and a coded representation of the video, and performing the conversion based on the determination.

[0020] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining parameters of a cross-component linear model (CCLM) for transforming between a current video block of a video that is a chroma block and a coded representation of the video based on two or more chroma samples from a group of adjacent chroma samples, the two or more chroma samples being selected based on a coding mode of the current video block, and performing the transform based on the determination.

[0021] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including: determining parameters of a cross-component linear model (CCLM) based on a chroma sample selected based on W available upper neighboring samples for conversion between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, where W is an integer; and performing the conversion based on the determining.

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

[0023] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters of a cross-component linear model (CCLM) for transforming between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, based on two or four chroma samples and / or corresponding luma samples, and performing the transform based on the determination.

[0024] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, comprising: selecting chroma samples for conversion between a current video block of a video that is a chroma block and a coded representation of the video based on position rules, the chroma samples being used to derive parameters of a Cross-Component Linear Model (CCLM), and performing the conversion based on the determination, the position rules specifying selecting chroma samples located in a row above and / or a column to the left of the current video block.

[0025] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining locations at which luma samples are downsampled for conversion between a current video block of a video that is a chroma block and a coded 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, the downsampled luma samples being at locations corresponding to locations of the chroma samples used to derive the parameters of the CCLM, and performing the conversion based on the determination.

[0026] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining, for conversion between a current video block of a video that is a chroma block and a coded representation of the video, how to derive parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on a coding condition associated with the current video block, and performing the conversion based on the determination.

[0027] In another representative aspect, the disclosed techniques may be used to provide a method for video processing that includes determining, for conversion between a current video block of a video that is a chroma block and a coded representation of the video, whether to derive maximum and / or minimum values ​​of luma and chroma components used to derive parameters of a cross-component linear model (CCLM) based on availability of left and above neighboring blocks of the current video block, and performing the conversion based on the determination.

[0028] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method including determining parameters of an encoding tool using a linear model for transforming between a current video block of a video and a coded representation of the video based on selected neighboring samples of the current video block and corresponding neighboring samples of a reference block, and performing the transform based on the determining.

[0029] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, comprising: determining parameters of a local illumination compensation (LIC) tool based on N neighboring samples of a current video block and N corresponding neighboring samples of a reference block for transforming between a current video block and a coded representation of the video, the N neighboring samples of the current video block being selected based on positions of the N neighboring samples, and performing the transform based on the determining, the LIC tool using a linear model of illumination changes at the current video block during the transform.

[0030] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, comprising: determining, based on chroma samples and corresponding luma samples, parameters of a cross-component linear model (CCLM) for conversion between a current video block of a video, the current video block being a chroma block, and a coded representation of the video; and performing the conversion based on the determining; a portion 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 the corresponding luma samples.

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

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

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

[0034] These and other aspects and features of the disclosed technology are described in further detail in the drawings, specification, and claims. [Brief description of the drawings]

[0035] [Figure 1] 1 shows an example of sample locations used to derive weights for a linear model used in cross-component prediction. [Diagram 2] An example of classifying adjacent samples into two groups is shown. [Figure 3A] 1 shows an example of a chroma sample and its corresponding luma sample. [Figure 3B] 1 shows an example of down-filtering for a cross-component linear model (CCLM) in a joint exploration model (JEM). [Figure 4A] 13 shows an example where only upper adjacent samples are used for prediction based on a linear model. [Figure 4B] 1 shows an example where only the left adjacent sample is used for prediction based on a linear model. [Diagram 5] 1 shows an example of a straight line between minimum and maximum luma values ​​as a function of the corresponding chroma samples. [Figure 6] An example of a current chroma block and its adjacent samples is shown. [Figure 7] 1 shows an example of different parts of a chroma block predicted by a linear model using only left neighboring samples (LM-L) and a linear model using only above neighboring samples (LM-A). [Figure 8] An example of an upper left adjacent block is shown. [Figure 9] 1 shows an example of a sample used to derive a linear model. [Figure 10] An example of the left and bottom left columns and the right and top right rows for the current block are shown. [Figure 11] 1 shows an example of a current block and its reference samples. [Figure 12] An example of two adjacent samples is shown when both the left and top adjacent reference samples are available. [Figure 13] 1 shows an example of two adjacent samples when only the top adjacent reference sample is available. [Figure 14] 4 shows an example of two adjacent samples when only the left adjacent reference sample is available. [Figure 15] An example of four adjacent samples is shown when both left and top adjacent reference samples are available. [Figure 16] 1 shows an example of a lookup table used in LM derivation. [Figure 17] 1 shows an example of the LM parameter derivation process using 64 entries. [Figure 18] 1 shows a flowchart of an example method of video processing based on some implementations of the disclosed technology. [Figure 19A] 19A and 19B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 19B] 19A and 19B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 20A] 20A and 20B show a flowchart of another example method for video processing according to some implementations of the disclosed technology. [Figure 20B] 20A and 20B show a flowchart of another example method for video processing according to some implementations of the disclosed technology. [Figure 21] 13 shows a flowchart of another example method of video processing based on some implementations of the disclosed technology. [Figure 22] 1 shows a flowchart of an example method of video processing based on some implementations of the disclosed technology. [Figure 23A] 23A and 23B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 23B] 23A and 23B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 24A] 24A-24E show flowcharts of example methods for video processing according to some implementations of the disclosed technology. [Figure 24B] 24A-24E show flowcharts of example methods for video processing according to some implementations of the disclosed technology. [Figure 24C] 24A-24E show flowcharts of example methods for video processing according to some implementations of the disclosed technology. [Figure 24D] 24A-24E show flowcharts of example methods for video processing according to some implementations of the disclosed technology. [Figure 24E] 24A-24E show flowcharts of example methods for video processing according to some implementations of the disclosed technology. [Figure 25A] 25A and 25B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 25B] 25A and 25B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 26A] 26A and 26B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 26B] 26A and 26B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 27A]27A and 27B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 27B] 27A and 27B show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 28A] 28A-28C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 28B] 28A-28C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 28C] 28A-28C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 29A] 29A-29C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 29B] 29A-29C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 29C] 29A-29C show a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 30A] 30A and 30B are block diagrams of example hardware platforms for implementing the visual media decoding or encoding techniques described in this document. [Figure 30B] 30A and 30B are block diagrams of example hardware platforms for implementing the visual media decoding or encoding techniques described in this document. [Figure 31A] 31A and 31B show an example of the LM parameter derivation process using four entries, with FIG. 31A showing an example where both the upper and left neighboring samples are available. [Figure 31B]31A and 31B show examples of the LM parameter derivation process using four entries, with FIG. 31B showing an example where only the upper neighboring sample is available and not the upper right. [Diagram 32] 1 shows an example of adjacent samples for deriving LIC parameters. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0036] Due to the increasing demand for higher resolution video, video coding methods and techniques have become ubiquitous in modern technology. Video codecs typically include electronic circuits or software that compress or decompress digital video and are constantly being improved to provide higher coding efficiency. Video codecs convert uncompressed video into compressed formats and vice versa. There is a complex relationship between video quality, the amount of data used to represent the video (determined by the bit rate), the complexity of the encoding and decoding algorithms, sensitivity to data loss and errors, ease of editing, random access, and end-to-end delay (latency). Compression formats usually comply with standard video compression specifications, such as the High Efficiency Video Coding (HEVC) standard (also known as H.265 or MPEG-H Part 2), the upcoming Versatile Video Coding (VVC) standard, or other current and / or future video coding standards.

[0037] Embodiments of the disclosed technology may be applied to existing video coding standards (e.g., HEVC, H.265) and future standards to improve runtime performance. This document uses section headings to improve readability of the description, but the section headings do not limit the description or embodiments (and / or implementation) to only the respective section.

[0038] 1. Implementation of Cross-Component Prediction Cross-component prediction is a form of chroma-to-luma prediction approach that offers a good trade-off between complexity and improved compression efficiency.

[0039] 1.1 Example of a Cross-Component Linear Model (CCLM) In some embodiments, and 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 calculated as follows:

number

[0040] Here, pred C Let (i,j) denote the predicted chroma sample in a CU, recL'(i,j) denote the downsampled reconstructed luma sample of the same CU in case of color format 4:2:0 or 4:2:2, and recL'(i,j) denote the reconstructed luma sample of the same CU in case of color format 4:4:4. The CCLM parameters α and β are

number

number

[0041] where L(n) represents the downsampled (for color formats 4:2:0 or 4:2:2) or original (for color format 4:4:4) reconstructed luma samples above and to the left, C(n) represents the reconstructed chroma samples above and to the left, and the value of N is equal to twice the minimum of the width and height of the current chroma coding block.

[0042] In some embodiments, for a square shaped coding block, the above two equations are applied directly. In other embodiments, for a non-square coding block, the adjacent samples of the longer boundary are first subsampled to have the same number of samples as for the shorter boundary. Figure 1 shows the locations of the samples of the current block and the left and top reconstructed samples involved in CCLM mode.

[0043] In some embodiments, this regression error minimization calculation is performed as part of the decoding process, rather than simply as an encoder search process, and therefore no syntax is used to communicate 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, CCLM Cb-to-Cr prediction is applied in the residual domain, which adds a weighted reconstructed Cb residual to the original Cr intra prediction to get the final Cr prediction:

number

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

[0046] In some embodiments, the scaling factor α may be derived in a similar manner as in CCLM luma-to-chroma prediction. The only difference is the addition of a regression cost to the default α value in the error function, so that the derived scaling factor is:

number

[0047] where Cb(n) represents the neighboring reconstructed Cb sample, Cr(n) represents the neighboring reconstructed Cr sample, and λ is equal to Σ(Cb(n) Cb(n))>>9.

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

[0049] 1.2 Multi-model CCLM example In JEM, there are two CCLM modes: Single Model CCLM mode and Multiple Model CCLM mode (MMLM). As the name suggests, Single Model CCLM mode uses one linear model to predict chroma samples from luma samples for the entire CU, whereas in MMLM, there can be two models.

[0050] In MMLM, the adjacent luma and chroma samples of the current block are classified into two groups, and each group is used as a training set to derive a linear model (i.e., a 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 neighboring samples into two groups. The threshold is calculated as the average value of neighboring reconstructed luma samples. Neighboring samples with Rec'L[x,y]≦Threshold are classified into group 1, and neighboring samples with Rec'L[x,y]>Threshold are classified into group 2.

number

[0052] 1.3 Example of downsampling filter in CCLM In some embodiments, for a 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 CCLM mode is:

number

[0053] Here, the downsampling assumes a "type 0" phase relationship for the positions of the chroma samples relative to the positions of the luma samples, eg, collocated sampling in the horizontal direction and interstitial sampling in the vertical direction, as shown in FIG. 3A.

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

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

number

[0056] 1.4 Multidirectional LM (MDLM) This existing implementation proposes a multi-directional LM (MDLM), in which two further CCLM modes are proposed: LM-A, in which the linear model parameters are derived based only on the top (or above) neighboring samples, as shown in Fig. 4A, and LM-L, in which the linear model parameters are derived only based on the left neighboring samples, as shown in Fig. 4B.

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

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

[0059] In some embodiments, the division operations required to derive α are avoided and replaced by multiplications and shifts, such as: 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] where S is set equal to iShift, α is set equal to a, and β is set equal to b, and g_aiLMDIVTableLow and g_ailLMDIVTableHigh are two tables with 512 entries each, where each entry stores a 16-bit integer.

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

number

[0062] This implementation is also simpler than the current VTM implementation since the shift S always has the same value.

[0063] 1.6 CCLM example in VVC The same CCLM as in JEM is adopted in VTM-2.0, but the MM-CCLM in JEM is not adopted in VTM-2.0. VTM-3.0 adopts MDLM and simplified CCLM.

[0064] 1.7 Example of local illumination compensation in JEM Local Illumination Compensation (LIC) is based on a linear model of illumination changes with a scaling factor a and an offset b, and it is adaptively enabled or disabled for each inter-mode coded coding unit (CU).

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

[0066] If the CU is coded in 2Nx2N merge mode, the LIC flag is copied from the neighboring block in a manner similar to the motion information copying in merge mode, otherwise the LIC flag is signaled to indicate whether LIC is applied or not for the CU.

[0067] When LIC is enabled for a picture, an additional CU-level RD check is required to determine whether LIC applies to the CU. When LIC is enabled for a CU, 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 for integer-pixel motion search and fractional-pixel motion search, respectively.

[0068] To reduce the coding complexity, JEM applies an coding scheme in which 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 in the encoder. If the histogram difference between the current picture and all reference pictures of the current picture is smaller than a given threshold, LIC is disabled for the current picture; otherwise, LIC is enabled for the current picture.

[0069] 2 Examples of shortcomings 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 is not friendly to Single Instruction Multiple Data (SIMD) software design.

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

[0072] Exemplary Method for Cross-Component Prediction in Video Coding Embodiments of the presently disclosed technology overcome shortcomings 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 with respect to various implementations. The examples of the disclosed technology provided below are intended to illustrate the general concepts and are not meant to be construed as limiting. In an example, various features described in these examples can be combined, unless expressly indicated otherwise.

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

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

number

[0075] Here, off is, for example, 0 or 2. s-1 and so on.

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

[0077] FIG. 6 shows an example of adjacent samples of a current chroma block. Let the coordinates of the top left sample of the current chroma block be denoted as (x,y). Then, the adjacent chroma samples (shown in FIG. 6) are: A: Top left sample: [x-1,y], B: Upper middle sample on the left: [x-1,y+H / 2-1], C: Bottom middle sample on the left: [x-1,y+H / 2], D: Lower left sample: [x-1,y+H-1], E: Left bottom extension top sample: [x-1,y+H], F: Left bottom extension top middle sample: [x-1,y+H+H / 2-1], G: Left bottom extended middle sample: [x-1,y+H+H / 2], I: Left bottom extended sample: [x-1,y+H+H-1], J: Upper left sample: [x,y-1], K: Upper left middle sample: [x+W / 2-1,y-1], L: Upper right middle sample: [x+W / 2,y-1], M: Upper right sample: [x+W-1,y-1], N: Upper left extended sample: [x+W,y-1], O: Upper left middle sample: [x+W+W / 2-1,y-1], P: Upper extended right middle sample: [x+W+W / 2,y-1], and Q: Upper right extended sample: [x+W+W-1,y-1] It is written as:

[0078] Example 1. The parameters α and β in the LM method are derived from chroma samples at two or more specific positions. The derivation also depends on the corresponding downsampled luma sample of the selected chroma sample, or the derivation also depends on the corresponding luma sample of the selected chroma sample, for example if it is a 4:4:4 color format. b. For example, the parameters α and β in CCLM are, for example, 2 S It is derived from the chroma sample at position (e.g. S=2 or 3), e.g.: i. Position {A,D,J,M}; ii. Position {A,B,C,D,J,K,L,M}; iii.Position {A,I,J,Q}; iv. Position {A,B,D,I,J,K,M,Q}; v.Position{A,B,D,F,J,K,M,O}; vi. Position {A,B,F,I,J,K,O,Q}; vii.Position {A,C,E,I,J,L,N,Q}; viii.Position {A,C,G,I,J,L,P,Q}; ix.Position{A,C,E,G,J,L,N,P}; x.position{A,B,C,D}; xi.Position {A,B,D,I}; xii. Position {A,B,D,F}; xiii.Position{A,C,E,I}; xiv.Position {A,C,G,I}; xv.Position {A,C,E,G}; xvi.Position {J,K,L,M}; xvii.Position {J,K,M,Q}; xviii.Position {J,K,M,O}; xix.Position {J,K,O,Q}; xx.Position {J,L,N,Q}; xxi.Position {J,L,P,Q}; xxii.Position {J,L,N,P}; xxiii.Position {A,B,C,E,E,F,G,I}; xxiv.Position {J,K,L,M,N,O,P,Q}; etc. are derived. 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}, for example: (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 distinct locations 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 distinct 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 may be checked further. d. For example, to derive the parameters α and β in CCLM in the two-point method, all available chroma samples are not searched to find the minimum and maximum luma values.

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

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

[0081] ii. Only chroma samples at specific locations, e.g., those specified in 1.ai-1.a.xxiv, are included in the set for searching. e. In mode LM-L, all samples selected must be left adjacent samples. f. In mode LM-A, all samples selected must be the upper adjacent samples. g. The selected position may be fixed or may be adaptive.

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

[0083] i. For example, if both the left and top neighboring blocks are available, then positions A, D, J and M are selected; if only the left neighboring block is available, then positions A and D are selected; and if only the top neighboring block is available, then positions J and M are selected.

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

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

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

[0087] iii. If (α1,β1) and (α2,β2) have different precisions, e.g., to obtain a chroma prediction CP from its corresponding downsampled luma sample LR, it can be calculated as: Using (α1,β1), CP=SignShift(α1×LR+β1,SH1) It is calculated as Using (α2,β2), it is calculated as CP=SignShift(α2×LR+β2,SH2), and Sh1 is not equal to Sh2, so the parameters need to be shifted before being combined. If Sh1>Sh2, then before being combined, the parameters are (a) α1 should be shifted as α1=SignShift(α1,Sh1-Sh2), β1=SignShift(β1,Sh1-Sh2), so the final precision is (α2,β2).

[0088] (b) It should be shifted as follows: α1=Shift(α1,Sh1-Sh2), β1=Shift(β1,Sh1-Sh2), so the final precision becomes (α2,β2).

[0089] (c) They should be shifted such that α2=α2<<(Sh1-Sh2), β2=β2<<(Sh1-Sh2), so the final precision becomes (α1,β1). b. Some examples of Group 1 and Group 2 locations: 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, two groups are used for mode LM-L iv. Group 1: positions J and M, Group 2: positions N and Q, two groups are used for 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 consists of two chroma sample values denoted as C0 and C1, and their corresponding luma sample values denoted as L0 and L1 (L0 < L1). Using these inputs, the two-point method α = (C1 - C0) / (L1 - L0), and β = C0 - αL0 can be derived for α and β.

[0091] The bit depths of the luma samples and chroma samples are denoted as BL and BC. One or more simplifications for this implementation 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) can be used to derive the prediction block.

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

[0093] i. α = Shift(C1 - C0, Floor(log2(L1 - L0))), or α = SignShift(C1 - C0, Floor(log2(L1 - L0))) ii. α = Shift(C1 - C0, Ceiling(log2(L1 - L0))), or α = SignShift(C1 - C0, Ceiling(log2(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(log2(L1 - L0)) + Ceiling(log2(L1 - L0))) / 2 set as such.

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

[0096] (c) For example, when (L1 - L0) 2 < 2 2×Floor(log2(L1-L0))+1 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 5, 6, or 7 for example.

[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 determining the precision, for example, S = F. Off is the offset, for example, Off=(k + Z) >> 1. Z determines the start 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 values ​​of L1-L0.

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

[0105] v. For example, α = Shift((C1-C0)×M[kZ],D), or α=SignShift((C1-C0)×M[kZ],D) vi. To obtain the chroma prediction CP from its corresponding (e.g., downsampled for 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, 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 2 P where P is an integer such as, for example, 5, 6, 7, or 8. Alternatively, V is set to 2P-M (for example, M is equal to 0).

[0109] ix. Assume that α = P / Q (for example, Q = L1 - L0, P = C1 - C0, or they are derived in other ways), then α is calculated as α = Shift(P × M[k - Z], D), or α = SignShift(P × M[k - Z], D) using a look-up table, where k is the key (index) for querying the entry in the look-up 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, kMax = V + Z.

[0113] (d) In one example, k = Shift(Q, W), 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 look-up table as α = (Shift(P × M[k - Z], D)) << W, or α = (SignShift(P × M[k - Z], D)) << W as.

[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, if Q<0, then −Q is used to replace Q in the calculations, and −α is output.

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

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

[0123] d. All operations to derive the LM parameters must be within K bits, where K can be 8, 10, 12, 16, 24 or 32.

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

[0125] Example 4. A single chroma block may use multiple linear models, and the selection of the multiple linear models depends on the position of the chroma sample within the chroma block.

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

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

[0128] i. FIG. 7 shows an example. Assume that the upper 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 by LM-L and LM-A for the sample at position (x,y) 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 the adjacent samples (including chroma samples and their corresponding luma samples, which may be downsampled) into N groups. The maximum and minimum luma values ​​of the kth (k=0,1,…,N-1) group are denoted by MaxL k and MinL k and their corresponding chroma values ​​are MaxC k and MinC k It is written as follows.

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

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

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

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

[0139] (3) Not all groups are used, e.g., m <N-1、S0=0、S1=2、S3=4、…などである。

[0140] b. In one example, samples (or downsampled samples) located in the top row may be classified into one group, and samples (or downsampled samples) located in the left column of the block may be classified into another group.

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

[0142] For example, samples may be classified into two groups.

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

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

[0145] (3) Only samples in one group, e.g., S0, are used to find MaxC and MaxL, e.g., MaxL=MaxLS0, and MaxC=MaxCS0.

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

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

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

[0149] i. For example, if both left and top neighboring blocks are available, MaxL0 / MaxC0 and MinL0 / MinC0 are found from positions A and D, MaxL1 / MaxC1 and MinL1 / MinC1 are found from positions J and M, and then MaxL=(MaxL0+MaxL1) / 2, MaxC=(MaxC0+MaxC1) / 2, MinL=(MinL0+MinL1) / 2, MinC=(MinC0+MinC1) / 2.

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

[0151] (1) Alternatively, if no neighboring blocks above are available, then α and β are set equal to some default values, e.g., α=0, and β=1<<(bitDepth-1), where bitDepth is the bit depth of the chroma samples.

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

[0153] (1) Alternatively, if the left neighboring block is not available, then α and β are set equal to some default values, e.g., α=0 and β=1<<(bitDepth-1), where bitDepth is the bit depth of the chroma samples.

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

[0155] h. In one example, how to select samples for each group may depend on the value of the sample.

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

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

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

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

[0160] (c) If one of LM-L and LM-A cannot be applied, then the flag indicating whether LM-L or LM-A is used should not be signaled.

[0161] Example 7. A flag is signaled indicating whether the CCLM mode is applied. The context used in the arithmetic coding to code the flag may depend on whether the top-left neighboring block shown in FIG. 8 applies the CCLM mode or not.

[0162] (a) In one example, if the top-left neighboring block applies CCLM mode, a first context is used, and if the top-left neighboring block does not apply CCLM mode, a second context is used. (b) In one example, if the top-left neighboring block is not available, it is considered that the CCLM mode does not apply. (c) In one example, if the top-left neighboring block is not available, it is considered to apply the CCLM mode. (d) In one example, if the top-left neighboring block is not intra-coded, it is considered that the CCLM mode does not apply. (e) In one example, if the upper left neighboring block is not intra-coded, it is considered to apply CCLM mode.

[0163] Example 8. The DM and LM mode indications or codewords may be coded in different orders for each sequence / picture / tile / block.

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

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

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

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

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

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

[0170] (a) In LM mode or LM-L mode, adjacent samples RecC[x-1,y+d] can be used, where d is in the range of [T,S]. T can be less than 0 and S can 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 LM mode or LM-A mode, adjacent samples RecC[x+d,y] can be used, where d is in the range [T,S]. T can be less than 0 and S can 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 neighboring 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 W and H be the width and height of the current chroma block.

[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 parameters to the left of the current block and the number of adjacent samples used to derive the parameters 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) Figure 9 shows an example of the samples picked up when positions D and M of Figure 6 are used to derive α and β, and the downsampling performed when W>H.

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

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

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

[0184] (c) To derive α and β, e.g., α=(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 may be downsampled) and calculate C1, C0, L1 and L0.

[0185] (d) In one example, S adjacent luma samples (which may 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 may 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), where 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 of the group of luma samples.

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

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

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

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

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

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

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

[0200] Example 12. It is proposed to select the other neighboring or downsampled neighboring samples based on the largest neighboring or downsampled neighboring sample in a given set of neighboring or downsampled neighboring samples.

[0201] (a) In one example, let us say that the largest neighboring sample or the downsampled neighboring sample is at position (x0,y0). Then, we can use samples in the regions (x0-d1,y0), (x0,y0-d2), (x0+d3,y0), (x0,y0+d4) to select other samples. The integers {d1,d2,d3,d4} can depend on the position (x0,y0). For example, if (x0,y0) is to the left of the current block, then d1=d3=1, and d2=d4=0. If (x0,y0) is to the top of the current block, then d1=d3=0, and d2=d4=1.

[0202] (b) In one example, let us say that the smallest neighboring sample or the downsampled neighboring sample is at position (x1,y1). Then, samples in the regions (x1-d1,y1), (x1,y1-d2), (x1+d3,y1), (x1,y1+d4) may be used to select other samples. The integers {d1,d2,d3,d4} may depend on the position (x1,y1). For example, if (x1,y1) is to the left of the current block, then d1=d3=1, and d2=d4=0. If (x1,y1) is to the top of the current block, then d1=d3=0, and d2=d4=1.

[0203] (c) In one example, the samples represent samples of one color component (e.g., the luma color component). The samples used in the CCLM / cross color component process may be derived by the corresponding coordinates of a second color component.

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

[0205] Example 13. In the above example, luma and chroma may be swapped, or 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 location of the chroma samples (and / or the corresponding luma samples) may depend on the coded mode information.

[0207] (a) Alternatively or additionally, it may depend on the availability of neighboring samples, for example whether the left column or the top row or the top right row or the bottom left column is available. Figure 10 illustrates the left column / top row / top right row / bottom left column concept for a block.

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

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

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

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

[0212] (d) In one example, if the current mode is 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 in the left column and two samples in the top row may be selected, which may be located at the following (x,y coordinates of the top left corner of the current block):

[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+HH / W-1), and (x+W-1,y-1), for example, where H is greater than W.

[0216] 3. (x-1,y), (x,y-1), (x-1,y+H-1), and (x+WW / H-1,y-1), for example, where 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, then samples are selected from the top row only.

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

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

[0221] 3. How samples are selected may depend on width / height, e.g. if W>2 then 4 samples are selected, if W=2 then 2 samples are selected.

[0222] 4. The sample to be selected may be located at (x,y) the top left coordinate of the current block:

[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, if the top right row is available, or if the first top 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, if the top right row is available, or if the first top right sample is available.

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

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

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

[0230] 3. How samples are selected can depend on the width / height, e.g. if H>2 then 4 samples are selected, if H=2 then 2 samples are selected.

[0231] 4. The samples selected may be located in:

[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, if the bottom left column is available, or if the first bottom left 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) if the bottom left column is available or if the first bottom left sample is available.

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

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

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

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

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

[0241] (ii) If only four samples are selected, the two larger sample values ​​are averaged, the two smaller sample values ​​are averaged, and the averaged value is used as input to the two-point method to derive the LM parameters.

[0242] Example 15. In the above example, luma and chroma may be swapped, or 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).

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

[0244] In one example, W may 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 top and left blocks are available, W may be set to the width of the current block.

[0247] i. Alternatively, if no left block is 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 top right block. Alternatively, L may depend on the availability of one top left sample.

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

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

[0251] ii. If the current block is encoded as LM-A mode, then 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 top right block, or alternatively, L may depend on the availability of one top left sample.

[0253] e. If the top-left coordinate of the current block is (x0, y0), then the upper neighboring sample at position (x0+F+K×S, y0-1), where K=0, 1, 2, ..., kMax, is selected.

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

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

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

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

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

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

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

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

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

[0263] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (eg, 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 neighboring samples.

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

[0267] For example, kMax=1, F=W / 4, S=W / 2, offset=0. Alternatively, these settings are made if the current block is LM coded, both left and top neighboring samples are available, and W>=4.

[0268] For example, kMax=3, F=W / 8, S=W / 4, offset=0. Alternatively, these settings are made if the current block is LM coded, only upper neighboring samples are available, and W>=4.

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

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

[0271] Example 17. It is proposed to select the left neighboring chroma samples (and / or their corresponding luma samples that may 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 neighboring samples to be used.

[0272] In one example, H may 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 top and left blocks are available, H may be set to the height of the current block.

[0275] i. Alternatively, if no block above is 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 bottom-left block. Alternatively, L may depend on the availability of one bottom-left sample.

[0277] iii. Alternatively, if the required top right neighboring block is available, H may be set to (current block's height + current block's width).

[0278] (a) In one example, if the left neighboring sample is unavailable, the same H upper neighboring samples are chosen for LM-A and LM modes.

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

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

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

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

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

[0284] (c) In one example, if the top neighbor samples are not available, the same W left neighbor samples are chosen for LM-L mode and LM mode.

[0285] e. If the top-left coordinate of the current block is (x0, y0), then the left neighboring sample at position (x0-1, y0+F+K×S), where K=0, 1, 2, ..., kMax, is selected.

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

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

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

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

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

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

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

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

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

[0295] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (eg, 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 depth 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 neighboring samples.

[0299] For example, kMax=1, F=H / 4, S=H / 2, offset=0. Alternatively, these settings are made if the current block is LM coded, both left and top neighboring samples are available, and H>=4.

[0300] For example, kMax=3, F=H / 8, S=H / 4, offset=0. Alternatively, these settings are made if the current block is LM coded, only upper neighboring samples are available, and H>=4.

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

[0302] q. For example, H equals 2, kMax=1, F=0, S=1, offset=0.

[0303] Example 18. To derive the linear model parameters, it is proposed to select two or four adjacent chroma samples (and / or their corresponding luma samples, which may be downsampled).

[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, which may be downsampled) and then used to derive 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 may 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, if four adjacent chroma samples (and / or their corresponding luma samples that may be downsampled) are selected to derive maxY / maxC and minY / minC, the luma samples and their corresponding chroma samples are split into two arrays G0 and G1, each containing two chroma samples and their corresponding luma samples.

[0307] i. Given four luma samples and their corresponding chroma samples, denoted as S0, S1, S2, S3, they can be split 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 swapped.

[0308] ii. In one example, the luma sample values ​​of G0[0] and G0[1] are compared, and if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the luma samples of G0[0] and their corresponding chroma samples are swapped 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 sample are swapped with those of G0[1].

[0310] (b) Alternatively, if the luma sample value of G0[0] is smaller than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma sample are swapped 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 sample are swapped with those of G0[1].

[0312] iii. In one example, the luma sample values ​​of G1[0] and G1[1] are compared, and if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the luma samples of G1[0] and their corresponding chroma samples are swapped 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 sample are swapped with those of G1[1].

[0314] (b) Alternatively, if the luma sample value of G1[0] is smaller than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma sample are swapped 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 sample are swapped with those of G1[1].

[0316] iv. 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) the luma sample value of G1[1], G0 and G1 are swapped.

[0317] (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 greater than) the luma sample value of G1[0], G0 and G1 are swapped.

[0318] (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) the luma sample value of G1[0], G0 and G1 are swapped.

[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) the luma sample value of G1[1], G0 and G1 are swapped.

[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) the luma sample value of G1[1], G0[0] and G1[1] are swapped.

[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 greater than) the luma sample value of G1[0], G0[0] and G1[0] are swapped.

[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 greater than) the luma sample value of G1[0], G0[1] and G1[0] are swapped.

[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) the luma sample value of G1[1], G0[1] and G1[1] are swapped.

[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, which may be downsampled) are available, they are first padded to four chroma samples (and / or their corresponding luma samples), and then the CCLM parameters are derived using those four chroma samples (and / or their corresponding luma samples).

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

[0330] Example 19. In all the above examples, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and / or 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] Alternatively, the above constraints may be applied when the current block is coded in normal LM mode.

[0332] b. Alternatively, the chroma samples selected are those located in the top row (ie, having W samples) and the top right row having H samples.

[0333] i. Alternatively, and in addition, the above constraints may apply if the current block is coded in LM-A mode.

[0334] ii. Alternatively and additionally, the above constraints may apply when the rows above are available but the columns to the left are not, and the current block is coded in LM-A mode or normal LM.

[0335] c. Alternatively, the chroma samples selected are those located in the left column (ie, having H samples) and the bottom left column having W samples.

[0336] i. Alternatively, and in addition, the above constraints may apply if the current block is coded in LM-L mode.

[0337] ii. Alternatively and additionally, the above constraints may apply when the rows above are not available but the columns to the left are available and the current block is coded in LM-L mode or regular LM.

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

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

[0340] Alternatively, how to perform the methods disclosed in this document may depend on the bit depth (eg, 8-bit or 10-bit, etc.).

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

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

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

[0344] Example 22 The derivation of the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may depend on the availability of left and top neighbors, for example, if neither the left nor top neighboring blocks are available, the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may not be derived.

[0345] a. Deriving the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may depend on the number of available neighboring samples. For example, if numSampL==0 and numSampT==0, the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may not be derived. In another example, if numSampL+numSampT==0, the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may not be derived. In these two examples, numSampL and numSampT are the number of available neighboring samples from the left and top neighboring blocks.

[0346] b. Deriving the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may depend on the number of samples chosen to derive those parameters. For example, if cntL==0 and cntT==0, the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may not be derived. In another example, if cntL+cntT==0, the maximum / minimum values ​​of the luma and chroma components used to derive the CCLM parameters may not be derived. In these two examples, cntL and cntT are the number of samples chosen from the left and top neighboring blocks.

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

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

[0349] b. In one example, the samples utilized in deriving the LIC parameters may exclude samples at specific positions in the rows above and / or columns to the left.

[0350] i. In one example, the samples utilized in deriving the LIC parameters may exclude the first sample in the top row.

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

[0352] ii. In one example, the samples utilized in deriving the LIC parameters may exclude the first sample in the left column.

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

[0354] iii. Whether to apply the above method and / or how to define a particular position may depend on the availability of left columns / top rows.

[0355] iv. Whether to apply the above methods and / or how to define a particular location may depend on the block dimensions.

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

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

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

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

[0360] iii. In another example, N is equal to min(L,T), where T is the total number of available neighboring samples (which may 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 a rule for selecting 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 N samples in the LM-L process.

[0365] vii. In one example, how to select the N samples may depend on the availability of the row above / column to the left.

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

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

[0368] ii. The pick-up method may depend on the availability of adjacent blocks.

[0369] iii. For example, if both upper and left neighboring samples are available, K1 neighboring samples can be picked from the left neighboring sample and K2 neighboring samples can be picked from the upper neighboring sample, e.g., K1=K2=2.

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

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

[0372] vi. For example, the above samples may be picked using a first position offset value (denoted as F) and a step value (denoted as S), which may depend on the size of the current block and the availability of neighboring blocks.

[0373] (a) For example, F and S can be derived by applying the method disclosed in Example 16.

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

[0375] (a) For example, F and S can be derived by applying the method disclosed in Example 17.

[0376] e. In one example, the method proposed to derive the parameters used in CCLM may 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 parameters used in other coding tools that rely on linear models.

[0378] In another example, a cross-component prediction mode is proposed, in which chroma samples are predicted using corresponding reconstructed luma samples according to a prediction model as shown in equation (12). C (x,y) represents the predicted samples of chroma. α 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 in the luma downsampling process for block A in FIG.

number

[0380] As shown in equation (14), the top surrounding luma reference samples shaded in Fig. 11 are downsampled with a 3-tap filter. The left surrounding luma reference samples are downsampled according to equation (15). If the left or top samples are not available, a 2-tap filter as defined in equations (16) and (17) will be used.

number

[0381] In particular, the ambient luma reference sample is downsampled to a size equal to the chroma reference sample, whose size (width and height) are denoted as width and height. To derive α and β, only two or four adjacent samples are involved. To avoid division operations when deriving α and β, a lookup table is applied. The derivation method is shown below.

[0382] 3.1 Exemplary Method Using Up to Two Samples (1) The ratio r of width to height is calculated as shown in equation (18).

number

[0383] (2) If both top and left blocks are available, two samples located at posA of the first top line and posL of the first left line are selected. For simplicity, we assume the width is the long side. The derivation of posA and posL is shown in equation (19) (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 block above is available but the block to the left is not, then the first point on the top line and the point at posA are selected, as shown in FIG.

[0385] (4) If the left block is available but the top block is not, then the first point on the left line and the point at posL are selected, as shown in FIG.

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

[0387] (6) If neither the left nor the top block is available, a default prediction model is used with α equal to 0 and β equal to 1<<(BitDepth-1), 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 shown in equation (18).

[0389] (2) If both top and left blocks are available, four samples located at the beginning of the first top line and posA and 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 for different width-to-height ratios (1, 2, 4, and 8, respectively). The selected samples are shaded.

[0390] (3) If the block above is available but the block to the left is not, then the first point on the line above and the point at posA are selected, as shown in FIG.

[0391] (4) If the left block is available but the top block is not, then the first point on the left line and the point at posL are selected, as shown in FIG.

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

[0393] 3.3 Exemplary Methods for Using Lookup Tables in LM Derivation Figure 16 shows examples of lookup tables with 128, 64, and 32 entries, each entry represented by 16 bits. The two-point LM derivation process is simplified with 64 entries, as shown in Table 1 and Figure 17. Note that the first entry does not have to be stored in the table.

[0394] It should also be noted that each entry in these exemplary tables is designed to be 16 bits, but can easily be converted to fewer bit (e.g., 8 or 12 bit) numbers. 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 represent the maximum and minimum luma sample values ​​of the selected positions. Alternatively, they may represent a function of the maximum and minimum luma sample values ​​of the selected positions, for example, an averaging. If only four positions are selected, they may also be the average of the two largest luma values ​​and the average of the two smallest luma values. It is further noted that in FIG. 17, maxChroma and minChroma represent the chroma values ​​corresponding to maxLuma and minLuma.

[0397] 3.3 Method #4 using up to 4 samples The block width and height of the current chroma block are W and H, respectively. Also, the coordinates of the top left corner of the current chroma block are [0,0].

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

[0399] The coordinates of the two top 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 colored red as shown in FIG. 31A.

[0402] These four samples are then sorted according to luma sample strength and divided into two groups. The two largest and two smallest samples are averaged, respectively. The two averages are used to derive the cross-component prediction model. Alternatively, the maximum and minimum values ​​of the four samples are used to derive the LM parameters.

[0403] If the block above is available but the block to the left is not, then 4 chroma samples are selected from the block above if W>2, and 2 chroma samples are selected if W=2.

[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 colored red as shown in FIG. 31B.

[0406] If the left block is available but the block above is not, then 4 chroma samples are selected from the left block if H>2, and 2 chroma samples are selected if H=2.

[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 top block is available, a default prediction is used with α equal to 0 and β equal to 1<<(BitDepth-1), where BitDepth represents the bit depth of the chroma samples.

[0409] If the current mode is LM-A mode, 4 chroma samples from the block above are selected when W'>2, and 2 chroma samples are selected when W'=2. W' is the available number of neighboring samples above, which may be 2*W.

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

[0411] If the current mode is LM-L mode, then 4 chroma samples from the left block are selected when H'>2, and 2 chroma samples are selected when H'=2. H' is the available number of left neighboring samples, which may be 2*H.

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

[0413] 3.5 Example implementation for modifying the current VVC standard to use CCLM predictions

[0414] 8.3.4.2.8 Specification of INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction modes This section describes the equations using the equation numbers that correspond to those in the current draft of the VVC standard.

[0415] The inputs to this process are: - intra prediction mode predModeIntra, - the sample position (xTbC, yTbC) of the top-left sample of the current transform block relative to the top-left sample of the current picture, - the variable nTbW, which specifies the transform block width; - the variable nTbH, which defines the transformation block height; - Chroma neighboring samples p[x][y] at 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: ... - If 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] 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-161) - Otherwise, the following ordered steps apply: 1. ...[No changes to current specifications] 2. ... 3. ... 4. ... 5. ... 6. [No changes to the current specifications] 7. The variables minY, maxY, minC, and maxC are derived as follows: - The variable minY is 1<<(BitDepth Y )+1 and the variable maxY is set equal to -1. - If avalL is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, the variable aboveIs4 is set equal to 0, otherwise it is set equal to 1. - If avallT is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, the 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 to 0. - When predModeIntra is equal to INTRA_LT_CCLM, the variable nSX is set to nTbW, nSY is set to nTbH; otherwise, nSX is set to numSampLT, and nSY is set 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++; - If cnt is equal to 2, the following applies: - if selectLumaPix[0]>selectLumaPix[1] then 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], else 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, if cnt is equal to 4, the following applies: - The variable arrays minGrpIdx and maxGrpIdx are -minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 It is initialized as - The following applies: - if selectLumaPix[minGrpIdx[0]]>selectLumaPix[minGrpIdx[1]], swap minGrpIdx[0] with minGrpIdx[1; - if selectLumaPix[maxGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], swap maxGrpIdx[0] with maxGrpIdx[1]; - if selectLumaPix[minGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], swap minGrpIdx and maxGrpIdx; - if selectLumaPix[minGrpIdx[1]]>selectLumaPix[maxGrpIdx[0]], swap minGrpIdx[1] with 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. The variables a, b, and k are derived as follows: [End of change]

[0421] 3.6 Another illustrative working draft of the proposed CCLM forecast This section describes another example embodiment that illustrates changes that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.

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

[0423] [The current additions to the VVC Working Draft are as follows] The number of available neighboring chroma samples to the right and top-right, numTopSamp, and the number of available neighboring chroma samples to the left and bottom-left, nLeftSamp, are derived as follows: - If 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) By replacing N with L and T, the variable cntN and the array pickPosN[] 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)). - if 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 location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at 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 sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma sample. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the neighboring upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocator 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: - 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) - If 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) - If 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, pDsY[x][0] for x=1..nTbW-1 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) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY

[0000]

[0000] 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, if availL is equal to TRUE and availT is equal to FALSE, pDsY

[0000]

[0000] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY

[0000]

[0000] 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

[0000]

[0000] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 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) - If 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] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), 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] - if 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] is set equal to p[pickPosT[idx]][-1], for idx=0..(cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx], for idx=cntL..(cntL+cntT-1), is defined as: - x is set equal to pickPosT[idx-cntL] - if sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x>0: - If 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 (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) - Else, 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) - Else, 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 (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) - Else, 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) - Else, 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) - Otherwise (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, set pSelC[idx+2]=pSelC[idx] and pSelDsY[idx+2]=pSelDsY[idx] for idx=0 and 1 - 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+xy)<1)? 1:3+xy (8-218) a=((3+xy)<1)? Sign(a)*15:a (8-219) b=minC-((a*minY)>>k ) (8-220) where divSigTable[ ] is specified 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) [End of Example Embodiment]

[0424] 3.7 Another illustrative working draft of the proposed CCLM forecast This section describes another example embodiment that illustrates changes that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.

[0425] INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction mode specifications … The number of available neighboring chroma samples to the right and top-right, numTopSamp, and the number of available neighboring chroma samples to the left and bottom-left, nLeftSamp, are derived as follows: - If 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) By replacing N with L and T, the variable cntN and the array pickPosN[] 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)). - if 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),withpos=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 location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at 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 sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma sample. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the neighboring upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocator 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: - 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) - If 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) - If 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, pDsY[x][0] for x=1..nTbW-1 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) - If availL is equal to TRUE and availT is equal to TRUE, then 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, if availL is equal to TRUE and availT is equal to FALSE, then 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, if availL is equal to FALSE and availT is equal to TRUE, then 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: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 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) - If 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] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), 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] - if 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] is set equal to p[pickPosT[idx]][-1], for idx=0..(cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx], for idx=cntL..(cntL+cntT-1), is defined as: - x is set equal to pickPosT[idx-cntL] - if sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x>0: - If 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 (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) - Else, 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) - Else, 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 (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) - Else, 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) - Else, 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) - Otherwise (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+xy)<1)?1:3+xy (8-218) a=((3+xy)<1)?Sign(a)*15:a (8-219) b=minC-((a*minY)>>k) (8-220) where divSigTable[] is defined as: 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 Proposed Alternative Working Draft for CCLM Projections This section describes alternative example embodiments that show other changes that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.

[0427] INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction mode specifications … The number of available neighboring chroma samples to the right and top-right, numTopSamp, and the number of available neighboring chroma samples to the left and bottom-left, nLeftSamp, are derived as follows: - If 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) By replacing N with L and T, the variable cntN and the array pickPosN[] 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, 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 location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at 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 sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma sample. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the neighboring upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocator 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: - 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) - If 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) - If 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, pDsY[x][0] for x=1..nTbW-1 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) - If availL is equal to TRUE and availT is equal to TRUE, then 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, if availL is equal to TRUE and availT is equal to FALSE, then 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, if availL is equal to FALSE and availT is equal to TRUE, then 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: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 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) - If 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] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), 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] - if 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] is set equal to p[pickPosT[idx-cntL]][-1], where idx=cntL..(cntL+cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx], where idx=cntL..(cntL+cntT-1), is defined as: - x is set equal to pickPosT[idx-cntL] - if sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x > 0: - If 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 (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) - Else, 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) - Else, 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 (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) - Else, 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) - Else, 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) - Otherwise (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. 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+xy)<1)? 1:3+xy (8-218) a=((3+xy)<1)? Sign(a)*15:a (8-219) b=minC-((a*minY)>>k) (8-220) where divSigTable[] is defined as: 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)

[0428] The above examples may be incorporated in the context of methods, such as methods 1800, 1900 and 2000 described below, which may be implemented in a video encoder and / or decoder.

[0429] 18 shows a flowchart of an example method for video processing. The 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 transforming between a current video block of the video that is a chroma block and a coded representation of the video, where the R chroma samples are selected from the group based on a position rule, where R is greater than or equal to 2. The method 1800 further includes, at step 1804, performing the transform based on the determination.

[0430] 19A shows a flow chart of an example method for video processing. The method 1900 includes, at step 1902, determining parameters of a cross-component linear model based on a selected chroma sample based on a position of the chroma sample for conversion between a current video block of the video that is a chroma block and a coded representation of the video, the selected chroma sample being selected from a group of adjacent chroma samples. The method 1900 further includes, at step 1904, performing the conversion based on the determination.

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

[0432] 20A shows a flow chart of an example method for video processing. The method 2000 includes, at step 2002, determining sets of parameters for transforming between a current video block of the video that is a chroma block and a coded representation of the video, 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 locations. The method 2000 further includes, at step 2004, determining parameters for a final CCLM based on the sets of parameters. The method 2000 further includes, at step 2006, performing a transform based on the final CCLM.

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

[0434] 21 shows a flow chart of an example method for video processing. The method 2100 includes, at step 2102, determining parameters of a cross-component linear model fully determinable by two chroma samples and corresponding two luma samples for transforming between a current video block of the video, the current video block being a chroma block, and a coded representation of the video. The method 2100 further includes, at step 2104, performing the transform based on the determination.

[0435] 22 shows a flow chart of an exemplary method for video processing. The method 2200 includes, at step 2202, determining parameters of a cross-component linear model for a conversion between a current video block of a video, which is a chroma block, and a coded representation of the video, using a parameter table, where an entry of the parameter table is searched according to two chroma sample values ​​and two luma sample values. The method 2100 further includes, at step 2204, performing the conversion based on the determination.

[0436] 23A shows a flowchart of an exemplary method for video processing. The method 2310 includes, at step 2312, determining a final prediction P(x,y) of a chroma sample at a position (x,y) in a current video block for conversion between a current video block of the video being a chroma block and a coded representation of the video as a combination of prediction results of multiple cross-component linear models (MCCLMs), where the MCCLMs are selected based on the positions (x,y) of the chroma samples. The method 2310 further includes, at step 2314, performing conversion based on the final prediction.

[0437] 23B shows a flowchart of an example method for video processing. The method 2320 includes, at step 2322, performing a first decision regarding whether a first cross-component linear model (CCLM) using only left neighboring samples is used to predict samples of the current video block for conversion between a current video block of a video that is a chroma block and a coded representation of the video, and / or a second decision regarding whether a second cross-component linear model (CCLM) using only top neighboring samples is used to predict samples of the current video block. The method 2320 further includes, at step 2324, performing a conversion based on the first decision and / or the second decision.

[0438] 24A shows a flowchart of an example method for video processing. The method 2410 includes, at step 2412, determining a context to be used for encoding a flag for converting between a current video block of a video and an encoded representation of the video using arithmetic encoding to the encoded representation of the current video block, the context being based on whether an upper left neighboring block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode. The method 2410 further includes, at step 2414, performing the conversion based on the determination.

[0439] 24B shows a flowchart of an example method for video processing. The method 2420 includes, at step 2422, determining an encoding order for one or more indications of a direct intra-prediction mode (DM mode) and a linear intra-prediction mode (LM mode) for converting between a current video block of a video and a coded representation of the video based on coding modes of one or more neighboring blocks of the current video block. The method 2420 further includes, at step 2424, performing the conversion based on the determination.

[0440] 24C shows a flowchart of an example method for video processing. The method 2430 includes, at step 2432, determining parameters for linear model prediction or cross-color component prediction based on refined chroma and luma samples of the current video block for conversion between the current video block of the video and a coded representation of the video. The method 2430 further includes, at step 2434, performing the conversion based on the determination.

[0441] 24D shows a flow chart of an example method for video processing. The method 2440 includes, at step 2442, determining parameters for linear model prediction or cross-color component prediction by selecting neighboring samples based on a position of a maximum neighboring sample or a minimum neighboring sample for conversion between a current video block of a video that is a chroma block and a coded representation of the video. The method 2440 further includes, at step 2444, performing the conversion based on the determination.

[0442] 24E shows a flowchart of an exemplary method for video processing. The method 2450 includes, at step 2452, determining parameters for a linear model prediction or a 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 a coded representation of the video, where the primary color component is selected as one of the luma color component and the chroma color component, and the secondary color component is selected as the other of the luma color component and the chroma color component. The method 2450 further includes, at step 2454, performing the conversion based on the determination.

[0443] 25A shows a flow chart of an example method for video processing. The method 2510 includes performing downsampling on chroma and luma samples of neighboring blocks of a current video block at step 2512. The method 2510 further includes determining, at step 2514, 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 of the video being a chroma block and a coded representation of the video. The method 2510 further includes performing the conversion based on the determination at step 2516.

[0444] 25B shows a flowchart of an example method for video processing. The 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 transforming between a current video block of the video that is a chroma block and an encoded representation of the video, the two or more chroma samples being selected based on an encoding mode of the current video block. The method 2520 further includes, at step 2524, performing the transform based on the determination.

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

[0446] 26B shows a flowchart of an example method for video processing. The 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 neighboring samples of the current video block for conversion between a current video block of the video being a chroma block and a coded representation of the video. The method 2620 further includes, at step 2624, performing the conversion based on the determination.

[0447] 27A shows a flow chart of an example method for video processing. The 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 transforming between a current video block of the video, the current video block being a chroma block, and a coded representation of the video. The method 2710 further includes, at step 2714, performing the transform based on the determination.

[0448] 27B shows a flow chart of an example method for video processing. The 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 a coded representation of the video, the chroma samples being used to derive parameters of a cross-component linear model (CCLM). The method 2720 further includes, at step 2724, performing the conversion based on the determination. In this example, the position rule specifies selecting chroma samples located in a row above and / or a column to the left of the current video block.

[0449] 28A shows a flowchart of an example method for video processing. The method 2810 includes, at step 2812, determining a location at which luma samples are downsampled for conversion between a current video block of the video that is a chroma block and a coded 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, the downsampled luma samples being at locations corresponding to the locations of the chroma samples used to derive the parameters of the CCLM. The method 2810 further includes, at step 2814, performing the conversion based on the determination.

[0450] 28B shows a flow chart of an example method for video processing. The method 2820 includes, at step 2822, determining how to derive parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on an encoding condition associated with the current video block for converting between a current video block of the video being a chroma block and a coded representation of the video. The method 2820 further includes, at step 2824, performing the conversion based on the determination.

[0451] 28C shows a flowchart of an example method for video processing. The method 2830 includes, at step 2732, determining whether to derive maximum and / or minimum values ​​of luma and chroma components used to derive parameters of a cross-component linear model (CCLM) for conversion between a current video block of a video that is a chroma block and a coded representation of the video based on availability of left and above neighboring blocks of the current video block. The method 2830 further includes, at step 2834, performing the conversion based on the determination.

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

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

[0454] 29C shows a flowchart of an example method for video processing. The method 2930 includes, at step 2932, determining parameters of a cross-component linear model (CCLM) based on the chroma samples and the corresponding luma samples for conversion between a current video block of the video, the current video block being a chroma block, and a coded representation of the video. The 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 the corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and the corresponding luma samples.

[0455] Examples of implementation of the disclosed technology FIG. 30A is a block diagram of a video processing device 3000. The device 3000 may be used to implement one or more of the methods described herein. The device 3000 may be embodied in a smartphone, a tablet, a computer, or an Internet of Things (IoT) receiver. The device 3000 may include one or more processors 3002, one or more memories 3004, and video processing hardware 3006. The processor(s) 3002 may be configured to execute one or more methods described herein, including but not limited to the methods illustrated in FIGS. 18-29C. The memory(s) 3004 may be used to store data and code used to execute the methods and techniques described herein. The video processing hardware 3006 may be used to implement some of the techniques described herein in hardware circuitry.

[0456] FIG. 30B is another example of a block diagram of a video processing system in which the disclosed technology may be implemented. FIG. 30B is a block diagram illustrating an example of a video processing system 3100 in which various technologies disclosed herein may be implemented. Various implementations may include some or all of the components of the system 3100. The system 3100 may include an input 3102 that receives video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or in a compressed or encoded format. The input 3102 may 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), and wireless interfaces such as Wi-Fi or cellular interfaces.

[0457] The system 3100 may include an encoding component 3104 that may implement various coding or encoding methods described herein. The encoding component 3104 may reduce the average bit rate of the video from the 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 transmitted via a communication connection as represented by component 3106. The stored or communicated bitstream (or encoded) representation of the video received at the input 3102 may be used by component 3108 to generate pixel values ​​or a displayable image that is sent to the display interface 3110. The process of generating a user-viewable image from the bitstream representation may be referred to as video decompression. Also, although certain video processing operations may be referred to as "encoding" operations or tools, it is understood that the encoding tools or operations are used at the encoder and the corresponding decoding tools or operations that reverse the results of the encoding are performed at the decoder.

[0458] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High Definition Multimedia Interface (HDMI) or Displayport, etc. Examples of storage interfaces include serial advanced technology attachment (SATA), PCI, IDE interfaces, etc. The techniques described in this document may be embodied in a variety of electronic devices, such as, for example, mobile phones, laptops, smartphones, or other devices capable of performing digital data processing and / or video display.

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

[0460] Various techniques that may be suitably incorporated into some embodiments may be described using the following clause-based format.

[0461] The first set of paragraphs describes particular features and aspects of the disclosed technology recited in the preceding sections, including, for example, Examples 1.ad 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 transforming between a current video block of a video, the current video block being a chroma block, and a coded representation of the video, the R chroma samples being selected from the group based on a position rule, where R is greater than or equal to 2; and performing the transform based on the determination.

[0463] 2. The method of claim 1, wherein the parameter has a value determined based on a luma sample of the R chroma samples.

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

[0465] 4. The above parameters are: S 2. The method of claim 1, wherein the value is determined based on the chroma sample at the position, S being an integer.

[0466] 5. The top 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 F with coordinates (x-1,y+H+H / 2), and sample G with coordinates (x-1,y+H+H / 2). The method according to claim 1, comprising: a pool G, a sample I having coordinates (x-1, y+H+H-1), a sample J having coordinates (x, y-1), a sample K having coordinates (x+W / 2-1, y-1), a sample L having coordinates (x+W / 2, y-1), a sample M having coordinates (x+W-1, y-1), a sample N having coordinates (x+W, y-1), a sample O having coordinates (x+W+W / 2-1, y-1), a sample P having coordinates (x+W+W / 2, y-1), and a sample Q having coordinates (x+W+W-1, y-1).

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

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

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

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

[0471] 10. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from samples A, B, D, F, J, K, M, and O.

[0472] 11. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples A, C, G, I, J, L, P, and Q.

[0473] 12. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples A, C, E, G, J, L, N, and P.

[0474] 13. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples J, K, L, and M.

[0475] 14. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples J, L, N, and Q.

[0476] 15. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples J, K, L, M, N, O, P, and Q.

[0477] 16. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from samples A, B, C, D, E, F, G, and I.

[0478] 17. The method of claim 5, wherein the position rule specifies that the two chroma samples are selected from the samples J, K, L, M, N, O, P, and Q.

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

[0480] 19. The method of any of clauses 5 to 18, wherein the two chroma samples have equal corresponding luma values, and the method further comprises checking an additional chroma sample.

[0481] 20. The method of claim 1, wherein 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 ​​to determine a first set of values ​​for the parameter.

[0482] 21. The method of claim 1, wherein the upper adjacent sample having coordinates (x, y) is in the group if and only if x%K=0, where K is 2, 4, 6, or 8 and % is the modulo operator.

[0483] 22. The method of claim 1, wherein the left adjacent sample having coordinates (x, y) is in the group if and only if y%K=0, where K is 2, 4, 6, or 8 and % is the modulo operator.

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

[0485] 24. The method of any of claims 1 to 23, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0486] 25. The method of any of claims 1 to 23, wherein performing the transformation includes generating the current block from the encoded representation.

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

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

[0489] The second set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Example 1.ei and Example 9.

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

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

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

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

[0494] 5. The method of any of claims 1 to 4, wherein the positions of the chroma samples are selected based on a width or height of the chroma block.

[0495] 6. The method of claim 1, wherein the location 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 of claim 1, wherein the determination of the parameters is further based on a least mean squares method.

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

[0498] 9. A method for video processing, comprising: 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, the current video block having a width and height W and H, respectively, and the group of adjacent chroma samples including at least one sample located beyond 2×W adjacent chroma samples above or 2×H adjacent chroma samples to the left; and performing a conversion between the current video block and a coded representation of a video including the current video block based on the linear model.

[0499] 10. The method of 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), and the at least one sample is (x-1, y+d), where d is an integer in the range [T, S], and T and S are integers.

[0500] 11. The method according to item 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 of 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), and the at least one sample is (x+d, y-1), where d is an integer in the range [T, S], and T and S are integers.

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

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

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

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

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

[0510] 21. The method of any of claims 1 to 19, wherein performing 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-transitory memory having instructions that, when executed by the processor, cause the processor to perform a method according to any one of claims 1 to 21.

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

[0513] The third set of paragraphs describes particular 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, comprising the steps of determining multiple sets of parameters for transforming between a current video block of a video that is a chroma block and a coded representation of the video, each set of parameters defining a cross-component linear model (CCLM) and derived from a corresponding group of chroma samples at corresponding chroma sample positions; determining parameters for a final CCLM based on the multiple sets of parameters; and performing the transform based on the final CCLM.

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

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

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

[0518] 5. The method of claim 1, wherein the multiple sets of parameters include 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, the first group and the second group corresponding to different chroma sample positions.

[0519] 6. The top 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 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), A sample E with coordinates (x-1,y+H), A sample F with coordinates (x-1, y+H+H / 2-1), A 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), A sample L with coordinates (x+W / 2,y-1), A sample M with coordinates (x+W-1,y-1), Sample N with coordinates (x+W,y-1), A sample O having coordinates (x+W+W / 2-1, y-1), A sample P with coordinates (x+W+W / 2,y-1), or A sample Q with coordinates (x+W+W-1, y-1), Item 6. The method of item 5, comprising at least one of the following:

[0520] 7. The method of 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 of claim 6, wherein the first group includes samples A and I, and the second group includes samples J and Q.

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

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

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

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

[0526] 13. The N groups of chroma and luma samples are designated as S0, S1, ..., S m where 1≦m≦N-1, m and N are non-negative integers, and the maximum luma value is maxL=f1(maxL S0 ,maxL S1 ,…,maxL Sm ), where f1 is the first function and maxL Si is group S out of multiple groups. i The maximum luma value of f2(maxC S0 ,maxC S1 ,…,maxC Sm ), where f2 is the second function, and maxC Si is maxL Si Group S corresponding to i and the minimum luma value is minL = f3(minL S0 ,minL S1 ,…,minL Sm), where f3 is the third function, and minL Si Group S i The minimum luma value is minC = f4(minC S0 ,minC S1 ,…,minC Sm ), where f4 is the fourth function and minC Si is minL Si Group S corresponding to i and the parameters of the linear model have α and β calculated as α=(maxC-minC) / (maxL-minL) and β=minC-α×minL.

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

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

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

[0530] 18. The method of any one of clauses 13 to 14, wherein S0 has samples from the top row of the current video block and S1 has samples from the left row of the current video block.

[0531] 19. The method of claim 13 or 14, wherein samples from a top row of the current image block have coordinates (x,y), S0 comprises a first portion of the samples, each sample of the first portion satisfying x%P=Q, and S1 comprises a second portion of the samples, each sample of the second portion satisfying x%P≠Q, where % is a modulo operator and P and Q are non-negative integers.

[0532] 20. The method of claim 13 or 14, wherein samples from the left row of the current image block have coordinates (x,y), S0 comprises a first portion of the samples, each sample of the first portion satisfying y%P=Q, and S1 comprises a second portion of the samples, each sample of the second portion satisfying y%P≠Q, where % is a modulo operator and P and Q are non-negative integers.

[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 of clauses 12 to 14, wherein the chroma and luma samples comprise only a portion of the chroma and luma samples of adjacent blocks.

[0535] 23. The method according to any one of claims 13 to 22, wherein N is predetermined.

[0536] 24. The method of any of clauses 13 to 23, wherein 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 largest coding units, or one or more coding units.

[0537] 25. The method of claim 12, wherein the chroma and luma samples for each group are selected based on availability of neighboring blocks of the current picture block.

[0538] 26. The method of claim 12, wherein the chroma and luma samples for each group are selected based on a width and height of the current picture block.

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

[0540] 28. The method of any of claims 1 to 27, wherein the performing of the transformation includes generating the coded representation from the current block.

[0541] 29. The method of any of clauses 1 to 27, wherein performing the transformation includes generating the current block from the encoded representation.

[0542] 30. An apparatus in a video system having a processor and non-transitory memory having instructions that, when executed by the processor, cause the processor to perform a 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 a program code for performing the method according to any one of clauses 1 to 29.

[0544] The fourth set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 3.ab and 3.d.

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

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

[0547] 3. The method of claim 2, where α=0 if L1 is equal to L0.

[0548] 4. The method according to claim 2, wherein if 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 of claim 2, where α is determined by eliminating division operations.

[0550] 6. The method of claim 2, wherein α is determined using a lookup table-free process, which does not include a division operation.

[0551] 7. The method of claim 2, wherein the parameters of the cross-component linear model have values ​​that are determined based on the value of (L1-L0).

[0552] 8. The method according to claim 2, where α=Shift(C1-C0,Floor(log2(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.

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

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

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

[0556] 12. The method of claim 11, wherein intermediate variables are clipped or right shifted to be within said K bits.

[0557] 13. The method of any of clauses 1 to 12, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0558] 14. The method of any of clauses 1 to 12, wherein performing 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 that, when executed by the processor, cause the processor to perform a method according to any one of claims 1 to 14.

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

[0561] The fifth set of paragraphs describes particular features and aspects of the disclosed techniques 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, which is a chroma block, and a coded representation of the video, wherein entries in the parameter table are searched according to two chroma sample values ​​and two luma sample values; and performing the conversion based on the determination.

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

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

[0565] 4. 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, the method according to item 1.

[0566] 5. 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 formulas α = (C1 - C0) / (L1 - L0) and β = C0 - α × L0, the method according to item 1.

[0567] 6. k = Shift(L1 - L0, W), where k is used to query the 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, the method according to item 5.

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

[0569] 8. α = Shift((C1 - C0) × M[k - Z], D) or α = SignShift((C1 - C0) × M[k - Z], D), where 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 the index for querying the entry in the parameter table, the method according to item 5.

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

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

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

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

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

[0575] 14. The method according to claim 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 of claim 5, wherein (L1-L0)<0 and the determination is performed to derive a value of '-α' instead of α.

[0577] 16. The method of claim 5, wherein (L1-L0)=0 and α is set to a default value which is 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 if x≧0 and is -(-x+off)>>s if x<0.

[0579] 18. The method of any of claims 1 to 17, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0580] 19. The method of any of claims 1 to 17, wherein performing the transformation includes generating the current block from the encoded representation.

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

[0582] 21. A computer program product stored on a non-transitory computer readable medium, comprising a program code for performing the method according to any one of clauses 1 to 19.

[0583] The sixth set of paragraphs describes particular features and aspects of the disclosed techniques recited 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) in a current video block of a video, the current video block being a chroma block, as a combination of prediction results of multiple cross-component linear models (MCCLMs), the MCCLMs being selected based on the position (x,y) of the chroma sample, for conversion between the current video block of the video and a coded representation of the video; and performing the conversion based on the final prediction.

[0585] 2. The method of claim 1, wherein the multiple cross-component linear models include a first linear model whose parameters are derived exclusively from the left adjacent sample, and a second linear model whose parameters are derived exclusively from the above adjacent sample.

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

[0587] 4. The method according to item 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 item 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 item 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 item 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 items 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 paragraphs 5 to 7, wherein, if x>y, then as the value of (xy) increases, the value of (w2-w1) increases.

[0595] 12. A method of image processing, comprising the steps of: making a first decision as to whether a first cross-component linear model (CCLM) using only left adjacent samples is to be used for predicting samples of a current image block of an image that is a chroma block and / or a second decision as to whether a second cross-component linear model (CCLM) using only upper adjacent samples is to be used for predicting samples of the current image block, and performing the conversion based on the first decision and / or the second decision.

[0596] 13. The method of claim 12, wherein the first CCLM is not applied if W>K×H is satisfied, where K is a non-negative integer.

[0597] 14. The method of claim 12, wherein the second CCLM is not applied if H>K×W, where K is a non-negative integer.

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

[0599] 16. The method of any of claims 1 to 15, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0600] 17. The method of any 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 that, when executed by the processor, cause the processor to perform a method according to any one of claims 1 to 17.

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

[0603] The seventh set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 7, 8, 11-13.

[0604] 1. A method of video processing, comprising: determining a context to be used for encoding a flag using arithmetic encoding into the encoded representation of a current video block of a video for conversion between the current video block and an encoded representation of the video, the context being based on whether an upper-left neighboring 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.

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

[0606] 3. The method of claim 1, wherein the upper left neighboring block is unavailable and the CCLM prediction mode is considered valid.

[0607] 4. The method of claim 1, wherein the upper left neighboring block is unavailable and the CCLM prediction mode is considered invalid.

[0608] 5. The method of claim 1, wherein the upper left neighboring block is intra-coded and the CCLM prediction mode is considered to be valid.

[0609] 6. The method of claim 1, wherein the upper left neighboring block is intra-coded and the CCLM prediction mode is considered to be invalid.

[0610] 7. A method of video processing, comprising the steps of: determining an encoding order for one or more indications of a direct intra prediction mode (DM mode) and a linear intra prediction mode (LM mode) for conversion between a current video block of a video and an encoded representation of the video based on an encoding mode of one or more neighboring blocks of the current video block; and performing the conversion based on the determination.

[0611] 8. The method of claim 7, wherein a top-left neighboring block of the one or more neighboring blocks is coded in the LM mode and an indication of the LM mode is coded first.

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

[0613] 10. The method of claim 7, wherein an upper-left neighboring block of the one or more neighboring blocks is encoded in a coding mode different from the LM mode, and an indication of the DM mode is encoded first.

[0614] 11. The method of any of clauses 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 largest coding units, or one or more coding units.

[0615] 12. A method of image processing, comprising the steps of determining parameters for linear model prediction or cross-color component prediction based on refined chroma and luma samples of a current image block for conversion between a current image block of an image and an encoded representation of the image, and performing the conversion based on the determination.

[0616] 13. The method of claim 12, wherein the chroma and luma samples are downsampled.

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

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

[0619] 16. The method of claim 15, wherein the luma samples may be downsampled before being used to derive L0 and L1.

[0620] 17. C0 and L0 are based on S chroma and luma samples, denoted as {Cx1,Cx2,…,CxS} and {Lx1,Lx2,…,LxS}, respectively. C1 and L1 are based on T chroma and luma samples, denoted as {Cy1,Cy2,…,CyT} and {Ly1,Ly2,…,LyT}, respectively. {Cx1,Cx2,…,CxS} are based on {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), and f0, f1, f2, and f3 are functions.

[0621] 18. The method of claim 17, wherein f0 and f1 are first functions.

[0622] 19. The method of claim 17, wherein f2 and f3 are second functions.

[0623] 20. The method of claim 17, wherein f0, f1, f2, and f3 are third functions.

[0624] 21. The method of claim 20, wherein the third function is an averaging function.

[0625] 22. The method according to claim 17, wherein S=T. 23. The method of claim 17, where (Lx1, Lx2, …, LxS) is the smallest sample in a set of luma samples.

[0626] 24. The method of claim 17, where {Ly1,Ly2,...,LyT} is the maximum sample in a set of luma samples.

[0627] 25. The method of claim 23 or 24, wherein the set of luma samples comprises all adjacent samples used in VTM-3.0 to derive the parameters of the linear model prediction.

[0628] 26. The method of any one of claims 23 to 24, wherein the set of luma samples comprises a subset, but not all, of the adjacent samples used by VTM-3.0 to derive the parameters of the linear model prediction.

[0629] 27. A method of image processing, comprising the steps of: determining parameters for linear model prediction or cross-color component prediction by selecting neighboring samples based on the position of a maximum or minimum neighboring sample for conversion between a current image block of an image, which is a chroma block, and an encoded representation of the image; and performing the conversion based on the determination.

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

[0631] 29. The method of claim 27, wherein the nearest neighboring sample is at position (x1,y1) and samples in the regions (x1-d1,y1), (x1,y1-d2), (x1+d3,y1), (x1,y1+d4) are used to select the nearest neighboring sample, where {d1,d2,d3,d4} depends on the position (x1,y1).

[0632] 30. The method of any of clauses 27 to 29, wherein the adjacent samples represent color components.

[0633] 31. A method of image processing, comprising: determining parameters for linear model prediction or cross color component prediction based on a primary color component and a secondary color component for a conversion between a current image block of an image and an encoded representation of the image, 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; and performing the conversion based on the determination.

[0634] 32. The method of any of clauses 1 to 31, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0635] 33. The method of any of clauses 1 to 31, wherein performing the transformation includes generating the current block from the encoded representation.

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

[0637] 35. A computer program product stored on a non-transitory computer readable medium, comprising a program code for performing the method according to any one of clauses 1 to 33.

[0638] The eighth set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 10 and 14.

[0639] 1. A method comprising the steps of: performing downsampling on chroma and luma samples of adjacent blocks of a current image 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 image block of an image that is a chroma block and an encoded representation of the image; and performing the conversion based on the determination.

[0640] 2. The method of claim 1, wherein the current image block has a height (H) and a width (W), and the downsampling is based on the height or the width.

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

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

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

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

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

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

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

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

[0649] 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, which 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; and performing the conversion based on the determination.

[0650] 12. The method of claim 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.

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

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

[0653] 15. The method of claim 11, wherein the two or more chroma samples are selected from one or more of a left column, a top row, a top right row, or a bottom left column with respect to the current picture block.

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

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

[0656] 18. The method according to claim 17, wherein K=2. 19. The method of claim 11, wherein the encoding mode of the current image block is a first linear mode different from 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 top-left sample of the current image block are (x, y), and the width and height of the current image block are W and H, respectively.

[0657] 20. The method of claim 19, wherein 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).

[0658] 21. 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-H / W-1), and (x+W-1, y-1), and H>W.

[0659] 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), and H<W.

[0660] 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).

[0661] 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).

[0662] 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).

[0663] 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).

[0664] 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).

[0665] 28. The method of claim 19, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+H / 4), (x-1,y+2*H / 4), and (x-1,y+3*H / 4).

[0666] 29. The method of claim 19, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+2*H / 4), (x-1,y+3*H / 4), and (x-1,y+H-1).

[0667] 30. The method of claim 19, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+(2H) / 4), (x-1,y+2*(2H) / 4), and (x-1,y+3*(2H) / 4).

[0668] 31. The method of claim 19, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+2*(2H) / 4), (x-1,y+3*(2H) / 4), and (x-1,y+(2H)-1).

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

[0670] 33. The method of any of clauses 1 to 32, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0671] 34. The method of any of clauses 1 to 32, wherein performing the transformation includes generating the current block from the encoded representation.

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

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

[0674] The ninth set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 16 and 17.

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

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

[0677] 3. The method of claim 1, wherein W depends on the availability of at least one of an above neighboring block or a left neighboring block of the current image block.

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

[0679] 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 image block.

[0680] 6. The method of claim 1, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), the first position offset value (F) and the step value (S) being dependent on W.

[0681] 7. The method of claim 6, wherein the top-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.

[0682] 8. The method of claim 6, wherein F=W / P or F=W / P+offset, where P is an integer.

[0683] 9. The method of claim 8, where F=W>>(2+numIs4T), where numIs4T is equal to 1 if 4 adjacent samples are selected in the adjacent row above, and numIs4T is equal to 0 otherwise.

[0684] 10. The method of claim 6, wherein S=W / Q, where Q is an integer.

[0685] 11. The method of claim 6, wherein S is 1 or greater.

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

[0687] 13. The method of claim 9 or 12, wherein numIs4T is equal to 1 if an upper adjacent sample is available, a left adjacent sample is available, and the current video block is encoded with a normal CCLM that is different from a first CCLM that uses only the left adjacent sample and different from a second CCLM that uses only the upper adjacent sample.

[0688] 14. The method of claim 6, wherein F=S / R, where R is an integer.

[0689] 15. The method of claim 6, wherein S=F / Z, and Z is an integer.

[0690] 16. A method according to any of clauses 7 to 15, wherein at least one of Kmax, F, S, or offset depends on a prediction mode of the current image 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, or the third CCLM.

[0691] 17. The method of any of clauses 7 to 15, wherein at least one of Kmax, F, S, or offset depends on the width and / or height of the current image block.

[0692] 18. The method of any of clauses 7 to 15, wherein at least one of Kmax, F, S, or offset depends on the availability of adjacent samples.

[0693] 19. The method of any of paragraphs 7 to 15, wherein at least one of Kmax, F, S, or offset depends on W.

[0694] 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 neighboring samples of the current video block for conversion between a current video block of an image that is a chroma block and a coded representation of the image; and performing the conversion based on the determination.

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

[0696] 22. The method of clause 20, wherein H depends on the availability of at least one of an above neighboring block or a left neighboring block of the current image block.

[0697] 23. The method of claim 20, wherein H depends on the coding mode of the current video block.

[0698] 24. The method of clause 21, wherein L has a value that depends on the availability of a bottom-left block or bottom-left sample located adjacent to the current image block.

[0699] 25. The method of claim 20, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), the first position offset value (F) and the step value (S) being dependent on H.

[0700] 26. The method of claim 25, wherein the top-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.

[0701] 27. The method of claim 25, wherein F=H / P or F=H / P+offset, and P is an integer.

[0702] 28. The method of claim 27, wherein F=H>>(2+numIs4L), where numIs4L is equal to 1 if 4 adjacent samples are selected in the left adjacent column, and is equal to 0 otherwise.

[0703] 29. The method of claim 25, wherein S=H / Q, where Q is an integer.

[0704] 30. The method of claim 25, wherein S is 1 or greater.

[0705] 31. The method of claim 29 or 30, wherein S=Max(1,H>>(1+numIs4L)), where numIs4L is equal to 1 if 4 adjacent samples are selected in the left adjacent column, and numIs4L is equal to 0 otherwise.

[0706] 32. The method of claim 9 or 12, wherein numIs4L is equal to 1 if an upper adjacent sample is available, a left adjacent sample is available, and the current video block is encoded with a normal CCLM that is different from a first CCLM that uses only the left adjacent sample and different from a second CCLM that uses only the upper adjacent sample.

[0707] 33. The method of claim 25, wherein F=S / R, where R is an integer.

[0708] 34. The method of claim 25, wherein S=F / Z, and Z is an integer.

[0709] 35. A method according to any of clauses 26 to 34, wherein at least one of Kmax, F, S, or offset depends on a 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, or the third CCLM.

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

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

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

[0713] 39. The method of clause 20, wherein H is set to the height of the current image block plus the width of the current image block if the current image block's upper right neighbor is available.

[0714] 40. The method of claim 20, wherein if a left neighboring sample is not available, the selected chroma sample has height H, regardless of whether the current image block has a first CCLM that uses only upper neighboring samples.

[0715] 41. The method of claim 1, wherein W is set to the height of the current image block plus the width of the current image block if the neighboring block to the lower left of the current image block is available.

[0716] 42. The method of claim 1, wherein if the top neighboring sample is not available, the selected chroma sample has a number W regardless of whether the current image block has a first CCLM that uses only the left neighboring sample.

[0717] 43. The method of any of clauses 1 to 42, wherein the performing of the transformation includes generating the coded representation from the current block.

[0718] 44. The method of any of clauses 1 to 42, wherein performing the transformation includes generating the current block from the encoded representation.

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

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

[0721] The tenth set of paragraphs describes certain features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 18 and 19.

[0722] 1. A method for video processing, comprising the steps of 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, the current video block being a chroma block, and a coded representation of the video, and performing the conversion based on the determination.

[0723] 2. The method of claim 1, wherein the corresponding luma sample is obtained by downsampling.

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

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

[0726] 5. The method of 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 split into two arrays G0 and G1, each array containing two chroma samples and their corresponding luma samples.

[0727] 6. The two sequences 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}, one of the following: S0, S1, S2, S3 each include the four chroma samples and each further include a corresponding luma sample; The method according to item 5.

[0728] 7. The method according to item 6, in which upon comparison of two luma sample values ​​of G0[0] and G0[1], the chroma samples of G0[0] and their corresponding luma samples are exchanged with those of G0[1].

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

[0730] 9. The method of claim 6, wherein upon comparison of two luma sample values ​​of G1[0] and G1[1], the chroma samples of G1[0] and their corresponding luma samples are exchanged with those of G1[1].

[0731] 10. The method of claim 9, wherein if a luma sample value of G1[0] is greater than a luma sample value of G1[1], a chroma sample of G1[0] and its corresponding luma sample are swapped with those of G1[1].

[0732] 11. The method of claim 6, wherein upon comparison of two luma sample values ​​of G0[0] and 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].

[0733] 12. The method according to item 11, wherein if 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].

[0734] 13. The method of claim 6, in which upon comparison of two luma sample values ​​of G0[1] and G1[0], the chroma samples of G0[1] and their corresponding luma samples are exchanged with those of G1[0].

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

[0736] 15. The method according to clause 6, in which, upon comparison of two luma sample values ​​of G0[0], G0[1], G1[0], and G1[1], the following exchange operations are performed in sequence: i) an exchange operation of chroma samples of G0[0] and their corresponding luma samples with those of G0[1], ii) an exchange operation of chroma samples of G1[0] and their corresponding luma samples with those of G1[1], iii) an exchange operation of chroma samples of G0[0] or G0[1] and their corresponding luma samples with those of G0[1] or G1[1], and iv) an exchange operation of chroma samples of G0[1] and their corresponding luma samples with those of G1[0].

[0737] 16. The method of claim 6, wherein 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].

[0738] 17. The method of claim 6, wherein 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].

[0739] 18. The method according to clause 16 or 17, wherein the calculation of maxY and maxC or the calculation of minY and minC is performed after any of a plurality of exchange operations performed following a comparison of two luma sample values ​​of G0[0], G0[1], G1[0] and G1[1], the plurality of exchange operations including: i) an exchange operation of chroma samples of G1[0] and their corresponding luma samples with those of G1[1], ii) an exchange operation of chroma samples of G0[0] or G0[1] and their corresponding luma samples with those of G0[1] or G1[1], and iii) an exchange operation of chroma samples of G0[1] and their corresponding luma samples with those of G1[0].

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

[0741] 20. The method of 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.

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

[0743] 22. A method for video processing, comprising: selecting chroma samples based on position rules for conversion between a current video block of a video that is a chroma block and a coded 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 decision, the position rules specifying selecting chroma samples located within a row above and / or a column to the left of the current video block.

[0744] 23. The method of clause 22, wherein the top row and the left column have W samples and H samples, respectively, where W and H are the width and height of the current image block, respectively.

[0745] 24. The method of claim 22, wherein 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 upper adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0746] 25. The method of claim 22, wherein the position rules specify selecting chroma samples located within the top row and the top right row of the current image block, the top row and the top right row having W samples and H samples, respectively, where W and H are the width and height of the current image block, respectively.

[0747] 26. The method of claim 25, wherein only available samples in the top row and the top right row are selected.

[0748] 27. The method of claim 25, wherein the position rule is applied to the current video block encoded in a first CCLM mode that uses only upper neighboring samples to derive the CCLM.

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

[0750] 29. The method of any of clauses 23 to 28, wherein numSampT is set based on a rule specifying that if an upper neighboring sample is available, then numSampT is set equal to nTbW, and if an upper neighboring sample is not available, then numSampT is set equal to 0, where numSampT represents the number of chroma samples in an upper neighboring row used to derive the parameters of a cross-component linear model, and nTbW represents the width of the current video block.

[0751] 30. The method described in clause 29, wherein the 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 upper adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0752] 31. The method of any of clauses 23 to 28, wherein numSampT is set based on a rule that specifies that if upper neighboring samples are available and the current video block is encoded in a first CCLM mode that uses only upper neighboring samples to derive the CCLM, then numSampT is set equal to nTbW+Min(numTopRight, nTbH), and otherwise numSampT is set equal to 0, where numSampT represents the number of chroma samples in an upper neighboring 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 top-right neighboring samples.

[0753] 32. The method of claim 31, wherein the rule is applied to the current video block that is not coded in a normal CCLM mode that is different from a first CCLM mode that uses only upper adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0754] 33. The method of claim 22, wherein the position rules are specified to select chroma samples located within the left column and bottom-left column of the current video block, the left column and bottom-left column having H samples and W samples, respectively, where W and H are the width and height of the current video block, respectively.

[0755] 34. The method of claim 33, wherein only available samples in the left column and the bottom left column are selected.

[0756] 35. The method of claim 33, wherein the position rule is applied to the current video block encoded in a second CCLM mode that uses only left neighboring samples to derive the CCLM.

[0757] 36. The method of claim 33, wherein the position rule is applied when the row above is not available, the column to the left is available, and the current video block is encoded in a normal CCLM mode that is different from a first CCLM mode that uses only above adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0758] 37. The method of any of clauses 33 to 36, wherein numSampL is set based on a rule specifying that if a left neighboring sample is available, then numSampL is set equal to nTbH, and otherwise numSampL is set equal to 0, where numSampL represents the number of chroma samples in the left neighboring column used to derive parameters of the cross-component linear model, and nTbH represents the height of the current video block.

[0759] 38. The method of claim 37, wherein the 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 upper adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0760] 39. The method of any of clauses 33 to 36, wherein numSampL is set based on a rule that specifies that if left neighboring samples are available and the current video block is encoded in a second CCLM mode that uses only left neighboring samples to derive the CCLM, then numSampL is set equal to nTbH+Min(numLeftBelow, nTbW), and otherwise numSampL is set equal to 0, where numSampL represents the number of chroma samples in a left neighboring 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 left neighboring samples.

[0761] 40. The method of claim 39, wherein the rule is applied to the current video block that is not coded in a normal CCLM mode that is different from a first CCLM mode that uses only upper adjacent samples to derive the CCLM and that is also different from a second CCLM mode that uses only left adjacent samples to derive the CCLM.

[0762] 41. The method of any of clauses 22 to 40, wherein a luma sample corresponding to a selected chroma sample is used to derive the parameters of the cross-component linear model.

[0763] 42. The method of claim 41, wherein the luma samples are derived by downsampling.

[0764] 43. The method of any of clauses 1 to 42, wherein the performing of the transformation includes generating the coded representation from the current block.

[0765] 44. The method of any of clauses 1 to 42, wherein performing the transformation includes generating the current block from the encoded representation.

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

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

[0768] The eleventh set of paragraphs describes particular features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 20-22.

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

[0770] 2. The method of claim 1, wherein luma samples are not downsampled at locations outside the current video block that are not used to determine the parameters of the CCLM.

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

[0772] 4. The method of claim 3, wherein the encoding condition corresponds to a color format of the current image block.

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

[0774] 6. The method of claim 3, wherein the encoding condition corresponds to a color representation method of the current image block.

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

[0776] 8. The method of claim 3, wherein the chroma samples are downsampled and the determination depends on the position of the downsampled chroma samples.

[0777] 9. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM based on the chroma samples and the luma samples selected from a group of adjacent chroma samples based on a position rule.

[0778] 10. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM based on maximum and minimum values ​​of the chroma samples and the luma samples.

[0779] 11. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM that are fully determinable by two chroma samples and corresponding two luma samples.

[0780] 12. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM using a parameter table whose entries are searched for according to two chroma sample values ​​and two luma sample values.

[0781] 13. A method for image processing, comprising: determining, for conversion between a current image block of an image that is a chroma block and an encoded representation of the image, whether to derive maximum and / or minimum values ​​of luma and chroma components used to derive parameters of a cross-component linear model (CCLM) based on the availability of left and upper neighboring blocks of the current image block; and performing the conversion based on the determination.

[0782] 14. The method according to claim 13, wherein the maximum and / or minimum values ​​are not derived if the left neighboring block and the above neighboring block are not available.

[0783] 15. The method of claim 13, wherein the determination is based on a number of available neighboring samples of the current video block, the available neighboring samples being used to derive the parameters of the cross-component linear model.

[0784] 16. The method according to clause 15, wherein if numSampL==0 and numSampT==0, the maximum and / or minimum values ​​are not derived, numSampL and numSampT indicate the number of available adjacent samples from the left adjacent block and the number of available adjacent samples from the upper adjacent block, respectively, and 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.

[0785] 17. The method according to claim 15, wherein if numSampL+numSampT==0, the maximum and / or minimum values ​​are not derived, 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, and 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.

[0786] 18. The method of any of claims 1 to 17, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0787] 19. The method of any of claims 1 to 17, wherein performing the transformation includes generating the current block from the encoded representation.

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

[0789] 21. A computer program product stored on a non-transitory computer readable medium, comprising a program code for performing the method according to any one of clauses 1 to 19.

[0790] The twelfth set of paragraphs describes certain features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Example 23.

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

[0792] 2. The method of claim 1, wherein the encoding tool is a Local Illumination Compensation (LIC) tool that includes using a linear model of illumination changes in the current image block during the transformation.

[0793] 3. The method of claim 2, wherein the neighboring samples of the current video block and the neighboring samples of the reference block are selected based on a position rule.

[0794] 4. The method of claim 3, wherein the parameters of the encoding tool are determined based on maximum and minimum values ​​of the neighboring samples of the current video block and the neighboring samples of the reference block.

[0795] 5. The method of claim 2, wherein the parameters of the encoding tool are determined using a parameter table whose entries are searched for according to two adjacent samples of the current video block and two adjacent samples of the reference block.

[0796] 6. The method of claim 2, wherein the neighboring samples of the current video block and the neighboring samples of the reference block are downsampled to derive the parameters of the encoding tool.

[0797] 7. The method of claim 2, wherein the neighboring samples used to derive the parameters of the LIC tool do not include samples at a particular position within a row above and / or a column to the left of the current image block.

[0798] 8. The method according to claim 2, wherein the top left sample of the current image block has coordinates (x0, y0), and a sample having coordinates (x0, y0-1) is not used to derive parameters of the LIC tool.

[0799] 9. The method according to claim 2, wherein the top left sample of the current image block has coordinates (x0, y0), and a sample having coordinates (x0-1, y0) is not used to derive parameters of the LIC tool.

[0800] 10. The method of claim 7, wherein the particular position depends on the availability of the row above and / or the column to the left.

[0801] 11. The method of claim 7, wherein the specific position depends on a block dimension of the current image block.

[0802] 12. The method of claim 1, wherein the determination depends on the availability of the row above and / or the column to the left.

[0803] 13. The method of claim 2, wherein N adjacent samples of the current image block and N adjacent samples of the reference block are used to derive the parameters of the LIC tool.

[0804] 14. The method of claim 13, wherein N is 4.

[0805] 15. The method of claim 13, wherein the N neighboring samples of the current video block include N / 2 samples from a row above the current video block and N / 2 samples from a left column of the current video block.

[0806] 16. The method of clause 13, wherein N is equal to min(L,T), where T is the total number of available neighboring samples of the current video block, and L is an integer.

[0807] 17. The method of claim 13, wherein the N adjacent samples are selected based on the same rules applicable to selecting samples for deriving the parameters of the CCLM.

[0808] 18. The method of claim 13, wherein the N adjacent samples are selected based on the same rules applicable to selecting samples for deriving parameters of the first mode of the CCLM using only the upper adjacent samples.

[0809] 19. The method according to claim 13, wherein the N adjacent samples are selected based on the same rules applicable to selecting samples for deriving parameters of a second mode of the CCLM using only left adjacent samples.

[0810] 20. The method of claim 13, wherein the N neighboring samples of the current image block are selected based on availability of a row above or a column to the left of the current image block.

[0811] 21. A method for video processing, comprising: determining parameters of a local illumination compensation (LIC) tool based on N adjacent samples of the current video block and N corresponding adjacent samples of a reference block for converting between a current video block of a video and a coded representation of the video, the N adjacent samples of the current video block being selected based on positions of the N adjacent samples; and performing the conversion based on the determination, wherein the LIC tool uses a linear model of illumination changes in the current video block during the conversion.

[0812] 22. The method of claim 21, wherein the N neighboring samples of the current image block are selected based on a width and height of the current image block.

[0813] 23. The method of claim 21, wherein the N neighboring samples of the current video block are selected based on availability of neighboring blocks of the current video block.

[0814] 24. The method of claim 21, wherein the N neighboring samples of the current video block are selected with a first position offset value (F) and a step value (S) that depend on a dimension of the current video block and availability of neighboring blocks.

[0815] 25. The method of any of clauses 1 to 24, wherein the current image block is affine coded.

[0816] 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, the current video block being a chroma block, and a coded representation of the video; and performing the conversion based on the determining, wherein some of the chroma samples are obtained by a padding operation, and the chroma samples and the corresponding luma samples are grouped into two arrays G0 and G1, each array containing two chroma samples and the corresponding luma sample.

[0817] 27. The method according to clause 26, wherein if the sum of cntT and cntL is equal to 2, the following operations are performed in order: 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 indicate the number of samples selected from the upper adjacent block and the left adjacent block, respectively, and pSelComp[0] to pSelComp[3] indicate pixel values ​​of color components of the corresponding samples selected.

[0818] 28. The method of claim 26, wherein the determining of the parameters includes initializing values ​​of G0[0], G0[1], G1[0], and G1[1].

[0819] 29. The method of claim 28, wherein G0[0] = 0, G0[1] = 2, G1[0] = 1, and G1[1] = 3.

[0820] 30. The method of claim 28, wherein the determination of the parameters further includes, after the initialization of the values, comparing two luma sample values ​​of G0[0] and G0[1] and replacing the chroma samples of G0[0] and their corresponding luma samples with those of G0[1].

[0821] 31. The method of claim 30, wherein if a luma sample value of G0[0] is greater than a luma sample value of G0[1], a chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].

[0822] 32. The method of claim 28, wherein the determination of the parameters further includes, after the initialization of the values, comparing two luma sample values ​​of G1[0] and G1[1] and replacing chroma samples of G1[0] and their corresponding luma samples with those of G1[1].

[0823] 33. The method of clause 32, wherein if a luma sample value of G1[0] is greater than a luma sample value of G1[1], a chroma sample of G1[0] and its corresponding luma sample are swapped with those of G1[1].

[0824] 34. The method of claim 28, wherein the determination of the parameters further includes, after the initialization of the values, comparing two luma sample values ​​of G0[0] and G1[1] and replacing chroma samples and their corresponding luma samples of G0[0] or G0[1] with those of G1[0] or G1[1].

[0825] 35. The method of clause 34, wherein if 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].

[0826] 36. The method of claim 28, wherein the determination of the parameters further includes, after the initialization of the values, comparing two luma sample values ​​of G0[1] and G1[0] and replacing the chroma samples of G0[1] and their corresponding luma samples with those of G1[0].

[0827] 37. The method of clause 36, wherein if a luma sample value of G0[1] is greater than a luma sample value of G1[0], a chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].

[0828] 38. The method according to clause 28, wherein the determination of the parameters further comprises, after the initialization of the values, performing, upon comparison of two luma sample values ​​of G0[0], G0[1], G1[0], and G1[1], the following exchange operations in sequence: i) an exchange operation of chroma samples of G0[0] and their corresponding luma samples with those of G0[1], ii) an exchange operation of chroma samples of G1[0] and their corresponding luma samples with those of G1[1], iii) an exchange operation of chroma samples of G0[0] or G0[1] and their corresponding luma samples with those of G0[1] or G1[1], and iv) an exchange operation of chroma samples of G0[1] and their corresponding luma samples with those of G1[0].

[0829] 39. The method of any of clauses 1 to 38, wherein the performing of the transformation includes generating the encoded representation from the current block.

[0830] 40. The method of any of clauses 1 to 38, wherein performing the transformation includes generating the current block from the encoded representation.

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

[0832] 42. A computer program product stored on a non-transitory computer readable medium, comprising a program code for performing the method according to any one of clauses 1 to 40.

[0833] From the foregoing, it will be understood that, although specific embodiments of the technology disclosed herein have been described herein for purposes of illustration, various modifications may be made without departing from the scope of the invention, and, accordingly, the technology disclosed herein is not to be limited, except as by the appended claims.

[0834] Implementations of the subject matter and functional operations described in this patent document can be embodied in various systems, digital electronic circuits, or computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in one or more combinations of these. Implementations of the subject matter described in this specification can be implemented as one or more computer program products, i.e., as one or more modules of computer program instructions encoded on a tangible, non-transitory computer-readable medium for execution by or for controlling the operation of a data processing apparatus. A computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter producing a machine-readable propagated signal, or a combination of one or more of these. The term "data processing unit" or "data processing apparatus" encompasses any apparatus, device, and machine that processes data, including, by way of example, a programmable processor, a computer, or multiple processors or computers. An apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, such as code that constitutes a processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations of these.

[0835] 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. A 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 cooperating files (e.g., a file that stores one or more modules, subprograms, or portions of code). A computer program may be deployed to be executed on one computer or to be executed on multiple computers, located at one site, or distributed across multiple sites and interconnected by a communication network.

[0836] The processes and logic flows described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. These processes and logic flows may also be performed by, and apparatus may be implemented as, special purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).

[0837] Processors suitable for executing computer programs include, by way of example, both general purpose and special purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, a processor receives instructions and data from a read-only memory or a random access memory, or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer also includes one or more mass storage devices for storing data, e.g., magnetic disks, magneto-optical disks, or optical disks, or is operatively coupled to receive data from or transfer data to the 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 memory may be supplemented by, or incorporated in, dedicated logic circuitry.

[0838] The specification, together with the drawings, are intended to be merely illustrative, by which I mean examples. As used herein, the use of "or" is intended to include "and / or" unless the context clearly indicates otherwise.

[0839] Although this patent document contains numerous details, they should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of a particular invention. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in a particular combination, and even initially claimed as such, in some cases one or more features from a claimed combination may be removed from the combination, or the claimed combination may be subject to subcombinations or variations of the subcombinations.

[0840] Similarly, although the figures show operations in a particular order, this should not be understood as requiring that those operations be performed in the particular order or sequence shown, or that all of the operations shown be performed, to achieve desired results, nor should the separation of various system components in the embodiments described in this patent document be understood as requiring such separation in all embodiments.

[0841] Only a few implementations and examples have been described; other implementations, extensions and variations may be made based on what is described and illustrated in this patent document.

Claims

1. A method for processing video data, For the conversion between the current video block of the video, which is a chroma block, and the bitstream of the video, the steps include determining the values ​​of the parameters of the cross-component linear model (CCLM) in CCLM mode based on two chroma values ​​denoted as minC and maxC, and two chroma values ​​denoted as minY and maxY, Using the CCLM, a step of deriving a predicted sample of the current video block based on the reconstructed sample of the luma block corresponding to the current video block and the parameters of the CCLM, The steps include: performing the transformation based on the predicted sample of the current video block; It has, If maxY is not equal to minY, one of the parameters is determined based on a lookup table using an index derived based on the difference between maxY and minY. If maxY is equal to minY, the predicted sample of the current video block is based on minC, and not on minY, maxY, and maxC. maxY, maxC, minY, and minC are derived from two or four indices, the indices are mapped to chroma samples and corresponding luma samples, and in response to the use of two original indices and two mapped chroma samples and two corresponding luma samples to derive maxY, maxC, minY, and minC, a padding operation is applied to generate two padded chroma samples and two padded luma samples. The two original indices are denoted as S0 and S1, the two mapped indices to which the two padded chroma samples and the two padded luma samples are mapped are denoted as S2 and S3, and the padding operation is, 1) The chromatic sample mapped to S0 and the corresponding luma sample are copied to the chromatic sample mapped to S3 and the corresponding luma sample, respectively; 2) The chromatic sample and corresponding luma sample mapped to S1 are copied to the chromatic sample and corresponding luma sample mapped to S2, respectively; 3) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S0 and the corresponding luma sample, respectively; 4) The chromatic sample mapped to S3 and the corresponding luma sample are copied to the chromatic sample mapped to S1 and the corresponding luma sample, respectively. This is the order in which it is carried out. method.

2. minC and maxC are derived based on two or more selected chroma samples from adjacent chroma samples of the current video block, and the two or more selected chroma samples are selected based on the CCLM mode of the current video block and the availability of the adjacent chroma samples. The two or more chroma samples are further selected based on W and / or H, and only the adjacent chroma samples above are available, and in response that the CCLM mode of the current image block is the first CCLM mode and W is equal to 2, exactly two selected chroma samples are selected from the adjacent chroma samples above. The positions of the two or more selected chroma samples are derived based on a first position offset value (F) and a step value (S), where F and S are derived based at least on the availability of the adjacent chroma samples in the current image block and the dimensions of the current image block. F=Floor(M / 2 i ) where M is the number of adjacent chromat samples used to derive the selected chromat sample in the horizontal direction, or F = Floor(N / 2 i ) where N is the number of adjacent chroma samples used to derive the selected chroma sample in the vertical direction, i is equal to 2 or 3, and the Floor operation is used to obtain the integer part of the number, S=Max(1, Floor(M / 2 j )) or S = Max(1, Floor(N / 2) j )) where j is equal to 1 or 2, the Max operation is used to obtain the maximum value among multiple numbers, The method according to claim 1.

3. Both M and N are less than or equal to W + H, and are determined based on the CCLM mode of the current video block, where W and H are the width and height of the current video block, respectively. In response that the CCLM mode is the first CCLM mode and the above adjacent chromatic sample is available, M is equal to W. The method according to claim 2.

4. In response to selecting two chromatic samples horizontally, the positions of the two selected chromatic samples horizontally are Floor(M / 4) and Floor(M / 4) + Floor(M / 2). In response to selecting two chromatic samples in the vertical direction, the positions of the two selected chromatic samples in the vertical direction are Floor(N / 4) and Floor(N / 4) + Floor(N / 2). The method according to claim 2.

5. In response to selecting four chroma samples horizontally, the positions of the four selected chroma samples horizontally are Floor(M / 8), Floor(M / 8) + Floor(M / 4), Floor(M / 8) + 2*Floor(M / 4), and Floor(M / 8) + 3*Floor(M / 4). In response to selecting four chroma samples vertically, the positions of the four selected chroma samples vertically are Floor(N / 8), Floor(N / 8) + Floor(N / 4), Floor(N / 8) + 2*Floor(N / 4), and Floor(N / 8) + 3*Floor(N / 4). The method according to claim 2.

6. A step of determining whether the luma sample is downsampled in order to derive the values ​​of the parameters of the cross-component linear model based on the color format of the current video block, The method according to claim 1, further comprising:

7. The method according to claim 6, wherein the luma sample is downsampled in response to the color format being 4:2:0 or 4:2:

2.

8. When the CCLM mode is the second CCLM mode, in response that only the left adjacent chroma sample is available and the height of the current image block is equal to 2, exactly two chroma samples are selected from the left adjacent chroma sample. When the CCLM mode is the second CCLM mode, in response to the fact that only the left adjacent chroma sample is available and the height of the current image block is greater than 2, exactly four chroma samples are selected from the left adjacent chroma sample. The method according to claim 1.

9. When the CCLM mode is the third CCLM mode, in response that only the upper adjacent chroma samples are available and the width of the current image block is equal to 2, exactly two chroma samples are selected from the upper adjacent chroma samples. When the CCLM mode is the third CCLM mode, in response that only the above adjacent chroma samples are available and the width of the current image block is greater than 2, exactly four chroma samples are selected from the above adjacent chroma samples. The method according to claim 1.

10. The method according to claim 1, wherein the parameters of the CCLM are derived based on the value of Floor(Log2(maxY-minY)), and Floor(x) is a floor function that outputs the integer part of x.

11. The method according to claim 1, wherein the conversion includes encoding the current video block into the bitstream.

12. The method according to claim 1, wherein the conversion includes decoding the current video block from the bitstream.

13. A device for processing video data, comprising a processor and non-temporary memory having instructions, wherein when an instruction is executed by the processor, the processor receives For the conversion between the current video block of the video, which is a chroma block, and the bitstream of the said video, the parameter values ​​of the cross-component linear model (CCLM) in CCLM mode are determined based on two chroma values ​​denoted as minC and maxC, and two luma values ​​denoted as minY and maxY. Using the CCLM, predictive samples of the current video block are derived based on the reconstructed sample of the luma block corresponding to the current video block and the parameters of the CCLM. The transformation is performed based on the predicted samples of the current video block. If maxY is not equal to minY, one of the parameters is determined based on a lookup table using an index derived based on the difference between maxY and minY. If maxY is equal to minY, the predicted sample of the current video block is based on minC, and not on minY, maxY, and maxC. maxY, maxC, minY, and minC are derived from two or four indices, the indices are mapped to chroma samples and corresponding luma samples, and in response to the use of two original indices and two mapped chroma samples and two corresponding luma samples to derive maxY, maxC, minY, and minC, a padding operation is applied to generate two padded chroma samples and two padded luma samples. The two original indices are denoted as S0 and S1, the two mapped indices to which the two padded chroma samples and the two padded luma samples are mapped are denoted as S2 and S3, and the padding operation is, 1) The chromatic sample mapped to S0 and the corresponding luma sample are copied to the chromatic sample mapped to S3 and the corresponding luma sample, respectively; 2) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S2 and the corresponding luma sample, respectively; 3) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S0 and the corresponding luma sample, respectively; 4) The chromatic sample mapped to S3 and the corresponding luma sample are copied to the chromatic sample mapped to S1 and the corresponding luma sample, respectively. This is the order in which it is carried out. Device.

14. A non-temporary computer-readable storage medium storing instructions, wherein the instructions are transmitted to a processor. For the conversion between the current video block of the video, which is a chroma block, and the bitstream of the said video, the values ​​of the parameters of the cross-component linear model (CCLM) are determined based on two chroma values ​​denoted as C0 and C1, two luma values ​​denoted as L0 and L1, and a lookup table. Using the CCLM, predictive samples of the current video block are derived based on the reconstructed sample of the luma block corresponding to the current video block and the parameters of the CCLM. The transformation is performed based on the predicted samples of the current video block. If maxY is not equal to minY, one of the parameters is determined based on a lookup table using an index derived based on the difference between maxY and minY. If maxY is equal to minY, the predicted sample of the current video block is based on minC, and not on minY, maxY, and maxC. maxY, maxC, minY, and minC are derived from two or four indices, the indices are mapped to chroma samples and corresponding luma samples, and in response to the use of two original indices and two mapped chroma samples and two corresponding luma samples to derive maxY, maxC, minY, and minC, a padding operation is applied to generate two padded chroma samples and two padded luma samples. The two original indices are denoted as S0 and S1, the two mapped indices to which the two padded chroma samples and the two padded luma samples are mapped are denoted as S2 and S3, and the padding operation is, 1) The chromatic sample mapped to S0 and the corresponding luma sample are copied to the chromatic sample mapped to S3 and the corresponding luma sample, respectively; 2) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S2 and the corresponding luma sample, respectively; 3) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S0 and the corresponding luma sample, respectively; 4) The chromatic sample mapped to S3 and the corresponding luma sample are copied to the chromatic sample mapped to S1 and the corresponding luma sample, respectively. This is the order in which it is carried out. Computer-readable storage medium.

15. A method for storing a video bitstream, The steps include determining the parameter values ​​of the cross-component linear model (CCLM) in CCLM mode based on two chroma values ​​denoted as minC and maxC, and two luma values ​​denoted as minY and maxY, for the current video block of the video which is a chroma block, and Using the CCLM, a step of deriving a predicted sample of the current video block based on the reconstructed sample of the luma block corresponding to the current video block and the parameters of the CCLM, The steps include generating the bitstream based on the predicted samples of the current video block, The steps include storing the bitstream in a non-temporary computer-readable recording medium, It has, If maxY is not equal to minY, one of the parameters is determined based on a lookup table using an index derived based on the difference between maxY and minY. If maxY is equal to minY, the predicted sample of the current video block is based on minC, and not on minY, maxY, and maxC. maxY, maxC, minY, and minC are derived from two or four indices, the indices are mapped to chroma samples and corresponding luma samples, and in response to the use of two original indices and two mapped chroma samples and two corresponding luma samples to derive maxY, maxC, minY, and minC, a padding operation is applied to generate two padded chroma samples and two padded luma samples. The two original indices are denoted as S0 and S1, the two mapped indices to which the two padded chroma samples and the two padded luma samples are mapped are denoted as S2 and S3, and the padding operation is, 1) The chromatic sample mapped to S0 and the corresponding luma sample are copied to the chromatic sample mapped to S3 and the corresponding luma sample, respectively; 2) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S2 and the corresponding luma sample, respectively; 3) The chromatic sample mapped to S1 and the corresponding luma sample are copied to the chromatic sample mapped to S0 and the corresponding luma sample, respectively; 4) The chromatic sample mapped to S3 and the corresponding luma sample are copied to the chromatic sample mapped to S1 and the corresponding luma sample, respectively. This is the order in which it is carried out. method.