Neighboring Sample Selection for Intra Prediction
The simplified cross-component linear model prediction method addresses inefficiencies in existing video coding standards by optimizing parameter derivation and downsampling, resulting in improved compression efficiency and reduced complexity for chroma-to-luma prediction.
Patent Information
- Application Number
- JP2023148870
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-03-26
- Filing Date
- 2023-09-14
- Publication Date
- 2025-09-25
- Estimated Expiration
- 2040-02-24
Smart Images

Figure 0007744392000017 
Figure 0007744392000018 
Figure 0007744392000019
Abstract
Description
[Technical Field]
[0001] This application is a divisional application of Patent Application No. 2021-547179, which is the national phase application of International Application No. PCT / CN2020 / 076361 filed on February 24, 2020. The international applications are International Patent Application No. PCT / CN2019 / 075874 filed on February 22, 2019, International Patent Application No. PCT / CN2019 / 075993 filed on February 24, 2019, and International Patent Application No. PCT / CN2019 / 075993 filed on February 26, 2019. This application claims priority to and the benefit of International Patent Application No. PCT / CN2019 / 076195, International Patent Application No. PCT / CN2019 / 079396 filed March 24, 2019, International Patent Application No. PCT / CN2019 / 079431 filed March 25, 2019, and International Patent Application No. PCT / CN2019 / 079769 filed March 26, 2019. The disclosures of the above applications are incorporated herein in their entireties.
[0002] This patent document relates to image processing techniques, devices and systems. [Background technology]
[0003] Despite advances in video compression, digital video still accounts for the largest bandwidth usage 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, including simplified linear model derivations for cross-component linear model (CCLM) prediction modes in video coding. The described methods may be applied to both existing video coding standards (e.g., High Efficiency Video Coding (HEVC)) and future video coding standards (e.g., Versatile Video Coding (VVC)) or codecs.
[0005] In one exemplary aspect, the disclosed techniques may be used to provide a method for video processing, the method comprising: determining parameters of a cross-component linear model (CCLM) prediction mode based on a chroma sample selected based on W available upper neighboring samples for converting 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.
[0006] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method comprising determining parameters of a cross-component linear model (CCLM) prediction mode based on chroma samples selected based on H available left neighboring samples of the current video block for conversion between a current video block of a video that is a chroma block and a coded representation of the video, and performing the conversion based on the determination.
[0007] In another representative aspect, the disclosed techniques may be used to provide 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 transforming between a current video block of a video that is a chroma block and a coded representation of the video, and performing the transform based on the determination.
[0008] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, comprising: selecting chroma samples for conversion between a current video block of a video that is a chroma block and a coded representation of the video based on position rules, the chroma samples being used to derive parameters of a cross-component linear model (CCLM), and performing the conversion based on the determination, the position rules specifying selecting chroma samples located in a row above and / or a column to the left of the current video block.
[0009] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method comprising: determining locations at which luma samples are downsampled for a conversion between a current video block of video that is a chroma block and a coded representation of the video, the downsampled luma samples being used to determine parameters of a cross-component linear model (CCLM) based on the chroma samples and the downsampled luma samples, the downsampled luma samples being at locations corresponding to locations of the chroma samples used to derive the parameters of the CCLM; and performing the conversion based on the determination.
[0010] In another representative aspect, the disclosed techniques may be used to provide a method for video processing, the method comprising: determining, based on an encoding condition associated with a current video block of video that is a chroma block, how to derive parameters of a cross-component linear model (CCLM) using chroma samples and luma samples for conversion between a current video block of video and a coded representation of the video, the current video block being a chroma block; and performing the conversion based on the determination.
[0011] In another representative aspect, the disclosed technology may be used to provide a method for video processing, the method comprising: determining, for conversion between a current video block of video that is a chroma block and a coded representation of the video, whether to derive maximum and / or minimum values of luma and chroma components used to derive parameters of a cross-component linear model (CCLM) based on availability of left and above neighboring blocks of the current video block; and performing the conversion based on the determination.
[0012] In yet another exemplary embodiment, the above-described method is embodied in the form of processor-executable code and stored on a computer-readable program medium.
[0013] In yet another exemplary aspect, an apparatus configured or operable to perform the above-described method is disclosed. The apparatus may include a processor programmed to implement the method.
[0014] In yet another exemplary aspect, a video decoder device may implement the methods described herein.
[0015] These and other aspects and features of the disclosed technology are described in further detail in the drawings, specification, and claims. [Brief explanation of the drawings]
[0016] [Figure 1] 1 shows an example of sample locations used to derive weights for a linear model used in cross-component prediction. [Figure 2] An example of classifying adjacent samples into two groups is shown. [Figure 3A] 1 shows an example of a chroma sample and its corresponding luma sample. [Figure 3B] An example of down-filtering for a cross-component linear model (CCLM) in a joint exploration model (JEM) is shown. [Figure 4A] 10 shows an example in which only upper neighboring samples are used for prediction based on a linear model. [Figure 4B] 10 shows an example in which only the left adjacent sample is used for prediction based on a linear model. [Figure 5] 1 shows an example of a line between minimum and maximum luma values as a function of the corresponding chroma samples. [Figure 6] An example of a current chroma block and its adjacent samples is shown. [Figure 7] 10 shows an example of different parts of a chroma block predicted by a linear model using only left neighboring samples (LM-L) and a linear model using only above neighboring samples (LM-A). [Figure 8] An example of an upper left adjacent block is shown. [Figure 9] 1 shows an example of a sample used to derive a linear model. [Figure 10] An example of the left and bottom left columns and right and top right rows for the current block is shown. [Figure 11] An example of a current block and its reference samples is shown. [Figure 12] An example of two adjacent samples is shown when both left and top adjacent reference samples are available. [Figure 13] 1 shows an example of two adjacent samples when only the top adjacent reference sample is available. [Figure 14] An example of two adjacent samples is shown when only the left adjacent reference sample is available. [Figure 15] An example of four adjacent samples is shown when both left and top adjacent reference samples are available. [Figure 16] 1 shows an example of a lookup table used in LM derivation. [Figure 17] 1 shows an example of the LM parameter derivation process using 64 entries. [Figure 18A] 18A and 18B illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 18B] 18A and 18B illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 19A] 19A and 19B illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 19B] 19A and 19B illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 20A] 20A-20C illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 20B] 20A-20C illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 20C] 20A-20C illustrate a flowchart of an example method for video processing according to some implementations of the disclosed technology. [Figure 21A] 21A and 21B are block diagrams of example hardware platforms for implementing the visual media decoding or encoding techniques described in this document. [Figure 21B] 21A and 21B are block diagrams of example hardware platforms for implementing the visual media decoding or encoding techniques described in this document. [Figure 22A] 22A and 22B show an example of the LM parameter derivation process using four entries, with FIG. 22A showing an example where both the upper and left neighboring samples are available. [Figure 22B] 22A and 22B show an example of the LM parameter derivation process using four entries, with FIG. 22B showing an example where only the upper neighboring sample is available and the upper right one is not. [Figure 23] 1 shows an example of adjacent samples for deriving LIC parameters. DETAILED DESCRIPTION OF THE INVENTION
[0017] Due to the increasing demand for higher-resolution video, video encoding methods and techniques have become ubiquitous in modern technology. Video codecs typically include electronic circuits or software that compress or decompress digital video and are constantly being improved to provide higher encoding efficiency. Video codecs convert uncompressed video into a compressed format, or vice versa. There is a complex relationship between video quality, the amount of data used to represent the video (determined by the bit rate), the complexity of the encoding and decoding algorithms, sensitivity to data loss and errors, ease of editing, random access, and end-to-end delay (latency). Compression formats usually conform to standard video compression specifications, such as the High Efficiency Video Coding (HEVC) standard (also known as H.265 or MPEG-H Part 2), the upcoming Versatile Video Coding (VVC) standard, or other current and / or future video encoding standards.
[0018] 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. This document uses section headings to improve readability of the description, but the section headings do not limit the description or embodiments (and / or implementations) to only the respective sections.
[0019] 1. Implementation of Cross-Component Prediction Cross-component prediction is a form of chroma-to-luma prediction approach that offers a good trade-off between complexity and improved compression efficiency.
[0020] 1.1 Example of a Cross-Component Linear Model (CCLM) In some embodiments, and to reduce cross-component redundancy, a cross-component linear model (CCLM) prediction mode (also referred to as LM) is used in JEM, where chroma samples are calculated as follows:
number
[0021] where pred C (i,j) represents the predicted chroma sample in a CU, recL'(i,j) represents the downsampled reconstructed luma sample of the same CU in the case of color format 4:2:0 or 4:2:2, and recL'(i,j) represents the reconstructed luma sample of the same CU in the case of color format 4:4:4. The CCLM parameters α and β are
number
number
[0022] where L(n) represents the downsampled (for color formats 4:2:0 or 4:2:2) or original (for color format 4:4:4) reconstructed luma samples above and to the left, C(n) represents the reconstructed chroma samples above and to the left, and the value of N is equal to twice the minimum of the width and height of the current chroma coding block.
[0023] In some embodiments, for square-shaped coding blocks, the above two equations are applied directly. In other embodiments, for non-square coding blocks, the adjacent samples on the longer boundary are first subsampled to have the same number of samples as on the shorter boundary. Figure 1 shows the locations of the samples of the current block and the left and top reconstructed samples involved in CCLM mode.
[0024] In some embodiments, this regression error minimization calculation is performed as part of the decoding process, rather than simply as an encoder search process, and therefore no syntax is used to communicate the α and β values.
[0025] In some embodiments, the CCLM prediction mode also includes prediction between two chroma components, for example, the Cr (red difference) component is predicted from the Cb (blue difference) component. Instead of using the reconstructed sample signal, CCLM Cb-to-Cr prediction is applied in the residual domain, which adds a weighted reconstructed Cb residual to the original Cr intra prediction to get the final Cr prediction:
number
[0026] Here, resi Cb'(i,j) denotes the reconstructed Cb residual sample at position (i,j).
[0027] In some embodiments, the scaling factor α may be derived in a similar manner as in CCLM luma-to-chroma prediction, the only difference being the addition of a regression cost to the default α value in the error function, so that the derived scaling factor is:
number
[0028] where Cb(n) represents the adjacent reconstructed Cb sample, Cr(n) represents the adjacent reconstructed Cr sample, and λ is equal to Σ(Cb(n)·Cb(n))>>9.
[0029] In some embodiments, CCLM luma-to-chroma prediction mode is added as one more chroma intra prediction mode. On the encoder side, one more RD cost check for chroma components is added to select the chroma intra prediction mode. If an intra prediction mode other than CCLM luma-to-chroma prediction mode is used for the chroma components of a CU, CCLM Cb-to-Cr prediction is used for Cr component prediction.
[0030] 1.2 Multi-model CCLM example In JEM, there are two CCLM modes: single-model CCLM mode and multiple-model CCLM mode (MMLM). As the names suggest, single-model CCLM mode uses one linear model to predict chroma samples from luma samples for the entire CU, while in MMLM there can be two models.
[0031] In MMLM, the neighboring luma samples and neighboring chroma samples of the current block are classified into two groups, and each group is used as a training set to derive a linear model (i.e., a specific α and β are derived for a specific group). Furthermore, the samples of the current luma block are also classified based on the same rules as the classification of the neighboring luma samples.
[0032] Figure 2 shows an example of classifying neighboring samples into two groups. A threshold is calculated as the average value of neighboring reconstructed luma samples. Neighboring samples with Rec'L[x,y]≦Threshold are classified into group 1, and neighboring samples with Rec'L[x,y]>Threshold are classified into group 2.
number
[0033] 1.3 Example of a downsampling filter in CCLM In some embodiments, for a 4:2:0 chroma format, where four luma samples correspond to one chroma sample, to perform chroma prediction, the reconstructed luma block needs to be downsampled to match the size of the chroma signal. The default downsampling filter used in CCLM mode is:
number
[0034] Here, the downsampling assumes a "type 0" phase relationship for the positions of the chroma samples relative to the positions of the luma samples, eg, collocated sampling in the horizontal direction and interstitial sampling in the vertical direction, as shown in FIG. 3A.
[0035] The exemplary 6-tap downsampling filter defined in (6) is used as the default filter in both single-model and multiple-model CCLM modes.
[0036] In some embodiments, for MMLM mode, the encoder may selectively select one of four additional luma downsampling filters to be applied to prediction in the CU and transmit a filter index indicating which of them is to be used. As shown in Figure 3B, the four selectable luma downsampling filters for MMLM mode are:
number
[0037] 1.4 Multidirectional LM (MDLM) This existing implementation proposes a multi-directional LM (MDLM), in which two further CCLM modes are proposed: LM-A, in which the linear model parameters are derived based only on the top (or above) neighboring samples, as shown in Figure 4A, and LM-L, in which the linear model parameters are derived based only on the left neighboring samples, as shown in Figure 4B.
[0038] 1.5 Simplifying Cross-Component Linear Models This existing implementation proposes replacing the LMS algorithm with linear model parameters α and β by a linear equation, the so-called two-point method. The two points (Luma and Chroma couple) (A, B) are the minimum and maximum values within a set of adjacent Luma samples, as shown in Figure 5.
[0039] where the linear model parameters α and β are given by: α=(y B -y A ) / (x B -x A ), and β=y A -αx A is obtained according to
[0040] In some embodiments, the division operations required to derive α are avoided and replaced by multiplications and shifts, such as: a=0; Shift=16; intshift=(uiInternalBitDepth>8)?uiInternalBitDepth-9:0; intadd=shift?1<<(shift-1):0; intdiff=(MaxLuma-MinLuma+add)>>shift; if(diff>0) { intdiv=((MaxChroma-MinChroma)*g_aiLMDivTableLow[diff-1]+32768)>>16; a=(((MaxChroma-MinChroma)*g_aiLMDivTableHigh[diff-1]+div+add)>>shift); } b=MinLuma[1]-((a*MinLuma[0])>>iShift);
[0041] where 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 with 512 entries each, and each entry stores a 16-bit integer.
[0042] To derive the chroma predictor, for the current VTM implementation, the multiplication is
number
[0043] This implementation is also simpler than the current VTM implementation, since the shift S always has the same value.
[0044] 1.6 CCLM example in VVC The same CCLM as in JEM is used in VTM-2.0, but the MM-CCLM in JEM is not used in VTM-2.0. VTM-3.0 uses MDLM and a simplified CCLM.
[0045] 1.7 Example of local illumination compensation in JEM Local Illumination Compensation (LIC) is based on a linear model of illumination changes with a scaling factor a and an offset b, and is adaptively enabled or disabled for each inter-mode coded coding unit (CU).
[0046] When LIC is applied to a CU, a least square error method is adopted to derive parameters a and b by using neighboring samples of the current CU and their corresponding reference samples. More specifically, as illustrated in Figure 23, subsampled (2:1 subsampled) neighboring samples of the CU and corresponding pixels in the reference picture (identified by motion information of the current CU or current sub-CU) are used. IC parameters are derived and applied separately for each prediction direction.
[0047] If the CU is coded in 2Nx2N merge mode, the LIC flag is copied from the neighboring block in a manner similar to the motion information copying in merge mode; otherwise, the LIC flag is signaled to indicate whether LIC is applied or not for the CU.
[0048] When LIC is enabled for a picture, an additional CU-level RD check is required to determine whether LIC applies to the CU. When LIC is enabled for a CU, the mean-removed sum of absolute difference (MR-SAD) and the mean-removed sum of absolute Hadamard-transformed difference (MR-SATD) are used instead of SAD and SATD for integer-pixel motion search and fractional-pixel motion search, respectively.
[0049] To reduce coding complexity, JEM applies an encoding scheme in which LIC is disabled for the entire picture when there is no obvious illumination change between the current picture and its reference pictures. To identify this situation, the encoder calculates the histogram of the current picture and the histograms of all reference pictures of the current picture. If the histogram difference between the current picture and all reference pictures of the current picture is smaller than a given threshold, LIC is disabled for the current picture; otherwise, LIC is enabled for the current picture.
[0050] 2 Examples of shortcomings in existing implementations The current implementation introduces a two-point method to replace the LMS approach in the LM mode in JEM. This new method reduces the number of additions and multiplications in CCLM, but introduces the following problems:
[0051] 1) Comparisons are introduced to find the minimum and maximum luma values, which is not friendly to Single Instruction Multiple Data (SIMD) software design.
[0052] 2) Two lookup tables with a total of 1024 entries storing 16-bit numbers are introduced, requiring 2K ROM memory, which is undesirable in hardware design.
[0053] Exemplary Method for Cross-Component Prediction in Video Coding Embodiments of the presently disclosed technology overcome shortcomings of existing implementations, thereby providing video coding with higher coding efficiency and lower computational complexity. The simplified linear model derivation for cross-component prediction based on the disclosed technology can enhance both existing and future video coding standards, as will become apparent in the following examples described with respect to various implementations. The examples of the disclosed technology provided below are intended to illustrate general concepts and are not meant to be construed as limiting. In an example, various features described in these examples can be combined, unless explicitly stated otherwise.
[0054] In the following examples and methods, the term "LM method" includes, but is not limited to, LM mode in JEM or VTM, MMLM mode in JEM, Left LM mode that uses only left neighboring samples to derive a linear model, Top LM mode that uses only top neighboring samples to derive a linear model, or other types of methods that utilize luma reconstructed samples to derive chroma prediction blocks. All LM modes that are neither LM-L nor LM-A are generally referred to as LM modes.
[0055] In the following examples and methods, Shift(x,s) is defined as Shift(x,s)=(x+off)>>s, and SignShift(x,s) is defined as
number
[0056] Here, off is, for example, 0 or 2. s-1 are integers such as
[0057] Let the height and width of the current chroma block be denoted as H and W, respectively.
[0058] Figure 6 shows an example of neighboring samples of a current chroma block. Let the coordinates of the top left sample of the current chroma block be represented as (x, y). Then, the neighboring chroma samples (shown in Figure 6) are: A: Upper left sample: [x-1,y], B: Upper middle sample on the left: [x-1, y+H / 2-1], C: Lower middle sample on the left: [x-1, y+H / 2], D: Lower left sample: [x-1, y+H-1], E: Left bottom extended top sample: [x-1, y+H], F: Left bottom extended top middle sample: [x-1, y+H+H / 2-1], G: Left bottom extended middle sample: [x-1, y+H+H / 2], I: Left bottom extended bottom sample: [x-1, y+H+H-1], J: Upper left sample: [x,y-1], K: Upper left middle sample: [x+W / 2-1,y-1], L: Upper right middle sample: [x+W / 2,y-1], M: Upper right sample: [x+W-1,y-1], N: Upper left extended sample: [x+W,y-1], O: Upper extended left middle sample: [x+W+W / 2-1,y-1], P: Upper extended right middle sample: [x+W+W / 2,y-1], and Q: Upper extended right sample: [x+W+W-1,y-1] It is written as:
[0059] Example 1. The parameters α and β in the LM method are derived from chroma samples at two or more specific positions. The derivation also depends on the corresponding downsampled luma sample of the selected chroma sample, or alternatively, on the corresponding luma sample of the selected chroma sample, for example, if it is a 4:4:4 color format. b. For example, the parameters α and β in CCLM are, for example, 2 S (e.g. S=2 or 3) and derived from the chroma sample at position, e.g.: i. Position {A,D,J,M}; ii. Position {A,B,C,D,J,K,L,M}; iii.Position {A,I,J,Q}; iv.Position{A,B,D,I,J,K,M,Q}; v.Position{A,B,D,F,J,K,M,O}; vi.Position{A,B,F,I,J,K,O,Q}; vii.Position {A,C,E,I,J,L,N,Q}; viii.Position {A,C,G,I,J,L,P,Q}; ix.Position{A,C,E,G,J,L,N,P}; x.position{A,B,C,D}; xi.Position {A,B,D,I}; xii.Position {A,B,D,F}; xiii.Position {A,C,E,I}; xiv.Position {A,C,G,I}; xv.Position {A,C,E,G}; xvi.Position {J,K,L,M}; xvii.Position {J,K,M,Q}; xviii.Position {J,K,M,O}; xix.Position {J,K,O,Q}; xx.Position {J,L,N,Q}; xxi.Position {J,L,P,Q}; xxii.Position {J,L,N,P}; xxiii.Position {A,B,C,E,E,F,G,I}; xxiv.Position {J,K,L,M,N,O,P,Q}; It is derived from etc. c. For example, the parameters α and β in CCLM are derived from the chroma samples at the following positions: i. Any combination between {A,B,C,D,E,F,G,I} and {J,K,L,M,N,O,P,Q}, for example: (a) Positions A and J; (b) positions B and K; (c) positions C and L; (d) positions D and M; (e) positions E and N; (f) positions F and O; (g) positions G and P; (h) positions I and Q; ii. Any two different locations fetched from {A,B,C,D,E,F,G} (a) Positions A and B; (b) Positions A and C; (c) positions A and D; (d) positions A and E; (e) positions A and F; (f) positions A and G; (g) positions A and I; (h) positions D and B; (i) positions D and C; (j) positions E and B; (k) positions E and C; (l) Positions I and B; (m) Positions I and C; (n) Positions I and D; (o) positions I and E; (p) positions I and F; (q) positions I and G; iii. Any two different locations 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 locations have the same luma value, more locations may be checked. d. For example, to derive the parameters α and β in CCLM in the two-point method, not all available chroma samples are searched to find the minimum and maximum luma values.
[0060] i. One chroma sample out of K chroma samples (and their corresponding downsampled luma samples) is included in the set for search, where K can be 2, 4, 6, or 8.
[0061] (a) For example, if Rec[x,y] is the top neighbor, it is included in the search set only if x%K==0. If Rec[x,y] is the left neighbor, it is included in the search set only if y%K==0.
[0062] ii. Only chroma samples at specific locations, such as those specified in 1.ai-1.a.xxiv, are included in the set for searching. e. In mode LM-L, all samples selected must be left adjacent samples. f. In mode LM-A, all selected samples must be adjacent samples above. g. The selected position may be fixed or adaptive.
[0063] i. In one example, which position is selected may depend on the width and height of the current chroma block; ii. In one example, which position is selected may be signaled from the encoder to the decoder, for example, in the VPS / SPS / PPS / slice header / tile group header / tile / CTU / CU / PU. h. The selected chroma samples are used to derive the parameters α and β using the least mean square method shown in equations (2) and (3), where N is set to the number of selected samples. i. A pair of selected chroma samples is used to derive the parameters α and β in a two-point method. j. In one example, how to select a sample may depend on the availability of neighboring blocks.
[0064] i. For example, if both left and top neighboring blocks are available, then positions A, D, J, and M are selected; if only the left neighboring block is available, then positions A and D are selected; and if only the top neighboring block is available, then positions J and M are selected.
[0065] Example 2. A set of parameters in CCLM mode can be first derived and then combined to form the final linear model parameters used to encode one block: α1 and β1 are derived from a group of chroma samples at a particular position, denoted as group 1, α2 and β2 are derived from a group of chroma samples at a particular position, denoted as group 2, and α N and β N is derived from a group of chroma samples at a particular position, denoted as group N, the final α and β are (α1,β1), …, (α N ,β N ) can be derived from a. In one example, α is α1, ..., α N β is calculated as the average of β1, ..., β N It is calculated as the average of
[0066] i. In one example, α=SignShift(α1+α2,1), β=SignShift(β1+β2,1).
[0067] ii. In one example, α=Shift(α1+α2,1) and β=Shift(β1+β2,1).
[0068] iii. If (α1,β1) and (α2,β2) have different precisions, e.g., to obtain a chroma prediction CP from its corresponding downsampled luma sample LR, it can be Using (α1,β1), CP=SignShift(α1×LR+β1,SH1) It is calculated as Using (α2,β2), it is calculated as CP=SignShift(α2×LR+β2,SH2), and Sh1 is not equal to Sh2, so the parameters need to be shifted before being combined. If Sh1>Sh2, then before being combined, the parameters are (a) Shifts should be made as follows: α1=SignShift(α1,Sh1-Sh2), β1=SignShift(β1,Sh1-Sh2), so the final precision is (α2,β2).
[0069] (b) It should be shifted as follows: α1=Shift(α1,Sh1-Sh2), β1=Shift(β1,Sh1-Sh2), then the final precision will be (α2,β2).
[0070] (c) They should be shifted as follows: α2=α2<<(Sh1-Sh2), β2=β2<<(Sh1-Sh2), so the final precision is (α1,β1). b. Some examples of Group 1 and Group 2 locations: i. Group 1: Positions A and D, Group 2: Positions J and M ii. Group 1: Positions A and I, Group 2: Positions J and Q iii. Group 1: Positions A and D, Group 2: Positions E and I, two groups are used for mode LM-L iv. Group 1: Positions J and M, Group 2: Positions N and Q, two groups are used for mode LM-A v. Group 1: positions A and B, Group 2: positions C and D, and the two groups are used in mode LM-L vi. Group 1: positions J and K, Group 2: positions L and M, and the two groups are used in mode LM-A.
[0071] Example 3. Assume that the input is two chroma sample values denoted as C0 and C1, and their corresponding luma sample values denoted as L0 and L1 (L0 < L1). Using these inputs, the two-point method can derive α = (C1 - C0) / (L1 - L0), and β = C0 - αL0 as α and β.
[0072] The bit depths of the luma samples and chroma samples are denoted as BL and BC. One or more simplifications for this implementation are a. When L1 is equal to L0, α is output as 0. Alternatively, when L1 is equal to L0, instead of using the CCLM mode, a specific intra prediction mode (e.g., DM mode, DC, or planar) can be used to derive the prediction block.
[0073] b. The division operation is replaced by other operations that do not use a look-up table. The log2 operation can be performed by checking the position of the most significant digit.
[0074] 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.
[0075] (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.
[0076] (b) For example, when 3×(L1 - L0) < 2 Floor(log2(L1-L0))+2 example i is used; otherwise, example ii is used.
[0077] (c) For example, when (L1 - L0) 2 < 2 2×Floor(log2(L1-L0))+1 example i is used; otherwise, example ii is used.
[0078] c. The division operation is replaced by a single look-up table denoted as M[k].
[0079] i. The size of the look-up table denoted as V is less than 2 P where P is an integer such as 5, 6, or 7 for example.
[0080] ii. Each entry of the look-up table stores an F-bit integer, for example, F = 8 or 16.
[0081] (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. <
[0084] (b) In one example, W also depends on the values of L1-L0.
[0085] iv. If k is not a valid key for querying the lookup table (kZ<0 or kZ>=V), then α is output as 0.
[0086] v. For example, α = Shift((C1-C0)×M[kZ],D), or α=SignShift((C1-C0)×M[kZ],D) vi. To obtain the chroma prediction CP from its corresponding (e.g., downsampled in the 4:2:0 case) 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.
[0087] (a) Sh may depend on BL, BC, V, S and D.
[0088] (b) D may depend on Sh.
[0089] viii. The size of the lookup table, denoted as V, is 2 P where P is an integer such as, for example, 5, 6, 7, or 8. Alternatively, V is set to 2P-M (for example, M is equal to 0).
[0090] 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.
[0091] (a) In one example, k is derived from Q using the function: k = f(Q).
[0092] (b) In one example, k is derived from Q and P using the function: k = f(Q, P).
[0093] (c) In one example, k is valid within a specific range [kMin, kMax]. For example, kMin = Z, kMax = V + Z.
[0094] (d) In one example, k = Shift(Q, W), a. W can depend on BL, V, and Z.
[0095] b. W can depend on the value of Q.
[0096] 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.
[0097] (e) In one example, k is derived in different ways for different values of Q. <00006�5> 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.
[0099] b. For example, k=Min(kMax,Q).
[0100] c. For example, k = Max(kMin,Min(kMax,Q)).
[0101] (f) In one example, if Q<0, then −Q is used to replace Q in the calculation, and −α is output.
[0102] (g) In one example, if Q is equal to 0, then α is set to a default value, such as 0 or 1.
[0103] (h) In one example, Q is 2 E If E>=0, then α=Shift(P,E) or α=SignShift(P,E).
[0104] d. All operations to derive the LM parameters must be within K bits, where K can be 8, 10, 12, 16, 24, or 32.
[0105] i. If the intermediate variable can exceed the range represented by the constraint bits, it should be clipped or right-shifted to be within the constraint bits.
[0106] Example 4. A single chroma block may use multiple linear models, and the selection of the multiple linear models depends on the position of the chroma sample within the chroma block.
[0107] In one example, LM-L and LM-A modes can be combined within a single chroma block.
[0108] b. In one example, some samples are predicted in LM-L mode and other samples are predicted in LM-A mode.
[0109] i. Figure 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.
[0110] 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).
[0111] 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, ….
[0112] (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, ….
[0113] iv. w1 and w2 may depend on the position (x,y).
[0114] (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.
[0115] Example 5. It is proposed to divide the adjacent samples (including chroma samples and their corresponding luma samples, which may be downsampled) into N groups, where the maximum and minimum luma values of the kth (k=0, 1, …, N-1) group are denoted by MaxL k and MinL k and their corresponding chroma values are MaxC k and MinC k It is written as follows.
[0116] a. In one example, MaxL is expressed as MaxL=f(MaxL S0 ,MaxL S1 ,…,MaxL Sm ) and MaxC is calculated as MaxC=f2(MaxC S0 ,MaxC S1 ,…,MaxC Sm ) and MinL is calculated as MinL=f3(MinL S0 ,MinL S1 ,…,MinL Sm ) MinC is calculated as MinC=f4(MinC S0 ,MinC S1 ,…,MinC Sm ) where f1, f2, f3 and f4 are functions. The two-point method uses these inputs to calculate α and β as follows: α = (MaxC - MinC) / (MaxL - MinL) β = MinC-αMinL i. In one example, f1, f2, f3, f4 all represent averaging functions.
[0117] ii. S0, S1, ..., Sm are the indices of the selected group used to calculate α and β.
[0118] (1) For example, all groups are used, e.g., S0=0, S1=1, ..., Sm=N-1.
[0119] (2) For example, two groups are used, e.g., m=1, S0=0, S1=N-1.
[0120] (3) For example, not all groups are used, e.g., m <N-1、S0=0、S1=2、S3=4、…などである。
[0121] b. In one example, samples (or downsampled samples) located in the top row may be classified into one group, and samples (or downsampled samples) located in the left column of the block may be classified into another group.
[0122] c. In one example, the samples (or downsampled samples) are sorted based on their location or coordinates.
[0123] i. For example, samples may be classified into two groups.
[0124] (1) For a sample with coordinates (x, y) located in the top row, it is classified into group S0 if x%P=Q, where P and Q are integers, for example, P=2, Q=1, P=2, Q=0, or P=4, Q=0, otherwise it is classified into group S1.
[0125] (2) For a sample with coordinates (x, y) located in the left column, it is classified into group S0 if y%P=Q, where P and Q are integers, for example, P=2, Q=1, P=2, Q=0, or P=4, Q=0, otherwise it is classified into group S1.
[0126] (3) Only samples in one group, e.g., S0, are used to find MaxC and MaxL, e.g., MaxL=MaxLS0 and MaxC=MaxCS0.
[0127] d. In one example, only a portion of the adjacent samples (or downsampled samples) are used to divide into N groups.
[0128] e. The number of groups (e.g., N) and / or the index and / or function (f1 / f2 / f3 / f4) of the selected group may be pre-defined or may be signaled within the SPS / VPS / PPS / picture header / slice header / tile group header / LCU group / LCU / CU.
[0129] f. In one example, how to select samples for each group may depend on the availability of neighboring blocks.
[0130] i. For example, if both left and top neighboring blocks are available, MaxL0 / MaxC0 and MinL0 / MinC0 are found from positions A and D, MaxL1 / MaxC1 and MinL1 / MinC1 are found from positions J and M, and MaxL=(MaxL0+MaxL1) / 2, MaxC=(MaxC0+MaxC1) / 2, MinL=(MinL0+MinL1) / 2, MinC=(MinC0+MinC1) / 2.
[0131] ii. For example, if only the left neighboring block is available, MaxL / MaxC and MinL / MinC are found directly from positions A and D.
[0132] (1) Alternatively, if the neighboring block above is not available, α and β are set equal to some default value, for example, α=0 and β=1<<(bitDepth-1), where bitDepth is the bit depth of the chroma samples.
[0133] iii. For example, if only the upper neighboring block is available, MaxL / MaxC and MinL / MinC are found directly from positions J and M.
[0134] (1) Alternatively, if no left neighboring block is 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 samples.
[0135] g. In one example, how the samples in each group are selected may depend on the width and height of the block.
[0136] h. In one example, how the samples in each group are selected may depend on the value of the sample.
[0137] i. In one example, the two samples with the largest and smallest luma values are selected to be in a first group, and all other samples are placed in a second group.
[0138] Example 6. It is proposed that whether and how to apply the LM-L and LM-A modes may depend on the width (W) and height (H) of the current block.
[0139] (a) For example, LM-L cannot be applied when W>K×H, e.g., K=2.
[0140] (b) For example, LM-A cannot be applied when H>K×W, e.g., K=2.
[0141] (c) If one of LM-L and LM-A cannot be applied, the flag indicating whether LM-L or LM-A is used should not be signaled.
[0142] Example 7. A flag is signaled indicating whether CCLM mode is applied. The context used in arithmetic coding to encode the flag may depend on whether the top-left neighboring block shown in Figure 8 applies CCLM mode or not.
[0143] (a) In one example, if the upper left neighboring block applies CCLM mode, the first context is used, and if the upper left neighboring block does not apply CCLM mode, the second context is used. (b) In one example, if the upper left neighboring block is not available, it is considered that the CCLM mode does not apply. (c) In one example, if the upper left neighboring block is not available, it is considered to apply CCLM mode. (d) In one example, if the upper left neighboring block is not intra-coded, it is considered that CCLM mode does not apply. (e) In one example, if the upper left neighboring block is not intra-coded, it is considered to apply CCLM mode.
[0144] Example 8. The DM and LM mode indications or codewords may be coded in different orders per sequence / per picture / per tile / per block.
[0145] (a) The coding order of the LM and DM indications (e.g., first code whether it is in LM mode, and if not, then code whether it is in DM mode; or first code whether it is in DM mode, and if not, then code whether it is in LM mode) may depend on the mode information of one or more neighboring blocks.
[0146] (b) In one example, if the block to the upper left of the current block is available and is coded in LM mode, an indication of LM mode is coded first.
[0147] (c) Alternatively, if the block to the upper left of the current block is available and is coded in DM mode, an indication of DM mode is coded first.
[0148] (d) Alternatively, if the block to the upper left of the current block is available and is coded in a non-LM mode (e.g., DM mode, or other intra-prediction mode other than LM), an indication of DM mode is coded first.
[0149] (e) In one example, an indication of this order may be signaled within the SPS / VPS / PPS / picture header / slice header / tile group header / LCUs / LCU / CU.
[0150] Example 9. In the above example, a sample (or a downsampled sample) may be located beyond the range of the 2×W upper neighboring samples or the 2×H left neighboring samples shown in FIG.
[0151] (a) In LM mode or LM-L mode, adjacent samples RecC[x-1, y+d] can be used, where d is in the range [T, S]. T can be less than 0 and S can be greater than 2H-1. For example, T=-4, S=3H. In another example, T=0, S=max(2H, W+H). In yet another example, T=0 and S=4H.
[0152] (b) In LM mode or LM-A mode, adjacent samples RecC[x+d,y] can be used, where d is in the range [T,S]. T can be less than 0 and S can be greater than 2W-1. For example, T=-4, S=3W. In another example, T=0, S=max(2W,W+H). In yet another example, T=0 and S=4W.
[0153] Example 10. In one example, the chroma neighboring samples and their corresponding luma samples (which may be downsampled) are downsampled before deriving the linear model parameters α and β as disclosed in Examples 1-7. Let W and H be the width and height of the current chroma block.
[0154] (a) In one example, whether to perform downsampling and how to perform it may depend on W and H.
[0155] (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.
[0156] (c) In one example, when W is equal to H, the chroma adjacent samples and their corresponding luma samples (which may be downsampled) are not downsampled.
[0157] (d) In one example, when W < H, the chroma adjacent samples to the left of the current block and their corresponding luma samples (which may be downsampled) are downsampled.
[0158] (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, if 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 β.
[0159] (e) In one example, when W > H, the chroma adjacent samples above the current block and their corresponding luma samples (which may be downsampled) are downsampled.
[0160] (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, if 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 β.
[0161] (ii) Figure 9 shows an example of the samples picked when positions D and M of Figure 6 are used to derive α and β, and the downsampling performed when W>H.
[0162] Example 11. Neighboring downsampled / original reconstructed samples and / or downsampled / original reconstructed samples may be further refined before being used in the linear model prediction process or the cross-color component prediction process.
[0163] (a) "Refined" may refer to a filtering process.
[0164] (b) "Refined" may refer to any non-linear processing.
[0165] (c) To derive α and β, for example, α=(C1-C0) / (L1-L0) and β=C0-αL0, it is proposed to pick several adjacent samples (including chroma samples and their corresponding luma samples, which may be downsampled) and calculate C1, C0, L1 and L0.
[0166] (d) In one example, S adjacent luma samples (which may be downsampled), denoted as Lx1, Lx2, ..., LxS, and their corresponding chroma samples, denoted as Cx1, Cx2, ..., CxS, are used to derive C0 and L0 as follows, and T adjacent luma samples (which may be downsampled), denoted as Ly1, Ly2, ..., LyT, and their corresponding chroma samples, denoted as Cy1, Cy2, ..., CyT, are used to derive C1 and L1 as follows: (i) C0 = f0 (Cx1, Cx2, ..., CxS), L0 = f1 (Lx1, Lx2, ..., LxS), C1 = f2 (Cy1, Cy2, ..., CyT), L1 = f4 (Ly1, Ly2, ..., LyT), where f0, f1, f2 and f3 are some functions.
[0167] (ii) In one example, f0 is the same as f1.
[0168] (iii) In one example, f2 is the same as f3.
[0169] (iv) In one example, f0, f1, f2, and f3 are the same.
[0170] 1. For example, they are all averaging functions.
[0171] (v) In one example, S is equal to T.
[0172] 1. In one example, the set {x1, x2, …, xS} is the same as the set {y1, y2, …, yT}.
[0173] (vi) In one example, Lx1, Lx2, ..., LxS are selected as the smallest S luma samples of the group of luma samples.
[0174] 1. For example, the group of luma samples includes all adjacent samples used in VTM-3.0 to derive the CCLM linear parameters.
[0175] 2. For example, a group of luma samples includes some adjacent samples used in VTM-3.0 to derive CCLM linear parameters.
[0176] For example, a group of luma samples includes the four samples shown in Figure 2-5.
[0177] (vii) In one example, Ly1, Ly2, ..., LyS are selected as the largest S luma samples of the group of luma samples.
[0178] 1. For example, the group of luma samples includes all adjacent samples used in VTM-3.0 to derive the CCLM linear parameters.
[0179] 2. For example, a group of luma samples includes some adjacent samples used in VTM-3.0 to derive CCLM linear parameters.
[0180] For example, a group of luma samples includes the four samples shown in Figure 2-5.
[0181] Example 12. It is proposed to select other neighboring or downsampled neighboring samples based on the largest neighboring or downsampled neighboring sample in a given set of neighboring or downsampled neighboring samples.
[0182] (a) In one example, let us denote the largest neighboring sample or downsampled neighboring sample as being at position (x0, y0). Then, samples in the regions (x0-d1, y0), (x0, y0-d2), (x0+d3, y0), and (x0, y0+d4) can be used to select other samples. The integers {d1, d2, d3, d4} can depend on the position (x0, y0). For example, if (x0, y0) is to the left of the current block, then d1=d3=1, and d2=d4=0. If (x0, y0) is above the current block, then d1=d3=0, and d2=d4=1.
[0183] (b) In one example, the smallest neighboring sample or the downsampled neighboring sample is denoted as being at position (x1, y1). Then, samples in the regions (x1-d1, y1), (x1, y1-d2), (x1+d3, y1), and (x1, y1+d4) may be used to select other samples. The integers {d1, d2, d3, d4} may depend on the position (x1, y1). For example, if (x1, y1) is to the left of the current block, then d1=d3=1, and d2=d4=0. If (x1, y1) is above the current block, then d1=d3=0, and d2=d4=1.
[0184] (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.
[0185] (d) A similar method can be used to derive the smallest sample.
[0186] 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).
[0187] Example 14. The selection of the location of the chroma samples (and / or the corresponding luma samples) may depend on the coded mode information.
[0188] (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.
[0189] (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.
[0190] (c) Alternatively or additionally, it may depend on the block size.
[0191] (i) Alternatively or additionally, it may depend on the ratio between the width and height of the current chroma (and / or luma) block.
[0192] (ii) Alternatively or additionally, it may depend on whether the width and / or height is equal to K (eg, K=2).
[0193] (d) In one example, if the current mode is normal LM mode, the following method may be applied to select chroma samples (and / or downsampled or non-downsampled luma samples).
[0194] (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, which may be located at the following locations (where (x,y) is the top left coordinate of the current block):
[0195] 1. (x-1,y), (x,y-1), (x-1,y+H-1), and (x+W-1,y-1).
[0196] 2. (x-1,y), (x,y-1), (x-1,y+HH / W-1), and (x+W-1,y-1), for example, when H is greater than W.
[0197] 3. (x-1,y), (x,y-1), (x-1,y+H-1), and (x+WW / H-1,y-1), for example, where H is less than W.
[0198] 4. (x-1,y), (x,y-1), (x-1,y+H-max(1,H / W)), and (x+W-max(1,W / H),y-1).
[0199] (ii) If only the top row is available, the sample is selected from the top row only.
[0200] 1. For example, the four samples in the top row may be selected.
[0201] 2. For example, two samples may be selected.
[0202] 3. How samples are selected can depend on width / height, e.g. if W>2 then 4 samples are selected, if W=2 then 2 samples are selected.
[0203] 4. The sample to be selected may be located at (x,y) where (x,y) is the top left corner of the current block.
[0204] a. (x,y-1), (x+W / 4,y-1), (x+2*W / 4,y-1), (x+3*W / 4,y-1).
[0205] b. (x,y-1), (x+W / 4,y-1), (x+3*W / 4,y-1), (x+W-1,y-1).
[0206] c. (x,y-1), (x+(2W) / 4,y-1), (x+2*(2W) / 4,y-1), (x+3*(2W) / 4,y-1), for example, if the top right row is available, or if the first top right sample is available.
[0207] d. (x,y-1), (x+(2W) / 4,y-1), (x+3*(2W) / 4,y-1), (x+(2W)-1,y-1), for example, if the top right row is available, or if the first top right sample is available.
[0208] (iii) If only the left column is available, samples are selected from the left column only.
[0209] 1. For example, the four samples in the left column may be selected.
[0210] 2. For example, the two samples in the left column may be selected.
[0211] 3. How samples are selected can depend on width / height, e.g. if H>2 then 4 samples are selected, if H=2 then 2 samples are selected.
[0212] 4. The sample selected may be located in:
[0213] a. (x-1,y), (x-1,y+H / 4), (x-1,y+2*H / 4), (x-1,y+3*H / 4).
[0214] b. (x-1,y), (x-1,y+2*H / 4), (x-1,y+3*H / 4), (x-1,y+H-1).
[0215] c. (x-1,y), (x-1,y+(2H) / 4), (x-1,y+2*(2H) / 4), (x-1,y+3*(2H) / 4), for example, if the bottom left column is available, or if the first bottom left sample is available.
[0216] d. (x-1,y), (x-1,y+2*(2H) / 4), (x-1,y+3*(2H) / 4), (x-1,y+(2H)-1) if the bottom left column is available or if the first bottom left sample is available.
[0217] (iv) In the above example, only two of the four samples may be selected.
[0218] (e) In one example, if the current mode is LM-A mode, samples may be selected according to Example 11(d)(ii).
[0219] (f) In one example, if the current mode is LM-L mode, samples may be selected according to Example 11(d)(iii).
[0220] (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 of all selected samples and the other having all remaining samples.
[0221] (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.
[0222] (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.
[0223] 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).
[0224] 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.
[0225] In one example, W may be set equal to the width of the current block.
[0226] b. In one example, W may be set to (L times the width of the current block), where L is an integer value.
[0227] c. In one example, if both the top and left blocks are available, W may be set to the width of the current block.
[0228] 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.
[0229] ii. In one example, L may depend on the availability of the block above and to the right. Alternatively, L may depend on the availability of one above-left sample.
[0230] d. In one example, W may depend on the coding mode.
[0231] i. In one example, if the current block is coded as LM mode, W may be set to the width of the current block.
[0232] ii. If the current block is coded as LM-A mode, W may be set to (L times the width of the current block), where L is an integer value.
[0233] (a) L may depend on the availability of the block above and to the right, or alternatively, L may depend on the availability of one above-left sample.
[0234] e. If the coordinates of the top left corner of the current block are (x0, y0), then the upper adjacent sample at position (x0+F+K×S, y0-1), where K=0, 1, 2, ..., kMax, is selected.
[0235] f. In one example, F=W / P, where P is an integer.
[0236] i. For example, P=2 i where i is an integer such as 1 or 2.
[0237] ii. Alternatively, F=W / P+offset.
[0238] g. In one example, S=W / Q, where Q is an integer.
[0239] i. For example, Q=2 j where j is an integer such as 1 or 2.
[0240] h. In one example, F=S / R, where R is an integer.
[0241] i. For example, R=2 m and m is an integer such as 1 or 2.
[0242] In one example, S=F / Z, where Z is an integer.
[0243] i. For example, Z=2 n where n is an integer such as 1 or 2.
[0244] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (eg, LM, LM-A, or LM-L, etc.).
[0245] k. kMax and / or F and / or S and / or offset may depend on the width and / or height of the current block.
[0246] l. kMax and / or F and / or S and / or offset may depend on the availability of neighboring samples.
[0247] m. kMax and / or F and / or S and / or offset may depend on W.
[0248] For example, kMax=1, F=W / 4, S=W / 2, offset=0. Alternatively, these settings are made when the current block is LM coded, both left and top neighboring samples are available, and W>=4.
[0249] For example, kMax=3, F=W / 8, S=W / 4, offset=0. Alternatively, these settings are made when the current block is LM coded, only upper neighboring samples are available, and W>=4.
[0250] For example, kMax=3, F=W / 8, S=W / 4, offset=0. Alternatively, these settings are made when the current block is LM-A coded and W>=4.
[0251] q. For example, kMax=1, F=0, S=1, offset=0. Alternatively, these settings are made when W is equal to 2.
[0252] Example 17. It is proposed to select the left neighboring chroma samples (and / or their corresponding luma samples that may be downsampled) based on a first position offset value (denoted as F) and a step value (denoted as S). Let H be the height of the available left neighboring samples to be used.
[0253] In one example, H may be set equal to the height of the current block.
[0254] b. In one example, H may be set to (L times the height of the current block), where L is an integer value.
[0255] c. In one example, if both the top and left blocks are available, H may be set to the height of the current block.
[0256] i. Alternatively, if no block above is available, H may be set to (L times the height of the current block), where L is an integer value.
[0257] ii. In one example, L may depend on the availability of the bottom-left block. Alternatively, L may depend on the availability of one bottom-left sample.
[0258] iii. Alternatively, if the required upper right neighboring block is available, H may be set to (current block height + current block width).
[0259] (a) In one example, if no left neighboring samples are available, the same H upper neighboring samples are chosen for LM-A mode and LM mode.
[0260] d. In one example, H may depend on the coding mode.
[0261] i. In one example, if the current block is coded as LM mode, H may be set to the height of the current block.
[0262] ii. If the current block is coded as LM-L mode, H may be set to (L times the height of the current block).
[0263] (a) L may depend on the availability of the bottom-left block, or alternatively, L may depend on the availability of one top-left sample.
[0264] (b) Alternatively, if the required bottom-left neighboring block is available, W may be set to (current block height + current block width).
[0265] (c) In one example, if no upper neighboring samples are available, the same W left neighboring samples are chosen for the LM-L mode and the LM mode.
[0266] e. If the coordinates of the top left corner of the current block are (x0, y0), then the left adjacent sample at position (x0-1, y0+F+K×S), where K=0, 1, 2, ..., kMax, is selected.
[0267] f. In one example, F=H / P, where P is an integer.
[0268] i. For example, P=2 i where i is an integer such as 1 or 2.
[0269] ii. Alternatively, F=H / P+offset.
[0270] g. In one example, S=H / Q, where Q is an integer.
[0271] i. For example, Q=2 j where j is an integer such as 1 or 2.
[0272] h. In one example, F=S / R, where R is an integer.
[0273] i. For example, R=2 mand m is an integer such as 1 or 2.
[0274] In one example, S=F / Z, where Z is an integer.
[0275] i. For example, Z=2 n where n is an integer such as 1 or 2.
[0276] j. kMax and / or F and / or S and / or offset may depend on the prediction mode of the current block (eg, LM, LM-A, or LM-L, etc.).
[0277] k. kMax and / or F and / or S and / or offset may depend on the height and / or depth of the current block.
[0278] l. kMax and / or F and / or S and / or offset may depend on H.
[0279] m. kMax and / or F and / or S and / or offset may depend on the availability of neighboring samples.
[0280] For example, kMax=1, F=H / 4, S=H / 2, offset=0. Alternatively, these settings are made when the current block is LM coded, both left and top neighboring samples are available, and H>=4.
[0281] For example, kMax=3, F=H / 8, S=H / 4, offset=0. Alternatively, these settings are made when the current block is LM coded, only upper neighboring samples are available, and H>=4.
[0282] For example, kMax=3, F=H / 8, S=H / 4, offset=0. Alternatively, these settings are made when the current block is LM-L coded and H>=4.
[0283] q. For example, H is equal to 2, kMax=1, F=0, S=1, offset=0.
[0284] Example 18. To derive the linear model parameters, it is proposed to select two or four adjacent chroma samples (and / or their corresponding luma samples, which may be downsampled).
[0285] a. In one example, maxY / maxC and minY / minC are derived from two or four adjacent chroma samples (and / or their corresponding luma samples, which may be downsampled), and then used to derive linear model parameters using a two-point approach.
[0286] b. In one example, when two adjacent chroma samples (and / or their corresponding luma samples that may be downsampled) are selected to derive maxY / maxC and minY / minC, minY is set to the smaller luma sample value, minC is set to its corresponding chroma sample value, maxY is set to the larger luma sample value, and maxC is set to its corresponding chroma sample value.
[0287] c. In one example, if four adjacent chroma samples (and / or their corresponding luma samples that may be downsampled) are selected to derive maxY / maxC and minY / minC, the luma samples and their corresponding chroma samples are split into two arrays G0 and G1, each containing two chroma samples and their corresponding luma samples.
[0288] i. Given four luma samples and their corresponding chroma samples denoted as S0, S1, S2, S3, they can be split into two groups in any order, for example: (a) G0 = {S0, S1}, G1 = {S2, S3}; (b) G0 = {S1, S0}, G1 = {S3, S2}; (c) G0 = {S0,S2}, G1 = {S1,S3}; (d) G0 = {S2, S0}, G1 = {S3, S1}; (e) G0 = {S1,S2}, G1 = {S0,S3}; (f) G0 = {S2, S1}, G1 = {S3, S0}; (g) G0 = {S0,S3}, G1 = {S1,S2}; (h) G0 = {S3, S0}, G1 = {S2, S1}; (i) G0 = {S1,S3}, G1 = {S0,S2}; (j) G0 = {S3, S1}, G1 = {S2, S0}; (k) G0 = {S3, S2}, G1 = {S0, S1}; (l) G0 = {S2, S3}, G1 = {S1, S0}; (m) G0 and G1 may be swapped.
[0289] ii. In one example, the luma sample values of G0[0] and G0[1] are compared, and if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the luma samples of G0[0] and their corresponding chroma samples are swapped with those of G0[1].
[0290] (a) Alternatively, if the luma sample value of G0[0] is greater than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma sample are swapped with those of G0[1].
[0291] (b) Alternatively, if the luma sample value of G0[0] is smaller than the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma sample are swapped with those of G0[1].
[0292] (c) Alternatively, if the luma sample value of G0[0] is less than or equal to the luma sample value of G0[1], the luma sample of G0[0] and its corresponding chroma sample are swapped with those of G0[1].
[0293] iii. In one example, the luma sample values of G1[0] and G1[1] are compared, and if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the luma samples of G1[0] and their corresponding chroma samples are swapped with those of G1[1].
[0294] (a) Alternatively, if the luma sample value of G1[0] is greater than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma sample are swapped with those of G1[1].
[0295] (b) Alternatively, if the luma sample value of G1[0] is smaller than the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma sample are swapped with those of G1[1].
[0296] (c) Alternatively, if the luma sample value of G1[0] is less than or equal to the luma sample value of G1[1], the luma sample of G1[0] and its corresponding chroma sample are swapped with those of G1[1].
[0297] 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 greater than) the luma sample value of G1[1], G0 and G1 are swapped.
[0298] (a) In one example, the luma sample values of G0[0] and G1[0] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than, or greater than) the luma sample value of G1[0], G0 and G1 are swapped.
[0299] (b) In one example, the luma sample values of G0[1] and G1[0] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than, or greater than) the luma sample value of G1[0], G0 and G1 are swapped.
[0300] (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 greater than) the luma sample value of G1[1], G0 and G1 are swapped.
[0301] 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 greater than) the luma sample value of G1[1], G0[0] and G1[1] are swapped.
[0302] (a) In one example, the luma sample values of G0[0] and G1[0] are compared, and if the luma sample value of G0[0] is greater than (or less than, or less than, or greater than) the luma sample value of G1[0], G0[0] and G1[0] are swapped.
[0303] (b) In one example, the luma sample values of G0[1] and G1[0] are compared, and if the luma sample value of G0[1] is greater than (or less than, or less than, or greater than) the luma sample value of G1[0], G0[1] and G1[0] are swapped.
[0304] (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 greater than) the luma sample value of G1[1], G0[1] and G1[1] are swapped.
[0305] 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].
[0306] (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].
[0307] 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].
[0308] 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].
[0309] d. In one example, if only two adjacent chroma samples (and / or their corresponding luma samples that may be downsampled) are available, they are first padded to four chroma samples (and / or their corresponding luma samples), and then the CCLM parameters are derived using those four chroma samples (and / or their corresponding luma samples).
[0310] i. In one example, two padding chroma samples (and / or their corresponding luma samples) are copied from two available adjacent chroma samples (and / or their corresponding luma samples that may be downsampled).
[0311] Example 19. In all the above examples, the selected chroma samples are assumed to be located in the top row (i.e., having W samples) and / or left column (i.e., having H samples) shown in FIG. 10, where W and H are the width and height of the current block.
[0312] a. Alternatively, the above constraints may be applied when the current block is coded in normal LM mode.
[0313] b. Alternatively, the selected chroma samples are those located in the top row (ie, having W samples) and the top right row having H samples.
[0314] i. Alternatively, and additionally, the above constraints may be applied if the current block is coded in LM-A mode.
[0315] ii. Alternatively, and additionally, the above constraints may apply when the rows above are available but the columns to the left are not, and the current block is coded in LM-A mode or normal LM.
[0316] c. Alternatively, the selected chroma samples are those located in the left column (ie, having H samples) and the bottom left column having W samples.
[0317] i. Alternatively, and additionally, the above constraints may apply if the current block is coded in LM-L mode.
[0318] ii. Alternatively and additionally, the above constraints may apply when the row above is not available but the column to the left is available and the current block is coded in LM-L mode or regular LM.
[0319] Example 20 In one example, only neighboring luma samples in positions where corresponding chroma samples are required to derive CCLM parameters need to be downsampled.
[0320] Example 21 How to perform the methods disclosed in this document may depend on the color format (eg, 4:2:0 or 4:4:4, etc.).
[0321] Alternatively, how to perform the methods disclosed in this document may depend on the bit depth (e.g., 8-bit or 10-bit, etc.).
[0322] b. Alternatively, how to perform the methods disclosed in this document may depend on the color representation method (eg, RGB or YCbCr).
[0323] c. Alternatively, how to perform the methods disclosed in this document may depend on the color representation method (eg, RGB or YCbCr).
[0324] d. Alternatively, how the methods disclosed in this document perform may depend on the chroma downsampling position.
[0325] Example 22 The derivation of the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may depend on the availability of left and top neighbors, for example, if neither the left nor the top neighboring blocks are available, the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may not be derived.
[0326] a. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may depend on the number of available neighboring samples. For example, if numSampL==0 and numSampT==0, the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may not be derived. In another example, if numSampL+numSampT==0, the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may not be derived. In these two examples, numSampL and numSampT are the numbers of available neighboring samples from the left and top neighboring blocks.
[0327] b. Whether to derive the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may depend on the number of samples chosen to derive those parameters. For example, if cntL==0 and cntT==0, the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may not be derived. In another example, if cntL+cntT==0, the maximum / minimum values of the luma and chroma components used to derive the CCLM parameters may not be derived. In these two examples, cntL and cntT are the numbers of samples chosen from the left and top neighboring blocks.
[0328] Example 23 In one example, the proposed method for deriving parameters used in CCLM can be used to derive parameters used in LIC or other coding tools that rely on linear models.
[0329] a. The examples disclosed above can be applied to LIC, for example, by replacing "chroma neighboring samples" with "neighboring samples of the current block" and "corresponding luma samples" with "neighboring samples of the reference block."
[0330] b. In one example, the samples utilized in LIC parameter derivation may exclude samples at specific positions in the top row and / or left column.
[0331] i. In one example, the samples utilized in LIC parameter derivation may exclude the first sample in the top row.
[0332] (a) If the coordinates of the top left sample are (x0, y0), it is proposed to exclude (x0, y0-1) for the use of LIC parameters.
[0333] ii. In one example, the samples utilized in LIC parameter derivation may exclude the first sample in the left column.
[0334] (a) If the coordinates of the top left sample are (x0, y0), it is proposed to exclude (x0-1, y0) for the use of LIC parameters.
[0335] iii. Whether to apply the above method and / or how to define a particular location may depend on the availability of left columns / top rows.
[0336] iv. Whether to apply the above methods and / or how to define a particular location may depend on the block size.
[0337] c. In one example, N adjacent samples of the current block (which may be downsampled) and N corresponding adjacent samples of the reference block (which may also be downsampled) may be used to derive the parameters used for LIC.
[0338] i. For example, N is 4.
[0339] ii. In one example, the N adjacent samples may be defined as the N / 2 samples from the row above and the N / 2 samples from the column to the left.
[0340] (a) Alternatively, the N adjacent samples may be defined as the N samples from the row above or the column to the left.
[0341] iii. In another example, N is equal to min(L,T), where T is the total number of available neighboring samples (which may be downsampled) of the current block.
[0342] (a) In one example, L is set to 4.
[0343] 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.
[0344] v. In one example, the selection of the coordinates of the N samples may follow the rules for selecting N samples in the LM-A process.
[0345] vi. In one example, the selection of the coordinates of the N samples may follow the rules for selecting N samples in the LM-L process.
[0346] vii. In one example, how to select the N samples may depend on the availability of the row above / column to the left.
[0347] d. In one example, N adjacent samples of the current block (which may be downsampled) and N corresponding adjacent samples of the reference block (which may be downsampled) are used to derive parameters used in LIC and may be picked based on the sample position.
[0348] i. The pick-up method may depend on the width and height of the current block.
[0349] ii. The pick-up method may depend on the availability of neighboring blocks.
[0350] iii. For example, if both upper and left neighboring samples are available, K1 neighboring samples can be picked from the left neighboring samples and K2 neighboring samples can be picked from the upper neighboring samples, e.g., K1=K2=2.
[0351] iv. For example, if only the left neighboring samples are available, K1 neighboring samples can be picked from the left neighboring samples, for example, K1=4.
[0352] v. For example, if only the upper adjacent sample is available, K2 adjacent samples can be picked from the upper adjacent sample, for example, K2=4.
[0353] vi. For example, the above sample may be picked using a first position offset value (denoted as F) and a step value (denoted as S), which may depend on the size of the current block and the availability of neighboring blocks.
[0354] (a) For example, F and S can be derived by applying the method disclosed in Example 16.
[0355] vii. For example, the left sample may be picked using a first position offset value (denoted as F) and a step value (denoted as S) which may depend on the size of the current block and the availability of neighboring blocks.
[0356] (a) For example, F and S can be derived by applying the method disclosed in Example 17.
[0357] 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.
[0358] f. The above method may be used to derive parameters used in other coding tools that rely on linear models.
[0359] In another example, a cross-component prediction mode is proposed, in which chroma samples are predicted using corresponding reconstructed luma samples according to a prediction model as shown in equation (12). C (x,y) represents the predicted chroma samples. α and β are two model parameters. Rec'L(x,y) is the downsampled luma sample.
number
[0360] As shown in equation (13), a 6-tap filter is introduced into the luma downsampling process for block A in FIG.
number
[0361] As shown in equation (14), the top surrounding luma reference samples shaded in Figure 11 are downsampled with a 3-tap filter. The left surrounding luma reference samples are downsampled according to equation (15). If the left or top samples are not available, a 2-tap filter as defined in equations (16) and (17) will be used.
number
[0362] In particular, the ambient luma reference samples are downsampled to a size equal to the chroma reference samples. The size (width and height) are denoted as width and height. To derive α and β, only two or four adjacent samples are involved. To avoid division operations when deriving α and β, a lookup table is applied. The derivation method is shown below.
[0363] 3.1 Exemplary Method Using Up to Two Samples (1) The ratio r of width to height is calculated as shown in equation (18).
number
[0364] (2) If both the top and left blocks are available, two samples located at posA on the first top line and posL on the first left line are selected. For simplicity, we assume the width is the long side. The derivation of posA and posL is shown in equation (19) (position index starts from 0). Figure 12 shows some examples of different width-to-height ratios (1, 2, 4, and 8, respectively). The selected samples are shaded.
number
[0365] (3) If the block above is available but the block to the left is not, then the first point on the top line and the point at posA are selected, as shown in FIG.
[0366] (4) If the left block is available but the top block is not, then the first point on the left line and the point at posL are selected, as shown in FIG.
[0367] (5) A chroma prediction model is derived according to the luminance and chrominance values of the selected samples.
[0368] (6) If neither the left nor the top block is available, a default prediction model is used where α is equal to 0 and β is equal to 1<<(BitDepth-1), where BitDepth represents the bit depth of the chroma samples.
[0369] 3.2 Exemplary Method Using Up to Four Samples (1) The ratio r of width to height is calculated as shown in equation (18).
[0370] (2) If both the top and left blocks are available, four samples located at the beginning of the first top line and posA and the beginning of the first left line and posL are selected. The derivation of posA and posL is shown in equation (19). Figure 15 shows some examples of different width-to-height ratios (1, 2, 4, and 8, respectively). The selected samples are shaded.
[0371] (3) If the block above is available but the block to the left is not, then the first point on the line above and the point at posA are selected, as shown in FIG.
[0372] (4) If the left block is available but the top block is not, then the first point on the left line and the point at posL are selected, as shown in FIG.
[0373] (5) If neither the left nor the top block is available, a default prediction model is used where α is equal to 0 and β is equal to 1<<(BitDepth-1), where BitDepth represents the bit depth of the chroma samples.
[0374] 3.3 Exemplary Methods for Using Lookup Tables in LM Derivation Figure 16 shows examples of lookup tables with 128, 64, and 32 entries, each represented by 16 bits. The two-point LM derivation process is simplified with 64 entries, as shown in Table 1 and Figure 17. Note that the first entry does not need to be stored in the table.
[0375] It should also be noted that each entry in these exemplary tables is designed to be 16 bits, but can easily be converted to fewer bit (e.g., 8 or 12 bit) numbers. For example, a table with 8 bit entries can be achieved as follows: g_aiLMDivTableHighSimp_64_8[i]=(g_aiLMDivTableHighSimp_64[i]+128)>>8
[0376] 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]
[0377] Note that maxLuma and minLuma may represent the maximum and minimum luma sample values of the selected positions. Alternatively, they may represent a function, such as an averaging, of the maximum and minimum luma sample values of the selected positions. If only four positions are selected, they may also represent the average of the two largest luma values and the average of the two smallest luma values. It is further noted that in Figure 17, maxChroma and minChroma represent the chroma values corresponding to maxLuma and minLuma.
[0378] 3.3 Method #4: Using up to 4 samples The block width and height of the current chroma block are W and H, respectively. Also, the coordinates of the top left corner of the current chroma block are [0,0].
[0379] If both the top and left blocks are available and the current mode is normal LM mode (excluding LM-A and LM-L), then the two chroma samples located in the top row and the two chroma samples located in the left column are selected.
[0380] The coordinates of the two top samples are [Floor(W / 4),-1] and [Floor(3*W / 4),-1].
[0381] The coordinates of the two left samples are [-1,Floor(H / 4)] and [-1,Floor(3*H / 4)].
[0382] The selected samples are colored red as shown in Figure 22A.
[0383] These four samples are then sorted according to luma sample intensity and divided into two groups. The two largest and two smallest samples are averaged, respectively. The two averages are used to derive the cross-component prediction model. Alternatively, the maximum and minimum values of the four samples are used to derive the LM parameters.
[0384] If the block above is available but the block to the left is not, then 4 chroma samples are selected from the block above if W>2, and 2 chroma samples are selected if W=2.
[0385] 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].
[0386] The selected samples are colored red as shown in Figure 22B.
[0387] If the left block is available but the block above is not, then 4 chroma samples are selected from the left block if H>2, and 2 chroma samples are selected if H=2.
[0388] 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].
[0389] If neither the left nor the top block is available, a default prediction is used with α equal to 0 and β equal to 1<<(BitDepth−1), where BitDepth represents the bit depth of the chroma samples.
[0390] If the current mode is LM-A mode, four chroma samples from the block above are selected when W'>2, and two chroma samples are selected when W'=2. W' is the available number of neighboring samples above, which can be 2*W.
[0391] 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].
[0392] If the current mode is LM-L mode, four chroma samples from the left block are selected when H'>2, and two chroma samples are selected when H'=2. H' is the available number of left neighboring samples, which can be 2*H.
[0393] 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].
[0394] 3.5 Example Implementation for Modifying the Current VVC Standard for Use with CCLM Predictions
[0395] 8.3.4.2.8 INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction mode specification This section describes the equations using the equation numbers that correspond to those in the current draft of the VVC standard.
[0396] The inputs to this process are: - intra prediction mode predModeIntra, - sample position (xTbC, yTbC) of the top left sample of the current transform block relative to the top left sample of the current picture, - variable nTbW, which specifies the transform block width; - variable nTbH, which defines the transformation block height; - Chroma neighboring samples p[x][y] at x=-1, y=0..2*nTbH-1 and x=0..2*nTbW-1, y=-1.
[0397] The output of this process is the predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1.
[0398] The current luma position (xTbY, yTbY) is derived as follows: (xTbY, yTbY)=(xTbC<<1, yTbC<<1) (8-155)
[0399] The variables avalL, avalT, and avalTL are derived as follows: ... - If predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-156) numSampL=availL? nTbH:0 (8-157) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+numTopRight):0 (8-158) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+numLeftBelow):0 (8-159)
[0400] The variable bCTUbordery is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-160)
[0401] The predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-161) - Otherwise, the following ordered steps apply: 1. ...[No change to the current specification] 2. ... 3. ... 4. ... 5. ... 6. [No changes to the current specifications] 7. The variables minY, maxY, minC and maxC are derived as follows: - The variable minY is 1<<(BitDepth Y )+1 and the variable maxY is set equal to -1. - If avalL is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, the variable aboveIs4 is set equal to 0, otherwise it is set equal to 1. - If avallT is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM, the variable LeftIs4 is set equal to 0, otherwise it is set equal to 1. - The variable arrays startPos[] and pickStep[] are derived as follows: - startPos[0]=actualTopTemplateSampNum>>(2+aboveIs4); - pickStep[0]=std::max(1, actualTopTemplateSampNum>>(1+aboveIs4)); - startPos[1]=actualLeftTemplateSampNum>>(2+leftIs4); - pickStep[1]=std::max(1, actualLeftTemplateSampNum>>(1+leftIs4)); - The variable cnt is set to 0. - When predModeIntra is equal to INTRA_LT_CCLM, the variable nSX is set to nTbW, nSY is set to nTbH; otherwise, nSX is set to numSampLT, and nSY is set to numSampL. - When avallT is equal to TRUE and predModeIntra is not equal to INTRA_L_CCLM, the variables selectLumaPix and selectChromaPix are derived as follows: - While startPos[0]+cnt*pickStep[0]<nSX and cnt<4, the following applies: - selectLumaPix[cnt]=pTopDsY[startPos[0]+cnt*pickStep[0]]; - selectChromaPix[cnt]=p[startPos[0]+cnt*pickStep[0]][-1]; - cnt++; - When avalL is equal to TRUE and predModeIntra is not equal to INTRA_T_CCLM, the variables selectLumaPix and selectChromaPix are derived as follows: - While startPos[1]+cnt*pickStep[1]<nSY and cnt<4, the following applies: - selectLumaPix[cnt]=pLeftDsY[startPos[1]+cnt*pickStep[1]]; - selectChromaPix[cnt]=p[-1][startPos[1]+cnt*pickStep[1]]; - cnt++; - If cnt is equal to 2, the following applies: - if selectLumaPix[0]>selectLumaPix[1] then minY is set equal to selectLumaPix[1], minC is set equal to selectChromaPix[1], maxY is set equal to selectLumaPix[0], and maxC is set equal to selectChromaPix[0], else maxY is set equal to selectLumaPix[1], maxC is set equal to selectChromaPix[1], minY is set equal to selectLumaPix[0], and minC is set equal to selectChromaPix[0] - Otherwise, if cnt is equal to 4, the following applies: - The variable arrays minGrpIdx and maxGrpIdx are -minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 It is initialized as - The following applies: - if selectLumaPix[minGrpIdx[0]]>selectLumaPix[minGrpIdx[1]], swap minGrpIdx[0] with minGrpIdx[1; - if selectLumaPix[maxGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], swap maxGrpIdx[0] and maxGrpIdx[1]; - if selectLumaPix[minGrpIdx[0]]>selectLumaPix[maxGrpIdx[1]], swap minGrpIdx and maxGrpIdx; - if selectLumaPix[minGrpIdx[1]]>selectLumaPix[maxGrpIdx[0]], swap 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. The variables a, b, and k are derived as follows: [End of change]
[0402] 3.6 Another illustrative working draft of the proposed CCLM projections This section describes another example embodiment that illustrates changes that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0403] INTRA_LT_CCLM, INTRA_L_CCLM and INTRA_T_CCLM intra prediction mode specifications.
[0404] [The current additions to the VVC Working Draft are as follows] The number of available adjacent chroma samples to the right and top right, numTopSamp, and the number of available adjacent chroma samples to the left and bottom left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-157) numSampL=availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight, nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow, nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variable cntN and the array pickPosN[], which is obtained by replacing N with 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)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to (1+numIs4N)<<1 and pickPosN[pos] is set equal to (startPosN+pos*pickStepN) for pos=0..(cntN-1). - Otherwise, cntN is set equal to 0. The predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at x = 0..nTbW*2-1, y = 0..nTbH*2-1 are set equal to the reconstructed luma samples. 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent left luma sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocate sample pDsY[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=1..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y-1]+ pY[2*x-1][2*y]+4*pY[2*x][2*y]+pY[2*x+1][2*y]+ pY[2*x][2*y+1]+4)>>3 (8-163) - If availL is equal to TRUE, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y+1]+4)>>3 (8-164) - Otherwise, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-165) - If availT is equal to TRUE, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+ pY[2*x][1]+4)>>3 (8-166) - Otherwise, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-167) - If availL is equal to TRUE and availT is equal to TRUE, pDsY
[0000]
[0000] is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ pY[0][1]+4)>>3 (8-168) - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, pDsY
[0000]
[0000] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, pDsY
[0000]
[0000] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-170) - Otherwise (availL is equal to FALSE and availT is equal to FALSE), pDsY
[0000]
[0000] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+ pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-172) - If availL is equal to TRUE, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[0][2*y]+2*pY[0][2*y+1]+ pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-173) - Otherwise, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), and the selected downsampled left luma sample pSelDsY[idx] for idx=0..(cntL-1) is derived as follows: - The variable y is set equal to pickPosL[idx] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y-1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y+1]+4)>>3 (8-175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent top chroma sample pSelC[idx] is set equal to p[pickPosT[idx]][-1] for idx=0..(cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx] for idx=cntL..(cntL+cntT-1) is defined as follows: - x is set equal to pickPosT[idx-cntL] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x>0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8-181) - 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, then the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8-183) - Otherwise (availTL equals FALSE and bCTUboundary equals 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, then the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8-189) - Otherwise (availTL equals FALSE and bCTUboundary equals TRUE), the following applies: pSelDsY[idx]=pY[0][-1] (8-190) 6. The variables minY, maxY, minC and maxC are derived as follows: - - When cntT+cntL is equal to 2, set pSelC[idx+2]=pSelC[idx] and pSelDsY[idx+2]=pSelDsY[idx] for idx=0 and 1 - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]]>pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx ). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (8-208) a=0 (8-209) b=1<<(BitDepthC-1) (8-210) - Otherwise, the following applies: diff=maxY-minY (8-211) - If diff is not equal to 0, the following applies: diffC=maxC-minC (8-212) x=Floor(Log2(diff)) (8-213) normDiff=((diff<<4)>>x)&15 (8-214) x+=(normDiff!=0)? 1:0 (8-215) y=Floor(Log2(Abs(diffC)))+1 (8-216) a=(diffC*(divSigTable[normDiff]|8)+2y-1)>>y (8-217) k=((3+xy)<1)? 1:3+xy (8-218) a=((3+xy)<1)? Sign(a)*15:a (8-219) b=minC-((a*minY)>>k ) (8-220) where divSigTable[ ] is 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) [END OF EXAMPLE EMBODIMENT]
[0405] 3.7 Another illustrative working draft of the proposed CCLM projections This section describes another example embodiment that illustrates changes that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0406] INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction mode specifications … The number of available adjacent chroma samples to the right and top right, numTopSamp, and the number of available adjacent chroma samples to the left and bottom left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-157) numSampL=availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow, nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variable cntN and the array pickPosN[], which is obtained by replacing N with 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)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to Min(numSampN,(1+numIs4N)<<1) and pickPosN[pos] is set equal to (startPosN+pos*pickStepN),withpos=0..(cntN-1) - Otherwise, cntN is set equal to 0. The predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at x=0..nTbW*2-1, y=0..nTbH*2-1 are set equal to the reconstructed luma samples. 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent left luma sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocate sample pDsY[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=1..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y-1]+ pY[2*x-1][2*y]+4*pY[2*x][2*y]+pY[2*x+1][2*y]+ pY[2*x][2*y+1]+4)>>3 (8-163) - If availL is equal to TRUE, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y+1]+4)>>3 (8-164) - Otherwise, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-165) - If availT is equal to TRUE, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+ pY[2*x][1]+4)>>3 (8-166) - Otherwise, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-167) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ pY[0][1]+4)>>3 (8-168) - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-170) - Otherwise (availL equals FALSE and availT equals FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+ pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-172) - If availL is equal to TRUE, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[0][2*y]+2*pY[0][2*y+1]+ pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-173) - Otherwise, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), and the selected downsampled left luma sample pSelDsY[idx] for idx=0..(cntL-1) is derived as follows: - The variable y is set equal to pickPosL[idx] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y-1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y+1]+4)>>3 (8-175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent top chroma sample pSelC[idx] is set equal to p[pickPosT[idx]][-1] for idx=0..(cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx] for idx=cntL..(cntL+cntT-1) is defined as follows: - x is set equal to pickPosT[idx-cntL] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x>0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8-181) - 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, then the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8-183) - Otherwise (availTL equals FALSE and bCTUboundary equals 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, then the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8-189) - Otherwise (availTL equals FALSE and bCTUboundary equals 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 equals 2, replace Comp with DsY and C, set pSelComp[3] equal to pSelComp[0], set pSelComp[2] equal to pSelComp[1], set pSelComp[0] equal to pSelComp[1], and set pSelComp[1] equal to pSelComp[3] - The arrays minGrpIdx[] and maxGrpIdx[] are set as follows: minGrpIdx[0]=0, minGrpIdx[1]=1, maxGrpIdx[0]=2, maxGrpIdx[1]=3 - If pSelDsY[minGrpIdx[0]] > pSelDsY[minGrpIdx[1]], Swap(minGrpIdx[0], minGrpIdx[1]). - If pSelDsY[maxGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(maxGrpIdx[0], maxGrpIdx[1]). - If pSelDsY[minGrpIdx[0]]>pSelDsY[maxGrpIdx[1]], Swap(minGrpIdx, maxGrpIdx). - If pSelDsY[minGrpIdx[1]]>pSelDsY[maxGrpIdx[0]], Swap(minGrpIdx[1], maxGrpIdx[0]). - maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1. - maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1. - minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1. - minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1. 7. The variables a, b, and k are derived as follows: - If numSampL is equal to 0 and numSampT is equal to 0, the following applies: k=0 (8-208) a=0 (8-209) b=1<<(BitDepthC-1) (8-210) - Otherwise, the following applies: diff=maxY-minY (8-211) - If diff is not equal to 0, the following applies: diffC=maxC-minC (8-212) x=Floor(Log2(diff)) (8-213) normDiff=((diff<<4)>>x)&15 (8-214) x+=(normDiff!=0)?1:0 (8-215) y=Floor(Log2(Abs(diffC)))+1 (8-216) a=(diffC*(divSigTable[normDiff]|8)+2y-1)>>y (8-217) k=((3+xy)<1)?1:3+xy (8-218) a=((3+xy)<1)?Sign(a)*15:a (8-219) b=minC-((a*minY)>>k) (8-220) where divSigTable[] is defined as 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)
[0407] 3.8 Proposed Alternative Working Draft for CCLM Projections This section describes alternative example embodiments that illustrate other modifications that can be made to the current working draft of the VVC standard. Equation numbers here refer to the corresponding equation numbers in the VVC standard.
[0408] INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM intra prediction mode specifications … The number of available adjacent chroma samples to the right and top right, numTopSamp, and the number of available adjacent chroma samples to the left and bottom left, nLeftSamp, are derived as follows: - If predModeIntra is equal to INTRA_LT_CCLM, the following applies: numSampT=availT? nTbW:0 (8-157) numSampL=availL? nTbH:0 (8-158) - Otherwise, the following applies: numSampT=(availT&&predModeIntra==INTRA_T_CCLM)? (nTbW+Min(numTopRight,nTbH)):0 (8-159) numSampL=(availL&&predModeIntra==INTRA_L_CCLM)? (nTbH+Min(numLeftBelow,nTbW)):0 (8-160) The variable bCTUboundary is derived as follows: bCTUboundary=(yTbC&(1<<(CtbLog2SizeY-1)-1)==0)? TRUE:FALSE (8-161) The variable cntN and the array pickPosN[], which is obtained by replacing N with L and T, are derived as follows: - The variable numIs4N is set equal to ((availT&&availL&&predModeIntra==INTRA_LT_CCLM)? 0:1) - The variable startPosN is set equal to numSampN>>(2+numIs4N) - The variable pickStepN is set equal to Max(1,numSampN>>(1+numIs4N)). - If availN is equal to TRUE and predModeIntra is equal to INTRA_LT_CCLM or INTRA_N_CCLM, cntN is set equal to Min(numSampN, (1+numIs4N)<<1) and pickPosN[pos] is set equal to (startPosN+pos*pickStepN) for pos=0..(cntN-1). - Otherwise, cntN is set equal to 0. The predicted samples predSamples[x][y] for x=0..nTbW-1, y=0..nTbH-1 are derived as follows: - If both numSampL and numSampT are equal to 0, the following applies: predSamples[x][y]=1<<(BitDepthC-1) (8-162) - Otherwise, the following ordered steps apply: 1. Prior to the deblocking filter process at location (xTbY+x, yTbY+y), the colocated luma samples pY[x][y] at x=0..nTbW*2-1, y=0..nTbH*2-1 are set equal to the reconstructed luma samples. 2. The adjacent luma samples pY[x][y] are derived as follows: - When numSampL is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent left luma sample pY[x][y] at x=-1..-3, y=0..2*numSampL-1 is set equal to the reconstructed luma sample. - When numSampT is greater than 0, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent luma samples pY[x][y] at x=0..2*numSampT-1, y=-1,-2 are set equal to the reconstructed luma samples. - When availTL is equal to TRUE, prior to the deblocking filter process at position (xTbY+x, yTbY+y), the adjacent upper-left luma sample pY[x][y] at x=-1, y=-1,-2 is set equal to the reconstructed luma sample. 3. The downsampled collocate sample pDsY[x][y] for x=0..nTbW-1, y=0..nTbH-1 is derived as follows: - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=1..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x][2*y-1]+ pY[2*x-1][2*y]+4*pY[2*x][2*y]+pY[2*x+1][2*y]+ pY[2*x][2*y+1]+4)>>3 (8-163) - If availL is equal to TRUE, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+ pY[-1][2*y]+4*pY[0][2*y]+pY[1][2*y]+ pY[0][2*y+1]+4)>>3 (8-164) - Otherwise, pDsY[0][y] for y=1..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y-1]+2*pY[0][2*y]+pY[0][2*y+1]+2)>>2 (8-165) - If availT is equal to TRUE, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x][-1]+ pY[2*x-1][0]+4*pY[2*x][0]+pY[2*x+1][0]+ pY[2*x][1]+4)>>3 (8-166) - Otherwise, pDsY[x][0] for x=1..nTbW-1 is derived as follows: pDsY[x][0]=(pY[2*x-1][0]+2*pY[2*x][0]+pY[2*x+1][0]+2)>>2 (8-167) - If availL is equal to TRUE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+ pY[-1][0]+4*pY[0][0]+pY[1][0]+ pY[0][1]+4)>>3 (8-168) - Otherwise, if availL is equal to TRUE and availT is equal to FALSE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[-1][0]+2*pY[0][0]+pY[1][0]+2)>>2 (8-169) - Otherwise, if availL is equal to FALSE and availT is equal to TRUE, then pDsY[0][0] is derived as follows: pDsY[0][0]=(pY[0][-1]+2*pY[0][0]+pY[0][1]+2)>>2 (8-170) - Otherwise (availL equals FALSE and availT equals FALSE), pDsY[0][0] is derived as follows: pDsY[0][0]=pY[0][0] (8-171) - Otherwise, the following applies: - pDsY[x][y] for x=1..nTbW-1, y=0..nTbH-1 is derived as follows: pDsY[x][y]=(pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+ 2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+ pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 (8-172) - If availL is equal to TRUE, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[0][2*y]+2*pY[0][2*y+1]+ pY[1][2*y]+pY[1][2*y+1]+4)>>3 (8-173) - Otherwise, pDsY[0][y] for y=0..nTbH-1 is derived as follows: pDsY[0][y]=(pY[0][2*y]+pY[0][2*y+1]+1)>>1 (8-174) 4. When numSampL is greater than 0, the selected adjacent left chroma sample pSelC[idx] is set equal to p[-1][pickPosL[idx]] for idx=0..(cntL-1), and the selected downsampled left luma sample pSelDsY[idx] for idx=0..(cntL-1) is derived as follows: - The variable y is set equal to pickPosL[idx] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - If y>0||availTL==TRUE, pSelDsY[idx]=(pY[-2][2*y-1]+ pY[-3][2*y]+4*pY[-2][2*y]+pY[-1][2*y]+ pY[-2][2*y+1]+4)>>3 (8-175) - Otherwise, pSelDsY[idx]=(pY[-3][0]+2*pY[-2][0]+pY[-1][0]+2)>>2 (8-177) - Otherwise, the following applies: pSelDsY[idx]=(pY[-1][2*y]+pY[-1][2*y+1]+ 2*pY[-2][2*y]+2*pY[-2][2*y+1]+ pY[-3][2*y]+pY[-3][2*y+1]+4)>>3 (8-178) 5. When numSampT is greater than 0, the selected adjacent top chroma sample pSelC[idx] is set equal to p[pickPosT[idx-cntL]][-1], where idx=cntL..(cntL+cntT-1), and the downsampled adjacent top luma sample pSelDsY[idx], where idx=cntL..(cntL+cntT-1), is defined as: - x is set equal to pickPosT[idx-cntL] - If sps_cclm_colocated_chroma_flag is equal to 1, the following applies: - if x > 0: - If bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[2*x][-3]+ pY[2*x-1][-2]+4*pY[2*x][-2]+pY[2*x+1][-2]+ pY[2*x][-1]+4)>>3 (8-179) - Otherwise (bCTUboundary is equal to TRUE), the following applies: pSelDsY[idx]=(pY[2*x-1][-1]+ 2*pY[2*x][-1]+ pY[2*x+1][-1]+2)>>2 (8-180) - Otherwise, - If availTL is equal to TRUE and bCTUboundary is equal to FALSE, the following applies: pSelDsY[idx]=(pY[0][-3]+ pY[-1][-2]+4*pY[0][-2]+pY[1][-2]+ pY[0][-1]+4)>>3 (8-181) - 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, then the following applies: pSelDsY[idx]=(pY[0][-3]+2*pY[0][-2]+pY[0][-1]+2)>>2 (8-183) - Otherwise (availTL equals FALSE and bCTUboundary equals 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, then the following applies: pSelDsY[idx]=(pY[0][-2]+pY[0][-1]+1)>>1 (8-189) - Otherwise (availTL equals FALSE and bCTUboundary equals 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 equals 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)
[0409] 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.
[0410] 18A shows a flowchart of an example method for video processing. The method 1810 includes, at step 1812, determining parameters of a cross-component linear model (CCLM) based on chroma samples selected based on W available upper neighboring samples for transforming between a current video block of the video that is a chroma block and a coded representation of the video, where W is an integer. The method 1810 further includes, at step 1814, performing the transform based on the determination.
[0411] 18B shows a flowchart of an example method for video processing. The method 1820 includes, at step 1822, determining parameters of a cross-component linear model (CCLM) prediction mode based on chroma samples selected based on H available left neighboring samples of 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. The method 1820 further includes, at step 1824, performing the conversion based on the determination.
[0412] 19A shows a flowchart of an example method for video processing. The method 1910 includes, at step 1912, 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 1910 further includes, at step 1914, performing the transform based on the determination.
[0413] 19B shows a flowchart of an exemplary method for video processing. Method 1920, at step 1922, includes selecting 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 1920 further includes, at step 1924, 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.
[0414] 20A shows a flowchart of an example method for video processing. The method 2010 includes, at step 2012, 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 2010 further includes, at step 2014, performing the conversion based on the determination.
[0415] 20B shows a flowchart of an example method for video processing. The method 2020 includes, at step 2022, 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 the video being a chroma block and a coded representation of the video. The method 2020 further includes, at step 2024, performing the conversion based on the determination.
[0416] 20C shows a flowchart of an example method for video processing. Method 2030 includes, at step 2032, 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 2030 further includes, at step 2034, performing the conversion based on the determination.
[0417] Implementation examples of the disclosed technology FIG. 21A is a block diagram of a video processing device 3000. The device 3000 may be used to implement one or more of the methods described herein. The device 3000 may be embodied in a smartphone, tablet, computer, or Internet of Things (IoT) receiver. The device 3000 may include one or more processors 3002, one or more memories 3004, and video processing hardware 3006. The processor(s) 3002 may be configured to execute one or more methods described herein (including, but not limited to, the methods illustrated in FIGS. 18-29C). The memory(s) 3004 may be used to store data and code used to execute the methods and techniques described herein. The video processing hardware 3006 may be used to implement some of the techniques described herein in hardware circuitry.
[0418] FIG. 21B is another example block diagram of a video processing system in which the disclosed technology may be implemented. FIG. 21B is a block diagram illustrating an example video processing system 3100 in which various technologies disclosed herein may be implemented. Various implementations may include some or all of the components of system 3100. System 3100 may include an input 3102 that receives video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or in a compressed or encoded format. Input 3102 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, passive optical networks (PONs), and wireless interfaces such as Wi-Fi or cellular interfaces.
[0419] The system 3100 may include an encoding component 3104 that may implement various coding or encoding methods described herein. The encoding component 3104 may reduce the average bitrate of the video from the input 3102 to the output of the encoding component 3104, generating an encoded representation of the video. Encoding techniques are therefore sometimes referred to as video compression techniques or video transcoding techniques. The output of the encoding component 3104 may be stored or transmitted via a communication connection, as represented by component 3106. The stored or communicated bitstream (or encoded) representation of the video received at the input 3102 may be used by component 3108 to generate pixel values or displayable video that are sent to the display interface 3110. The process of generating a user-viewable video from the bitstream representation is sometimes referred to as video decompression. Also, while certain video processing operations may be referred to as “encoding” operations or tools, it is understood that the encoding tools or operations are used in an encoder, and that corresponding decoding tools or operations that reverse the results of the encoding are performed in a decoder.
[0420] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High-Definition Multimedia Interface (HDMI) or DisplayPort, etc. Examples of storage interfaces include Serial Advanced Technology Attachment (SATA), PCI, IDE interfaces, etc. The techniques described herein may be embodied in a variety of electronic devices, such as, for example, mobile phones, laptops, smartphones, or other devices capable of performing digital data processing and / or video display.
[0421] In some embodiments, the video encoding method may be performed using an apparatus implemented on a hardware platform such as those described with respect to Figures 21A or 21B.
[0422] Various techniques that may be suitably incorporated into some embodiments may be described using the following clause-based format.
[0423] The first set of paragraphs describes particular features and aspects of the disclosed technology listed in the preceding sections, including, for example, Examples 16 and 17.
[0424] 1. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) prediction mode based on a chroma sample 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.
[0425] 2. The method according to item 1, wherein the CCLM prediction mode uses a linear mode to derive a predicted value of a chroma component from another component.
[0426] 3. 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.
[0427] 4. 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.
[0428] 5. The method of clause 1, wherein W depends on the coding mode of the current video block.
[0429] 6. The method of clause 3, 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.
[0430] 7. 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.
[0431] 8. The method of clause 7, 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.
[0432] 9. The method of claim 7, wherein F=W / P or F=W / P+offset, and P is an integer.
[0433] 10. The method of clause 9, where F=W>>(2+numIs4T), where numIs4T is equal to 1 if four adjacent samples are selected in the adjacent row above, and numIs4T is equal to 0 otherwise, and the symbol >> is defined as the arithmetic right shift symbol.
[0434] 11. The method of claim 7, wherein S=W / Q, where Q is an integer.
[0435] 12. The method of claim 7, wherein S is 1 or greater.
[0436] 13. The method of clause 11 or 12, wherein S = Max(1,W>>(1+numIs4T)), numIs4T is equal to 1 if four adjacent samples are selected in the adjacent row above, otherwise numIs4T is equal to 0, and the symbol >> is defined as the arithmetic right shift symbol.
[0437] 14. The method of clause 10 or 13, 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.
[0438] 15. The method of claim 7, wherein F=S / R, where R is an integer.
[0439] 16. The method of claim 7, wherein S=F / Z, and Z is an integer.
[0440] 17. A method according to any one of clauses 8 to 16, 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 normal 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 normal CCLM.
[0441] 18. The method of any of clauses 8 to 16, wherein at least one of Kmax, F, S, or offset depends on the width and / or height of the current video block.
[0442] 19. The method of any of clauses 8 to 16, wherein at least one of Kmax, F, S, or offset depends on the availability of neighboring samples.
[0443] 20. The method of any of paragraphs 8 to 16, wherein at least one of Kmax, F, S, or offset depends on W.
[0444] 21. A method for video processing, comprising: determining parameters of a cross-component linear model (CCLM) prediction mode 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.
[0445] 22. The method according to clause 21, wherein the CCLM prediction mode uses a linear mode to derive a predicted value of a chroma component from another component.
[0446] 23. The method of clause 21, 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 of the current video block 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 neighboring samples.
[0447] 24. The method of clause 21, wherein H depends on the availability of at least one of an upper neighboring block or a left neighboring block of the current image block.
[0448] 25. The method of clause 21, wherein H depends on the coding mode of the current video block.
[0449] 26. The method of clause 23, wherein L has a value that depends on the availability of a bottom-left block or bottom-left sample located adjacent to the current image block.
[0450] 27. The method of clause 21, wherein the chroma sample is selected based on a first position offset value (F) and a step value (S), the first position offset value (F) and the step value (S) being dependent on H.
[0451] 28. The method of clause 27, wherein the top-left sample has coordinates (x0, y0) and the selected chroma sample has coordinates (x0-1, y0+F+K×S), where K is an integer between 0 and kMax.
[0452] 29. The method of claim 27, wherein F=H / P or F=H / P+offset, and P is an integer.
[0453] 30. The method of clause 29, wherein F=H>>(2+numIs4L), where numIs4L is equal to 1 if four adjacent samples are selected in the left adjacent column, and is equal to 0 otherwise.
[0454] 31. The method of claim 27, wherein S=H / Q, where Q is an integer.
[0455] 32. The method of claim 27, wherein S is 1 or greater.
[0456] 33. The method of clause 31 or 32, wherein S=Max(1,H>>(1+numIs4L)), and numIs4L is equal to 1 if four adjacent samples are selected in the left adjacent column, and numIs4L is equal to 0 otherwise.
[0457] 34. The method of clause 30 or 33, wherein numIs4L is equal to 1 if an upper neighboring sample is available, a left neighboring 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 neighboring sample and different from a second CCLM that uses only the upper neighboring sample.
[0458] 35. The method of claim 27, wherein F=S / R, and R is an integer.
[0459] 36. The method of claim 27, wherein S=F / Z, and Z is an integer.
[0460] 37. A method according to any of clauses 28 to 36, 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 normal 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 normal CCLM.
[0461] 38. The method of any of clauses 26 to 34, wherein at least one of Kmax, F, S, or offset depends on the width and / or height of the current video block.
[0462] 39. The method of any of paragraphs 28 to 36, wherein at least one of Kmax, F, S, or offset depends on H.
[0463] 40. The method of any of clauses 28 to 36, wherein at least one of Kmax, F, S, or offset depends on the availability of neighboring samples.
[0464] 41. The method of clause 21, wherein H is set to the height of the current video block plus the width of the current video block if the current video block's upper right neighboring block is available.
[0465] 42. The method of clause 21, wherein if a left adjacent sample is not available, the selected chroma sample has height H, regardless of whether the current video block has a first CCLM that uses only an upper adjacent sample.
[0466] 43. The method of clause 1, wherein W is set to the height of the current video block plus the width of the current video block if the neighboring block to the lower left of the current video block is available.
[0467] 44. The method of claim 1, wherein if the upper neighboring sample is not available, the selected chroma sample has a number W, regardless of whether the current image block has a first CCLM that uses only the left neighboring sample.
[0468] 45. The method of any of clauses 1 to 44, wherein the performing the transformation includes generating the coded representation from the current block.
[0469] 46. The method of any of clauses 1 to 44, wherein performing the transformation includes generating the current block from the coded representation.
[0470] 47. 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 46.
[0471] 48. 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 46.
[0472] The second set of paragraphs describes particular features and aspects of the disclosed techniques listed in the preceding sections, including, for example, Examples 18 and 19.
[0473] 1. A method for video processing, comprising the steps of determining parameters of a cross-component linear model (CCLM) based on two or four chroma samples and / or corresponding luma samples for a conversion between a current video block of a video that is a chroma block and a coded representation of the video, and performing the conversion based on the determination.
[0474] 2. The method of claim 1, wherein the corresponding luma samples are obtained by downsampling.
[0475] 3. The method of claim 1, wherein maxY, maxC, minY, and minC are first derived and used to derive the parameters.
[0476] 4. The method of claim 3, wherein the parameters are derived based on a two-point approach.
[0477] 5. The method of clause 3, wherein the two chroma samples are selected to derive the maxY, the maxC, the minY, and the minC, and the minY is set to the smaller luma sample value whose corresponding chroma sample value is the minC, and the maxY is set to the larger luma sample value whose corresponding chroma sample value is the maxC.
[0478] 6. The method of clause 3, wherein the four chroma samples are selected to derive the maxY, maxC, minY, and minC, and the four chroma samples and the corresponding luma samples are divided into two arrays G0 and G1, each array containing two chroma samples and their corresponding luma samples.
[0479] 7. The two sequences G0 and G1 are the following sets: i) G0={S0,S1}, G1={S2,S3}, ii) G0={S1,S0}, G1={S3,S2}, iii) G0={S0,S2}, G1={S1,S3}, iv) G0={S2,S0}, G1={S3,S1}, v) G0={S1,S2}, G1={S0,S3}, vi) G0={S2,S1}, G1={S3,S0}, vii) G0={S0,S3}, G1={S1,S2}, viii) G0={S3,S0}, G1={S2,S1}, ix) G0={S1,S3}, G1={S0,S2}, x) G0={S3,S1}, G1={S2,S0}, xi) G0={S3,S2}, G1={S0,S1}, or xii) Xii)G0={S2,S3}, G1={S1,S0}, including one of S0, S1, S2, and S3 each include the four chroma samples and each further include a corresponding luma sample; The method according to item 6.
[0480] 8. The method of clause 7, wherein upon comparison of two luma sample values of G0[0] and G0[1], the chroma samples of G0[0] and their corresponding luma samples are swapped with those of G0[1].
[0481] 9. The method of clause 8, wherein if the luma sample value of G0[0] is greater than the luma sample value of G0[1], the chroma samples of G0[0] and their corresponding luma samples are swapped with those of G0[1].
[0482] 10. The method of clause 7, wherein upon comparison of two luma sample values of G1[0] and G1[1], the chroma samples of G1[0] and their corresponding luma samples are swapped with those of G1[1].
[0483] 11. The method of clause 10, wherein if the luma sample value of G1[0] is greater than the luma sample value of G1[1], the chroma samples of G1[0] and their corresponding luma samples are swapped with those of G1[1].
[0484] 12. The method of clause 6, wherein upon comparison of two luma sample values of G0[0] and G1[1], the chroma samples of G0 and their corresponding luma samples are swapped with those of G1.
[0485] 13. The method of clause 12, wherein if a luma sample value of G0[0] is greater than a luma sample value of G1[1], a chroma sample of G0 and its corresponding luma sample are exchanged with those of G1.
[0486] 14. The method of clause 7, wherein upon comparison of two luma sample values of G0[1] and G1[0], the chroma samples of G0[1] and their corresponding luma samples are swapped with those of G1[0].
[0487] 15. The method of clause 14, wherein if the luma sample value of G0[1] is greater than the luma sample value of G1[0], the chroma samples of G0[1] and their corresponding luma samples are swapped with those of G1[0].
[0488] 16. The method of clause 7, wherein, upon comparison of two luma sample values of G0[0], G0[1], G1[0], and G1[1], the following exchange operations are selectively performed in sequence: i) an exchange operation of chroma samples of G0[0] and their corresponding luma samples with those of G0[1]; ii) an exchange operation of chroma samples of G1[0] and their corresponding luma samples with those of G1[1]; iii) an exchange operation of chroma samples of G0 and their corresponding luma samples with those of G1; and iv) an exchange operation of chroma samples of G0[1] and their corresponding luma samples with those of G1[0].
[0489] 17. The method of clause 7 or 16, wherein maxY is calculated based on the sum of the luma sample values of G1[0] and G1[1], and maxC is calculated based on the sum of the chroma sample values of G1[0] and G1[1].
[0490] 18. The method of clause 7 or 16, wherein maxY is calculated based on the average of the luma sample values of G1[0] and G1[1], and maxC is calculated based on the average of the chroma sample values of G1[0] and G1[1].
[0491] 19. The method of clause 7 or 16, wherein minY is calculated based on the sum of the luma sample values of G0[0] and G0[1], and minC is calculated based on the sum of the chroma sample values of G0[0] and G0[1].
[0492] 20. The method of clause 7 or 16, wherein minY is calculated based on the average of the luma sample values of G0[0] and G0[1], and minC is calculated based on the average of the chroma sample values of G0[0] and G0[1].
[0493] 21. The method of any of clauses 17 to 20, wherein the calculation of maxY and maxC or the calculation of minY and minC is performed after any of a plurality of exchange operations performed in response to a comparison of two luma sample values of G0[0], G0[1], G1[0] and G1[1], the plurality of exchange operations including: i) an exchange operation of chroma samples of G1[0] and their corresponding luma samples with those of G1[1]; ii) an exchange operation of chroma samples of G0 and their corresponding luma samples with those of G1; iii) an exchange operation of chroma samples of G0[1] and their corresponding luma samples with those of G1[0]; or iv) an exchange operation of chroma samples of G0[0] and their corresponding luma samples with those of G0[1].
[0494] 22. The method of claim 1, wherein if only two chroma samples are available, padding is performed on the two available chroma samples to provide the four chroma samples, and also on the two corresponding available luma samples to provide the four luma samples.
[0495] 23. The method of clause 22, wherein the four chroma samples include the two available chroma samples and two padding chroma samples copied from the two available chroma samples, and the four corresponding luma samples include the two available luma samples and two padding luma samples copied from the two available luma samples.
[0496] 24. The method of clause 7, wherein S0, S1, S2, S3 are chroma samples and corresponding luma samples are selected in a given order within a row above and / or a column to the left of the current picture block.
[0497] 25. A method for video processing, comprising: selecting chroma samples based on position rules for conversion between a current video block of a video that is a chroma block and a coded representation of the video, the chroma samples being used to derive parameters of a cross-component linear model (CCLM); and performing the conversion based on the determination, wherein the position rules specify selecting chroma samples located within a row above and / or a column to the left of the current video block.
[0498] 26. The method of clause 25, wherein the top row and the left column have W samples and H samples, respectively, where W and H are the width and height of the current video block, respectively.
[0499] 27. The method described in clause 26, wherein the position rule is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only upper adjacent samples to derive the parameters of the cross-component linear model and that is also different from a second CCLM mode that uses only left adjacent samples to derive the parameters of the cross-component linear model.
[0500] 28. The method of clause 26, wherein the position rules specify selecting chroma samples located within the top row and upper right row of the current picture block.
[0501] 29. The method of clause 28, wherein the top row and the top-right row have W and H samples, respectively, where W and H are the width and height of the current video block, respectively.
[0502] 30. The method of claim 28, wherein only available samples in the top row and the top right row are selected.
[0503] 31. The method of clause 28, wherein the position rule is applied to the current video block coded in a first CCLM mode that uses only upper adjacent samples to derive the parameters of the cross-component linear model.
[0504] 32. The method of clause 28, wherein the position rule is applied when the row above is available, the column to the left is not available, and the current video block is coded in a normal CCLM mode that is different from a first CCLM mode that uses only adjacent samples above to derive the parameters of the CCLM and that is also different from a second CCLM mode that uses only adjacent samples to the left to derive the parameters of the cross-component linear model.
[0505] 33. The method of any of clauses 26 to 32, wherein numSampT is set based on a rule specifying that if an upper neighboring sample is available, then numSampT is set equal to nTbW, and if an upper neighboring sample is not available, then numSampT is set equal to 0, where numSampT represents the number of chroma samples in an upper neighboring row used to derive the parameters of the cross-component linear model, and nTbW represents the width of the current video block.
[0506] 34. The method described in clause 33, wherein the rule is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only upper adjacent samples to derive the parameters of the cross-component linear model and that is also different from a second CCLM mode that uses only left adjacent samples to derive the parameters of the cross-component linear model.
[0507] 35. The method of any of clauses 26 to 32, wherein numSampT is set based on a rule that specifies that if upper neighboring samples are available and the current video block is encoded in a first CCLM mode that uses only upper neighboring samples to derive the parameters of the cross-component linear model, then numSampT is set equal to nTbW+Min(numTopRight, nTbH), and otherwise numSampT is set equal to 0, where numSampT represents the number of chroma samples in the upper neighboring row used to derive the parameters of the cross-component linear model, nTbW and nTbH represent the width and height of the current video block, respectively, and numTopRight represents the number of available upper-right neighboring samples.
[0508] 36. The method of clause 25, wherein the position rules specify selecting chroma samples located within the left column and bottom-left column of the current picture block.
[0509] 37. The method of clause 36, wherein the left column and the bottom-left column have H samples and W samples, respectively, where W and H are the width and height of the current video block, respectively.
[0510] 38. The method of claim 36, wherein only available samples in the left column and the bottom left column are selected.
[0511] 39. The method of clause 36, wherein the position rule is applied to the current video block coded in a second CCLM mode that uses only left neighboring samples to derive the parameters of the cross-component linear model.
[0512] 40. The method of clause 36, wherein the position rule is applied when the row above is unavailable, the column to the left is available, and the current video block is coded in a normal CCLM mode that is different from a first CCLM mode that uses only adjacent samples above to derive the parameters of the CCLM and that is also different from a second CCLM mode that uses only adjacent samples to the left to derive the parameters of the cross-component linear model.
[0513] 41. The method of any of clauses 36 to 40, wherein numSampL is set based on a rule that specifies that if a left neighboring sample is available, then numSampL is set equal to nTbH, and otherwise numSampL is set equal to 0, where numSampL represents the number of chroma samples in the left neighboring column used to derive the parameters of the cross-component linear model, and nTbH represents the height of the current video block.
[0514] 42. The method described in clause 41, wherein the rule is applied to the current video block encoded in a normal CCLM mode that is different from a first CCLM mode that uses only upper adjacent samples to derive the parameters of the cross-component linear model and that is also different from a second CCLM mode that uses only left adjacent samples to derive the parameters of the cross-component linear model.
[0515] 43. The method of any of clauses 36 to 40, wherein numSampL is set based on a rule that specifies that if left neighboring samples are available and the current video block is encoded in a second CCLM mode that uses only left neighboring samples to derive the parameters of the cross-component linear model, then numSampL is set equal to nTbH+Min(numLeftBelow, nTbW), and otherwise numSampL is set equal to 0, where numSampL represents the number of chroma samples in the left neighboring column used to derive the parameters of the cross-component linear model, nTbW and nTbH represent the width and height of the current video block, respectively, and numLeftBelow represents the number of available left neighboring samples.
[0516] 44. The method of any of clauses 25 to 43, wherein luma samples corresponding to selected chroma samples are used to derive the parameters of the cross-component linear model.
[0517] 45. The method of clause 44, wherein the luma samples are derived by downsampling.
[0518] 46. The method of any of clauses 1 to 45, wherein the performing the transformation includes generating the coded representation from the current block.
[0519] 47. The method of any of clauses 1 to 45, wherein performing the transformation includes generating the current block from the coded representation.
[0520] 48. A method according to any one of clauses 1 to 45, wherein the CCLM uses downsampled collocated chroma component samples to derive predicted values of chroma component samples of the current block based on a linear model including the parameters of the cross-component linear model.
[0521] 49. 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 48.
[0522] 50. 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 48.
[0523] The third set of paragraphs describes particular features and aspects of the disclosed technology listed in the preceding sections, including, for example, Examples 20, 21, and 22.
[0524] 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.
[0525] 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.
[0526] 3. A method for video processing, comprising: determining, based on coding conditions associated with a current video block of a video that is a chroma block, how to derive parameters of a cross-component linear model (CCLM) using chroma samples and luma samples for a conversion between a current video block of the video and a coded representation of the video; and performing the conversion based on the determination.
[0527] 4. The method of claim 3, wherein the encoding condition corresponds to a color format of the current video block.
[0528] 5. The method according to item 4, wherein the color format is 4:2:0 or 4:4:4.
[0529] 6. The method of claim 3, wherein the encoding condition corresponds to a color representation method of the current video block.
[0530] 7. The method according to item 6, wherein the color representation method is RGB or YCbCr.
[0531] 8. The method of clause 3, wherein the chroma samples are downsampled and the determination depends on the position of the downsampled chroma samples.
[0532] 9. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM based on the chroma samples and the luma samples selected from a group of adjacent chroma samples based on a position rule.
[0533] 10. The method of claim 3, wherein the method of deriving parameters comprises determining the parameters of the CCLM based on maximum and minimum values of the chroma samples and the luma samples.
[0534] 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.
[0535] 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.
[0536] 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.
[0537] 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.
[0538] 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.
[0539] 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.
[0540] 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.
[0541] 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.
[0542] 19. The method of any of clauses 1 to 17, wherein performing the transformation includes generating the current block from the coded representation.
[0543] 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.
[0544] 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.
[0545] The fourth set of sections describes particular features and aspects of the disclosed techniques recited in the preceding sections.
[0546] 1. A method for video processing, comprising: determining a set of values for parameters of a linear model based on two or more chroma samples for a current video block having a chroma block, the two or more chroma samples being selected from a group of adjacent chroma samples for the chroma block; and reconstructing the current video block based on the linear model.
[0547] 2. 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 is Sample A with coordinates (x-1, y), Sample D with coordinates (x-1, y+H-1), Sample J with coordinates (x,y-1), a sample M with coordinates (x+W-1, y-1), Item 1. The method according to Item 1, comprising:
[0548] 3. The method of clause 2, wherein the top-left neighboring block and the upper neighboring block of the current image block are available, and the two or more chroma samples include the samples A, D, J, and M.
[0549] 4. The method of claim 2, wherein the upper left neighboring block of the current image block is available, and the two or more chroma samples include samples A and D.
[0550] 5. The method of clause 2, wherein an adjacent block above the current image block is available and the two or more chroma samples include samples J and M.
[0551] 6. A method for video processing, comprising the steps of: for a current video block having chroma blocks, generating a plurality of groups having chroma and luma samples of neighboring blocks of the current video block; determining maximum and minimum values of the chroma and luma samples based on the plurality of groups; determining a set of values for parameters of a linear model based on the maximum and minimum values; and reconstructing the current video block based on the linear model.
[0552] 7. The method of clause 6, wherein selecting the plurality of groups is based on the availability of the neighboring blocks of the current image block.
[0553] 8. The plurality of groups includes S0 and S1, and the maximum luma value is maxL=f1(maxL S0 ,maxL S1 ,…,maxL Sm ), where f1 is the first function and maxL Si is group S among multiple groups. i The maximum luma value is maxC = f2(maxC S0 ,maxC S1 ,…,maxC Sm ), where f2 is the second function and maxC Si Group S i The maximum chroma value is minL = f3(minL S0 ,minL S1 ,…,minL Sm ), where f3 is the third function and minL Si Group S i The minimum luma value is minC = f4(minC S0 ,minC S1 ,…,minC Sm ) where f4 is the fourth function and minC Si Group S iand the parameters of the linear model have α and β calculated as α=(maxC-minC) / (maxL-minL) and β=minC-α×minL.
[0554] 9. 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 is Sample A with coordinates (x-1, y), Sample D with coordinates (x-1, y+H-1), Sample J with coordinates (x,y-1), a sample M with coordinates (x+W-1, y-1), Item 9. The method according to item 8, comprising:
[0555] 10. The top-left and top-neighboring blocks of the current image block are available, and the maximum and minimum luma and chroma values (maxL S0 , maxC S0 , minL S0 , and minC S0 ) are calculated based on the samples A and D by determining the maximum luma and chroma values and the minimum luma and chroma values (maxL S1 , maxC S1 , minL S1 , and minC S1 ) is based on the samples J and M, maxL=(maxL S0 +maxL S1 ) / 2, maxC=(maxC S0 +maxC S1 ) / 2, minL=(minL S0 +minL S1 ) / 2, and minC = (minC S0 +minC S1 ) / 2, Item 9. The method according to Item 8, wherein
[0556] 11. The adjacent block to the upper left of the current video block is available, and maxL, maxC, minL, and minC are the method according to item 9 based on the samples A and D.
[0557] 12. The adjacent block above the current video block is available, and maxL, maxC, minL, and minC are the method according to item 9 based on the samples J and M.
[0558] 13. The parameters of the linear model are α = 0, and β = 1 << (bitDepth - 1) and have α and β calculated as such, where bitDepth is the bit depth of the chroma sample, the method according to item 6.
[0559] 14. Generating the plurality of groups is the method according to item 6 based on the height or width of the current video block.
[0560] 15. A method for video processing, generating downsampled chroma and luma samples by downsampling the chroma and luma samples of adjacent blocks of a current video block having a height (H) and a width (W); determining a set of values for parameters of a linear model for the current video block based on the downsampled chroma and luma samples; reconstructing the current video block based on the linear model; and a method having the above.
[0561] 16. The downsampling is the method according to item 15 based on the height or the width.
[0562] 17. The method according to item 16, where W < H.
[0563] 18. The method according to item 16, where W > H.
[0564] 19. The method of clause 15, wherein the top-left sample of the current image block is R[0,0], and the downsampled chroma samples have samples R[-1,K×H / W], where K is a non-negative integer ranging from 0 to W-1.
[0565] 20. The method of clause 15, wherein the top-left sample of the current image block is R[0,0], and the downsampled chroma sample has sample R[K×H / W,-1], where K is a non-negative integer ranging from 0 to H-1.
[0566] 21. The method of clause 15, wherein a refinement process is performed on the downsampled chroma and luma samples before they are used to determine the set of values for the parameters of the linear model for the current video block.
[0567] 22. The method of claim 21, wherein the refinement process comprises a filtering process.
[0568] 23. The method of claim 21, wherein the refinement process comprises a non-linear process.
[0569] 24. The method of clause 15, wherein the parameters of the linear model are α and β, where α = (C1 - C0) / (L1 - L0) and β = C0 - αL0, where C0 and C1 are chroma samples and L0 and L1 are luma samples.
[0570] 25. C0 and L0 are based on S downsampled chroma and luma samples, denoted as {Cx1, Cx2, …, CxS} and {Lx1, Lx2, …, LxS}, respectively; C1 and L1 are based on T downsampled chroma and luma samples, denoted as {Cy1, Cy2, …, CyT} and {Ly1, Ly2, …, LyT}, respectively; C0 = f0 (Cx1, Cx2, ..., CxS), L0 = f1 (Lx1, Lx2, ..., LxS), C1 = f2 (Cy1, Cy2, ..., CyT), and L1 = f3 (Ly1, Ly2, ..., LyT), f0, f1, f2, and f3 are functions, Item 25. The method according to item 24.
[0571] 26. The method of paragraph 25, wherein f0 and f1 are first functions.
[0572] 27. The method of clause 25, wherein f2 and f3 are second functions.
[0573] 28. The method of clause 25, wherein f0, f1, f2, and f3 are third functions.
[0574] 29. The method of claim 28, wherein the third function is an averaging function.
[0575] 30. The method of claim 25, wherein S=T.
[0576] 31. The method of clause 25, where (Lx1, Lx2, ..., LxS) is the smallest sample in a set of luma samples.
[0577] 32. The method of clause 25, where {Ly1,Ly2,...,LyT} is the largest sample in a set of luma samples.
[0578] 33. The method of clause 31 or 32, wherein the set of luma samples comprises all adjacent samples used in VTM-3.0 to derive the parameters of the linear model.
[0579] 34. The method of clause 31 or 32, except that the set of luma samples comprises a subset of the neighboring samples used in VTM-3.0 to derive the parameters of the linear model, the subset being all of the neighboring samples.
[0580] 35. The method according to claim 1, 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.
[0581] 36. The method according to claim 1, wherein the two or more chroma samples are selected based on a ratio of the height of the current video block to the width of the current video block.
[0582] 37. The method according to claim 1, wherein the two or more chroma samples are selected based on an encoding mode of the current video block.
[0583] 38. 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 37.
[0584] 39. The method according to claim 38, wherein the two or more chroma samples include samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - 1, y - 1).
[0585] 40. The method according to claim 38, wherein the two or more chroma samples include samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - H / W - 1), and (x + W - 1, y - 1), and H > W.
[0586] 41. The method according to claim 38, wherein the two or more chroma samples include samples at coordinates (x - 1, y), (x, y - 1), (x - 1, y + H - 1), and (x + W - W / H - 1, y - 1), and H < W.
[0587] 42. The method of clause 38, wherein the two or more chroma samples include 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).
[0588] 43. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x,y-1), (x+W / 4,y-1), (x+2*W / 4,y-1), and (x+3*W / 4,y-1).
[0589] 44. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x,y-1), (x+W / 4,y-1), (x+3*W / 4,y-1), and (x+W-1,y-1).
[0590] 45. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x, y-1), (x+(2W) / 4, y-1), (x+2*(2W) / 4, y-1), and (x+3*(2W) / 4, y-1).
[0591] 46. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x, y-1), (x+(2W) / 4, y-1), (x+3*(2W) / 4, y-1), and (x+(2W)-1, y-1).
[0592] 47. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+H / 4), (x-1,y+2*H / 4), and (x-1,y+3*H / 4).
[0593] 48. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+2*H / 4), (x-1,y+3*H / 4), and (x-1,y+H-1).
[0594] 49. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+(2H) / 4), (x-1,y+2*(2H) / 4), and (x-1,y+3*(2H) / 4).
[0595] 50. The method of clause 38, wherein the two or more chroma samples include samples at coordinates (x-1,y), (x-1,y+2*(2H) / 4), (x-1,y+3*(2H) / 4), and (x-1,y+(2H)-1).
[0596] 51. The method of any of clauses 39 to 50, wherein exactly two samples of the four samples are selected to determine the set of values for the parameters of the linear model.
[0597] 52. A video decoding device having a processor configured to perform the method of any one of clauses 1 to 51.
[0598] 53. A video encoding device having a processor configured to perform the method of any of clauses 1 to 51.
[0599] 54. 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 51.
[0600] 55. 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 51.
[0601] From the foregoing, it will be understood that, although specific embodiments of the technology disclosed herein have been described herein for purposes of illustration, various modifications may be made without departing from the scope of the invention. Accordingly, the technology disclosed herein is not to be limited except as by the appended claims.
[0602] Implementations of the subject matter and functional operations described in this patent document may be embodied in various systems, digital electronic circuits, or computer software, firmware, or hardware, including the structures disclosed herein and their structural equivalents, or in one or more combinations of these. Implementations of the subject matter described herein may be implemented as one or more computer program products, i.e., as one or more modules of computer program instructions encoded on a tangible, non-transitory computer-readable medium for execution by or for controlling the operation of a data processing apparatus. A computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter producing a machine-readable propagated signal, or a combination of one or more of these. The terms "data processing unit" or "data processing apparatus" encompass any apparatus, device, or machine that processes data, including, by way of example, a programmable processor, a computer, or multiple processors or computers. An apparatus may include, in addition to hardware, code that creates an execution environment for the computer program in question, such as code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or one or more combinations of these.
[0603] 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.
[0604] 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).
[0605] Processors suitable for the execution of a computer program include, by way of example, both general-purpose and special-purpose microprocessors, and any one or more processors of any kind of digital computer. Typically, a processor receives instructions and data from a read-only memory or a random-access memory, or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer also includes one or more mass storage devices for storing data, such as magnetic, magneto-optical, or optical disks, or is operatively coupled to receive data from or transfer data to the mass storage devices. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices. The processor and memory may be supplemented by, or incorporated in, special-purpose logic circuitry.
[0606] The specification, together with the drawings, are intended to be considered merely exemplary, and by exemplary is meant example. As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.
[0607] While this patent document contains numerous details, these should not be construed as limitations on the scope of any invention or what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of a particular invention. Certain features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, while features may be described above as operating in a particular combination, and even initially claimed as such, in some cases one or more features from a claimed combination may be removed from the combination, or the claimed combination may be subject to subcombinations or variations of the subcombination.
[0608] Similarly, although the figures may depict operations in a particular order, this should not be understood as requiring that those operations be performed in the particular order or sequence shown, or that all of the operations shown be performed, to achieve desired results. Additionally, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0609] Only a few implementations and examples have been described, and other implementations, extensions and variations may be made based on what is described and illustrated in this patent document.
Claims
1. 1. A method for processing video data, comprising: determining, for conversion between a current video block of a video, which is a chroma block, and a bitstream of the video, based on at least R chroma samples and downsampled neighboring luma samples, the R chroma samples being selected from a group of neighboring chroma samples based on a position rule, where R is greater than or equal to 2, and the downsampled neighboring luma samples are generated by a downsampling process based on a color format of the current video block; performing the transformation based on the value of the parameter; and At least one neighboring chroma sample among the group of neighboring chroma samples does not belong to the R chroma samples based on a size of the current image block, and neighboring luma samples corresponding to the at least one neighboring chroma sample that does not belong to the R chroma samples are not subjected to the downsampling process; the group of adjacent chroma samples includes a left-adjacent chroma sample and an above-adjacent chroma sample; to generate the value of the parameter, a maximum and / or a minimum of luma component values and their associated chroma component values are derived, the maximum and / or the minimum of luma component values and their associated chroma component values being derived based on the left-neighboring chroma sample and the above-neighboring chroma sample; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if the left-neighboring chroma sample and the above-neighboring chroma sample are not available; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if numSampL==0 and numSampT==0, where numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively; method.
2. 2. The method of claim 1 , wherein in the position rule, the positions of the selected R adjacent chroma samples are selected based on a first position offset value (F) and a step value (S), where F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block.
3. 2. The method of claim 1, wherein the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if numSampL+numSampT==0, and wherein numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively.
4. 2. The method of claim 1, wherein the maximum and / or minimum luma component values and their associated chroma component values are not derived when cntL==0 and cntT==0, and wherein cntL and cntT indicate the number of selected chroma samples from the left-neighboring chroma samples and the number of selected chroma samples from the above-neighboring chroma samples, respectively.
5. 2. The method of claim 1, wherein the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if cntL+cntT==0, and wherein cntL and cntT indicate the number of selected chroma samples from the left-neighboring chroma samples and the number of selected chroma samples from the above-neighboring chroma samples, respectively.
6. F=Floor(numSampL / 2 i ) or F = Floor(numSampT / 2 i ) where numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively, and a Floor operation is used to obtain the integer part of the number.
7. S=Max(1, Floor(numSampL / 2 j )) or S = Max(1, Floor(numSampT / 2 j 7. The method of claim 6, wherein: ##EQU1## and the Max operation is used to obtain the maximum value of the plurality of numbers.
8. 8. The method of claim 7, wherein i is equal to 2 or 3 and j is equal to 1 or 2.
9. The method of claim 1 , wherein the converting comprises encoding the current video block into the bitstream.
10. The method of claim 1 , wherein the converting comprises decoding the current video block from the bitstream.
11. 1. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions that, when executed by the processor, cause the processor to: determining parameter values of a cross-component linear model based on at least R chroma samples and downsampled adjacent luma samples for conversion between a current video block of an image, the current video block being a chroma block, and a bitstream of the image, wherein the R chroma samples are selected from a group of adjacent chroma samples based on a position rule, where R is greater than or equal to 2, and the downsampled adjacent luma samples are generated by a downsampling process based on a color format of the current video block; performing the transformation based on values of the parameters; At least one neighboring chroma sample among the group of neighboring chroma samples does not belong to the R chroma samples based on a size of the current image block, and neighboring luma samples corresponding to the at least one neighboring chroma sample that does not belong to the R chroma samples are not subjected to the downsampling process; the group of adjacent chroma samples includes a left-adjacent chroma sample and an above-adjacent chroma sample; to generate the value of the parameter, a maximum and / or a minimum of luma component values and their associated chroma component values are derived, the maximum and / or the minimum of luma component values and their associated chroma component values being derived based on the left-neighboring chroma sample and the above-neighboring chroma sample; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if the left-neighboring chroma sample and the above-neighboring chroma sample are not available; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if numSampL==0 and numSampT==0, where numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively; Device.
12. 12. The apparatus of claim 11, wherein in the position rule, the positions of the selected R adjacent chroma samples are selected based on a first position offset value (F) and a step value (S), where F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block.
13. A non-transitory computer-readable storage medium having stored thereon instructions that cause a processor to: determining parameter values of a cross-component linear model based on at least R chroma samples and downsampled adjacent luma samples for conversion between a current video block of an image, the current video block being a chroma block, and a bitstream of the image, wherein the R chroma samples are selected from a group of adjacent chroma samples based on a position rule, where R is greater than or equal to 2, and the downsampled adjacent luma samples are generated by a downsampling process based on a color format of the current video block; performing the transformation based on values of the parameters; At least one neighboring chroma sample among the group of neighboring chroma samples does not belong to the R chroma samples based on a size of the current image block, and neighboring luma samples corresponding to the at least one neighboring chroma sample that does not belong to the R chroma samples are not subjected to the downsampling process; the group of adjacent chroma samples includes a left-adjacent chroma sample and an above-adjacent chroma sample; to generate the value of the parameter, a maximum and / or a minimum of luma component values and their associated chroma component values are derived, the maximum and / or the minimum of luma component values and their associated chroma component values being derived based on the left-neighboring chroma sample and the above-neighboring chroma sample; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if the left-neighboring chroma sample and the above-neighboring chroma sample are not available; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if numSampL==0 and numSampT==0, where numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively; A non-transitory computer-readable storage medium.
14. 14. The non-transitory computer-readable storage medium of claim 13, wherein in the position rule, the positions of the selected R adjacent chroma samples are selected based on a first position offset value (F) and a step value (S), where F and S are derived based on at least the availability of the group of adjacent chroma samples and the size of the current video block.
15. 1. A method for storing a video bitstream, comprising: determining, for a current video block of the video, which is a chroma block, values of parameters of a cross-component linear model based on at least R chroma samples and downsampled neighboring luma samples, where the R chroma samples are selected from a set of neighboring chroma samples based on a position rule, where R is greater than or equal to 2, and the downsampled neighboring luma samples are generated by a downsampling process based on a color format of the current video block; generating the bitstream based on the values of the parameters; storing the bitstream on a non-transitory computer-readable recording medium; and At least one neighboring chroma sample among the group of neighboring chroma samples does not belong to the R chroma samples based on a size of the current image block, and neighboring luma samples corresponding to the at least one neighboring chroma sample that does not belong to the R chroma samples are not subjected to the downsampling process; the group of adjacent chroma samples includes a left-adjacent chroma sample and an above-adjacent chroma sample; to generate the value of the parameter, a maximum and / or a minimum of luma component values and their associated chroma component values are derived, the maximum and / or the minimum of luma component values and their associated chroma component values being derived based on the left-neighboring chroma sample and the above-neighboring chroma sample; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if the left-neighboring chroma sample and the above-neighboring chroma sample are not available; the maximum and / or minimum values of the luma component values and their associated chroma component values are not derived if numSampL==0 and numSampT==0, where numSampL and numSampT indicate the number of available left-neighboring chroma samples and the number of available above-neighboring chroma samples, respectively; method.
Citation Information
Patent Citations
Image processing device and image processing method
JP2013034163A
JPP7651649B
JPP7688066B
Intra-frame prediction and decoding methods and apparatuses for image signal
US9462273B2