Complexity Reduction in Parameter Derivation for Intra Prediction
A simplified linear model derivation for cross-component prediction in video encoding addresses inefficiencies in existing technologies, improving encoding efficiency and reducing complexity, thereby enhancing video coding performance.
Patent Information
- Application Number
- JP2021523511
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-03-26
- Filing Date
- 2019-11-06
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2039-11-06
AI Technical Summary
Existing video coding technologies face challenges in achieving efficient compression and reduced computational complexity, particularly in cross-component prediction methods for video encoding, which can lead to increased bandwidth demands and processing overhead.
The implementation of a simplified linear model derivation for cross-component linear model (CCLM) prediction mode, including methods such as single and multiple model CCLM, multi-directional LM, and local illumination compensation, to enhance video encoding efficiency and reduce complexity.
The proposed methods improve video encoding efficiency and reduce computational complexity, enhancing runtime performance and compatibility with existing and future video coding standards like HEVC and VVC.
Smart Images

Figure 0007714460000017 
Figure 0007714460000018 
Figure 0007714460000019
Abstract
Description
[Technical Field]
[0001] This The application for is a national phase application of International Application PCT / CN2019 / 115999 filed on November 6, 2019, and the international application 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, International Patent Application No. PCT / CN2019 / 075874, filed on February 24, 2019, International Patent Application No. PCT / CN2019 / 075993, filed on February 26, 2019, International Patent Application No. PCT / CN2019 / 076195, filed on March 24, 2019, International Patent Application No. PCT / CN2019 / 079396, filed on March 25, 2019, International Patent Application No. PCT / CN2019 / 079431 and International Patent Application No. PCT / CN2019 / 079769, filed on March 26, 2019. claims priority thereto. Above The entire disclosure of the aforementioned application is incorporated by reference as part of the disclosure of this application.
[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 on the Internet and other digital communication 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, and for example, a simplified linear model derivation related to a cross-component linear model (CCLM) prediction mode in video encoding is described. The described methods can be applied to both existing video encoding standards (e.g., HEVC (High Efficiency Video Coding)) and future video encoding standards (e.g., VVC (Versatile Video Coding)) or codecs.
[0005] In a representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model based on two chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the two chroma samples are selected from the group based on a position rule, and performing the conversion based on the determination.
[0006] In a representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model based on chroma samples selected based on the positions of the chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the selected chroma samples are selected from a group of adjacent chroma samples, and performing the conversion based on the determination.
[0007] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining, for a current video block, a group of adjacent chroma samples used to derive a set of values for parameters of a linear model, where the width and height of the current video block are W and H respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples; and performing a conversion between the current video block and an encoded representation of the video including the current video block based on the linear model.
[0008] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method is a method for video processing, and includes determining a plurality of sets of parameters for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where each set of parameters defines a cross-component linear model (CCLM) and is derived from a group of corresponding chroma samples at corresponding chroma sample positions; determining parameters for a final CCLM based on the plurality of sets of parameters; and performing the conversion based on the final CCLM.
[0009] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on minimum and maximum chroma and luma samples among N groups of chroma and luma samples selected from adjacent luma and chroma samples of the current video block for conversion between the current video block of the video and an encoded representation of the video; and performing the conversion using the CCLM.
[0010] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model that can be completely determined by two chroma samples and corresponding two luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, and performing the conversion based on the determination.
[0011] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model using a parameter table for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where entries in the parameter table are retrieved according to two chroma sample values and two luma sample values, and performing the conversion based on the determination.
[0012] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a final prediction P(x, y) of a chroma sample at a position (x, y) within the current video block as a combination of prediction results of a plurality of cross-component linear models (MCCLMs), where the MCCLMs are selected based on the position (x, y) of the chroma sample, and performing the conversion based on the final prediction.
[0013] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for the conversion between a current video block of a video that is a chroma block and an encoded representation of the video, performing a first determination as to whether a first cross-component linear model (CCLM) that uses only left adjacent samples is used to predict samples of the current video block, and / or a second determination as to whether a second cross-component linear model (CCLM) that uses only upper adjacent samples is used to predict samples of the current video block, and based on the first determination and / or the second determination, performing the conversion.
[0014] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a context used to encode a flag for arithmetic encoding the current video block into the encoded representation of the video for the conversion between the current video block of the video and the encoded representation of the video, where the context is based on whether an upper left adjacent block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode, and based on the determination, performing the conversion.
[0015] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining an encoding order for one or more indications of a direct intra prediction mode (DM mode) and a linear intra prediction mode (LM mode) based on an encoding mode of one or more adjacent blocks of the current video block for the conversion between the current video block of the video and the encoded representation of the video, and based on the determination, performing the conversion.
[0016] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction based on refined chroma and luma samples of the current video block for conversion between the current video block of the video and the encoded representation of the video, and performing the conversion based on the determination.
[0017] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction by selecting adjacent samples based on the positions of the maximum adjacent sample or the minimum adjacent sample for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and performing the conversion based on the determination.
[0018] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters related to linear model prediction or cross-color component prediction based on the primary color component and the secondary color component for conversion between the current video block of the video and the encoded 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, and performing the conversion based on the determination.
[0019] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing downsampling on chroma and luma samples of adjacent blocks of a current video block, determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and performing the conversion based on the determination.
[0020] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on two or more chroma samples from a group of adjacent chroma samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, where the two or more chroma samples are selected based on the encoding mode of the current video block, and performing the conversion based on the determination.
[0021] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper adjacent samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, where W is an integer, and performing the conversion based on the determination.
[0022] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on H available adjacent samples to the left of the current video block of the video, which is a chroma block, for conversion between the current video block and the encoded representation of the video, and performing the conversion based on the determination.
[0023] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and performing the conversion based on the determination.
[0024] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method has a step of selecting chroma samples based on a position rule for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, where the chroma samples are used to derive parameters of a cross-component linear model (CCLM), and a step of performing the conversion based on the determination, and the position rule is defined to select chroma samples located within the row above and / or the column to the left of the current video block.
[0025] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a position where luma samples are downsampled for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, the downsampled luma samples being used to determine parameters of a cross-component linear model (CCLM) based on chroma samples and the downsampled luma samples, and the downsampled luma samples being at positions corresponding to positions of the chroma samples used to derive the parameters of the CCLM; and performing the conversion based on the determination.
[0026] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining a method for deriving parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on encoding conditions associated with the current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination.
[0027] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining whether to derive maximum and / or minimum values of luma components and chroma components used to derive parameters of a cross-component linear model (CCLM) based on the availability of an adjacent block to the left and an adjacent block above the current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination.
[0028] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of an encoding tool using a linear model based on selected adjacent samples of the current video block of the video and corresponding adjacent samples of a reference block for conversion between the current video block of the video and the encoded representation of the video, and performing the conversion based on the determination.
[0029] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method is a step of 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 conversion between the current video block of the video and the encoded representation of the video, wherein the N adjacent samples of the current video block are selected based on the positions of the N adjacent samples, and performing the conversion based on the determination, and the LIC tool uses a linear model of illumination change in the current video block during the conversion.
[0030] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes determining parameters of a cross-component linear model (CCLM) based on chroma samples and corresponding luma samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video, and performing the conversion based on the determination, wherein a part of the chroma samples is obtained by a padding operation, and the chroma samples and the corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and corresponding luma samples.
[0031] In yet another representative aspect, the above method is embodied in the form of processor-executable code and stored in a computer-readable program medium.
[0032] In yet another representative aspect, an apparatus configured or operable to execute the above-described method is disclosed. The apparatus may include a processor programmed to implement this method.
[0033] In yet another representative aspect, a video decoder device may implement the methods described herein.
[0034] The above and other aspects and features of the disclosed technology are described in more detail in the drawings, the specification, and the claims.
Brief Description of the Drawings
[0035]
Figure 1
Figure 2
Figure 3A
Figure 3B
Figure 4A
Figure 4B
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19A
Figure 19B
Figure 20A
Figure 20B
Figure 21
Figure 22
Figure 23A
Figure 23B
Figure 24A
Figure 24B
Figure 24C
Figure 24D
Figure 24E
Figure 25A
Figure 25B
Figure 26A
Figure 26B
Figure 27A
Figure 27B
Figure 28A
Figure 28B
Figure 28C
Figure 29A
Figure 29B
Figure 29C
Figure 30A
Figure 30B
Figure 31A
Figure 31B
Figure 32
DETAILED DESCRIPTION OF THE INVENTION
[0036] Due to the increasing demands for higher-resolution video, video coding methods and technologies have become ubiquitous in modern technology. A video codec typically includes electronic circuitry or software for compressing or decompressing digital video and is constantly being improved to provide higher coding efficiency. A video codec converts uncompressed video into a compressed format or vice versa. There are complex relationships among video quality, the amount of data used to represent the video (determined by the bitrate), the complexity of the encoding and decoding algorithms, the sensitivity to data loss and errors, ease of editing, random access, and end-to-end delay (latency). Compression formats usually conform to standard video compression specifications such as, for example, the HEVC (High Efficiency Video Coding) standard (also known as H.265 or MPEG-H Part 2), the upcoming VVC (Versatile Video Coding) standard, or other current and / or future video coding standards.
[0037] Embodiments of the disclosed technology can be applied to existing video coding standards (e.g., HEVC, H.265) and future standards to improve runtime performance. In this document, section headings are used to improve readability, but those section headings do not limit the description or embodiments (and / or implementations) to only their respective sections.
[0038] 1 Embodiments of Cross-Component Prediction Cross-component prediction is a form of chroma-to-luma prediction approach that has a well-balanced trade-off between complexity and compression efficiency improvement.
[0039] 1.1 Example of Cross-Component Linear Model (CCLM) In some embodiments, also, to reduce cross-component redundancy, a cross-component linear model (CCLM) prediction mode (also referred to as LM) is used in JEM, where chroma samples are
Number
[0040] Here, pred C (i,j) represents the predicted chroma sample within the CU, recL’(i,j) represents the downsampled reconstructed luma samples of the same CU in the case of color format 4:2:0 or 4:2:2, and recL’(i,j) represents the reconstructed luma samples of the same CU in the case of color format 4:4:4. The CCLM parameters α and β are
Number
Number
[0041] Here, L(n) represents the reconstructed luma samples above and to the left that are downsampled (in the case of color format 4:2:0 or 4:2:2) or original (in the case of color format 4:4:4), C(n) represents the 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-encoded block.
[0042] In some embodiments, for square-shaped encoded blocks, the above two equations are directly applied. In other embodiments, for non-square encoded blocks, first, the adjacent samples of the longer boundary are subsampled so that they have the same number of samples as the shorter boundary. FIG. 1 shows the sample arrangement of the current block involved in the CCLM mode and the positions of the reconstructed samples on the left and above.
[0043] In some embodiments, this regression error minimization calculation is performed not simply as an encoder search process but as part of the decoding process, and thus there is no syntax used to convey the α and β values.
[0044] In some embodiments, the CCLM prediction mode also includes prediction between two chroma components. For example, the Cr (red difference) component is predicted from the Cb (blue difference) component. Instead of using the reconstructed sample signal, the CCLM Cb-to-Cr prediction is applied in the residual domain. This adds the weighted reconstructed Cb residual to the original Cr intra prediction to obtain the final Cr prediction:
Equation
[0045] Here, resi Cb ’(i,j) indicates the reconstructed Cb residual sample at position (i,j).
[0046] In some embodiments, the scaling factor α can be derived in a similar manner as in CCLM luma-to-chroma prediction. The only difference is the addition of the regression cost to the default α value in the error function, and as a result, the derived scaling factor is:
Equation
[0047] where Cb(n) represents adjacent reconstructed Cb samples, Cr(n) represents adjacent reconstructed Cr samples, and λ is equal to Σ(Cb(n)·Cb(n)) >> 9.
[0048] In some embodiments, the CCLM luma-to-chroma prediction mode is added as one additional chroma intra prediction mode. On the encoder side, one more RD cost check for the chroma component is added to select the chroma intra prediction mode. When an intra prediction mode other than the CCLM luma-to-chroma prediction mode is used for the chroma component of a CU, CCLM Cb-to-Cr prediction is used for Cr component prediction.
[0049] 1.2 Examples of Multiple Model CCLM In JEM, there are two CCLM modes: the single model CCLM mode and the multiple model CCLM mode (MMLM). As the name implies, the single model CCLM mode uses one linear model to predict chroma samples from luma samples for the entire CU, while in MMLM, two models can exist.
[0050] In MMLM, the adjacent luma samples and adjacent chroma samples of the current block are classified into two groups, and each group is used as a training set for deriving a linear model (i.e., specific α and β are derived for a specific group). Furthermore, the samples of the current luma block are also classified based on the same rules as the classification of adjacent luma samples.
[0051] Figure 2 shows an example of classifying adjacent samples into two groups. A threshold is calculated as the average value of adjacent reconstructed luma samples. Adjacent samples where Rec’L[x,y] ≤ Threshold are classified into Group 1, and adjacent samples where Rec’L[x,y] > Threshold are classified into Group 2.
Number
[0052] 1.3 Example of Downsampling Filter in CCLM In some embodiments, for the 4:2:0 chroma format where 4 luma samples correspond to 1 chroma sample, in order to perform chroma prediction, the reconstructed luma block needs to be downsampled to match the size of the chroma signal. The default downsampling filter used in the CCLM mode is as follows:
Number
[0053] Here, for the downsampling, a "Type 0" phase relationship as shown in Figure 3A, such as horizontal collocated sampling and vertical inter-grid sampling, is assumed for the position of the chroma sample with respect to the position of the luma sample.
[0054] The exemplary 6-tap downsampling filter defined in (6) is used as the default filter in both the single-model CCLM mode and the multi-model CCLM mode.
[0055] In some embodiments, in the MMLM mode, the encoder can selectively select one of four additional luma downsampling filters for application to the prediction in the CU and send a filter index indicating which of them is used. The four selectable luma downsampling filters for the MMLM mode, as shown in Figure 3B, are as follows: [Number] as follows.
[0056] 1.4 Multi-Directional LM (MDLM) This existing implementation proposes a multi-directional LM (MDLM). In MDLM, two additional CCLM modes are proposed, namely, LM-A where the linear model parameters are derived based only on the top (or above) adjacent samples as shown in Figure 4A, and LM-L where the linear model parameters are derived based only on the left adjacent samples as shown in Figure 4B.
[0057] 1.5 Simplification of the Cross-Component Linear Model This existing implementation proposes to replace the LMS algorithms for the linear model parameters α and β with a linear equation, so-called two-point method. The two points (a couple of Luma and Chroma) (A, B) are the minimum and maximum values within the set of adjacent Luma samples as shown in Figure 5.
[0058] Here, the linear model parameters α and β are obtained according to the following equations: α = (y B - y A ) / (x B - x A ), and β = y A - αx A are obtained according to.
[0059] In some embodiments, the division operation required for the derivation of α is avoided and replaced by multiplication and shift as follows: a = 0; Shift = 16; int shift = (uiInternalBitDepth > 8)? uiInternalBitDepth - 9 : 0; int add = shift? 1 << (shift - 1) : 0; int diff = (MaxLuma - MinLuma + add) >> shift; if (diff > 0) { int div = ((MaxChroma - MinChroma)*g_aiLMDivTableLow[diff - 1] + 32768) >> 16; a = (((MaxChroma - MinChroma)*g_aiLMDivTableHigh[diff - 1] + div + add) >> shift); } b = MinLuma[1] - ((a*MinLuma[0]) >> iShift);
[0060] Here, S is set equal to iShift, α is set equal to a, and β is set equal to b. Also, g_aiLMDIVTableLow and g_ailLMDIVTableHigh are two tables each having 512 entries, and each entry stores a 16 - bit integer.
[0061] To derive the chroma predictor, for the current VTM implementation, the multiplication is
Number
[0062] Since the shift S always has the same value, this implementation is also simpler than the current VTM implementation.
[0063] 1.6 Examples of CCLM in VVC 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. MDLM and a simplified CCLM are adopted in VTM-3.0.
[0064] 1.7 Examples of Local Illumination Compensation in JEM Local Illumination Compensation (LIC) is based on a linear model for illumination change using a scaling factor a and an offset b. Also, it is adaptively enabled or disabled for each coding unit (CU) to be inter-mode coded.
[0065] When LIC is applied to a CU, the least squares error method is adopted to derive the parameters a and b by using the adjacent samples of the current CU and their corresponding reference samples. More specifically, as illustrated in FIG. 32, the subsampled (2:1 subsampling) adjacent samples of the CU and the corresponding pixels in the reference picture (identified by the motion information of the current CU or the current sub-CU) are used. The IC parameters are derived and applied separately for each prediction direction.
[0066] When a CU is coded in 2N×2N merge mode, the LIC flag is copied from the adjacent block in the same way as the motion information copy in the merge mode. Otherwise, for the CU, the LIC flag is signaled to indicate whether LIC is applied or not.
[0067] When LIC is enabled for a picture, an additional CU-level RD check is required to determine whether LIC is applied to the CU. When LIC is enabled for the CU, for integer pixel motion search and fractional pixel motion search, mean-removed sum of absolute difference (MR-SAD) and mean-removed sum of absolute Hadamard-transformed difference (MR-SATD) are used instead of SAD and SATD, respectively.
[0068] To reduce the coding complexity, in JEM, a coding scheme is applied where LIC is disabled for the whole picture when there is no obvious illumination change between the current picture and its reference picture. To identify this situation, the histogram of the current picture and the histograms of all reference pictures of the current picture are calculated at the encoder. If the histogram difference between the current picture and all reference pictures of the current picture is smaller than a given threshold, LIC is disabled for the current picture, and otherwise, LIC is enabled for the current picture.
[0069] 2 Examples of drawbacks in existing implementations The current implementation introduces a dichotomy 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 look-up tables with a total of 1024 entries to store 16-bit numbers are introduced, requiring 2K ROM memory, which is not desirable in hardware design.
[0072] Exemplary Method for Cross-Component Prediction in Video Symbolization Embodiments of the technology disclosed herein overcome the drawbacks of existing implementations, thereby providing video symbolization with higher symbolization efficiency and lower computational complexity. The simplified linear model derivation for cross-component prediction based on the disclosed technology can strengthen both existing and future video symbolization standards, as will become apparent in the following examples described for various implementations. The examples of the disclosed technology provided below are illustrative of general concepts and are not meant to be construed as limiting. In one example, various features described in these examples can be combined unless explicitly shown otherwise.
[0073] In the following examples and methods, the term "LM method" includes, but is not limited to, the LM mode in JEM or VTM, the MMLM mode in JEM, the left LM mode that uses only the left adjacent sample to derive a linear model, the upper LM mode that uses only the upper adjacent sample to derive a linear model, or other types of methods that utilize luma reconstruction samples to derive a chroma prediction block. All LM modes that are neither LM-L nor LM-A are referred to as the normal LM mode.
[0074] In the following examples and methods, Shift(x,s) is defined as Shift(x,s)=(x+off)>>s, and SignShift(x,s) is
Number
[0075] where off is an integer such as 0 or 2 s-1 and so on.
[0076] The height and width of the current chroma block are denoted as H and W, respectively.
[0077] Figure 6 shows an example of an adjacent sample group of the current chroma block. Let the coordinates of the sample in the upper left of the current chroma block be expressed as (x, y). Then, the adjacent chroma sample group (shown in Figure 6) is A: Upper left sample on the left: [x - 1, y], B: Upper middle left sample on the left: [x - 1, y + H / 2 - 1], C: Lower middle left sample on the left: [x - 1, y + H / 2], D: Lower left sample on the left: [x - 1, y + H - 1], E: Upper extended lower sample on the left: [x - 1, y + H], F: Upper middle extended lower sample on the left: [x - 1, y + H + H / 2 - 1], G: Lower middle extended lower sample on the left: [x - 1, y + H + H / 2], I: Lower extended lower sample on the left: [x - 1, y + H + H - 1], J: Left sample on the upper side: [x, y - 1], K: Left middle sample on the upper side: [x + W / 2 - 1, y - 1], L: Right middle sample on the upper side: [x + W / 2, y - 1], M: Right sample on the upper side: [x + W - 1, y - 1], N: Upper extended left sample on the upper side: [x + W, y - 1], O: Upper middle extended left sample on the upper side: [x + W + W / 2 - 1, y - 1], P: Upper middle extended right sample on the upper side: [x + W + W / 2, y - 1], and Q: Upper extended right sample on the upper side: [x + W + W - 1, y - 1] are expressed as.
[0078] Example 1. The parameters α and β in the LM method are derived from chroma samples at two or more specific positions. a. The derivation also depends on the corresponding downsampled luma samples of the selected chroma samples. Alternatively, the derivation depends on the corresponding luma samples of the selected chroma samples, for example, when it is in the 4:4:4 color format. b. For example, the parameters α and β in CCLM are, for example, 2 S (for example, S = 2 or 3) derived from the color samples at the positions of: i. Positions {A, D, J, M}; ii. Positions {A, B, C, D, J, K, L, M}; iii. Positions {A, I, J, Q}; iv. Positions {A, B, D, I, J, K, M, Q}; v. Positions {A, B, D, F, J, K, M, O}; vi. Positions {A, B, F, I, J, K, O, Q}; vii. Positions {A, C, E, I, J, L, N, Q}; viii. Positions {A, C, G, I, J, L, P, Q}; ix. Positions {A, C, E, G, J, L, N, P}; x. Positions {A, B, C, D}; xi. Positions {A, B, D, I}; xii. Positions {A, B, D, F}; xiii. Positions {A, C, E, I}; xiv. Positions {A, C, G, I}; xv. Positions {A, C, E, G}; xvi. Positions {J, K, L, M}; xvii. Positions {J, K, M, Q}; xviii. Positions {J, K, M, O}; xix. Positions {J, K, O, Q}; xx. Positions {J, L, N, Q}; xxi. Positions {J, L, P, Q}; xxii. Positions {J, L, N, P}; xxiii. Positions {A, B, C, E, E, F, G, I}; xxiv. Positions {J, K, L, M, N, O, P, Q}; etc. are derived from. c. For example, the parameters α and β in CCLM are derived from the color samples at the following positions: i. Any combination between {A, B, C, D, E, F, G, I} and {J, K, L, M, N, O, P, Q}, such as the following 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 different positions fetched from {A, B, C, D, E, F, G} (a) Positions A and B; (b) Positions A and C; (c) Positions A and D; (d) Positions A and E; (e) Positions A and F; (f) Positions A and G; (g) Positions A and I; (h) Positions D and B; (i) Positions D and C; (j) Positions E and B; (k) Positions E and C; (l) Positions I and B; (m) Positions I and C; (n) Positions I and D; (o) Positions I and E; (p) Positions I and F; (q) Positions I and G; iii. Any two different positions fetched from {J, K, L, M, N, O, P, Q} (a) Positions J and K; (b) Positions J and L; (c) Positions J and M; (d) Positions J and N; (e) Positions J and O; (f) Positions J and P; (g) Positions J and Q; (h) Positions M and K; (i) Positions M and L; (j) Positions N and K; (k) Positions N and L; (l) Positions Q and K; (m) Positions Q and L; (n) Positions Q and M; (o) Positions Q and N; (p) Positions Q and O; (q) Positions Q and P; (r) Positions Q and Q; iv. In one example, if two selected positions have the same luma value, more positions can be further checked. d. For example, in order to derive parameters α and β in CCLM by the two-point method, not all available chroma samples are searched to find the minimum and maximum luma values.
[0079] i. One of the K chroma samples (and their corresponding downsampled luma samples) is included in the search set T. K can be 2, 4, 6, or 8.
[0080] (a) For example, if Rec[x, y] is the upper adjacent sample, it is included in the search set only when x % K == 0. If Rec[x, y] is the left adjacent sample, it is included in the search set only when y % K == 0.
[0081] ii. Only chroma samples at specific positions such as those defined in 1.a.i. - 1.a.xxiv are included in the search set. e. In mode LM-L, all selected samples must be the left adjacent samples. f. In mode LM-A, all selected samples must be the upper adjacent samples. g. The selected positions may be fixed or adaptive.
[0082] i. In one example, which positions are selected may depend on the width and height of the current chroma block; ii. In one example, which positions are selected may be signaled from the encoder to the decoder, for example, within VPS / SPS / PPS / slice header / tile group header / tile / CTU / CU / PU, etc. h. The selected color samples are used to derive the parameters α and β by the least-squares average method shown in Formula (2) and Formula (3). In Formula (2) and Formula (3), N is set to the number of selected samples. i. A pair of selected color samples are used to derive the parameters α and β by the two-point method. j. In one example, how to select samples may depend on the availability of adjacent blocks.
[0083] i. For example, when both the left and upper adjacent blocks are available, positions A, D, J, and M are selected; when only the left adjacent block is available, positions A and D are selected; and when only the upper adjacent block is available, positions J and M are selected.
[0084] Example 2. The set of parameters in the CCLM mode is first derived and then combined to form the final linear model parameters used to encode one block. If α1 and β1 are derived from a group of color samples at specific positions denoted as Group 1, α2 and β2 are derived from a group of color samples at specific positions denoted as Group 2, and α N and β N are derived from a group of color samples at specific positions denoted as Group N, then the final α and β can be derived from (α1, β1), …, (α N , β N ). a. In one example, α is calculated as the average of α1, …, α N , and β is calculated as the average of β1, …, β N .
[0085] i. In one example, α = SignShift(α1 + α2, 1), β = SignShift(β1 + β2, 1).
[0086] ii. In one example, α = Shift(α1 + α2, 1) and β = Shift(β1 + β2, 1).
[0087] iii. When (α1, β1) and (α2, β2) have different precisions, for example, in order to obtain the chroma prediction CP from its corresponding downsampled luma sample LR, it is calculated as CP = SignShift(α1 × LR + β1, SH1) using (α1, β1), but when using (α2, β2), it is calculated as CP = SignShift(α2 × LR + β2, SH2), and Sh1 is not equal to Sh2, and the parameters need to be shifted before being combined. If Sh1 > Sh2, before being combined, the parameters should be (a) shifted as α1 = SignShift(α1, Sh1 - Sh2) and β1 = SignShift(β1, Sh1 - Sh2). Then the final precision is (α2, β2).
[0088] (b) shifted as α1 = Shift(α1, Sh1 - Sh2) and β1 = Shift(β1, Sh1 - Sh2). Then the final precision is (α2, β2).
[0089] (c) shifted as α2 = α2 << (Sh1 - Sh2) and β2 = β2 << (Sh1 - Sh2). Then the final precision is (α1, β1). b. Some examples of the positions of Group 1 and Group 2: i. Group 1: Positions A and D, Group 2: Positions J and M ii. Group 1: Positions A and I, Group 2: Positions J and Q iii. Group 1: Positions A and D, Group 2: Positions E and I, and the two groups are used in mode LM - L iv. Group 1: Positions J and M, Group 2: Positions N and Q, and the two groups are used in mode LM - A v. Group 1: positions A and B, Group 2: positions C and D, and the two groups are used in mode LM-L vi. Group 1: positions J and K, Group 2: positions L and M, and the two groups are used in mode LM-A.
[0090] Example 3. Assume that there are two chroma sample values denoted as C0 and C1, and their corresponding luma sample values denoted as L0 and L1 (L0 < L1) as inputs. 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 lookup 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 look-up table denoted as M[k].
[0098] i. The size of the look-up table denoted as V is less than 2 P where P is an integer such as, for example, 5, 6, or 7.
[0099] ii. Each entry of the look-up 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 look-up table.
[0102] (a) In one example, W depends on BL, V, and Z.
[0103] (b) In one example, W also depends on the value of L1 - L0.
[0104] iv. If k is not a valid key for querying the lookup table (k - Z < 0, or k - Z >= V), α is output as 0.
[0105] v. For example, α = Shift((C1 - C0) × M[k - Z], D), or α = SignShift((C1 - C0) × M[k - Z], D) vi. To obtain the chroma prediction CP from its corresponding (e.g., downsampled in the case of 4:2:0) luma sample LR, it is calculated as follows: CP = SignShift(α × LR + β, Sh), or CP = Shift(α × LR + β, Sh) vii. Sh may be a fixed number or may depend on the values of C0, C1, L0, 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 equal to, where P is an integer such as 5, 6, 7, or 8, for example. Alternatively, V is set to 2P - M (e.g., M is equal to 0).
[0109] ix. Assume α = 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 lookup table, where k is the key (index) for querying entries in the lookup table.
[0110] (a) In one example, k is derived from Q using the function: k = f(Q).
[0111] (b) In one example, k is derived from Q and P using the function: k = f(Q, P).
[0112] (c) In one example, k is valid within a specific range [kMin, kMax]. For example, kMin = Z, 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 lookup 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, -Q is used to replace Q in the calculation. And -α is output.
[0121] (g) In one example, if Q is equal to 0, α is set to a default value such as 0 or 1.
[0122] (h) In one example, if Q is equal to 2 E E >= 0, α = Shift(P, E) or α = SignShift(P, E).
[0123] d. All operations for deriving the LM parameter must be within K bits, and K can be 8, 10, 12, 16, 24, or 32.
[0124] i. If an intermediate variable can exceed the range represented by the constraint bits, it should be clipped or right-shifted so that it is within the constraint bits.
[0125] Example 4. One single chroma block may use multiple linear models, and the selection of the multiple linear models depends on the positions of the chroma samples within the chroma block.
[0126] a. In one example, the LM-L mode and the LM-A mode can be combined within a single chroma block.
[0127] b. In one example, some samples are predicted in the LM-L mode and other samples are predicted in the LM-A mode.
[0128] i. 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 adjacent samples (including the chroma sample and its corresponding luma sample, which may be downsampled) into N groups. The maximum luma value and the minimum luma value of the k-th (k = 0, 1, …, N−1) group are MaxL k and MinL k respectively, and their corresponding chroma values are MaxC k and MinC k respectively.
[0135] a. In one example, MaxL is calculated as MaxL = f1(MaxL S0 , MaxL S1 , …, MaxL Sm ), MaxC is calculated as MaxC = f2(MaxC S0 , MaxC S1 , …, MaxC Sm ), MinL is calculated as MinL = f3(MinL S0 , MinL S1 , …, MinL Sm ), and MinC is calculated as MinC = f4(MinC S0 , MinC S1 , …, MinC Sm ). f1, f2, f3, and f4 are functions. The two-point method calculates α and β as follows using these inputs: α = (MaxC - MinC) / (MaxL - MinL)[[ID=##]] β = 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 groups used to calculate α and β.
[0137] (1) For example, all groups are used, for example, S0 = 0, S1 = 1, …, Sm = N−1.
[0138] (2) For example, two groups are used, for example, m = 1, S0 = 0, S1 = N - 1.
[0139] (3) For example, not all groups are used, for example, m < N - 1, S0 = 0, S1 = 2, S3 = 4, ….
[0140] b. In one example, the samples (or downsampled samples) located in the upper row can be classified into one group, and the samples (or downsampled samples) located in the left column of the block can be classified into another group.
[0141] c. In one example, the samples (or downsampled samples) are classified based on their positions or coordinates.
[0142] i. For example, the samples can be classified into two groups.
[0143] (1) For the samples with coordinates (x, y) located in the upper row, it is classified into group S0 when x % P = Q, where P and Q are integers, for example, P = 2, Q = 1, P = 2, Q = 0, or P = 4, Q = 0, and is classified into group S1 otherwise.
[0144] (2) For the samples with coordinates (x, y) located in the left column, it is classified into group S0 when y % P = Q, where P and Q are integers, for example, P = 2, Q = 1, P = 2, Q = 0, or P = 4, Q = 0, and is classified into group S1 otherwise.
[0145] (3) Only the samples within one group, such as S0, are used to find MaxC and MaxL. For example, MaxL = MaxLS0, and MaxC = MaxCS0.
[0146] d. In one example, only a portion of adjacent samples (or downsampled samples) is used to be divided into N groups.
[0147] e. The number of groups (e.g., N) and / or the index of the selected groups and / or the function (f1 / f2 / f3 / f4) may be predefined or may be signaled within SPS / VPS / PPS / picture header / slice header / tile group header / LCU group / LCU / CU.
[0148] f. In one example, how to select samples of each group may depend on the availability of adjacent blocks.
[0149] i. For example, when both the left and upper adjacent blocks are available, 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 MaxL = (MaxL0 + MaxL1) / 2, MaxC = (MaxC0 + MaxC1) / 2, MinL = (MinL0 + MinL1) / 2, MinC = (MinC0 + MinC1) / 2.
[0150] ii. For example, when only the left adjacent block is available, MaxL / MaxC and MinL / MinC are directly found from positions A and D.
[0151] (1) Or, when the upper adjacent block is not available, α and β are set equal to some default values. For example, α = 0 and β = 1 << (bitDepth - 1), where bitDepth is the bit depth of the chroma sample.
[0152] iii. For example, when only the upper adjacent block is available, MaxL / MaxC and MinL / MinC are directly found from positions J and M.
[0153] (1) Alternatively, when the left adjacent block is not available, α and β are set equal to some default values. For example, α = 0, and β = 1 << (bitDepth - 1), where bitDepth is the bit depth of the chroma sample.
[0154] g. In one example, how the samples of each group are selected may depend on the width and height of the block.
[0155] h. In one example, how the samples of each group are selected may depend on the values of the samples.
[0156] i. In one example, two samples with the maximum and minimum luma values are selected to be in the first group. And all the other samples are made to be in the second group.
[0157] Example 6. It is proposed that whether to apply the LM-L mode and the LM-A mode, and how to apply them, may depend on the width (W) and height (H) of the current block.
[0158] (a) For example, when W > K × H, LM-L cannot be applied, for example, K = 2.
[0159] (b) For example, when H > K × W, LM-A cannot be applied, for example, K = 2.
[0160] (c) When one of LM-L and LM-A cannot be applied, a flag indicating which of LM-L or LM-A is used should not be signaled.
[0161] Example 7. A flag indicating whether the CCLM mode is applied is signaled. The context used for arithmetic coding to encode the flag may depend on whether the upper left adjacent block shown in FIG. 8 applies the CCLM mode.
[0162] (a) In one example, when the upper left adjacent block applies the CCLM mode, the first context is used; when the upper left adjacent block does not apply the CCLM mode, the second context is used. (b) In one example, when the upper left adjacent block is not available, this is regarded as not applying the CCLM mode. (c) In one example, when the upper left adjacent block is not available, this is regarded as applying the CCLM mode. (d) In one example, when the upper left adjacent block is not intra-coded, this is regarded as not applying the CCLM mode. (e) In one example, when the upper left adjacent block is not intra-coded, this is regarded as applying the CCLM mode.
[0163] Example 8. Indications or codewords of the DM mode and the LM mode can be coded in a different order for each sequence / for each picture / for each tile / for each block.
[0164] (a) The coding order of the LM and DM indications (for example, first code whether it is in the LM mode, and if not, then code whether it is in the DM mode; or first code whether it is in the DM mode, and if not, then code whether it is in the LM mode) can depend on the mode information of one or more adjacent blocks.
[0165] (b) In one example, when the block above the upper left of the current block is available and is coded in the LM mode, the indication of the LM mode is coded first.
[0166] (c) Alternatively, when the block above the upper left of the current block is available and is coded in the DM mode, the indication of the DM mode is coded first.
[0167] (d) Alternatively, if the block above the upper left of the current block is available and is encoded in a non-LM (e.g., DM mode, or other intra prediction mode excluding LM), the indication of the DM mode is encoded first.
[0168] (e) In one example, the indication in this order can be signaled within the SPS / VPS / PPS / picture header / slice header / tile group header / LCU group / LCU / CU.
[0169] Example 9. In the above example, the sample (or downsampled sample) may be located beyond the range of the 2×W upper adjacent samples or the 2×H left adjacent samples shown in FIG. 6.
[0170] (a) In the LM mode or the LM-L mode, the adjacent sample RecC[x-1,y+d] can be used, where d is within the range of [T,S]. T may be less than 0, and S may be greater than 2H-1. For example, T = -4, S = 3H. In another example, T = 0, S = max(2H,W+H). In yet another example, T = 0 and S = 4H.
[0171] (b) In the LM mode or the LM-A mode, the adjacent sample RecC[x+d,y] can be used, where d is within the range of [T,S]. T may be less than 0, and S may be greater than 2W-1. For example, T = -4, S = 3W. In another example, T = 0, S = max(2W,W+H). In yet another example, T = 0 and S = 4W.
[0172] Example 10. In one example, the chroma adjacent samples and their corresponding luma samples (which may be downsampled) are downsampled before deriving the linear model parameters α and β as disclosed in Examples 1-7. Let the width and height of the current chroma block be W and H.
[0173] (a) In one example, whether to perform downsampling and how to perform it may depend on W and H.
[0174] (b) In one example, the number of adjacent samples used to derive the 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 can 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 can 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 can 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 a sample picked up when positions D and M in Figure 6 are used to derive α and β, and downsampling performed when W > H.
[0181] Example 11. Adjacent downsampled / original reconstructed samples, and / or downsampled / original reconstructed samples may be further refined before being used in a linear model prediction process or a cross-color component prediction process.
[0182] (a) "Refined" may refer to a filtering process.
[0183] (b) "Refined" may refer to some non-linear process.
[0184] (c) For example, in order to derive α and β such as α = (C1 - C0) / (L1 - L0) and β = C0 - αL0, it is proposed to pick up several adjacent samples (including chroma samples and their corresponding luma samples, which can be downsampled) and calculate C1, C0, L1, and L0.
[0185] (d) In one example, S adjacent luma samples (which can be downsampled) denoted as Lx1, Lx2,..., LxS and their corresponding chroma samples denoted as Cx1, Cx2,..., CxS are used to derive C0 and L0 as follows, and T adjacent luma samples (which can be downsampled) denoted as Ly1, Ly2,..., LyT and their corresponding chroma samples denoted as Cy1, Cy2,..., CyT are used to derive C1 and L1 as follows: (i) C0 = f0(Cx1, Cx2,..., CxS), L0 = f1(Lx1, Lx2,..., LxS), C1 = f2(Cy1, Cy2,..., CyT), L1 = f4(Ly1, Ly2,..., LyT). f0, f1, f2, and f3 are some functions.
[0186] (ii) In one example, f0 is the same as f1.
[0187] (iii) In one example, f2 is the same as f3.
[0188] (iv) In one example, f0, f1, f2, and f3 are the same.
[0189] 1. For example, they are all averaging functions.
[0190] (v) In one example, S is equal to T.
[0191] 1. In one example, the set {x1, x2, …, xS} is the same as the set {y1, y2, …, yT}.
[0192] (vi) In one example, Lx1, Lx2, …, LxS are selected as the smallest S luma samples among a group of luma samples.
[0193] 1. For example, the group of luma samples includes all adjacent samples used in VTM - 3.0 to derive CCLM linear parameters.
[0194] 2. For example, the group of luma samples includes some adjacent samples used in VTM - 3.0 to derive CCLM linear parameters.
[0195] a. For example, the group of luma samples includes the four samples shown in Figure 2 - 5.
[0196] (vii) In one example, Ly1, Ly2, …, LyS are selected as the largest S luma samples among a group of luma samples.
[0197] 1. For example, the group of luma samples includes all adjacent samples used in VTM - 3.0 to derive CCLM linear parameters.
[0198] 2. For example, a group of luma samples includes some of the neighboring samples used in VTM-3.0 to derive the CCLM linear parameters.
[0199] a. For example, a group of luma samples includes the four samples shown in FIG. 2-5.
[0200] Example 12. It is proposed to select other neighboring samples or downsampled neighboring samples based on the largest neighboring sample or downsampled neighboring sample within a given set of neighboring samples or downsampled neighboring samples.
[0201] (a) In one example, denote that the largest neighboring sample or downsampled neighboring sample is at position (x0, y0). Then, other samples can be selected using the samples in the regions (x0 - d1, y0), (x0, y0 - d2), (x0 + d3, y0), (x0, y0 + d4). The integers {d1, d2, d3, d4} may depend on the position (x0, y0). For example, if (x0, y0) is on the left of the current block, d1 = d3 = 1, and d2 = d4 = 0. If (x0, y0) is on the top of the current block, d1 = d3 = 0, and d2 = d4 = 1.
[0202] (b) In one example, denote that the smallest neighboring sample or downsampled neighboring sample is at position (x1, y1). Then, other samples can be selected using the samples in the regions (x1 - d1, y1), (x1, y1 - d2), (x1 + d3, y1), (x1, y1 + d4). The integers {d1, d2, d3, d4} may depend on the position (x1, y1). For example, if (x1, y1) is on the left of the current block, d1 = d3 = 1, and d2 = d4 = 0. If (x1, y1) is on the top of the current block, d1 = d3 = 0, and d2 = d4 = 1.
[0203] (c) In one example, the above 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) A similar method can be used to derive the smallest sample.
[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 locations, 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, when the current mode is the normal LM mode, the following method may be applied to select chroma samples (and / or luma samples that have been downsampled or not downsampled).
[0213] (i) If both the left column and the top row are available, two samples from the left column and two samples from the top row may be selected. They may be located as follows (assuming the top left coordinates of the current block are (x, y)).
[0214] 1. (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - 1, y - 1).
[0215] 2. (x - 1, y), (x, y - 1), (x - 1, y + H - H / W - 1), and (x + W - 1, y - 1). For example, when H is greater than W.
[0216] 3. (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - W / H - 1). For example, when H is less than W.
[0217] 4. (x - 1, y), (x, y - 1), (x - 1, y + H - max(1, H / W)), and (x + W - max(1, W / H), y - 1).
[0218] (ii) If only the top row is available, the samples are selected only from the top row.
[0219] 1. For example, four samples from the top row may be selected.
[0220] 2. For example, two samples may be selected.
[0221] 3. How the samples are selected may depend on the width / height. For example, when W > 2, four samples are selected, and when W = 2, two samples are selected.
[0222] 4. The selected sample may be located as follows (assuming the top - left coordinates of the current block are (x, y)).
[0223] a. (x, y - 1), (x + W / 4, y - 1), (x + 2*W / 4, y - 1), (x + 3*W / 4, y - 1).
[0224] b. (x, y - 1), (x + W / 4, y - 1), (x + 3*W / 4, y - 1), (x + W - 1, y - 1).
[0225] c. (x, y - 1), (x+(2W) / 4, y - 1), (x + 2*(2W) / 4, y - 1), (x + 3*(2W) / 4, y - 1). For example, when the top - right row is available, or when 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, when the top - right row is available, or when the first top - right sample is available.
[0227] (iii) When only the left column is available, the sample is selected only from the left column.
[0228] 1. For example, four samples from the left column can be selected.
[0229] 2. For example, two samples from the left column can be selected.
[0230] 3. How to select the sample may depend on the width / height. For example, when H > 2, four samples are selected, and when H = 2, two samples are selected.
[0231] 4. The selected sample may be located as follows.
[0232] a. (x - 1, y), (x - 1, y + H / 4), (x - 1, y + 2*H / 4), (x - 1, y + 3*H / 4).
[0233] b. (x - 1, y), (x - 1, y + 2*H / 4), (x - 1, y + 3*H / 4), (x - 1, y + H - 1).
[0234] c. (x - 1, y), (x - 1, y + (2H) / 4), (x - 1, y + 2*(2H) / 4), (x - 1, y + 3*(2H) / 4). For example, when the left - lower column is available, or when the first left - lower sample is available.
[0235] d. (x - 1, y), (x - 1, y + 2*(2H) / 4), (x - 1, y + 3*(2H) / 4), (x - 1, y + (2H) - 1). When the left - lower column is available, or when the first left - lower sample is available.
[0236] (iv) In the above example, only two of the four samples may be selected.
[0237] (e) In one example, when the current mode is the LM - A mode, samples can be selected according to Example 11(d)(ii).
[0238] (f) In one example, when the current mode is the LM - L mode, samples can be selected according to Example 11(d)(iii).
[0239] (g) The selected luma samples (e.g., according to the position of the selected chroma) may be grouped into two groups, one having the maximum and minimum values among all the selected samples, and the other having all the remaining samples.
[0240] (i) To derive the LM parameter, the two maximum values of the two groups are averaged as the maximum value in the two - point method, and the two minimum values of the two groups are averaged as the minimum value in the two - point method.
[0241] (ii) If only four samples are selected, the two largest sample values are averaged, the two smallest sample values are averaged, and the averaged values are 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 block to the top right. 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, when the current block is encoded as the LM mode, W can be set to the width of the current block.
[0251] ii. When the current block is encoded as the LM-A mode, W may be set to (L times the width of the current block), where L is an integer value.
[0252] (a) L may depend on the availability of the upper-right block. Alternatively, L may depend on the availability of one upper-left sample.
[0253] e. Assuming the upper-left coordinates of the current block are (x0, y0), with K = 0, 1, 2,... kMax, the upper adjacent sample at the position (x0 + F + K × S, y0 - 1) is selected.
[0254] f. In one example, F = W / P. P is an integer.
[0255] i. For example, P = 2 i and i is an integer such as 1 or 2, for example.
[0256] ii. Alternatively, F = W / P + offset.
[0257] g. In one example, S = W / Q. Q is an integer.
[0258] i. For example, Q = 2 j and j is an integer such as 1 or 2, for example.
[0259] h. In one example, F = S / R. R is an integer.
[0260] i. For example, R = 2 m and m is an integer such as 1 or 2, for example.
[0261] i. In one example, S = F / Z. Z is an integer.
[0262] i. For example, Z = 2 n and n is an integer such as 1 or 2, for example.
[0263] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (such as LM, LM-A or LM-L, etc.).
[0264] k. kMax and / or F and / or S and / or offset may depend on the width and / or height of the current block.
[0265] l. kMax and / or F and / or S and / or offset may depend on the availability of adjacent samples.
[0266] m. kMax and / or F and / or S and / or offset may depend on W.
[0267] n. For example, kMax = 1, F = W / 4, S = W / 2, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, both left and upper adjacent samples are available, and W >= 4.
[0268] o. For example, kMax = 3, F = W / 8, S = W / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, only the upper adjacent sample is available, and W >= 4.
[0269] p. For example, kMax = 3, F = W / 8, S = W / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-A encoded and W >= 4.
[0270] q. For example, kMax = 1, F = 0, S = 1, offset = 0. Alternatively, furthermore, these settings are made when W is equal to 2.
[0271] Example 17. It is proposed to select the left adjacent chroma sample (and / or their corresponding luma samples that can be downsampled) based on a first position offset value (denoted as F) and a step value (denoted as S). Let the height of the available left adjacent samples to be used be H.
[0272] a. In one example, H can be set equal to the height of the current block.
[0273] b. In one example, H may be set to (L times the height of the current block), where L is an integer value.
[0274] c. In one example, if both the upper and left blocks are available, H can be set to the height of the current block.
[0275] i. Alternatively, if the upper block is not available, H may be set to (L times the height of the current block), where L is an integer value.
[0276] ii. In one example, L may depend on the availability of the lower left block. Alternatively, L may depend on the availability of one lower left sample.
[0277] iii. Alternatively, if the required upper right adjacent block is available, H may be set to (the height of the current block + the width of the current block).
[0278] (a) In one example, if the left adjacent sample is not available, the same H upper adjacent samples are selected for the LM-A mode and the LM mode.
[0279] d. In one example, H may depend on the coding mode.
[0280] i. In one example, if the current block is coded as the LM mode, H can be set to the height of the current block.
[0281] ii. If the current block is encoded in the LM-L mode, H can be set to (L times the height of the current block).
[0282] (a) L may depend on the availability of the bottom-left block. Alternatively, L may depend on the availability of one top-left sample.
[0283] (b) Alternatively, if the required bottom-left adjacent block is available, W may be set to (the height of the current block + the width of the current block).
[0284] (c) In one example, if the upper adjacent sample is not available, the same W left adjacent samples are selected for the LM-L mode and the LM mode.
[0285] e. Assuming the top-left coordinates of the current block are (x0, y0), with K = 0, 1, 2, …, kMax, the left adjacent sample at position (x0 - 1, y0 + F + K × S) is selected.
[0286] f. In one example, F = H / P. P is an integer.
[0287] i. For example, P = 2 i and i is an integer such as 1 or 2, for example.
[0288] ii. Alternatively, F = H / P + offset.
[0289] g. In one example, S = H / Q. Q is an integer.
[0290] i. For example, Q = 2 j and j is an integer such as 1 or 2, for example.
[0291] h. In one example, F = S / R. R is an integer.
[0292] i. For example, R = 2 mand m is an integer such as, for example, 1 or 2.
[0293] i. In one example, S = F / Z. Z is an integer.
[0294] i. For example, Z = 2 n and n is an integer such as, 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 (such as LM, LM-A or LM-L, etc.).
[0296] k. kMax and / or F and / or S and / or offset may depend on the height and / or the height of the current block.
[0297] l. kMax and / or F and / or S and / or offset may depend on H.
[0298] m. kMax and / or F and / or S and / or offset may depend on the availability of adjacent samples.
[0299] n. For example, kMax = 1, F = H / 4, S = H / 2, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, both left and upper adjacent samples are available, and H >= 4.
[0300] o. For example, kMax = 3, F = H / 8, S = H / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM encoded, only the upper adjacent sample is available, and H >= 4.
[0301] p. For example, kMax = 3, F = H / 8, S = H / 4, offset = 0. Alternatively, furthermore, these settings are made when the current block is LM-L encoded and H >= 4.
[0302] q. For example, H is equal to 2, kMax = 1, F = 0, S = 1, and offset = 0.
[0303] Example 18. It is proposed to select two or four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) to derive the linear model parameters.
[0304] a. In one example, maxY / maxC and minY / minC are derived from two or four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled), and then are used to derive the linear model parameters using a two - point approach.
[0305] b. In one example, when two adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are selected to derive maxY / maxC and minY / minC, minY is set to the smaller luma sample value, minC is set to its corresponding chroma sample value, maxY is set to the larger luma sample value, and maxC is set to its corresponding chroma sample value.
[0306] c. In one example, when four adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are selected to derive maxY / maxC and minY / minC, those luma samples and their corresponding chroma samples are divided into two arrays G0 and G1, each containing two chroma samples and their corresponding luma samples.
[0307] i. Assuming that the four luma samples and their corresponding chroma samples are denoted as S0, S1, S2, S3, they can be divided into two groups in any order. For example: (a) G0 = {S0, S1}, G1 = {S2, S3}; (b) G0 = {S1, S0}, G1 = {S3, S2}; (c) G0 = {S0, S2}, G1 = {S1, S3}; (d) G0 = {S2, S0}, G1 = {S3, S1}; (e) G0 = {S1, S2}, G1 = {S0, S3}; (f) G0 = {S2, S1}, G1 = {S3, S0}; (g) G0 = {S0, S3}, G1 = {S1, S2}; (h) G0 = {S3, S0}, G1 = {S2, S1}; (i) G0 = {S1, S3}, G1 = {S0, S2}; (j) G0 = {S3, S1}, G1 = {S2, S0}; (k) G0 = {S3, S2}, G1 = {S0, S1}; (l) G0 = {S2, S3}, G1 = {S1, S0}; (m) G0 and G1 may be exchanged.
[0308] ii. In one example, if the luma sample values of G0[0] and G0[1] are compared and the luma sample value of G0[0] is greater than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].
[0309] (a) Alternatively, if the luma sample value of G0[0] is greater than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].
[0310] (b) Alternatively, if the luma sample value of G0[0] is less than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].
[0311] (c) Alternatively, if the luma sample value of G0[0] is less than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma samples are exchanged with those of G0[1].
[0312] iii. In one example, the luma sample values of G1[0] and G1[1] are compared, and if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].
[0313] (a) Alternatively, if the luma sample value of G1[0] is greater than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].
[0314] (b) Alternatively, if the luma sample value of G1[0] is less than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].
[0315] (c) Alternatively, if the luma sample value of G1[0] is less than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma samples are exchanged with those of G1[1].
[0316] iv. In one example, the luma sample values of G0[0] and G1[1] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0 and G1 are exchanged.
[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 equal to, or greater than or equal to) the luma sample value of G1[0], G0 and G1 are exchanged.
[0318] (b) In one example, the luma sample values of G0[1] and G1[0] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0 and G1 are exchanged.
[0319] (c) In one example, the luma sample values of G0[1] and G1[1] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0 and G1 are exchanged.
[0320] v. In one example, the luma sample values of G0[0] and G1[1] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0[0] and G1[1] are exchanged.
[0321] (a) In one example, the luma sample values of G0[0] and G1[0] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0[0] and G1[0] are exchanged.
[0322] (b) In one example, the luma sample values of G0[1] and G1[0] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[0], G0[1] and G1[0] are exchanged.
[0323] (c) In one example, the luma sample values of G0[1] and G1[1] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than or equal to, or greater than or equal to) the luma sample value of G1[1], G0[1] and G1[1] are exchanged.
[0324] vi. In one example, maxY is calculated as the average of the luma sample values of G0[0] and G0[1], and maxC is calculated as the average of the chroma sample values of G0[0] and G0[1].
[0325] (a) Alternatively, maxY is calculated as the average of the luma sample values of G1[0] and G1[1], and maxC is calculated as the average of the chroma sample values of G1[0] and G1[1].
[0326] vii. In one example, minY is calculated as the average of the luma sample values of G0[0] and G0[1], and minC is calculated as the average of the chroma sample values of G0[0] and G0[1].
[0327] Alternatively, minY is calculated as the average of the luma sample values of G1[0] and G1[1], and minC is calculated as the average of the chroma sample values of G1[0] and G1[1].
[0328] d. In one example, if only two adjacent chroma samples (and / or their corresponding luma samples that can be downsampled) are available, they are first padded to become four chroma samples (and / or their corresponding luma samples), and the CCLM parameters are derived using those four chroma samples (and / or their corresponding luma samples).
[0329] i. In one example, the two padding chroma samples (and / or their corresponding luma samples) are copied from the two available adjacent chroma samples (and / or their corresponding luma samples that can be downsampled).
[0330] Example 19. In all of the above examples, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and / or the left column (i.e., having H samples) shown in FIG. 10, where W and H are the width and height of the current block.
[0331] a. Alternatively, the above constraints can be applied when the current block is encoded in the normal LM mode.
[0332] b. Alternatively, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and the top - right row having H samples.
[0333] i. Alternatively, further, the above constraints may apply when the current block is encoded in the LM-A mode.
[0334] ii. Alternatively, further, the above constraints may apply when the upper row is available but the left column is not available and the current block is encoded in the LM-A mode or the normal LM.
[0335] c. Alternatively, the selected chroma samples are located in the left column (i.e., having H samples) and the lower left column having W samples.
[0336] i. Alternatively, further, the above constraints may apply when the current block is encoded in the LM-L mode.
[0337] ii. Alternatively, further, the above constraints may apply when the upper row is not available but the left column is available and the current block is encoded in the LM-L mode or the normal LM.
[0338] Example 20 In one example, only the adjacent luma samples at the positions where the corresponding chroma samples are required to derive the CCLM parameters need to be downsampled.
[0339] Example 21 How to perform the method disclosed in this document may depend on the color format (e.g., 4:2:0 or 4:4:4, etc.).
[0340] a. Alternatively, how to perform the method disclosed in this document may depend on the bit depth (e.g., 8 bits or 10 bits, etc.).
[0341] b. Alternatively, how to perform the method disclosed in this document may depend on the color representation method (e.g., RGB or YCbCr, etc.).
[0342] c. Alternatively, how to perform the method disclosed in this document may depend on the color representation method (e.g., RGB or YCbCr, etc.).
[0343] d. Alternatively, how to perform the method disclosed in this document may depend on the chroma downsampling position.
[0344] Example 22 Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCLM parameter may depend on the availability of adjacent ones on the left and above. For example, if neither the left nor the above adjacent block is available, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCLM parameter are not derived.
[0345] a. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameter may depend on the number of available adjacent samples. For example, when numSampL == 0 and numSampT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameter are not derived. In another example, when numSampL + numSampT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameter are not derived. In these two examples, numSampL and numSampT are the number of available adjacent samples from the adjacent blocks on the left and above.
[0346] b. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters may depend on the number of selected samples used to derive those parameters. For example, when cntL == 0 and cntT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In another example, when cntL + cntT == 0, it may be assumed that the maximum / minimum values of the luma and chroma components used to derive the CCCLM parameters are not derived. In these two examples, cntL and cntT are the number of selected samples from the left and upper adjacent blocks.
[0347] Example 23 In one example, the proposed method for deriving the parameters used in CCCLM may be used to derive the parameters used in LIC or other coding tools that rely on a linear model.
[0348] a. The examples disclosed above may be applicable to LIC, for example, by replacing "chroma adjacent samples" with "adjacent samples of the current block" and replacing "corresponding luma samples" with "adjacent samples of the reference block".
[0349] b. In one example, the samples used to derive the LIC parameters may exclude samples at specific positions within the upper row and / or the left column.
[0350] i. In one example, the samples used to derive the LIC parameters may exclude the first sample within the upper row.
[0351] (a) Assuming the coordinates of the upper left sample are (x0, y0), it is proposed to exclude (x0, y0 - 1) for the use of LIC parameters.
[0352] ii. In one example, the samples used to derive the LIC parameters may exclude the first sample within the left column.
[0353] (a) Assuming the coordinates of the upper left sample are (x0, y0), it is proposed to exclude (x0 - 1, y0) for the use of LIC parameters.
[0354] iii. Whether to apply the above method and / or how to determine a specific position may depend on the availability of the left column / upper row.
[0355] iv. Whether to apply the above method and / or how to determine a specific position may depend on the block size.
[0356] c. In one example, the parameters used for LIC can be derived using N adjacent samples (which can be downsampled) of the current block and N corresponding adjacent samples (which can be correspondingly downsampled) of the reference block.
[0357] i. For example, N is 4.
[0358] ii. In one example, the N adjacent samples can be defined as N / 2 samples from the upper row and N / 2 samples from the left column.
[0359] (a) Alternatively, the N adjacent samples may be defined as N samples from the upper row or the left column.
[0360] iii. In another example, N is equal to min(L, T), where T is the total number of available adjacent samples (which can be downsampled) of the current block.
[0361] (a) In one example, L is set to 4.
[0362] iv. In one example, the selection of the coordinates of the N samples may follow the rules for selecting N samples in the CCLM process.
[0363] v. In one example, the selection of the coordinates of the N samples can follow the rules for selecting the N samples in the LM-A process.
[0364] vi. In one example, the selection of the coordinates of the N samples can follow the rules for selecting the N samples in the LM-L process.
[0365] vii. In one example, how the N samples are selected can depend on the availability of the upper row / left column.
[0366] d. In one example, N adjacent samples of the current block (which can be downsampled) and N corresponding adjacent samples of the reference block (which can be downsampled) are used to derive the parameters used in the LIC and can be picked up based on the sample positions.
[0367] i. The picking-up method can depend on the width and height of the current block.
[0368] ii. The picking-up method can depend on the availability of the adjacent blocks.
[0369] iii. For example, if both the upper and left adjacent samples are available, K1 adjacent samples can be picked up from the left adjacent sample and K2 adjacent samples can be picked up from the upper adjacent sample. For example, K1 = K2 = 2.
[0370] iv. For example, if only the left adjacent sample is available, K1 adjacent samples can be picked up from the left adjacent sample. For example, K1 = 4.
[0371] v. For example, if only the upper adjacent sample is available, K2 adjacent samples can be picked up from the upper adjacent sample. For example, K2 = 4.
[0372] vi. For example, the above sample can be picked up using a first position offset value (denoted as F) and a step value (denoted as S) that may depend on the dimensions of the current block and the availability of adjacent blocks.
[0373] (a) For example, by applying the method disclosed in Example 16, F and S can be derived.
[0374] vii. For example, the left sample can be picked up using a first position offset value (denoted as F) and a step value (denoted as S) that may depend on the dimensions of the current block and the availability of adjacent blocks.
[0375] (a) For example, by applying the method disclosed in Example 17, F and S can be derived.
[0376] e. In one example, the method proposed to derive the parameters used in CCLM can also be used to derive the parameters used in LIC when the current block is affine coded.
[0377] f. The above method may also be used to derive the parameters used in other coding tools that rely on a linear model.
[0378] In another example, a cross-component prediction mode is proposed in which the chroma sample is predicted using the corresponding reconstructed luma sample according to a prediction model as shown in Equation (12). In Equation (12), Pred C (x,y) represents the predicted sample 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 into the luma downsampling process for block A in FIG. 11.
Number
[0380] As shown in Equation (14), the upper surrounding luma reference samples shaded in FIG. 11 are downsampled by a 3-tap filter. The left surrounding luma reference samples are downsampled according to Equation (15). If the left or upper samples are not available, a 2-tap filter defined by Equations (16) and (17) will be used.
Number
[0381] In particular, the surrounding luma reference samples are downsampled to the same size as the chroma reference samples. Let its size (width and height) be denoted as width and height. Only two or four adjacent samples are involved in deriving α and β. A lookup table is applied to avoid the division operation when deriving α and β. The derivation method is shown below.
[0382] 3.1 Exemplary Method Using a Maximum of Two Samples (1) The ratio r of width to height is calculated as shown in Equation (18).
Number
[0383] (2) If both the upper and left blocks are available, two samples located at posA on the first upper line and posL on the first left line are selected. To simplify the explanation, assume that the width is the long side. The derivation of posA and posL is shown in Equation (19) (the position index starts from 0). Figure 12 shows some examples of different width-to-height ratios (1, 2, 4, and 8 respectively). The selected samples are shaded.
Number
[0384] (3) If the upper block is available but the left block is not, as shown in Figure 13, the first point on the upper line and the point at posA are selected.
[0385] (4) If the left block is available but the upper block is not, as shown in Figure 14, the first point on the left line and the point at posL are selected.
[0386] (5) A chroma prediction model is derived according to the luminance values and chrominance values of the selected samples.
[0387] (6) If neither the left nor the upper block is available, a default prediction model where α is equal to 0 and β is equal to 1<<(BitDepth - 1) is used, where BitDepth represents the bit depth of the chroma samples.
[0388] 3.2 Exemplary Method Using up to Four Samples (1) The ratio r of width to height is calculated as shown in Equation (18).
[0389] (2) When both the upper and left blocks are available, four samples located at the beginning of the first upper line and posA, and at the beginning of the first left line and posL are selected. The derivation of posA and posL is shown in Equation (19). Figure 15 shows some examples of different width-to-height ratios (1, 2, 4, and 8 respectively). The selected samples are shaded.
[0390] (3) When the upper block is available but the left block is not, as shown in Figure 13, the first point of the upper line and the point of posA are selected.
[0391] (4) When the left block is available but the upper block is not, as shown in Figure 14, the first point of the left line and the point of posL are selected.
[0392] (5) When neither the left nor the upper block is available, a default prediction model where α is equal to 0 and β is equal to 1<<(BitDepth - 1) is used, where BitDepth represents the bit depth of the chroma sample.
[0393] 3.3 Exemplary Method of Using a Lookup Table in LM Derivation Figure 16 shows an example of a lookup table with 128, 64, and 32 entries, where each entry is represented by 16 bits. The two-point LM derivation process is simplified with 64 entries, as shown in Table 1 and Figure 17. It should be noted that the first entry may not be stored in the table.
[0394] It should also be noted that although each entry of these exemplary tables is designed to be 16 bits, it can be easily converted to a smaller number of bits (e.g., 8 bits or 12 bits). For example, a table with 8-bit entries can be achieved as follows: g_aiLMDivTableHighSimp_64_8[i] = (g_aiLMDivTableHighSimp_64[i] + 128) >> 8
[0395] For example, a table with 12-bit entries can be achieved as follows: g_aiLMDivTableHighSimp_64_12[i] = (g_aiLMDivTableHighSimp_64[i] + 8) >> 4 [Table 1]
[0396] Note that maxLuma and minLuma may indicate the maximum and minimum luma sample values at the selected positions. Alternatively, they may represent a function of the maximum and minimum luma sample values at the selected positions, such as averaging. If only four positions are selected, they may also be the average of the two larger luma values and the average of the two smaller luma values. Further note that in Figure 17, maxChroma and minChroma represent the chroma values corresponding to maxLuma and minLuma.
[0397] 3.3 Method #4 Using a Maximum of 4 Samples Let the block width and height of the current chroma block be W and H respectively. Also, let the top-left coordinates of the current chroma block be [0, 0].[[]END]
[0398] If both the upper and left blocks are available and the current mode is the normal LM mode (excluding LM-A and LM-L), two chroma samples located in the upper row and two chroma samples located in the left column are selected.
[0399] The coordinates of the two upper samples are [Floor(W / 4), -1] and [Floor(3 * W / 4), -1].[[]END]
[0400] The coordinates of the two left samples are [-1, Floor(H / 4)] and [-1, Floor(3*H / 4)].
[0401] The selected samples are painted red as shown in Figure 31A.
[0402] Subsequently, these four samples are sorted according to the luma sample intensity and classified into two groups. The two larger samples and the two smaller samples are each averaged. Using these two average points, a cross-component prediction model is derived. Alternatively, using the maximum and minimum values of the four samples, the LM parameter is derived.
[0403] If the upper block is available but the left block is not, when W > 2, four chroma samples are selected from the upper block, and when W = 2, two chroma samples are selected.
[0404] The coordinates of the four selected upper samples are [W / 8, -1], [W / 8 + W / 4, -1], [W / 8 + 2*W / 4, -1], and [W / 8 + 3*W / 4, -1].
[0405] The selected samples are painted red as shown in Figure 31B.
[0406] If the left block is available but the upper block is not, when H > 2, four chroma samples are selected from the left block, and when H = 2, two chroma samples are selected.
[0407] The coordinates of the four selected left samples are [-1, H / 8], [-1, H / 8 + H / 4], [-1, H / 8 + 2*H / 4], and [-1, H / 8 + 3*H / 4].
[0408] If neither the left nor the upper block is available, a default prediction where α is equal to 0 and β is equal to 1<<(BitDepth-1) is used, where BitDepth represents the bit depth of the chroma sample.
[0409] When the current mode is the LM-A mode, when W’>2, four chroma samples from the upper block are selected, and when W’=2, two chroma samples are selected. W’ is the number of available upper adjacent samples, which can be 2*W.
[0410] The coordinates of those four selected upper samples are [W’ / 8, -1], [W’ / 8 + W’ / 4, -1], [W’ / 8 + 2*W’ / 4, -1], and [W’ / 8 + 3*W’ / 4, -1].
[0411] When the current mode is the LM-L mode, when H’>2, four chroma samples from the left block are selected, and when H’=2, two chroma samples are selected. H’ is the number of available left adjacent samples, which can be 2*H.
[0412] The coordinates of those four selected left samples are [-1, H’ / 8], [-1, H’ / 8 + H’ / 4], [-1, H’ / 8 + 2*H’ / 4], and [-1, H’ / 8 + 3*H’ / 4].
[0413] 3.5 Examples of Embodiments for Modifying the Current VVC Standard for the Use of CCLM Prediction
[0414] 8.3.4.2.8 Specifications of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM Intra Prediction Modes In this section, equations are described using equation numbers corresponding to those in the current draft of the VVC standard.
[0415] The input to this process is as follows: - Intra prediction mode predModeIntra, - The sample positions (xTbC, yTbC) of the top-left sample of the current conversion block with respect to the top-left sample of the current picture, - The variable nTbW that defines the conversion block width, - The variable nTbH that defines the conversion block height, - The chroma adjacent samples p[x][y] for x = -1, y = 0..2*nTbH-1, and x = 0..2*nTbW-1, y = -1.
[0416] The output of this process is the predicted samples predSamples[x][y] for x = 0..nTbW-1, y = 0..nTbH-1.
[0417] The current luma position (xTbY, yTbY) is derived as follows: (xTbY, yTbY)=(xTbC<<1, yTbC<<1) (8-155)
[0418] The variables avalL, avalT, and avalTL are derived as follows: ... - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-156) numSampL=availL? nTbH:0 (8-157) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+numTopRight):0 (8-158) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+numLeftBelow):0 (8-159)
[0419] The variable bCTUbordery is derived as follows: bCTUboundary = (yTbC & (1 << (CtbLog2SizeY - 1) - 1) == 0)? TRUE : FALSE (8 - 160)
[0420] For the prediction samples predSamples[x][y] where x = 0..nTbW - 1 and y = 0..nTbH - 1, they 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 change to the current specification] 2.... 3.... 4.... 5.... 6. [No change to the current specification] 7. The variables minY, maxY, minC, and maxC are derived as follows: - The variable minY is set equal to 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++; - When cnt is equal to 2, the following applies: - If selectLumaPix[0]>selectLumaPix[1], minY is set equal to selectLumaPix[1], minC is set equal to selectChromaPix[1], maxY is set equal to selectLumaPix[0], and maxC is set equal to selectChromaPix[0]; otherwise, maxY is set equal to selectLumaPix[1], maxC is set equal to selectChromaPix[1], minY is set equal to selectLumaPix[0], and minC is set equal to selectChromaPix[0]. - Otherwise, when cnt is equal to 4, the following applies: - The variable arrays minGrpIdx and maxGrpIdx are - initialized as minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 and - the following applies: - If selectLumaPix[minGrpIdx[0]]>selectLumaPix[minGrpIdx[1]], exchange minGrpIdx[0] and minGrpIdx[1]; - If selectLumaPix[maxGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], exchange maxGrpIdx[0] and maxGrpIdx[1]; - If selectLumaPix[minGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], exchange minGrpIdx and maxGrpIdx; - If selectLumaPix[minGrpIdx[1]] > selectLumaPix[maxGrpIdx[0]], exchange minGrpIdx[1] and maxGrpIdx[0]; - maxY, maxC, minY, and minC are derived as follows: - maxY = (selectLumaPix[maxGrpIdx[0]] + selectLumaPix[maxGrpIdx[1]] + 1) >> 1; - maxC = (selectChromaPix[maxGrpIdx[0]] + selectChromaPix[maxGrpIdx[1]] + 1) >> 1; - maxY = (selectLumaPix[minGrpIdx[0]] + selectLumaPix[minGrpIdx[1]] + 1) >> 1; - maxC = (selectChromaPix[minGrpIdx[0]] + selectChromaPix[minGrpIdx[1]] + 1) >> 1; - 8. Variables a, b, and k are derived as follows: [End of change]
[0421] 3.6 Another exemplary working draft for the proposed CCLM prediction In this section, another exemplary embodiment showing changes that can be made to the current working draft of the VVC standard is described. The equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0422] Specifications of the INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes.
[0423] [Additions to the current VVC working draft are as follows] The number of available adjacent chroma samples numTopSamp on the right and upper right, and the number of available adjacent chroma samples nLeftSamp on the left and lower left are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT = availT? nTbW:0 (8-157) numSampL = availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight, nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow, nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variables cntN, and the array pickPosN[] with L and T substituted for N are derived as follows: - The variable numIs4N is set equal to ((availN&&predModeIntra==INTRA_LT_CCLM)? 0:1) - The variable startPosN is set equal to numSampN>>(2+numIs4N) - The variable pickStepN is set equal to Max(1, numSampN>>(1+numIs4N)) - When availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to (1+numIs4N)<<1, and pickPosN[pos] is set equal to (startPosN+pos*pickStepN) for pos = 0..(cntN-1) - Otherwise, cntN is set equal to 0 The prediction samples predSamples[x][y] for x = 0..nTbW-1, y = 0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY+x, yTbY+y), the collocated luma samples pY[x][y] for x = 0..nTbW*2-1, y = 0..nTbH*2-1 are set equal to the reconstructed luma samples 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent left luma samples pY[x][y] for x=-1..-3, y = 0..2*numSampL-1 are set equal to the reconstructed luma samples - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper luma samples pY[x][y] for x = 0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma samples - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper left luma samples pY[x][y] for x=-1, y=-1,-2 are set equal to the reconstructed luma samples 3. The downsampled collocated luma samples pDsY[x][y] for x = 0..nTbW-1, y = 0..nTbH-1 are derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - For \(x = 1..nTbW - 1\) and \(y = 1..nTbH - 1\), \(pDsY[x][y]\) is derived as follows: \(pDsY[x][y]=(pY[2*x][2*y - 1]+\) \(pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+\) \(pY[2*x][2*y + 1]+4)>>3\ (8 - 163)\) - When \(availL\) is equal to TRUE, for \(y = 1..nTbH - 1\), \(pDsY[0][y]\) is derived as follows: \(pDsY[0][y]=(pY[0][2*y - 1]+\) \(pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+\) \(pY[0][2*y + 1]+4)>>3\ (8 - 164)\) - Otherwise, for \(y = 1..nTbH - 1\), \(pDsY[0][y]\) is derived as follows: \(pDsY[0][y]=(pY[0][2*y - 1]+2*pY[0][2*y]+pY[0][2*y + 1]+2)>>2\ (8 - 165)\) - When \(availT\) is equal to TRUE, for \(x = 1..nTbW - 1\), \(pDsY[x][0]\) is derived as follows: \(pDsY[x][0]=(pY[2*x][-1]+\) \(pY[2*x - 1][0]+4*pY[2*x][0]+pY[2*x + 1][0]+\) \(pY[2*x][1]+4)>>3\ (8 - 166)\) - Otherwise, for \(x = 1..nTbW - 1\), \(pDsY[x][0]\) is derived as follows: \(pDsY[x][0]=(pY[2*x - 1][0]+2*pY[2*x][0]+pY[2*x + 1][0]+2)>>2\ (8 - 167)\) - When \(availL\) is equal to TRUE and \(availT\) is equal to TRUE, \(pDsY[0][0]\) is derived as follows: \(pDsY[0][0]=(pY[0][-1]+\) \(pY[-1][0]+4*pY[0][0]+pY[1][0]+\) (pY[0][1]+4)>>3 (8 - 168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8 - 169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8 - 170) - In other cases (when availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8 - 171) - In other cases, the following applies: - For pDsY[x][y] where x = 1..nTbW - 1 and y = 0..nTbH - 1, it is derived as follows: pDsY[x][y]=(pY[2*x - 1][2*y]+pY[2*x - 1][2*y + 1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y + 1]+ pY[2*x + 1][2*y]+pY[2*x + 1][2*y + 1]+4)>>3 (8 - 172) - When availL is equal to TRUE, for pDsY[0][y] where y = 0..nTbH - 1, it is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[0][2*y]+2*pY[0][2*y + 1]+ pY[1][2*y]+pY[1][2*y + 1]+4)>>3 (8 - 173) - Otherwise, for pDsY[0][y] where y = 0..nTbH - 1, it is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8 - 174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL - 1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL - 1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y - 1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y + 1]+4)>>3 (8 - 175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8 - 177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[-2][2*y]+2*pY[-2][2*y + 1]+ pY[-3][2*y]+pY[-3][2*y + 1]+4)>>3 (8 - 178) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] for idx = 0..(cntT - 1) is set equal to p[pickPosT[idx]][-1], and the downsampled adjacent upper luma sample pSelDsY[idx] for idx = cntL..(cntL + cntT - 1) is defined as follows: - x is set equal to pickPosT[idx - cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8-181) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8-182) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8-183) - Otherwise (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8-184) - Otherwise, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x-1][-2]+pY[2*x-1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x+1][-2]+pY[2*x+1][-1]+4)>>3 (8-185) - Otherwise (bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-186) - Otherwise - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8-187) - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8-188) - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8 - 189) - In other cases (where availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 190) 6. The variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, set idx = 0 and 1, and pSelC[idx + 2]=pSelC[idx] and pSelDsY[idx + 2]=pSelDsY[idx]. - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]]>pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx ). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY = (pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[1]] + 1) >> 1. - minC = (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[1]] + 1) >> 1. 7. The variables a, b, and k are derived as follows: - When numSampL is equal to 0 and numSampT is equal to 0, the following applies: k = 0 (8 - 208) a = 0 (8 - 209) b = 1 << (BitDepthC - 1) (8 - 210) - Otherwise, the following applies: diff = maxY - minY (8 - 211) - When diff is not equal to 0, the following applies: diffC = maxC - minC (8 - 212) x = Floor(Log2(diff)) (8 - 213) normDiff = ((diff << 4) >> x) & 15 (8 - 214) x += (normDiff!= 0)? 1 : 0 (8 - 215) y = Floor(Log2(Abs(diffC))) + 1 (8 - 216) a = (diffC * (divSigTable[normDiff] | 8) + 2y - 1) >> y (8 - 217) k = ((3 + x - y) < 1)? 1 : 3 + x - y (8 - 218) a = ((3 + x - y) < 1)? Sign(a) * 15 : a (8 - 219) b = minC - ((a * minY) >> k) (8 - 220) Here, divSigTable[] is defined as follows: divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (8 - 221) - Otherwise (when diff is equal to 0), the following applies: k = 0 (8 - 222) a = 0 (8 - 223) b = minC (8 - 224) 8. For x = 0..nTbW - 1, y = 0..nTbH - 1, the prediction samples predSamples[x][y] are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) (8 - 225) [End of the exemplary embodiment]
[0424] 3.7 Another exemplary working draft for the proposed CCLM prediction In this section, another exemplary embodiment showing the changes that can be made to the current working draft of the VVC standard is described. The equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0425] Specifications of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes … The number of available right and upper - right adjacent chroma samples numTopSamp and the number of available left and lower - left adjacent chroma samples nLeftSamp are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT = availT? nTbW:0 (8 - 157) numSampL = availL? nTbH:0 (8 - 158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0 (8 - 159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow, nTbW)):0 (8 - 160) The variable bCTUboundary is derived as follows: bCTUboundary = (yTbC & (1 << (CtbLog2SizeY - 1) - 1) == 0)? TRUE : FALSE (8 - 161) The variables cntN, and the array pickPosN[] with N replaced by L and T are derived as follows: - The variable numIs4N is set equal to ((availN && predModeIntra == INTRA_LT_CCLM)? 0 : 1) - The variable startPosN is set equal to numSampN >> (2 + numIs4N) - The variable pickStepN is set equal to Max(1, numSampN >> (1 + numIs4N)) - When availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to Min(numSampN, (1 + numIs4N) << 1), and pickPosN[pos] is set equal to (startPosN + pos * pickStepN), with pos = 0..(cntN - 1) - Otherwise, cntN is set equal to 0 The prediction samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - When both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y] = 1 << (BitDepthC - 1) (8 - 162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY + x, yTbY + y), the collocated luma samples pY[x][y] for x = 0..nTbW * 2 - 1, y = 0..nTbH * 2 - 1 are set equal to the reconstructed luma samples 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent left luma samples pY[x][y] for x = -1..-3, y = 0..2*numSampL - 1 are set equal to the reconstructed luma samples. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper luma samples pY[x][y] for x = 0..2*numSampT - 1, y = -1,-2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper left luma samples pY[x][y] for x = -1, y = -1,-2 are set equal to the reconstructed luma samples. 3. The downsampled collocated luma samples pDsY[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x = 1..nTbW - 1, y = 1..nTbH - 1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+ pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+ pY[2*x][2*y + 1]+4)>>3 (8 - 163) - When availL is equal to TRUE, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y + 1]+4)>>3 (8 - 164) - Otherwise, for y = 1..nTbH-1, pDsY[0][y] is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-165) - When availT is equal to TRUE, for x = 1..nTbW-1, pDsY[x][0] is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+ pY[2*x][1]+4)>>3 (8-166) - Otherwise, for x = 1..nTbW-1, pDsY[x][0] is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-167) - When availL is equal to TRUE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ pY[0][1]+4)>>3 (8-168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-170) - Otherwise (availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise, the following applies: - For pDsY[x][y] where x = 1..nTbW-1 and y = 0..nTbH-1, it is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+ pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-172) - When availL is equal to TRUE, for pDsY[0][y] where y = 0..nTbH-1, it is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[0][2*y]+2*pY[0][2*y+1]+ pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-173) - Otherwise, for pDsY[0][y] where y = 0..nTbH-1, it is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL-1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL-1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y-1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y+1]+4)>>3 (8-175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx]][-1] for idx = 0..(cntT-1), and the downsampled adjacent upper luma sample pSelDsY[idx] for idx = cntL..(cntL+cntT-1) is defined as follows: - x is set equal to pickPosT[idx-cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x>0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 180) - Otherwise, - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8 - 181) - Otherwise, if availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 182) - Otherwise, if availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8 - 183) - Otherwise (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 184) - Otherwise, the following applies: - If x > 0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x - 1][-2]+pY[2*x - 1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x + 1][-2]+pY[2*x + 1][-1]+4)>>3 (8 - 185) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 186) - Otherwise - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8 - 187) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 188) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8 - 189) - Otherwise (when availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 190) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, replace Comp with DsY and C, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], and set pSelComp[1] equal to pSelComp[3]. - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0] = 0, minGrpIdx[1] = 1, maxGrpIdx[0] = 2, maxGrpIdx[1] = 3 - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]] > pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx). - If pSelDsY[minGrpIdx[1]] > pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY = (pSelDsY[maxGrpIdx[0]] + pSelDsY[maxGrpIdx[1]] + 1) >> 1. - maxC = (pSelC[maxGrpIdx[0]] + pSelC[maxGrpIdx[1]] + 1) >> 1. - minY = (pSelDsY[minGrpIdx[0]] + pSelDsY[minGrpIdx[1]] + 1) >> 1. - minC = (pSelC[minGrpIdx[0]] + pSelC[minGrpIdx[1]] + 1) >> 1. 7. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k = 0 (8 - 208) a = 0 (8 - 209) b = 1 << (BitDepthC - 1) (8 - 210) - Otherwise, the following applies: diff = maxY - minY (8 - 211) - If diff is not equal to 0, the following applies: diffC = maxC - minC (8 - 212) x = Floor(Log2(diff)) (8 - 213) normDiff = ((diff << 4) >> x) & 15 (8 - 214) x += (normDiff!= 0)? 1 : 0 (8 - 215) y = Floor(Log2(Abs(diffC))) + 1 (8 - 216) a = (diffC * (divSigTable[normDiff] | 8) + 2y - 1) >> y (8 - 217) k = ((3 + x - y) < 1)? 1 : 3 + x - y (8 - 218) a = ((3 + x - y) < 1)? Sign(a) * 15 : a (8 - 219) b = minC - ((a * minY) >> k) (8 - 220) Here, divSigTable[] is defined as follows: divSigTable[] = {0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} (8 - 221) - Otherwise (diff is equal to 0), the following applies: k = 0 (8 - 222) a = 0 (8 - 223) b = minC (8 - 224) 8. The predicted samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b) (8-225)
[0426] 3.8 Alternative working draft for the proposed CCLM prediction In this section, alternative exemplary embodiments are described that show alternative changes that can be made to the current working draft of the VVC standard. The equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0427] Specification of INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction modes … The number of available adjacent chroma samples numTopSamp on the right and upper right, and the number of available adjacent chroma samples nLeftSamp on the left and lower left are derived as follows: - When predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-157) numSampL=availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variables cntN, and the array pickPosN[] with L and T substituted for N are derived as follows: - The variable numIs4N is set equal to ((availT && availL && predModeIntra == INTRA_LT_CCLM)? 0 : 1). - The variable startPosN is set equal to numSampN>>(2 + numIs4N). - The variable pickStepN is set equal to Max(1, numSampN>>(1 + numIs4N)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, then cntN is set equal to Min(numSampN, (1 + numIs4N)<<1), and pickPosN[pos] is set equal to (startPosN + pos*pickStepN) for pos = 0..(cntN - 1). - Otherwise, cntN is set equal to 0. The prediction samples predSamples[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC - 1) (8 - 162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at position (xTbY + x, yTbY + y), the collocated luma samples pY[x][y] for x = 0..nTbW*2 - 1, y = 0..nTbH*2 - 1 are set equal to the reconstructed luma samples. 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent left luma samples pY[x][y] for x = -1..-3, y = 0..2*numSampL - 1 are set equal to the reconstructed luma samples. - When numSampT is greater than or equal to, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper luma samples pY[x][y] for x = 0..2*numSampT - 1, y = -1, -2 are set equal to the reconstructed luma samples - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY + x, yTbY + y), the adjacent upper - left luma samples pY[x][y] for x = -1, y = -1, -2 are set equal to the reconstructed luma samples 3. The down - sampled collocated luma samples pDsY[x][y] for x = 0..nTbW - 1, y = 0..nTbH - 1 are derived as follows: - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x = 1..nTbW - 1, y = 1..nTbH - 1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y - 1]+ pY[2*x - 1][2*y]+4*pY[2*x][2*y]+pY[2*x + 1][2*y]+ pY[2*x][2*y + 1]+4)>>3 (8 - 163) - When availL is equal to TRUE, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y + 1]+4)>>3 (8 - 164) - Otherwise, pDsY[0][y] for y = 1..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y - 1]+2*pY[0][2*y]+pY[0][2*y + 1]+2)>>2 (8 - 165) - When availT is equal to TRUE, pDsY[x][0] for x = 1..nTbW - 1 is derived as follows: pDsY[x][0] = (pY[2*x][-1] + pY[2*x - 1][0] + 4 * pY[2*x][0] + pY[2*x + 1][0] + pY[2*x][1] + 4) >> 3 (8 - 166) - Otherwise, for x = 1..nTbW - 1, pDsY[x][0] is derived as follows: pDsY[x][0] = (pY[2*x - 1][0] + 2 * pY[2*x][0] + pY[2*x + 1][0] + 2) >> 2 (8 - 167) - When availL is equal to TRUE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[0][-1] + pY[-1][0] + 4 * pY[0][0] + pY[1][0] + pY[0][1] + 4) >> 3 (8 - 168) - Otherwise, when availL is equal to TRUE and availT is equal to FALSE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[-1][0] + 2 * pY[0][0] + pY[1][0] + 2) >> 2 (8 - 169) - Otherwise, when availL is equal to FALSE and availT is equal to TRUE, pDsY[0][0] is derived as follows: pDsY[0][0] = (pY[0][-1] + 2 * pY[0][0] + pY[0][1] + 2) >> 2 (8 - 170) - Otherwise (when availL is equal to FALSE and availT is equal to FALSE), pDsY[0][0] is derived as follows: pDsY[0][0] = pY[0][0] (8 - 171) - Otherwise, the following applies: - For x = 1..nTbW - 1, y = 0..nTbH - 1, pDsY[x][y] is derived as follows: pDsY[x][y]=(pY[2*x - 1][2*y]+pY[2*x - 1][2*y + 1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y + 1]+ pY[2*x + 1][2*y]+pY[2*x + 1][2*y + 1]+4)>>3 (8 - 172) - When availL is equal to TRUE, pDsY[0][y] for y = 0..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y + 1]+ 2*pY[0][2*y]+2*pY[0][2*y + 1]+ pY[1][2*y]+pY[1][2*y + 1]+4)>>3 (8 - 173) - Otherwise, pDsY[0][y] for y = 0..nTbH - 1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y + 1]+1)>>1 (8 - 174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] for idx = 0..(cntL - 1) is set equal to p[-1][pickPosL[idx]], and the selected downsampled left luma sample pSelDsY[idx] for idx = 0..(cntL - 1) is derived as follows: - The variable y is set equal to pickPosL[idx] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y - 1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y + 1]+4)>>3 (8 - 175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8 - 177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8 - 178) 5. When numSampT is greater than 0, the selected adjacent upper chroma sample pSelC[idx] is set equal to p[pickPosT[idx - cntL]][-1] for idx = cntL..(cntL + cntT - 1), and the downsampled adjacent upper luma sample pSelDsY[idx] for idx = cntL..(cntL + cntT - 1) is defined as follows: - x is set equal to pickPosT[idx - cntL] - When sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x - 1][-2]+4*pY[2*x][-2]+pY[2*x + 1][-2]+ pY[2*x][-1]+4)>>3 (8 - 179) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 180) - Otherwise, - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8 - 181) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 182) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8 - 183) - In other cases (when availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 184) - In other cases, the following applies: - When x > 0: - When bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x - 1][-2]+pY[2*x - 1][-1]+ 2*pY[2*x][-2]+2*pY[2*x][-1]+ pY[2*x + 1][-2]+pY[2*x + 1][-1]+4)>>3 (8 - 185) - Otherwise (when bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x - 1][-1]+ 2*pY[2*x][-1]+ pY[2*x + 1][-1]+2)>>2 (8 - 186) - In other cases - When availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[-1][-2]+pY[-1][-1]+ 2*pY[0][-2]+2*pY[0][-1]+ pY[1][-2]+pY[1][-1]+4)>>3 (8 - 187) - Otherwise, when availTL is equal to TRUE and bCTUboundary is equal to TRUE, the following applies: pSelDsY[idx]=(pY[-1][-1]+ 2*pY[0][-1]+ pY[1][-1]+2)>>2 (8 - 188) - Otherwise, when availTL is equal to FALSE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8 - 189) - In other cases (availTL is equal to FALSE and bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8 - 190) 6. When cntT + cntL is not equal to 0, the variables minY, maxY, minC, and maxC are derived as follows: - - When cntT + cntL is equal to 2, replace Comp with DsY and C, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], and set pSelComp[1] equal to pSelComp[3] - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=2, maxGrpIdx[0]=1, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx ). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. 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 follows: divSigTable[]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0} (8-221) - Otherwise (diff equals 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] FIG. 18 shows a flowchart of an exemplary method for video processing. Method 1800 includes, at step 1802, determining parameters of a cross-component linear model based on R chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the R chroma samples are selected from the group based on a position rule and R is 2 or more. Method 1800 further includes, at step 1804, performing the conversion based on the determination.
[0430] FIG. 19A shows a flowchart of an exemplary method for video processing. Method 1900 includes, at step 1902, determining parameters of a cross-component linear model based on chroma samples selected based on the positions of the chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where the selected chroma samples are selected from a group of adjacent chroma samples. Method 1900 further includes, at step 1904, performing the conversion based on the determination.
[0431] FIG. 19B shows a flowchart of an exemplary method for video processing. Method 1910 includes, at step 1912, determining a group of adjacent chroma samples used to derive a set of values regarding parameters of a linear model for a current video block, where the width and height of the current video block are W and H respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples. Method 1910 further includes, at step 1914, performing a conversion between the current video block and an encoded representation of the video including the current video block based on the linear model.
[0432] 20A shows a flowchart of an example method for video processing. Method 2000 includes, at step 2002, determining sets of parameters for transforming between a current video block of 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. Method 2000 further includes, at step 2004, determining parameters for a final CCLM based on the sets of parameters. Method 2000 further includes, at step 2006, performing the 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 among N groups of selected chroma and luma samples from neighboring luma and chroma samples of the current video block for conversion between a 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 flowchart of an example method for video processing. Method 2100 includes, at step 2102, determining parameters of a cross-component linear model fully determinable by two chroma samples and two corresponding luma samples for transforming between a current video block of video that is a chroma block and a coded representation of the video. Method 2100 further includes, at step 2104, performing the transform based on the determination.
[0435] FIG. 22 shows a flowchart of an exemplary method for video processing. Method 2200 includes, at step 2202, determining parameters of a cross-component linear model using a parameter table for conversion between a current video block of a video, which is a chroma block, and an encoded representation of the video, where an entry in the parameter table is retrieved according to two chroma sample values and two luma sample values. Method 2100 further includes, at step 2204, performing the conversion based on the determination.
[0436] FIG. 23A shows a flowchart of an exemplary method for video processing. Method 2310 includes, at step 2312, determining a final prediction P(x, y) of a chroma sample at a position (x, y) within a current video block as a combination of prediction results of a plurality of cross-component linear models (MCCLMs) for conversion between a current video block of a video, which is a chroma block, and an encoded representation of the video, where the MCCLMs are selected based on the position (x, y) of the chroma sample. Method 2310 further includes, at step 2314, performing the conversion based on the final prediction.
[0437] FIG. 23B shows a flowchart of an exemplary method for video processing. Method 2320 includes, at step 2322, performing a first determination as to whether a first cross-component linear model (CCLM) that uses only a left adjacent sample is used to predict samples of a current video block for conversion between a current video block of a video, which is a chroma block, and an encoded representation of the video, and / or performing a second determination as to whether a second cross-component linear model (CCLM) that uses only an upper adjacent sample is used to predict samples of the current video block. Method 2320 further includes, at step 2324, performing the conversion based on the first determination and / or the second determination.
[0438] 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 using arithmetic coding into the encoded representation of the current video block for conversion between a current video block of video 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. 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 the 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 a current video block of video and a coded representation of the video. The method 2430 further includes, at step 2434, performing the conversion based on the determination.
[0441] Figure 24D shows a flowchart of an exemplary method for video processing. Method 2440 includes, at step 2442, determining parameters regarding linear model prediction or cross-color component prediction by selecting adjacent samples based on the positions of the maximum or minimum adjacent samples for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video. Method 2440 further includes, at step 2444, performing the conversion based on the determination.
[0442] Figure 24E shows a flowchart of an exemplary method for video processing. Method 2450 includes, at step 2452, determining parameters regarding linear model prediction or cross-color component prediction based on the primary color component and the secondary color component for conversion between the current video block of the video and the encoded 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. Method 2450 further includes, at step 2454, performing the conversion based on the determination.
[0443] Figure 25A shows a flowchart of an exemplary method for video processing. Method 2510 includes, at step 2512, performing downsampling on the chroma and luma samples of the adjacent blocks of the current video block. Method 2510 further includes, at step 2514, determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video. Method 2510 further includes, at step 2516, performing the conversion based on the determination.
[0444] FIG. 25B shows a flowchart of an exemplary method for video processing. Method 2520 includes, at step 2522, determining parameters of a cross-component linear model (CCLM) based on two or more chroma samples from a group of adjacent chroma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, wherein the two or more chroma samples are selected based on an encoding mode of the current video block. Method 2520 further includes, at step 2524, performing the conversion based on the determination.
[0445] FIG. 26A shows a flowchart of an exemplary method for video processing. Method 2610 includes, at step 2612, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper adjacent samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, where W is an integer. Method 2520 further includes, at step 2524, performing the conversion based on the determination.
[0446] FIG. 26B shows a flowchart of an exemplary method for video processing. Method 2620 includes, at step 2622, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on H available adjacent samples to the left of the current video block for conversion between a current video block of a video that is a chroma block and an encoded representation of the video. Method 2620 further includes, at step 2624, performing the conversion based on the determination.
[0447] 27A shows a flowchart 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 flowchart of an example method for video processing. Method 2720, at step 2722, selects chroma samples based on position rules for conversion between a current video block of 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). Method 2720 further includes, at step 2724, performing the conversion based on the determination. In this example, the position rules specify selecting chroma samples located in the row above and / or the 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 locations at which luma samples are downsampled for a 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 flowchart of an example method for video processing. 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 coding conditions associated with the current video block for converting between a current video block of video that is a chroma block and a coded representation of the video. 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. 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 converting between a current video block of video that is a chroma block and a coded representation of the video based on the availability of neighboring blocks to the left and above the current video block. Method 2830 further includes, at step 2834, performing the conversion based on the determination.
[0452] 29A shows a flowchart of an example method for video processing. The method 2910 includes, at step 2912, determining parameters of a coding 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 the video and a coded representation of the video. The method 2910 further includes, at step 2914, performing the conversion based on the determination.
[0453] 29B shows a flowchart of an example method for video processing. 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 transforming between a current video block of video and a coded representation of the video, where the N neighboring samples of the current video block are selected based on positions of the N neighboring samples. Method 2920 further includes, at step 2924, performing the transform based on the determination. The LIC tool uses a linear model of illumination changes in the current video block during the transform.
[0454] 29C shows a flowchart of an example method for video processing. Method 2930 includes, at step 2932, determining parameters of a cross-component linear model (CCLM) based on the chroma samples and corresponding luma samples for transforming between a current video block of video, the current video block being a chroma block, and a coded representation of the video. Method 2930 further includes, at step 2934, performing the transform based on the determination. In this example, some of the chroma samples are obtained by a padding operation, and the chroma samples and corresponding luma samples are grouped into two arrays G0 and G1, each array containing two chroma samples and corresponding luma samples.
[0455] Implementation examples of the disclosed technology Figure 30A is a block diagram of a video processing apparatus 3000. The apparatus 3000 can be used to implement one or more of the methods described herein. The apparatus 3000 can be embodied in a smartphone, a tablet, a computer, or an Internet of Things (IoT) receiver. The apparatus 3000 can include one or more processors 3002, one or more memories 3004, and video processing hardware 3006. The (one or more) processors 3002 can be configured to execute one or more of the methods described in this document (including, but not limited to, the methods shown in FIGS. 18-29C). The (one or more) memories 3004 can be used to store data and code used to execute the methods and techniques described herein. The video processing hardware 3006 can be used to implement some of the techniques described in this document in hardware circuits.
[0456] Figure 30B is another example of a block diagram of a video processing system in which the disclosed techniques can be implemented. Figure 30B is a block diagram showing an example of a video processing system 3100 in which various techniques disclosed herein can be implemented. Various implementations can include some or all of the components of the system 3100. The system 3100 can include an input 3102 for receiving video content. The video content can be received in a raw or uncompressed format, such as, for example, 8-bit or 10-bit multi-component pixel values, or in a compressed or encoded format. The input 3102 can represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet®, Passive Optical Network (PON), and wireless interfaces such as Wi-Fi® or a cellular interface.
[0457] System 3100 may include an encoding component 3104 that can implement various coding or encoding methods described in this document. The encoding component 3104 may reduce the average bit rate of the video from input 3102 to the output of the encoding component 3104 to generate an encoded representation of the video. Encoding techniques are therefore sometimes referred to as video compression techniques or video transcoding techniques. The output of the encoding component 3104 may be stored or connected as represented by component 3106 and transmitted via communication. The stored or communicated bitstream (or encoded) representation of the video received at input 3102 may be used by component 3108 to generate pixel values or a displayable video that is sent to a display interface 3110. The process of generating a video that a user can view from the bitstream representation is sometimes referred to as video decompression. Also, although certain video processing operations may be referred to as "encoding" operations or tools, it is understood that encoding tools or operations are used in an encoder and corresponding decoding tools or operations that reverse the encoding result are executed in a decoder.
[0458] Examples of a peripheral bus interface or a display interface may include a Universal Serial Bus (USB), a High-Definition Multimedia Interface (HDMI (registered trademark)), a DisplayPort, etc. Examples of a storage interface include SATA (serial advanced technology attachment), PCI, an IDE interface, etc. The techniques described in this document may be embodied in various electronic devices such as, for example, a mobile phone, a laptop, a smartphone, or other devices capable of performing digital data processing and / or video display.
[0459] In some embodiments, the video encoding method may be executed using an apparatus implemented on a hardware platform as described with respect to FIGS. 30A or 30B.
[0460] Various techniques 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.a.d. and 1.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 a transformation between a current video block of a video that is 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 transformation 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 2 S The method of claim 1, wherein S has a value determined based on the chroma sample at the position, and S is 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 G with coordinates (x - 1, y + H + H / 2), sample I with coordinates (x - 1, y + H + H - 1), sample J with coordinates (x, y - 1), sample K with coordinates (x + W / 2 - 1, y - 1), sample L with coordinates (x + W / 2, y - 1), sample M with coordinates (x + W - 1, y - 1), sample N with coordinates (x + W, y - 1), sample O with coordinates (x + W + W / 2 - 1, y - 1), sample P with coordinates (x + W + W / 2, y - 1), and sample Q with coordinates (x + W + W - 1, y - 1). The method according to claim 1.
[0467] 6. The position rule stipulates that the two chroma samples are selected from sample A, D, J, and M. The method according to claim 5.
[0468] 7. The position rule stipulates that the two chroma samples are selected from sample A, B, C, D, J, K, L, and M. The method according to claim 5.
[0469] 8. The position rule stipulates that the two chroma samples are selected from sample A, I, J, and Q. The method according to claim 5.
[0470] 9. The position rule stipulates that the two chroma samples are selected from sample A, B, D, I, J, K, M, and Q. The method according to claim 5.
[0471] 10. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, B, D, F, J, K, M, and O.
[0472] 11. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, C, G, I, J, L, P, and Q.
[0473] 12. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, C, E, G, J, L, N, and P.
[0474] 13. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, and M.
[0475] 14. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, L, N, and Q.
[0476] 15. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, M, N, O, P, and Q.
[0477] 16. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples A, B, C, D, E, F, G, and I.
[0478] 17. The method according to item 5, wherein the position rule stipulates that the two chromatographic samples are selected from the samples J, K, L, M, N, O, P, and Q.
[0479] 18. The method according to claim 5, wherein the position rule stipulates that one of the two chroma samples is selected from the samples A, B, C, D, E, F, G, and I, and the other of the two chroma samples is selected from the samples J, K, L, M, N, O, P, and Q.
[0480] 19. The method according to any one of claims 5 to 18, wherein the two chroma samples have equal corresponding luma values, and the method further includes checking additional chroma samples.
[0481] 20. The method according to claim 1, wherein in order to determine the first set of values for the parameters, the chroma samples within the group of adjacent chroma samples are searched to find the two chroma samples having the minimum and maximum corresponding luma values.
[0482] 21. The method according to claim 1, wherein the upper adjacent sample having coordinates (x, y) is within the group only when x%K = 0, where K is 2, 4, 6, or 8 and % is the modulo operator.
[0483] 22. The method according to claim 1, wherein the left adjacent sample having coordinates (x, y) is within the group only when y%K = 0, where K is 2, 4, 6, or 8 and % is the modulo operator.
[0484] 23. The method according to claim 1, wherein the two chroma samples are selected based on the availability of adjacent blocks.
[0485] 24. The method according to any one of claims 1 to 23, wherein the execution of the transformation includes generating the encoded representation from the current block.
[0486] 25. The method according to any one of claims 1 to 23, wherein the execution of the transformation includes generating the current block from the encoded representation.
[0487] 26. An apparatus in a video system having a processor and non-transitory memory having instructions that, when executed by the processor, cause the processor to perform the method of any one of clauses 1 to 25.
[0488] 27. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for carrying out the method of any one of clauses 1 to 25.
[0489] The second set of paragraphs describes particular features and aspects of the disclosed technology 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 chroma samples selected based on positions of the chroma samples for a transformation between a current video block of the video, the current video block being a chroma block, and a coded representation of the video, the selected chroma samples being selected from a group of adjacent chroma samples; and performing the transformation 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 video block is a second linear mode that uses only neighboring samples above, all of the selected chroma samples are above the current block.
[0494] 5. The method according to any one of claims 1 to 4, wherein the position of the chroma sample is selected based on the width or height of the chroma block.
[0495] 6. The method according to claim 1, wherein the position of the chroma sample corresponds to signaling in a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, a tile group header, a tile, a coding unit (CU), a coding tree unit (CTU), or a prediction unit (PU).
[0496] 7. The method according to claim 1, wherein the determination of the parameter is further based on the least mean square method.
[0497] 8. The method according to claim 1, wherein the determination of the parameter is further based on the two-point method.
[0498] 9. A method for video processing, comprising: determining a group of adjacent chroma samples used to derive a set of values for parameters of a linear model for a current video block, wherein the width and height of the current video block are W and H, respectively, and the group of adjacent chroma samples includes at least one sample located beyond 2×W upper adjacent chroma samples or 2×H left adjacent chroma samples; and performing a conversion between the current video block and an encoded representation of a video including the current video block based on the linear model.
[0499] 10. The method according to claim 9, wherein the current video block is encoded using a linear intra prediction mode, the upper left sample of the current video block is (x, y), the at least one sample is (x - 1, y + d), d is an integer within a range [T, S], and T and S are integers.
[0500] 11. The method according to claim 9, wherein T < 0 and S > (2×H - 1).
[0501] 12. The method according to item 9, wherein T = -4 and S = 3×H.
[0502] 13. The method according to item 9, wherein T = 0 and S = max(2×W, W + H).
[0503] 14. The method according to item 9, wherein T = 0 and S = 4×H.
[0504] 15. The method according to item 9, wherein the current video block is encoded using a linear intra prediction mode, the top - left sample of the current video block is (x, y), the at least one sample is (x + d, y - 1), d is an integer within the range [T, S], and T and S are integers.
[0505] 16. The method according to item 15, wherein T < 0 and S > (2×W - 1).
[0506] 17. The method according to item 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 according to item 15, wherein T = 0 and S = 4×W.
[0509] 20. The method according to any one of items 1 to 19, wherein the execution of the transformation includes generating the encoded representation from the current block.
[0510] 21. The method according to any one of items 1 to 19, wherein the execution of the transformation includes generating the current block from the encoded representation.
[0511] 22. An apparatus in a video system having a processor and a non - transient memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of items 1 to 21.
[0512] 23. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any one of clauses 1 to 21.
[0513] The third set of paragraphs describes particular features and aspects of the disclosed techniques listed in the preceding sections, including, for example, Examples 2 and 5.
[0514] 1. A method for video processing, comprising: determining sets of parameters for a transformation between a current video block of the video, the current video block being 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 group of corresponding chroma samples at corresponding chroma sample locations; determining parameters for a final CCLM based on the sets of parameters; and performing the transformation based on the final CCLM.
[0515] 2. The method of claim 1, wherein the parameters for the final CCLM are determined as the average of corresponding parameters in the multiple sets of parameters.
[0516] 3. The method of claim 1, wherein the plurality of sets of parameters comprises 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, and the first group and the second group correspond to different chroma sample positions.
[0519] 6. The upper left sample of the chroma block is (x, y), the width and height of the chroma block are W and H respectively, and the group of chroma samples is sample A having coordinates (x - 1, y), sample B having coordinates (x - 1, y + H / 2 - 1), sample C having coordinates (x - 1, y + H / 2), sample D having coordinates (x - 1, y + H - 1), sample E having coordinates (x - 1, y + H), sample F having coordinates (x - 1, y + H + H / 2 - 1), sample G having coordinates (x - 1, y + H + H / 2), sample I having coordinates (x - 1, y + H + H - 1), sample J having coordinates (x, y - 1), sample K having coordinates (x + W / 2 - 1, y - 1), sample L having coordinates (x + W / 2, y - 1), sample M having coordinates (x + W - 1, y - 1), sample N having coordinates (x + W, y - 1), sample O having coordinates (x + W + W / 2 - 1, y - 1), sample P having coordinates (x + W + W / 2, y - 1), or sample Q having coordinates (x + W + W - 1, y - 1), The method according to claim 5, having at least one of
[0520] 7. The method according to claim 6, wherein the first group includes sample A and D, and the second group includes sample J and M, or sample E and I.
[0521] 8. The method according to claim 6, wherein the first group includes sample A and I, and the second group includes sample J and Q.
[0522] 9. The method according to item 6, wherein the first group includes samples A and B, and the second group includes samples C and D.
[0523] 10. The method according to item 6, wherein the first group includes samples J and M, and the second group includes samples N and Q.
[0524] 11. The method according to item 6, wherein the first group includes samples J and K, and the second group includes samples L and M.
[0525] 12. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) based on minimum and maximum chroma and luma samples among N groups of chroma and luma samples selected from adjacent luma and chroma samples of a current video block of a video for conversion between the current video block of the video and an encoded representation of the video; and performing the conversion using the CCLM.
[0526] 13. The N groups of chroma and luma samples include S0, S1,..., S m , where 1 ≦ m ≦ N - 1, m and N are non-negative integers, the maximum luma value is calculated as maxL = f1(maxL S0 , maxL S1 ,..., maxL Sm ), f1 is a first function, and maxL Si is the maximum luma value of group S i among a plurality of groups. The maximum chroma value is calculated as maxC = f2(maxC S0 , maxC S1 ,..., maxC Sm ), f2 is a second function, and maxC Si is the chroma value of the group S Si corresponding to maxL i . The minimum luma value is calculated as minL = f3(minL S0 , minL S1 ,..., minL Sm) is calculated as, f3 is the third function, and minL Si is the minimum luma value of group S i , and the minimum chroma value is minC = f4(minC S0 , minC S1 , …, minC Sm ) is calculated as, f4 is the fourth function, and minC Si is the chroma value of group S Si corresponding to minL i , and the parameters of the linear model have α = (maxC - minC) / (maxL - minL) and β = minC - α × minL calculated as, the method according to claim 12.
[0527] 14. The method according to claim 13, wherein f1, f2, f3, and f4 are averaging functions.
[0528] 15. The method according to claim 13 or 14, wherein m = N - 1 16. The method according to claim 13 or 14, wherein m = 1 and S1 = S N-1 .
[0529] 17. The method according to claim 13 or 14, wherein m = 0
[0530] 18. The method according to claim 13 or 14, wherein S0 has samples from the row above the current video block, and S1 has samples from the row to the left of the current video block.
[0531] 19. The samples from the row above the current video block have coordinates (x, y), S0 has a first part of the samples, each sample in the first part satisfies x%P = Q, S1 has a second part of the samples, each sample in the second part satisfies x%P ≠ Q, where % is the modulo operator, and P and Q are non - negative integers, the method according to claim 13 or 14.
[0532] 20. The method of claim 13 or 14, wherein samples from the left row of the current video block have coordinates (x, y), S0 has a first portion of the samples, each sample of the first portion satisfying y%P=Q, and S1 has 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 of any of clauses 12 to 14, wherein the chroma and luma samples comprise only a portion of the chroma and luma samples of neighboring blocks.
[0535] 23. The method according to any one of paragraphs 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 clause 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 clause 12, wherein the chroma and luma samples for each group are selected based on the width and height of the current video block.
[0539] 27. The method of clause 12, wherein the chroma and luma samples of each group are selected based on the values of the chroma and luma samples.
[0540] 28. The method according to any one of claims 1 to 27, wherein the execution of the conversion includes generating the encoded representation from the current block.
[0541] 29. The method according to any one of claims 1 to 27, wherein the execution of the conversion includes generating the current block from the encoded representation.
[0542] 30. An apparatus in a video system having a processor and a non-transitory memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of claims 1 to 29.
[0543] 31. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 29.
[0544] The fourth set of claims describes specific features and aspects of the disclosed techniques recited in the preceding sections, including, for example, Examples 3.a - b and 3.d.
[0545] 1. A method of video processing, comprising determining parameters of a cross-component linear model that can be fully determined by two chroma samples and corresponding two luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, and performing the conversion based on the determination.
[0546] 2. The method according to claim 1, wherein the two chroma samples are denoted as C0 and C1, the corresponding luma samples are denoted as L0 and L1, the parameters of the cross-component linear model are denoted as α and β, and α and β are defined by the equations α = (C1 - C0) / (L1 - L0) and β = C0 - α × L0.
[0547] 3. The method according to claim 2, wherein α = 0 when L1 is equal to L0.
[0548] 4. The method according to item 2, wherein when L1 is equal to L0, an intra prediction mode other than the mode of the cross-component linear model is used.
[0549] 5. The method according to item 2, wherein α is determined by eliminating a division operation.
[0550] 6. The method according to item 2, wherein α is determined using a process that does not use a lookup table, and the process does not include a division operation.
[0551] 7. The method according to item 2, wherein the parameter of the cross-component linear model has a value determined based on the value of (L1 - L0).
[0552] 8. α = Shift(C1 - C0, Floor(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. The method according to item 2.
[0553] 9. α = Shift(C1 - C0, Ceiling(log2(L1 - L0))), where Shift(x, s) = (x + off) >> s, off is an integer, Ceiling(x) is a ceiling function that outputs the smallest integer greater than or equal to x. The method according to item 2.
[0554] 10. The method according to item 8 or 9, wherein the process for obtaining the value of log2(x) is performed by examining the position of the most significant digit of x.
[0555] 11. The method according to item 1, wherein the determination of the parameter is performed within K bits, and K is 8, 10, 12, 16, 24, or 32.
[0556] 12. The method according to item 11, wherein an intermediate variable is clipped or right-shifted so as to be within the K bits.
[0557] 13. The method of any of clauses 1 to 12, wherein the performing of the transformation includes generating the coded 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 coded representation.
[0559] 15. 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 the method of any one of clauses 1 to 14.
[0560] 16. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising 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 a conversion between a current video block of a video that 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 P Item 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] is M[kZ]=((1< <S)+Off) / kを満たし、Sは精度を定める整数であり、Offはオフセットを示し、Zは前記パラメータテーブルの最初の値である、項1に記載の方法。
[0566] 5. The method of claim 1, wherein the two chroma samples are denoted as C0 and C1, the 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.
[0567] 6. The method of clause 5, wherein k = Shift(L1-L0,W), where k is used to look up an entry in the parameter table, and Shift(x,s) = (x+off) >> s, where off is an integer, and W is the width of the current video block.
[0568] 7. The method according to item 6, wherein when kZ<0 or kZ≧V, α is zero, V indicates the size of the parameter table, and Z indicates the first value of the parameter table.
[0569] 8. The method of clause 5, wherein α=Shift((C1-C0)×M[kZ],D) or α=SignShift((C1-C0)×M[kZ],D), Shift(x,s)=(x+off)>>s, and SignShift(x,s) is (x+off)>>s if x≧0 and −(−x+off)>>s if x<0, where off is an integer, and k indicates an index for querying an entry in the parameter table.
[0570] 9. The method of claim 8, wherein k is derived based on the value of (L1-L0) and not based on the value of (C1-C0).
[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 clause 8, wherein k = Shift(L1-L0,W), where k is an index for referencing an entry in the parameter table, and Shift(x,s) = (x+off) >> s, where off is an integer, and W is the width of the current video block.
[0574] 13. The method according to item 8, wherein k is valid within the range between kMin and kMax, and k=L1-L0 if (L1-L0)≦kMax, and k=Shift(L1-L0,W) if (L1=L0)>kMax.
[0575] 14. The method according to item 8, wherein k is valid within the range between kMin and kMax, and k=Min(kMax, L1-L0) or k=Max(kMin,Min(kMax, L1-L0)).
[0576] 15. The method 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 when x≧0, and is −(−x+off)>>s when x<0.
[0579] 18. The method according to any one of claims 1 to 17, wherein the performing of the transformation includes generating the encoded representation from the current block.
[0580] 19. The method according to any one of claims 1 to 17, wherein the performing of 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, which when executed by the processor cause the processor to perform the 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 program code for performing the method according to any one of claims 1 to 19.
[0583] The sixth set of claims describes certain features and aspects of the disclosed technology enumerated in the preceding sections, including for example Examples 4 and 6.
[0584] 1. A method of video processing, comprising: determining a final prediction P(x, y) of a chroma sample at a position (x, y) within a current video block of a video, which is a chroma block, as a combination of prediction results of a plurality of cross - component linear models (MCCLMs), the MCCLMs being selected based on the position (x, y) of the chroma sample; and performing the transformation based on the final prediction.
[0585] 2. The method according to claim 1, wherein the plurality of cross - component linear models includes a first linear model whose parameters are derived from only left - adjacent samples and a second linear model whose parameters are derived from only upper - adjacent samples.
[0586] 3. The method of claim 1, wherein some of the chroma samples are predicted based only on neighboring samples to the left and some of the chroma samples are predicted based only on neighboring samples above.
[0587] 4. The method of claim 2 or 3, wherein the final prediction P(x,y) of the chroma sample is based on a weighted average of the prediction P1(x,y) from the first linear model and the prediction P2(x,y) from the second linear model.
[0588] 5. The method described in section 4, where P(x,y) = w1 × P1(x,y) + w2 × P2(x,y), and w1 and w2 are weights constrained by w1 + w2 = 1.
[0589] 6. 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 such that w1+w2=1< <shiftによって制約される重みである、項4に記載の方法。
[0590] 7. 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 paragraphs 5 to 7, wherein the values of w1 and w2 depend on the position (x, y).
[0592] 9. If x>y, then w1 <w2であり、x<yの場合、w1> 8. The method according to any one of items 5 to 7, wherein when x=y, w1=w2.
[0593] 10.x <yの場合、(y-x)の値が増加すると(w1-w2)の値が増加する、項5乃至7のいずれかに記載の方法。
[0594] 11. The method according to any one of paragraphs 5 to 7, wherein, if x>y, the value of (w2-w1) increases as the value of (xy) increases.
[0595] 12. A method of video processing, comprising the steps of: performing a first decision regarding whether a first cross-component linear model (CCLM) using only left adjacent samples will be used to predict samples of 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 first decision and / or the second decision regarding whether a second cross-component linear model (CCLM) using only upper adjacent samples will be used to predict samples of the current video block.
[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 clauses 1 to 15, wherein the performing the transformation includes generating the coded representation from the current block.
[0600] 17. The method of any of clauses 1 to 15, wherein performing the transformation includes generating the current block from the coded representation.
[0601] 18. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor, cause the processor to execute the method according to any one of items 1 to 17.
[0602] 19. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for executing the method according to any one of items 1 to 17.
[0603] The seventh group of items describes specific features and aspects of the disclosed technology listed in the preceding section including, for example, Example 7, Example 8, Examples 11 - 13.
[0604] 1. A method of video processing, comprising: determining a context used for encoding a flag using arithmetic coding of the current video block into the encoded representation of the current video block for conversion between the current video block of the video and the encoded representation of the video, the context being based on whether an upper left adjacent block of the current video block is encoded using a cross-component linear model (CCLM) prediction mode; and performing the conversion based on the determination.
[0605] 2. The method according to item 1, wherein the context has a first context when the upper left adjacent block uses the CCLM prediction mode, and has a second context different from the first context when the upper left adjacent block does not use the CCLM prediction mode.
[0606] 3. The method according to item 1, wherein the upper left adjacent block is unusable and the CCLM prediction mode is considered valid.
[0607] 4. The method according to item 1, wherein the upper left adjacent block is unusable 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 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 the encoding modes of one or more neighboring blocks of the current video block; and performing the conversion based on the determination.
[0611] 8. The method of clause 7, wherein an upper-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 clause 7, wherein an upper-left neighboring block of the one or more neighboring blocks is coded in the DM mode, and an indication of the DM mode is coded first.
[0613] 10. The method of clause 7, wherein an upper-left neighboring block of the one or more neighboring blocks is coded in a coding mode different from the LM mode, and the indication of the DM mode is coded 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 video 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 video block for conversion between a current video block and a coded representation of the video, 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 according to paragraph 12, wherein the refinement process comprises a filtering process or a non-linear process.
[0618] 15. The method of 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 clause 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 according to item 17, wherein f0 and f1 are the first functions.
[0622] 19. The method according to item 17, wherein f2 and f3 are the second functions.
[0623] 20. The method according to item 17, wherein f0, f1, f2, and f3 are the third functions.
[0624] 21. The method according to item 20, wherein the third function is an averaging function.
[0625] 22. The method according to item 17, wherein S = T 23. The method according to item 17, wherein (Lx1, Lx2, …, LxS) is the minimum sample among a group of luma samples.
[0626] 24. The method according to item 17, wherein {Ly1, Ly2, …, LyT} is the maximum sample among a group of luma samples.
[0627] 25. The method according to item 23 or 24, wherein the group of luma samples has all adjacent samples used in VTM-3.0 to derive the parameters of the linear model prediction.
[0628] 26. The method according to item 23 or 24, wherein the group of luma samples has a subset, not all, of the adjacent samples used in VTM-3.0 to derive the parameters of the linear model prediction.
[0629] 27. A video processing method, comprising: determining parameters related to linear model prediction or cross-color component prediction by selecting adjacent samples based on the positions of the maximum adjacent sample or the minimum adjacent sample for conversion between the current video block of the video, which is a chroma block, and the encoded representation of the video; and performing the conversion based on the determination.
[0630] 28. The method according to claim 27, wherein the maximum adjacent sample is at position (x0, y0), and samples in regions (x0 - d1, y0), (x0, y0 - d2), (x0 + d3, y0), (x0, y0 + d4) are used to select the adjacent samples, and {d1, d2, d3, d4} depends on the position (x0, y0).
[0631] 29. The method according to claim 27, wherein the minimum adjacent sample is at position (x1, y1), and samples in regions (x1 - d1, y1), (x1, y1 - d2), (x1 + d3, y1), (x1, y1 + d4) are used to select the adjacent samples, and {d1, d2, d3, d4} depends on the position (x1, y1).
[0632] 30. The method according to any one of claims 27 to 29, wherein the adjacent samples represent color components.
[0633] 31. A method for video processing, comprising: determining parameters related to linear model prediction or cross - color component prediction based on a main color component and a sub - color component for conversion between a current video block of a video and an encoded representation of the video, wherein the main color component is selected as one of a luma color component and a chroma color component, and the sub - color component is selected as the other of the luma color component and the chroma color component; and performing the conversion based on the determination.
[0634] 32. The method according to any one of claims 1 to 31, wherein performing the conversion includes generating the encoded representation from the current block.
[0635] 33. The method according to any one of claims 1 to 31, wherein performing the conversion 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, the instructions, when executed by the processor, causing the processor to execute the method according to any one of items 1 to 33.
[0637] 35. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for executing the method according to any one of items 1 to 33.
[0638] The eighth group of items describes specific features and aspects of the disclosed technology listed in the preceding sections including, for example, Example 10 and Example 14.
[0639] 1. A method comprising: performing downsampling on chroma and luma samples of adjacent blocks of a current video block; determining parameters of a cross-component linear model (CCLM) based on the downsampled chroma and luma samples obtained from the downsampling for conversion between the current video block, which is a chroma block, of the video and an encoded representation of the video; and performing the conversion based on the determination.
[0640] 2. The method according to item 1, wherein the current video block has a height (H) and a width (W), and the downsampling is based on the height or the width.
[0641] 3. The method according to item 1, wherein the downsampled chroma and luma samples are obtained before deriving the parameters of the CCLM including α and β, and α and β are defined by the formulas α = (C1 - C0) / (L1 - L0) and β = C0 - α × L0.
[0642] 4. The method according to item 1, wherein the number of left adjacent samples used to derive the parameters of the CCLM is the same as the number of upper adjacent samples used to derive the parameters of the CCLM.
[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 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 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 that is a chroma block and an encoded representation of the video, wherein the two or more chroma samples are selected based on an encoding mode of the current video block; and performing the conversion based on the determination.
[0650] 12. The method according to 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 according to 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 according to claim 11, wherein the two or more chroma samples are selected based on the availability of adjacent samples.
[0653] 15. The method according to claim 11, wherein the two or more chroma samples are selected from one or more of the left column, the upper row, the upper right row, or the lower left column with respect to the current video block.
[0654] 16. The method according to claim 11, wherein the two or more chroma samples are selected based on the ratio of the height of the current video block to the width of the current video block.
[0655] 17. The method according to claim 11, wherein the two or more chroma samples are selected based on whether the width or height of the current video block is equal to K, where K is an integer.
[0656] 18. The method according to claim 17, wherein K = 2. 19. The encoding mode of the current video block is a first linear mode different from a second linear mode that uses only left adjacent samples and a third linear mode that uses only upper adjacent samples. The coordinates of the upper left sample of the current video block are (x, y), and the width and height of the current video block are W and H, respectively. The method according to claim 11.
[0657] 20. 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 - 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 according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y+H / 4), (x-1, y+2*H / 4), and (x-1, y+3*H / 4).
[0666] 29. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y+2*H / 4), (x-1, y+3*H / 4), and (x-1, y+H-1).
[0667] 30. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y+(2H) / 4), (x-1, y+2*(2H) / 4), and (x-1, y+3*(2H) / 4).
[0668] 31. The method according to claim 19, wherein the two or more chroma samples have samples at coordinates (x-1, y), (x-1, y+2*(2H) / 4), (x-1, y+3*(2H) / 4), and (x-1, y+(2H)-1).
[0669] 32. The method according to any one of claims 20 to 31, wherein exactly two samples are selected to determine the parameters of the CCLM.
[0670] 33. The method according to any one of claims 1 to 32, wherein the execution of the transformation includes generating the encoded representation from the current block.
[0671] 34. The method according to any one of claims 1 to 32, wherein the execution of the transformation includes generating the current block from the encoded representation.
[0672] 35. An apparatus in a video system having a processor and a non-transitory memory having instructions, which when executed by the processor cause the processor to perform the method according to any one of claims 1 to 34.
[0673] 36. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for carrying out the method of any one of clauses 1 to 34.
[0674] The ninth set of paragraphs describes particular features and aspects of the disclosed techniques listed 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 chroma samples selected based on W available upper neighboring samples for conversion between a current video block of a video that is 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 video block, ii) L times the width of the current video block, where L is an integer, iii) the sum of the height of the current video block and the width of the current video block, or iv) the sum of the width of the current video block and the number of available upper right neighboring samples.
[0677] 3. The method of clause 1, wherein W depends on the availability of at least one of the neighboring blocks above or to the left of the current image block.
[0678] 4. The method of clause 1, wherein W depends on the coding mode of the current video block.
[0679] 5. The method of clause 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), and the first position offset value (F) and the step value (S) depend on W.
[0681] 7. The method according to clause 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, and P is an integer.
[0683] 9. The method of clause 8, where F=W>>(2+numIs4T), and numIs4T is equal to 1 if four 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 clause 10 or 11, wherein S=Max(1,W>>(1+numIs4T)), and numIs4T is equal to 1 if four adjacent samples are selected in the adjacent row above, and numIs4T is equal to 0 otherwise.
[0687] 13. The method of clause 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 coded 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 one of clauses 7 to 15, wherein at least one of Kmax, F, S, or offset depends on the prediction mode of the current video block, which is one of a first CCLM using only the left adjacent sample, a second CCLM using only the upper adjacent sample, a third CCLM using both the left adjacent sample and the upper adjacent sample, or another mode different from the first CCLM, the second CCLM, 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 video 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 neighboring 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 the video, the current video block being a chroma block, and a coded representation of the video; and performing the conversion based on the determination.
[0695] 21. The method according to claim 20, wherein H is set to i) the height of the current video block, ii) L times the height of the current video block, where L is an integer, iii) the sum of the height and the width of the current video block, or iv) the sum of the height of the current video block and the number of available lower left adjacent samples.
[0696] 22. The method according to claim 20, wherein H depends on the availability of at least one of the adjacent block above or the adjacent block to the left of the current video block.
[0697] 23. The method according to claim 20, wherein H depends on the encoding mode of the current video block.
[0698] 24. The method according to claim 21, wherein L has a value that depends on the availability of the lower left block or the lower left sample located adjacent to the current video block.
[0699] 25. The method according to claim 20, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), and the first position offset value (F) and the step value (S) depend on H.
[0700] 26. The method according to claim 25, wherein the upper left sample has coordinates (x0, y0), and the selected chroma sample has coordinates (x0 - 1, y0 + F + K × S), where K is an integer between 0 and kMax.
[0701] 27. The method according to claim 25, wherein F = H / P or F = H / P + offset, and P is an integer.
[0702] 28. The method according to claim 27, wherein F = H >> (2 + numIs4L), and numIs4L is equal to 1 when four adjacent samples are selected within the left adjacent column, and is equal to 0 otherwise.
[0703] 29. The method according to claim 25, wherein S = H / Q, and Q is an integer.
[0704] 30. The method according to item 25, wherein S is 1 or more.
[0705] 31. The method according to item 29 or 30, wherein S = Max(1, H>>(1 + numIs4L)), and numIs4L is equal to 1 when four adjacent samples are selected in the left adjacent column, and numIs4L is equal to 0 otherwise.
[0706] 32. The method according to item 9 or 12, wherein numIs4L is equal to 1 when the upper adjacent sample is available, the left adjacent sample is available, and the current video block is encoded 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 according to item 25, wherein F = S / R and R is an integer.
[0708] 34. The method according to item 25, wherein S = F / Z and Z is an integer.
[0709] 35. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the prediction mode of the current video block, which is one of a first CCLM that uses only the left adjacent sample, a second CCLM that uses only the upper adjacent sample, a third CCLM that uses both the left adjacent sample and the upper adjacent sample, or another mode different from the first CCLM, the second CCLM, and the third CCLM.
[0710] 36. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the width and / or height of the current video block.
[0711] 37. The method according to any one of items 26 to 34, wherein at least one of Kmax, F, S, or offset depends on H.
[0712] 38. The method according to any one 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 according to clause 20, wherein H is set to the sum of the height of the current video block and the width of the current video block when the adjacent block to the upper right of the current video block is available.
[0714] 40. The method according to clause 20, wherein when the left adjacent sample is not available, the selected chroma sample has a height H regardless of whether the current video block has a first CCLM that uses only the upper adjacent sample.
[0715] 41. The method according to clause 1, wherein W is set to the sum of the height of the current video block and the width of the current video block when the adjacent block to the lower left of the current video block is available.
[0716] 42. The method according to clause 1, wherein when the upper adjacent sample is not available, the selected chroma sample has a number of W regardless of whether the current video block has a first CCLM that uses only the left adjacent sample.
[0717] 43. The method according to any one of clauses 1 to 42, wherein the execution of the transformation includes generating the encoded representation from the current block.
[0718] 44. The method according to any one of clauses 1 to 42, wherein the execution of the transformation includes generating the current block from the encoded representation.
[0719] 45. An apparatus in a video system having a processor and a non-transitory memory having instructions, which, when executed by the processor, cause the processor to execute the method according to any one of clauses 1 to 44.
[0720] 46. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 44.
[0721] The tenth group of claims describes certain features and aspects of the disclosed technology enumerated in the preceding sections including, for example, Examples 18 and 19.
[0722] 1. A method for video processing, the method comprising: determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples for conversion between a current video block of a video that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination.
[0723] 2. The method according to claim 1, wherein the corresponding luma samples are obtained by downsampling.
[0724] 3. The method according to claim 1, wherein the parameters of the CCLM include maxY / maxC and minY / minC.
[0725] 4. The method according to claim 3, wherein the two chroma samples are selected to derive maxY / maxC and minY / minC, minY is set to the smaller luma sample value, its corresponding chroma sample value is minC, maxY is set to the larger luma sample value, and its corresponding chroma sample value is maxC.
[0726] 5. The method according to claim 3, wherein the four chroma samples are selected to derive maxY / maxC and minY / minC, the four chroma samples and the corresponding luma samples are divided into two arrays G0 and G1, and each array includes two chroma samples and their corresponding luma samples.
[0727] 6. The two arrays G0 and G1 are the following sets: i) G0 = {S0, S1}, G1 = {S2, S3}, ii) G0 = {S1, S0}, G1 = {S3, S2}, iii) G0 = {S0, S2}, G1 = {S1, S3}, iv) G0 = {S2, S0}, G1 = {S3, S1}, v) G0 = {S1, S2}, G1 = {S0, S3}, vi) G0 = {S2, S1}, G1 = {S3, S0}, vii) G0 = {S0, S3}, G1 = {S1, S2}, viii) G0 = {S3, S0}, G1 = {S2, S1}, ix) G0 = {S1, S3}, G1 = {S0, S2}, x) G0 = {S3, S1}, G1 = {S2, S0}, xi) G0 = {S3, S2}, G1 = {S0, S1}, or xii) Xii) G0 = {S2, S3}, G1 = {S1, S0}, including one of the following, where S0, S1, S2, and S3 each include the four chroma samples and further include their corresponding luma samples, the method according to item 5.
[0728] 7. The method according to item 6, wherein a comparison of two luma sample values of G0[0] and G0[1] is received, and the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].
[0729] 8. The method according to item 7, wherein if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].
[0730] 9. The method according to item 6, wherein a comparison of two luma sample values of G1[0] and G1[1] is received, and the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].
[0731] 10. The method according to item 9, wherein when the luma sample value of G1[0] is greater than the luma sample value of G1[1], the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].
[0732] 11. The method according to item 6, which receives a comparison of the two luma sample values of G0[0] and G1[1], and the chroma sample of G0[0] or G0[1] and its corresponding luma sample are exchanged with those of G1[0] or G1[1].
[0733] 12. The method according to item 11, wherein when the luma sample value of G0[0] is greater than the luma sample value of G1[1], the chroma sample of G0[0] or G0[1] and its corresponding luma sample are exchanged with those of G1[0] or G1[1].
[0734] 13. The method according to item 6, which receives a comparison of the two luma sample values of G0[1] and G1[0], and the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].
[0735] 14. The method according to item 13, wherein when the luma sample value of G0[1] is greater than the luma sample value of G1[0], the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].
[0736] 15. The method according to item 6, which receives a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1], and performs the following exchange operations in sequence: i) an exchange operation of the chroma sample of G0[0] and its corresponding luma sample with those of G0[1]; ii) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1]; iii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1]; and iv) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].
[0737] 16. The method according to item 6, where maxY is calculated as the average of the luma sample values of G0[0] and G0[1], or the average of the luma sample values of G1[0] and G1[1], and maxC is calculated as the average of the chroma sample values of G0[0] and G0[1], or the average of the chroma sample values of G1[0] and G1[1].
[0738] 17. The method according to item 6, where MinY is calculated as the average of the luma sample values of G0[0] and G0[1], or the average of the luma sample values of G1[0] and G1[1], and minC is calculated as the average of the chroma sample values of G0[0] and G0[1], or the average of the chroma sample values of G1[0] and G1[1].
[0739] 18. The calculation of maxY and maxC, or the calculation of minY and minC, is performed after any of the exchange operations of a plurality of exchange operations executed upon receiving a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1]. The plurality of exchange operations include: i) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1]; ii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1]; and iii) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0], as described in item 16 or 17.
[0740] 19. If only two chroma samples are available, padding is performed on the two available chroma samples to provide four chroma samples, the method according to claim 1.
[0741] 20. The four chroma samples include the two available chroma samples and two padded chroma samples copied from the two available chroma samples, the method according to claim 19.
[0742] 21. S0, S1, S2, S3 are chroma samples, and the corresponding luma samples are selected in a given order within the row above and / or the column to the left of the current video block, the method according to claim 6.
[0743] 22. A method for video processing, comprising: selecting chroma samples based on a position rule for conversion between a current video block of a video that is a chroma block and an encoded representation of the video, the chroma samples being used to derive parameters of a cross-component linear model (CCLM); and performing the conversion based on the determination, wherein the position rule is defined to select chroma samples located within the row above and / or the column to the left of the current video block.
[0744] 23. The method according to claim 22, wherein the row above and the column to the left each have W samples and H samples, respectively, and W and H are the width and height of the current video block, respectively.
[0745] 24. The position rule is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the adjacent sample above to derive the CCLM and different from a second CCLM mode that uses only the adjacent sample to the left to derive the CCLM, the method according to claim 22.
[0746] 25. The method according to item 22, wherein the position rule is defined to select chroma samples located in the upper row and the upper-right row of the current video block, the upper row and the upper-right row each having W samples and H samples, and W and H being the width and height of the current video block, respectively.
[0747] 26. The method according to item 25, wherein only available samples in the upper row and the upper-right row are selected.
[0748] 27. The method according to item 25, wherein the position rule is applied to the current video block encoded in a first CCLM mode that uses only upper adjacent samples to derive the CCLM.
[0749] 28. The method according to item 25, wherein the position rule is applied when the upper row is available, the left column is not available, and the current video block is encoded in a normal CCLM mode different from both a first CCLM mode that uses only upper adjacent samples to derive the CCLM and a second CCLM mode that uses only left adjacent samples to derive the CCLM.
[0750] 29. numSampT is set based on a rule that sets numSampT equal to nTbW when upper adjacent samples are available and sets numSampT equal to 0 when upper adjacent samples are not available, where numSampT represents the number of chroma samples in the upper adjacent row used to derive the parameter of the cross-component linear model, and nTbW represents the width of the current video block. The method according to any one of items 23 to 28.
[0751] 30. The method according to paragraph 29, applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the upper adjacent samples to derive the CCLM and also different from a second CCLM mode that uses only the left adjacent samples to derive the CCLM.
[0752] 31. When the upper adjacent samples are available and the current video block is encoded in a first CCLM mode that uses only the upper adjacent samples to derive the CCLM, numSampT is set equal to nTbW + Min(numTopRight, nTbH), and in other cases numSampT is set equal to 0, based on a rule that defines this. numSampT represents the number of chroma samples in the upper adjacent row used to derive the parameters of the cross-component linear model. nTbW and nTbH represent the width and height of the current video block, respectively, and numTopRight represents the number of available upper-right adjacent samples. The method according to any of paragraphs 23 to 28.
[0753] 32. The method according to paragraph 31, applied to the current video block not encoded in a normal CCLM mode that is different from a first CCLM mode that uses only the upper adjacent samples to derive the CCLM and also different from a second CCLM mode that uses only the left adjacent samples to derive the CCLM.
[0754] 33. The position rule is defined to select chroma samples located in the left column and the lower-left column of the current video block. The left column and the lower-left column have H samples and W samples, respectively, where W and H are the width and height of the current video block, respectively. The method according to paragraph 22.
[0755] 34. The method according to paragraph 33, where only the available samples in the left column and the lower-left column are selected.
[0756] 35. The method according to item 33, wherein the position rule is applied to the current video block encoded in a second CCLM mode that uses only the left adjacent sample to derive the CCLM.
[0757] 36. The method according to item 33, wherein the position rule is applied when the upper row is not available, the left column is available, and the current video block is encoded in a normal CCLM mode that is different from both a first CCLM mode that uses only the upper adjacent sample to derive the CCLM and a second CCLM mode that uses only the left adjacent sample to derive the CCLM.
[0758] 37. numSampL is set based on a rule that sets numSampL equal to nTbH when the left adjacent sample is available and sets numSampL equal to 0 otherwise, where numSampL represents the number of chroma samples in the left adjacent column used to derive the parameters of the cross-component linear model, and nTbH represents the height of the current video block. The method according to any one of items 33 to 36.
[0759] 38. The method according to item 37, wherein the rule is applied to the current video block encoded in a normal CCLM mode that is different from both a first CCLM mode that uses only the upper adjacent sample to derive the CCLM and a second CCLM mode that uses only the left adjacent sample to derive the CCLM.
[0760] 39. When the left adjacent sample is available and the current video block is encoded in a second CCLM mode that uses only the left adjacent sample to derive the CCLM, numSampL is set equal to nTbH + Min(numLeftBelow, nTbW), and in other cases, numSampL is set equal to 0. Based on the rule that defines this, numSampL is set. numSampL represents the number of chroma samples in the left adjacent column used to derive the parameters of the cross-component linear model. nTbW and nTbH represent the width and height of the current video block respectively, and numLeftBelow represents the number of available lower left adjacent samples. The method according to any one of paragraphs 33 to 36.
[0761] 40. The rule is applied to the current video block that is not encoded in the normal CCLM mode, which is different from both the first CCLM mode that uses only the upper adjacent sample to derive the CCLM and the second CCLM mode that uses only the left adjacent sample to derive the CCLM. The method according to paragraph 39.
[0762] 41. The luma sample corresponding to the selected chroma sample is used to derive the parameters of the cross-component linear model. The method according to any one of paragraphs 22 to 40.
[0763] 42. The luma sample is derived by downsampling. The method according to paragraph 41.
[0764] 43. The execution of the transformation includes generating the encoded representation from the current block. The method according to any one of paragraphs 1 to 42.
[0765] 44. The execution of the transformation includes generating the current block from the encoded representation. The method according to any one of paragraphs 1 to 42.
[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 the method of any one of clauses 1 to 44.
[0767] 46. A computer program product stored on a non-transitory computer-readable medium, the computer program product comprising program code for carrying out the method of any one of clauses 1 to 44.
[0768] The eleventh set of paragraphs describes particular features and aspects of the disclosed techniques listed 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 that 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 image processing, comprising: determining a method for deriving parameters of a cross-component linear model (CCLM) using chroma samples and luma samples based on encoding conditions associated with a current video block of an image for conversion between the current video block, which is a chroma block, and an encoded representation of the image; and performing the conversion based on the determination.
[0772] 4. The method according to item 3, wherein the encoding conditions correspond to a color format of the current video block.
[0773] 5. The method according to item 4, wherein the color format is 4:2:0 or 4:4:4.
[0774] 6. The method according to item 3, wherein the encoding conditions correspond to a color representation method of the current video block.
[0775] 7. The method according to item 6, wherein the color representation method is RGB or YCbCr.
[0776] 8. The method according to item 3, wherein the chroma samples are downsampled, and the determination depends on positions of the downsampled chroma samples.
[0777] 9. The method for deriving parameters according to item 3 includes determining the parameters of the CCLM based on the chroma samples and the luma samples selected based on a position rule from a group of adjacent chroma samples.
[0778] 10. The method for deriving parameters according to item 3 includes 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 completely 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 according to two chroma sample values and two luma sample values.
[0781] 13. A method for video processing, comprising: determining, for a 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 the availability of left and above neighboring blocks of the current video block; and performing the conversion based on the determination.
[0782] 14. The method of clause 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 value and / or the minimum value 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 above adjacent block, respectively, and the available adjacent samples from the left adjacent block and the available adjacent samples from the above adjacent block are used to derive the parameters of the cross-component linear model.
[0785] 17. The method according to clause 15, wherein if numSampL+numSampT==0, the maximum value and / or the minimum value 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 above adjacent block, respectively, and the available adjacent samples from the left adjacent block and the available adjacent samples from the above adjacent block are used to derive the parameters of the cross-component linear model.
[0786] 18. The method of any of clauses 1 to 17, wherein the performing of the transformation includes generating the coded representation from the current block.
[0787] 19. The method of any of clauses 1 to 17, wherein performing the transformation includes generating the current block from the coded representation.
[0788] 20. 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 the method of any one of clauses 1 to 19.
[0789] 21. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any one of clauses 1 to 19.
[0790] The twelfth set of paragraphs describes particular features and aspects of the disclosed technology listed 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 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 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 video block during the transformation.
[0793] 3. The method of clause 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 clause 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 clause 2, wherein the parameters of the encoding tool are determined using a parameter table whose entries are searched according to two adjacent samples of the current video block and two adjacent samples of the reference block.
[0796] 6. The method of clause 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 according to item 2, wherein the adjacent samples used to derive the parameters of the LIC tool do not include samples at specific positions in the row above and / or the left column of the current video block.
[0798] 8. The method according to item 2, wherein the top-left sample of the current video block has coordinates (x0, y0), and the sample having coordinates (x0, y0 - 1) is not used to derive the parameters of the LIC tool.
[0799] 9. The method according to item 2, wherein the top-left sample of the current video block has coordinates (x0, y0), and the sample having coordinates (x0 - 1, y0) is not used to derive the parameters of the LIC tool.
[0800] 10. The method according to item 7, wherein the specific position depends on the availability of the row above and / or the left column.
[0801] 11. The method according to item 7, wherein the specific position depends on the block size of the current video block.
[0802] 12. The method according to item 1, wherein the determination depends on the availability of the row above and / or the left column.
[0803] 13. The method according to item 2, wherein N adjacent samples of the current video block and N adjacent samples of the reference block are used to derive the parameters of the LIC tool.
[0804] 14. The method according to item 13, wherein N is 4.
[0805] 15. The method according to item 13, wherein the N adjacent samples of the current video block include N / 2 samples from the row above the current video block and N / 2 samples from the left column of the current video block.
[0806] 16. The method according to claim 13, wherein N is equal to min(L, T), T is the total number of available adjacent samples of the current video block, and L is an integer.
[0807] 17. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the CCLM.
[0808] 18. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the first mode of the CCLM that uses only upper adjacent samples.
[0809] 19. The method according to claim 13, wherein the N adjacent samples are selected based on the same rule applicable to selecting samples for deriving the parameters of the second mode of the CCLM that uses only left adjacent samples.
[0810] 20. The method according to claim 13, wherein the N adjacent samples of the current video block are selected based on the availability of the upper row or the left column of the current video block.
[0811] 21. A method for video processing, comprising: determining parameters of a local illumination compensation (LIC) tool based on N adjacent samples of a current video block of a video and N corresponding adjacent samples of a reference block for conversion between the current video block of the video and an encoded representation of the video, wherein the N adjacent samples of the current video block are selected based on the positions of the N adjacent samples; and performing the conversion based on the determination, wherein the LIC tool uses a linear model of illumination change in the current video block during the conversion.
[0812] 22. The method according to claim 21, wherein the N adjacent samples of the current video block are selected based on the width and height of the current video block.
[0813] 23. The method according to claim 21, wherein the N adjacent samples of the current video block are selected based on the availability of adjacent blocks of the current video block.
[0814] 24. The method according to claim 21, wherein the N adjacent samples of the current video block are selected with a first position offset value (F) and a step value (S) that depend on the dimensions of the current video block and the availability of adjacent blocks.
[0815] 25. The method according to any one of claims 1 to 24, wherein the current video 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 that is a chroma block and an encoded representation of the video; and performing the conversion based on the determination, wherein a part of the chroma samples is obtained by a padding operation, and the chroma samples and the corresponding luma samples are grouped into two arrays G0 and G1, each array including two chroma samples and corresponding luma samples.
[0817] 27. When the sum of cntT and cntL is equal to 2, the following operations are sequentially performed: i) pSelComp[3] is set equal to pSelComp[0]; ii) pSelComp[2] is set equal to pSelComp[1]; iii) pSelComp[0] is set equal to pSelComp[1]; and iv) pSelComp[1] is set equal to pSelComp[3], where cntT and cntL respectively indicate the number of samples selected from the upper adjacent block and the left adjacent block, and pSelComp[0] to pSelComp[3] indicate the pixel values of the corresponding color components of the selected samples. The method according to claim 26.
[0818] 28. The method according to claim 26, wherein said determination of said parameter includes initializing the values of G0[0], G0[1], G1[0], and G1[1].
[0819] 29. The method according to claim 28, wherein G0[0]=0, G0[1]=2, G1[0]=1, and G1[1]=3.
[0820] 30. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G0[0] and G0[1], and exchanging the chroma sample of G0[0] and its corresponding luma sample with those of G0[1].
[0821] 31. The method according to claim 30, wherein if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the chroma sample of G0[0] and its corresponding luma sample are exchanged with those of G0[1].
[0822] 32. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G1[0] and G1[1], and exchanging the chroma sample of G1[0] and its corresponding luma sample with those of G1[1].
[0823] 33. The method according to claim 32, wherein if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the chroma sample of G1[0] and its corresponding luma sample are exchanged with those of G1[1].
[0824] 34. The method according to claim 28, wherein said determination of said parameter further includes, after said initialization of said values, receiving a comparison of two luma sample values of G0[0] and G1[1], and exchanging the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G1[0] or G1[1].
[0825] 35. The method according to paragraph 34, wherein when the luma sample value of G0[0] is greater than the luma sample value of G1[1], the chroma samples of G0[0] or G0[1] and their corresponding luma samples are exchanged with those of G1[0] or G1[1].
[0826] 36. The method according to paragraph 28, wherein the determination of the parameter further includes, after the initialization of the value, receiving a comparison of two luma sample values of G0[1] and G1[0], and exchanging the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].
[0827] 37. The method according to paragraph 36, wherein when the luma sample value of G0[1] is greater than the luma sample value of G1[0], the chroma sample of G0[1] and its corresponding luma sample are exchanged with those of G1[0].
[0828] 38. The method according to paragraph 28, wherein the determination of the parameter further includes, after the initialization of the value, receiving a comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1], and performing the following exchange operations in sequence, namely, i) an exchange operation of the chroma sample of G0[0] and its corresponding luma sample with those of G0[1], ii) an exchange operation of the chroma sample of G1[0] and its corresponding luma sample with those of G1[1], iii) an exchange operation of the chroma sample of G0[0] or G0[1] and its corresponding luma sample with those of G0[1] or G1[1], and iv) an exchange operation of the chroma sample of G0[1] and its corresponding luma sample with those of G1[0].
[0829] 39. The method according to any one of paragraphs 1 to 38, wherein the execution of the transformation includes generating the encoded representation from the current block.
[0830] 40. The method according to any one of paragraphs 1 to 38, wherein the execution of the transformation includes generating the current block from the encoded representation.
[0831] 41. An apparatus in a video system having a processor and a non-transitory memory having instructions, the instructions, when executed by the processor, causing the processor to execute the method according to any one of claims 1 to 40.
[0832] 42. A computer program product stored on a non-transitory computer-readable medium, the computer program product including program code for performing the method according to any one of claims 1 to 40.
[0833] It should be understood from the above that, for the purpose of explanation here, specific embodiments of the technology disclosed herein have been described, but various changes can be made without departing from the scope of the present invention. Accordingly, the technology disclosed herein is not limited except as by the appended claims.
[0834] The matters and functional operations described in this patent document can be implemented in various systems, digital electronic circuits, or computer software, firmware, or hardware, or a combination of one or more of these, including the structures disclosed in this specification and those structurally equivalent thereto. The implementation of the matters described in this specification can be implemented as one or more computer program products, that is, as one or more modules of computer program instructions encoded on a tangible non-transitory computer-readable medium for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter that generates a machine-readable propagated signal, or a combination of one or more of these. The term "data processing unit" or "data processing apparatus" includes, by way of example, any apparatus, device, and machine that processes data, including programmable processors, computers, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, such as processor firmware, protocol stack, database management system, operating system, or code constituting a combination of one or more 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 at hand, or in multiple cooperating files (e.g., files that store one or more modules, subprograms, or portions of code). A computer program may be deployed to be executed on one computer or on multiple computers, either collocated or distributed across multiple locations and interconnected by a communications 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 the execution of a computer program include, by way of example, any one or more processors of both general and special purpose microprocessors, and any kind of digital computer. In general, a processor receives instructions and data from a read only memory or a random access memory or both. Essential elements of a computer are a processor for executing instructions and one or more memory devices for storing the instructions and data. In general, a computer also includes one or more mass storage devices for storing data, such as, by way of example, magnetic disks, magneto-optical disks, or optical disks, or is operatively coupled to receive data from or transfer data to such mass storage devices. However, a computer need not have such devices. Computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices including, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices. The processor and the memory may be supplemented or incorporated by dedicated logic circuitry.
[0838] The specification, together with the drawings, is intended to be considered as merely illustrative, and illustrative means exemplary. As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.
[0839] This patent document contains many details, but they should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of mechanisms that may be specific to particular embodiments of a particular invention. The specific plurality of mechanisms described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various mechanisms described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. Furthermore, although a plurality of mechanisms may be described as acting in a particular combination and may even initially be claimed as such, in some cases, one or more mechanisms may be excluded from the claimed combination, and the claimed combination may be led to a sub-combination or variation of a sub-combination.
[0840] Similarly, although the processes are shown in a particular order in the drawings, this should not be understood as requiring that those operations be performed in or in the order shown, or that all of the processes shown be performed, in order to achieve the desired result. Also, the separation of the various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0841] Only a few implementations and examples are described, and other implementations, extensions, and variations may be made based on what is described and illustrated in this patent document.
Claims
1. A method for processing video data, comprising: determining parameters of a cross-component linear model using a look-up table for conversion between a current video block of a video that is a chroma block and a bitstream of the video, wherein an index of the look-up table is derived according to two luma values derived based on reconstructed luma samples; executing the conversion based on the determination; wherein the two luma values are denoted as L0 and L1, and the index of the look-up table is derived based on a difference between L1 and L0; L0 and L1 are further derived based on positions of adjacent chroma samples of the current video block; the method.
2. The lookup table has a size of V that is smaller than 2 P The method according to claim 1, wherein P is an integer and has a size of V smaller than 2.
3. The method according to claim 2, wherein P is equal to 5.
4. The method according to any one of claims 1 to 3, wherein the look-up table has a plurality of entries each storing an F-bit integer, and F is 8 or 16.
5. The method according to any one of claims 1 to 3, wherein predicted samples of the current video block are derived based on reconstructed samples of a luma block corresponding to the current video block and the parameters of the cross-component linear model.
6. The method according to claim 1, wherein when L1 is equal to L0, predicted samples of the current video block are based on a specific chroma value C0, and C0 is derived based on adjacent chroma samples of the current video block.
7. The method according to claim 6, wherein the predicted samples of the current video block are set to C0.
8. The method according to any one of claims 1 to 3, wherein the conversion includes decoding the current video block from the bitstream.
9. The method according to any one of claims 1 to 3, wherein the conversion includes encoding the current video block into the bitstream.
10. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions, wherein when the instructions are executed by the processor, the processor is caused to For the conversion between the current video block of the video which is a chroma block and the bitstream of the video, use a look-up table to determine the parameters of the cross-component linear model, where the index of the look-up table is derived according to two luma values derived based on the reconstructed luma samples, Execute the conversion based on the determination, The two luma values are denoted as L0 and L1, and the index of the look-up table is derived based on the difference between L1 and L0, L0 and L1 are further derived based on the positions of adjacent chroma samples of the current video block, Device.
11. A non-transitory computer-readable storage medium storing instructions, where the instructions cause a processor to, For the conversion between the current video block of the video which is a chroma block and the bitstream of the video, use a look-up table to determine the parameters of the cross-component linear model, where the index of the look-up table is derived according to two luma values derived based on the reconstructed luma samples, Execute the conversion based on the determination, The two luma values are denoted as L0 and L1, and the index of the look-up table is derived based on the difference between L1 and L0, L0 and L1 are further derived based on the positions of adjacent chroma samples of the current video block, Computer-readable storage medium.
12. A method for storing a bitstream of a video, comprising: For the current video block of the video which is a chroma block, a step of determining the parameters of the cross-component linear model using a look-up table, where the index of the look-up table is derived according to two luma values derived based on the reconstructed luma samples; A step of generating the bitstream based on the determination; A step of storing the bitstream in a non-transitory computer-readable recording medium, having, The two luma values are denoted as L0 and L1, and the index of the look-up table is derived based on the difference between L1 and L0, L0 and L1 are further derived based on the positions of adjacent chroma samples of the current video block, Method.
Citation Information
Patent Citations
Image processing device and image processing method
JP2013034163A