METHOD AND APPARATUS FOR CROSS-COMPONENT PREDICTION FOR VIDEO CODING

Abstract
The present disclosure provides a method for decoding video data. The method comprises: obtaining a video block from a bitstream; obtaining neighboring luma and chroma sample values of the video block; performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values; deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values; predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; and obtaining decoded video block using the predicted internal chroma sample values.
Description
FIELD

Aspects of the present disclosure relate generally to image/video coding and compression, and more particularly, to methods and apparatus for cross-component prediction technology.


BACKGROUND

Various video coding techniques may be used to compress video data. Video coding is performed according to one or more video coding standards. For example, video coding standards include versatile video coding (VVC), high-efficiency video coding (H.265/HEVC), advanced video coding (H.264/AVC), moving picture expert group (MPEG) coding, or the like. Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, or the like) that take advantage of redundancy present in video images or sequences. An important goal of video coding techniques is to compress video data into a form that uses a lower bit rate, while avoiding or minimizing degradations to video quality.


SUMMARY

The following presents a simplified summary of one or more aspects according to the present disclosure in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.


According to one aspect of the present disclosure, there is provided a method for decoding video data, comprising: obtaining a video block from a bitstream; obtaining neighboring luma and chroma sample values of the video block; performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values; deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values; predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; and obtaining decoded video block using the predicted internal chroma sample values.


According to another aspect of the present disclosure, there is provided a method for encoding video data, comprising: obtaining a video block from a video frame; obtaining neighboring luma and chroma sample values of the video block; performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values; deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values; predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; and generating a bitstream comprising encoded video block using the predicted internal chroma sample values.


According to an embodiment, there is provided a computer system, comprising: one or more processors; and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of the present disclosure.


According to an embodiment, there is provided a computer program product, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of the present disclosure.


According to an embodiment, there is provided a computer readable medium, storing computer-executable instructions that, when executed, cause one or more processors to receive a bitstream and perform the operations of the method of the present disclosure based on the bitstream.


According to an embodiment, there is provided a computer readable medium, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of the present disclosure and transmit a bitstream comprising encoded video information associated with the predicted chroma samples.





BRIEF DESCRIPTION OF THE DRAWINGS

The disclosed aspects will hereinafter be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.



FIG. 1 illustrates a block diagram of a generic block-based hybrid video encoding system.



FIG. 2A to 2E illustrate five splitting types, comprising quaternary partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.



FIG. 3 illustrates a general block diagram of a block-based video decoder.



FIG. 4 illustrates an example of the locations of the left and above samples and the sample of the current block involved in the CCLM mode.



FIG. 5A to 5C illustrate examples of deriving CCLM parameters.



FIG. 6 illustrates an example of classifying the neighboring samples into two groups based on the value Threshold.



FIG. 7 illustrates an example of classifying the neighboring samples into two groups based on a knee point.



FIGS. 8A-8B illustrate the effect of the scale adjustment parameter “u”.



FIG. 9 illustrates an example of four reference lines neighboring to a prediction block.



FIGS. 10A and 10B illustrate schematic diagrams for correlation among a chroma sample and one or more luma samples.



FIG. 11 illustrates an example that 6-tap is used in multiple linear regression (MLR) model according to one or more aspects of the present disclosure.



FIG. 12 illustrates exemplary different filter shapes and/or numbers of taps according to one or more aspects of the present disclosure.



FIG. 13 illustrates an example in which FLM can only use top or left luma and/or chroma samples (extended) for parameter derivation.



FIG. 14 illustrates an example in which FLM can use different lines for parameter derivation.



FIG. 15 illustrates some examples for 1-tap/2-tap pre-operations.



FIG. 16 illustrates a workflow of a method for decoding video data according to one or more aspects of the present disclosure.



FIG. 17 illustrates a workflow of a method for encoding video data according to one or more aspects of the present disclosure.



FIG. 18 illustrates an exemplary computing system according to one or more aspects of the present disclosure.





DETAILED DESCRIPTION

Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of claims and the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.


It should be illustrated that the terms “first,” “second,” and the like used in the description, claims of the present disclosure, and the accompanying drawings are used to distinguish objects, and not used to describe any specific order or sequence. It should be understood that the data used in this way may be interchanged under an appropriate condition, such that the embodiments of the present disclosure described herein may be implemented in orders besides those shown in the accompanying drawings or described in the present disclosure.


The first version of the VVC standard was finalized in July, 2020, which offers approximately 50% bit-rate saving or equivalent perceptual quality compared to the prior generation video coding standard HEVC. Although the VVC standard provides significant coding improvements than its predecessor, there is evidence that superior coding efficiency can be achieved with additional coding tools. Recently, Joint Video Exploration Team (JVET) under the collaboration of ITU-T VCEG and ISO/IEC MPEG started the exploration of advanced technologies that can enable substantial enhancement of coding efficiency over VVC. In April 2021, one software codebase, called Enhanced Compression Model (ECM) was established for future video coding exploration work. The ECM reference software was based on VVC Test Model (VTM) that was developed by JVET for the VVC, with several existing modules (e.g., intra/inter prediction, transform, in-loop filter and so forth) are further extended and/or improved. In future, any new coding tool beyond the VVC standard need to be integrated into the ECM platform, and tested using JVET common test conditions (CTCs).


Similar to all the preceding video coding standards, the ECM is built upon the block-based hybrid video coding framework. FIG. 1 illustrates a block diagram of a generic block-based hybrid video encoding system. The input video signal is processed block by block (called coding units (CUs)). In ECM−1.0, a CU can be up to 128×128 pixels. However, same to the VVC, one coding tree unit (CTU) is split into CUs to adapt to varying local characteristics based on quad/binary/ternary-tree. In the multi-type tree structure, one CTU is firstly partitioned by a quad-tree structure. Then, each quad-tree leaf node can be further partitioned by a binary and ternary tree structure. As shown in FIGS. 2A, 2B, 2C, 2D, and 2E, there are five splitting types, quaternary partitioning, vertical binary partitioning, horizontal binary partitioning, vertical extended quaternary partitioning, and horizontal extended quaternary partitioning.


In FIG. 1, spatial prediction and/or temporal prediction may be performed. Spatial prediction (or “intra prediction”) uses pixels from the samples of already coded neighboring blocks (which are called reference samples) in the same video picture/slice to predict the current video block. Spatial prediction reduces spatial redundancy inherent in the video signal. Temporal prediction (also referred to as “inter prediction” or “motion compensated prediction”) uses reconstructed pixels from the already coded video pictures to predict the current video block. Temporal prediction reduces temporal redundancy inherent in the video signal. Temporal prediction signal for a given CU is usually signaled by one or more motion vectors (MVs) which indicate the amount and the direction of motion between the current CU and its temporal reference. Also, if multiple reference pictures are supported, one reference picture index is additionally sent, which is used to identify from which reference picture in the reference picture store the temporal prediction signal comes. After spatial and/or temporal prediction, the mode decision block in the encoder chooses the best prediction mode, for example based on the rate-distortion optimization method. The prediction block is then subtracted from the current video block; and the prediction residual is de-correlated using transform and quantized. The quantized residual coefficients are inverse quantized and inverse transformed to form the reconstructed residual, which is then added back to the prediction block to form the reconstructed signal of the CU. Further in-loop filtering, such as deblocking filter, sample adaptive offset (SAO) and adaptive in-loop filter (ALF) may be applied on the reconstructed CU before it is put in the reference picture store and used to code future video blocks. To form the output video bit-stream, coding mode (inter or intra), prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit to be further compressed and packed to form the bit-stream. It should be noted that the term “block” or “video block” as used herein may be a portion, in particular a rectangular (square or non-square) portion, of a frame or a picture. With reference, for example, to HEVC and VVC, the block or video block may be or correspond to a Coding Tree Unit (CTU), a CU, a Prediction Unit (PU) or a Transform Unit (TU) and/or may be or correspond to a corresponding block, e.g., a Coding Tree Block (CTB), a Coding Block (CB), a Prediction Block (PB) or a Transform Block (TB) and/or to a sub-block.



FIG. 3 illustrates a general block diagram of a block-based video decoder. The video bit-stream is first entropy decoded at entropy decoding unit. The coding mode and prediction information are sent to either the spatial prediction unit (if intra coded) or the temporal prediction unit (if inter coded) to form the prediction block. The residual transform coefficients are sent to inverse quantization unit and inverse transform unit to reconstruct the residual block. The prediction block and the residual block are then added together. The reconstructed block may further go through in-loop filtering before it is stored in reference picture store. The reconstructed video in reference picture store is then sent out to drive a display device, as well as used to predict future video blocks.


The main focus of this disclosure is to further enhance the coding efficiency of the coding tool of cross-component prediction, cross-component linear model (CCLM), that is applied in the ECM. In the following, some related coding tools in the ECM are briefly reviewed. After that, some deficiencies in the existing design of CCLM are discussed. Finally, the solutions are provided to improve the existing CCLM prediction design.


Cross-Component Linear Model Prediction

To reduce the cross-component redundancy, a cross-component linear model (CCLM) prediction mode is used in the VVC, for which the chroma samples are predicted based on the reconstructed luma samples of the same CU by using a linear model as follows:











pred
C



(

i
,
j

)


=


α
·


rec
L


(

i
,
j

)


+
β





(
1
)







where predC(i,j) represents the predicted chroma samples in a CU, and recL′(i,j) represents the α down-sampled reconstructed luma samples of the same CU which are obtained by performing down-sampling on the reconstructed luma samples recL(i, j). The above α and β are linear model parameters which are derived from at most four neighboring chroma samples and their corresponding down-sampled luma samples, which may be referred to as neighboring luma-chroma sample pairs. Suppose that a current chroma block has a size of W×H, then W′ and H′ are obtained as follows:






W′=W,H′=H when LM mode is applied;






W′=W+H when LM-A mode is applied;






H′=H+W when LM-L mode is applied;


where in the LM mode, above samples and left samples of the CU are used together to calculate the linear model coefficients; in the LM_A mode, only the above samples of the CU are used to calculate the linear model coefficients; and in the LM_L mode, only the left samples of the CU are used to calculate the linear model coefficients.


If locations of above neighboring samples of a chroma block are denoted as S[0, −1] . . . S[W′−1, −1] and locations of left neighboring samples of the chroma block are denoted as S[−1, 0] . . . S[−1, H′−1], positions of four neighboring chroma samples are selected as follows:

    • S[W′/4, −1], S[3*W′/4, −1], S[−1, H′/4], S[−1, 3*H′/4] are selected as the positions of the four neighboring chroma samples when LM mode is applied and both above and left neighboring samples are available;
    • S[W′/8, −1], S[3*W′/8, −1], S[5*W′/8, −1], S[7*W′/8, −1] are selected as the positions of the four neighboring chroma samples when LM-A mode is applied or only the above neighboring samples are available;
    • S[−1, H′/8], S[−1, 3*H′/8], S[−1, 5*H′/8], S[−1, 7*H′/8] are selected as the positions of the four neighboring chroma samples when LM-L mode is applied or only the left neighboring samples are available.


The four neighboring luma samples corresponding to the selected locations are obtained by a down-sampling operation and the obtained four neighboring luma samples are compared four times to find two larger values: x0A and x1A, and two smaller values: x0B and x1B. Chroma sample values corresponding to the two larger values and the two smaller values are denoted as y0A, y1A, Y0B and y1B respectively. Then Xa, Xb, Ya and Yb are derived as:












X
a

=

(


x
A
0

+

x
A
1

+
1

)


>>
1

;




(
2
)












X
b

=

(


x
B
0

+

x
B
1

+
1

)


>>
1

;









Y
a

=

(


y
A
0

+

y
A
1

+
1

)


>>
1

;








Y
b

=

(


y
B
0

+

y
B
1

+
1

)


>>
1




Finally, the linear model parameters α and β are obtained according to the following equations.









α
=



Y
a

-

Y
b




X
a

-

X
b







(
3
)












β
=


Y
b

-

α
·

X
b







(
4
)








FIG. 4 illustrates an example of the locations of the left and above samples and the sample of the current block involved in the CCLM mode, including locations of left and above samples of an N×N chroma block in the CU and locations of left and above samples of an 2N×2N luma block in the CU.


The division operation to calculate parameter α is implemented with a look-up table. To reduce the memory required for storing the table, the diff value (difference between maximum and minimum values) and the parameter α are expressed by an exponential notation. For example, diff is approximated with a 4-bit significant part and an exponent. Consequently, the table for 1/diff is reduced into 16 elements for 16 values of the significand as follows:










DivTable

[

]

=

{

0
,
7
,
6
,
5
,
5
,
4
,
4
,
3
,
3
,
2
,
2
,
1
,
1
,
1
,
1
,
0

}





(
5
)







This would have a benefit of both reducing the complexity of the calculation as well as the memory size required for storing the needed tables


Besides the above template and left template can be used to calculate the linear model coefficients together, they also can be used alternatively in the other 2 LM modes, called LM_A, and LM_L modes.


In LM_T mode, only the above template is used to calculate the linear model coefficients. To get more samples, the above template is extended to (W+H) samples. In LM_L mode, only left template is used to calculate the linear model coefficients. To get more samples, the left template is extended to (H+W) samples.


In LM_LT mode, left and above templates are used to calculate the linear model coefficients.


To match the chroma sample locations for 4:2:0 video sequences, two types of down-sampling filter are applied to luma samples to achieve 2 to 1 down-sampling ratio in both horizontal and vertical directions. The selection of down-sampling filter is specified by a SPS level flag. The two down-sampling filters are as follows, which are corresponding to “type-0” and “type-2” content, respectively.












Rec
L


(

i
,
j

)

=

[









rec
L

(



2

i

-
1

,


2

j

-
1


)

+


2
·

rec
L




(


2

i

,


2

j

-
1


)


+








rec
L



(



2

i

+
1

,


2

j

-
1


)


+


rec
L

(



2

i

-
1

,

2

j


)

+










2
·


rec
L

(


2

i

,

2

j


)


+


rec
L

(



2

i

+
1

,

2

j


)

+
4




]


>>
3




(
6
)















rec
L


(

i
,
j

)

=

[






rec
L

(


2

i

,


2

j

-
1


)

+


rec
L

(



2

i

-
1

,

2

j


)

+

4
·


rec
L

(


2

i

,

2

j


)


+








rec
L

(



2

i

+
1

,

2

j


)

+


rec
L

(


2

i

,


2

j

+
1


)

+
4




]


>>
3




(
7
)







Note that only one luma line (general line buffer in intra prediction) is used to make the down-sampled luma samples when the upper reference line is at the CTU boundary.


This parameter computation is performed as part of the decoding process, and is not just as an encoder search operation. As a result, no syntax is used to convey the α and β values to the decoder.


For chroma intra mode coding, a total of 8 intra modes are allowed for chroma intra mode coding. Those modes include five traditional intra modes and three cross-component linear model modes (CCLM, LM_A, and LM_L). Chroma mode signalling and derivation process are shown in Table 1. Chroma mode coding directly depends on the intra prediction mode of the corresponding luma block. Since separate block partitioning structure for luma and chroma components is enabled in I slices, one chroma block may correspond to multiple luma blocks. Therefore, for Chroma DM mode, the intra prediction mode of the corresponding luma block covering the center position of the current chroma block is directly inherited.









TABLE 1







Derivation of chroma prediction mode


from luma mode when cclm is enabled










Chroma




prediction
Corresponding luma intra prediction mode














mode
0
50
18
1
X (0 <= X <= 66)


















0
66
0
0
0
0



1
50
66
50
50
50



2
18
18
66
18
18



3
1
1
1
66
1



4
0
50
18
1
X



5
81
81
81
81
81



6
82
82
82
82
82



7
83
83
83
83
83










A single binarization table is used regardless of the value of sps_cclm_enabled_flag as shown in Table 2.









TABLE 2







Unified binarization table for chroma prediction mode










Value of
Bin



intra_chroma_pred_mode
string














4
00



0
0100



1
0101



2
0110



3
0111



5
10



6
110



7
111










In Table 2, the first bin indicates whether it is regular (0) or LM modes (1). If it is LM mode, then the next bin indicates whether it is LM_CHROMA (0) or not. If it is not LM_CHROMA, next 1 bin indicates whether it is LM_L (0) or LM_A (1). For this case, when sps_cclm_enabled_flag is 0, the first bin of the binarization table for the corresponding intra_chroma_pred_mode can be discarded prior to the entropy coding. Or, in other words, the first bin is inferred to be 0 and hence not coded. This single binarization table is used for both sps_cclm_enabled_flag equal to 0 and 1 cases. The first two bins in Table 2 are context coded with its own context model, and the rest bins are bypass coded.


In addition, in order to reduce luma-chroma latency in dual tree, when the 64×64 luma coding tree node is partitioned with Not Split (and ISP is not used for the 64×64 CU) or QT, the chroma CUs in 32×32/32×16 chroma coding tree node are allowed to use CCLM in the following way:

    • If the 32×32 chroma node is not split or partitioned QT split, all chroma CUs in the 32×32 node can use CCLM
    • If the 32×32 chroma node is partitioned with Horizontal BT, and the 32×16 child node does not split or uses Vertical BT split, all chroma CUs in the 32×16 chroma node can use CCLM.


In all the other luma and chroma coding tree split conditions, CCLM is not allowed for chroma CU.


During the ECM development, the simplified derivation of α and β (min-max approximation) is removed. Instead, linear least square solution between causal reconstructed data of down-sampled luma samples and causal chroma samples to derive model parameters α and β.









α
=




I
×





i
=
0


I




Rec
C

(
i
)

×


Rec
L


(
i
)




-





i
=
0


I




Rec
C

(
i
)

×





i
=
0


I



Rec
L


(
i
)







I
×





i
=
0


I




Rec
L

(
i
)

×


Rec
L


(
i
)




-


(




i
=
0

I



Rec
L

(
i
)


)

2



=


A
1


A
2







(
8
)












β
=






i
=
0

I



Rec
C

(
i
)


-

α
×




i
=
0

I



Rec
L


(
i
)




I





(
9
)







where RecC(i) and Rec′L(i) indicate reconstructed chroma samples and down-sampled reconstructed luma samples around the target block, I indicates total samples number of neighboring data.


The LM_A, LM_L modes are also called Multi-Directional Linear Model (MDLM). FIG. 5A illustrates an example that MDLM works when the block content cannot be predicted from the L-shape reconstructed region. FIG. 5B illustrates MDLM_L which only uses left reconstructed samples to derive CCLM parameters. FIG. 5C illustrates MDLM_T which only uses top reconstructed samples to derive CCLM parameters.


Integerization for the above discussed Least Mean Square (LMS) (please refer to equations (8)-(9)) has been proposed as improvements for CCLM. The initial integerization design of LMS CCLM was firstly proposed in JCTVC-C206. The method was then improved by a series of simplification, including JCTVC-F0233/10178 which reduces α precision nα from 13 to 7, JCTVC-10151 which reduces the maximum multiplier bitwidth, and JCTVC-H0490/I0166 which reduces division LUT entries from 64 to 32, finally leads to the ECM LMS version.


As discussed in equation (1), the integerization design utilizes the linear relationship to modelize the correlation of luma signal and chroma signal. The chroma values are predicted from reconstructed luma values of collocated block.


Luma and chroma components have different sampling ratios in YUV420 sampling. The sampling ratio of chroma components is half of that of luma component and has 0.5 pixel phase difference in vertical direction. Reconstructed luma needs down-sampling in vertical direction and subsample in horizontal direction to match size of chroma signal. For example, the down-sampling may be implemented by:












Rec
L


(

i
,
j

)

=

(



rec
L

(


2

i

,

2

j


)

+


rec
L

(


2

i

,


2

j

+
1


)


)


>>
1




(
10
)







Float point operation is necessary in equation (8) to calculate linear model parameters α to keep high data accuracy. And float point multiplication is involved in equation (1) when α is represented by float point value. In this section, the integer implementation of this algorithm is designed. Specifically, fractional part of parameter α is quantized with nα bits data accuracy. Parameter α value is represented by an up-scaled and rounded integer value α′ and α′=α×(1<<nα). Then the linear model of equation (1) is changed to:











pred
C

[

x
,
y

]

=


(



α


·


Rec
L


[

x
,
y

]


>>


n
α


)

+

β







(
11
)







Where β′ is the rounding value of float point β and α′ can be calculated as follows.










α


=


a
·

(

1


<<


n
α



)


=



A
1


A
2


·

(

1


<<


n
α



)







(
12
)







It is proposed to replace division operation of equation (12) by table lookup and multiplication. A2 is firstly de-scaled to reduce the table size. A1 is also de-scaled to avoid product overflow. Then, in A2 it is kept only most significant bits defined by nA2 value and others bits are put to zero. The approximate value A2′ can be calculated as:










A
2


=


[


A
2

>>


r

A
2



]

·

2

r

A
2








(
13
)







Where [ . . . ] means rounding operation and rA2 can be calculated as:







r

A
2


=

max

(



bdepth

(

A
2

)

-

n

A
2



,
0

)





Where bdepth(A2) means bit depth of value A2.


Same operation is done for A1, as follows:










A
1


=


[


A
1

>>


r

A
1



]

·

2

r

A
1








(
14
)










r

A
1


=

max

(



bdepth

(

A
1

)

-

n

A
1



,
0

)





Taking into account quantized representation of A, and A2, equation (12) can be re-written as following.














α







[


A
1

>>


r

A
1



]

·

2

r

A
1






[


A
2

>>


r

A
2



]

·

2

r

A
2





·

2

n
a




=




2

n
table


·

[


A
1

>>


r

A
1



]

·

2


r

A
1


+

n
α






[


A
2

>>


r

A
2



]

·

2


r

A
2


+

n
table















[


2

n
table




A
2

>>


r

A
2




]

·

[


A
1

>>


r

A
1



]

·









2


r

A
1


+

n
α

-

(


r

A
2


+

n
table


)










(
15
)







Where





[


2
table



A
2

>>

r

A
2




]




is represented as lookup table with length of 2nA2 to avoid the division.


In the simulation, the constant parameters are set as:

    • na equals to 13, which value is tradeoff between data accuracy and computational cost.
    • nA2 equals to 6, results in lookup table size as 64, table size can be further reduced to 32 by up-scaling A2 when bdepth(A2)<6 (e.g. A2<32).
    • ntable equals to 15, results in 16 bits data representation of table elements.
    • nA1 is set as 15, to avoid product overflow and keep 16 bits multiplication.


In final, α′ is clipped to [−2−15, 215−1], to remain 16 bits multiplication in equation (11). With this clipping, the actual a value is limited to [−4,4) when na equals to 13, which is useful to prevent the error amplification.


With calculated parameter α′, parameter β′ is calculated as follows:










β


=








i
=
0

I



Rec
C

(
i
)


-

(


α


·




i
=
0

I




Rec
L








(
i
)





)


>>

n
α


)

I






(
16
)








Wherein the division of above equation can be simply replaced by shift, since value I is power of 2.


Similar as discussed above with regard to equation (1), in HM6.0, an intra prediction mode called LM is applied to predict chroma PU based on a linear model using the reconstruction of the collocated luma PU. The parameters of the linear model consist of slope (a>>k) and y-intercept (b), which are derived from the neighboring luma and chroma pixels using the least mean square solution. The values of the prediction samples predSamples[x,y], with x,y=0 . . . nS−1, where nS specifies the block size of the current chroma PU, are derived as follows:











predSamples
[

x
,
y

]

=

Clip


1
C



(


(


(




p
Y





[

x
,
y

]


a

)

>>
k

)

+
b

)



,

with


x

,

y
=


0





nS

-
1







(
17
)








where PY′[x,y] is the reconstructed pixels from the corresponding luma component. When the coordinates x and y are equal to or larger than 0, PY′ is the reconstructed pixel from the co-located luma PU. When x or y is less than 0, PY′ is the reconstructed neighboring pixel of the co-located luma PU.


Some intermediate variables in the derivation process, L, C, LL, LC, k2 and k3, are derived as:










L
=

(





y
=
0


nS
-
1




p
Y


[


-
1

,
y

]


+




x
=
0


nS
-
1




p
Y


[

x
,

-
1


]



)


>>

k

3






(

18
-
1

)














C
=

(





y
=
0


nS
-
1



p
[


-
1

,
y

]


+




x
=
0


nS
-
1



p
[

x
,

-
1


]



)


>>

k

3





(

18
-
2

)














LL

=

(





y
=
0


nS
-
1





p
Y


[


-
1

,
y

]

2


+




x
=
0


nS
-
1





p
Y


[

x
,

-
1


]

2



)


>>

k


3





(

18
-
3

)














LC

=

(





y
=
0


nS
-
1





p
Y


[


-
1

,
y

]



p
[


-
1

,
y

]



+




y
=
0


nS
-
1





p
Y


[

x
,

-
1


]



p
[

x
,

-
1


]




)


>>

k

3





(

18
-
4

)













k

2

=

Log

2


(


(

2

nS

)

>>

k

3


)






(

18
-
5

)













k

3

=

Max

(

0
,


BitDepth
C

+

Log

2


(
nS
)


-
14


)





(

18
-
6

)







Therefore, variables a, b and k can be derived as:










a

1

=


(

LC


<<
k


2

)

-

L

C







(



19


-


1



)















a

2


=


(

LL


<<
k


2

)

-

L

L







(



19


-


2



)















(



19


-


3



)












k

1


=


Max

(

0
,


Log

2


(

abs

(

a

2

)

)


-
5


)

-

Max

(

0
,


Log

2


(

abs

(

a

1

)

)


-

1

4



)

+
2













a

1

s


=

a

1


>>

Max


(

0
,


Log

2


(

abs

(

a

1

)

)


-

1

4



)







(



19


-


4



)














a

2

s

=

abs

(


a

2

>>

Max


(

0
,


Log

2


(

abs

(

a

2

)

)


-
5


)



)






(



19


-


5



)















(



19


-


6



)












a

3


=


a

2

s

<


1

?

0

:


Clip3

(


-

2

1

5



,


2

1

5


-
1

,




a

1

s



lm

Div


+

(

1


<<

(


k

1

-
1

)



)


>>

k

1



)













a
=

a

3


>>

Max


(

0
,


Log

2


(

abs

(

a

3

)

)


-
6


)







(



19


-


7



)













k
=

13
-

Max

(

0
,


Log

2


(

abs

(
a
)

)


-
6


)







(



19


-


8



)















b
=

(

L
-

(


(

a

C

)

>>

k


1


)

+

(

1


<<

(


k

2

-
1

)



)


)


>>

k


2


,





(



19


-


9



)








where lmDiv is specified in a 63-entry look-up table, i.e. Table 3, which is online generated by:










l




m

Div

(

a

2

s

)


=



(


(

1


<<
15


)

+

a

2


s
/
2



)

/
a


2


s
.







(
20
)















TABLE 3





Specification of lmDiv




























a2s
1
2
3
4
5
6
7
8
9
10
11
12
13





lmDiv
32768
16384
10923
8192
6554
5461
4681
4096
3641
3277
2979
2731
2521























a2s
14
15
16
17
18
19
20
21
22
23
24
25
26





lmDiv
2341
2185
2048
1928
1820
1725
1638
1560
1489
1425
1365
1311
1260





a2s
27
28
29
30
31
32
33
34
35
36
37
38
39





lmDiv
1214
1170
1130
1092
1057
1024
993
964
936
910
886
862
840





a2s
40
41
42
43
44
45
46
47
48
49
50
51
52





lmDiv
819
799
780
762
745
728
712
697
683
669
655
643
630






















a2s
53
54
55
56
57
58
59
60
61
62
63
64





lmDiv
618
607
596
585
575
565
555
546
537
529
520
512









In Equation (19-6), a1s is a 16-bit signed integer and lmDiv is a 16-bit unsigned integer. Therefore, 16-bit multiplier and 16-bit storage are needed. It is proposed to reduce the bit depth of multipliers to the internal bit depth, as well as the size of the look-up table, as detailed below.


The bit depth of a1s is reduced to the internal bit depth by changing equation (19-4) as:










a

1

s


=

a

1



>>

Max



(

0
,


Log

2


(

abs

(

a

1

)

)


-

(


BitDepth
C

-
2

)



)

.







(
21
)








The values of lmDiv with the internal bit depth are achieved with the following equation (22) and stored in the look-up table:










l




m

Div

(

a

2

s

)


=



(


(

1


<<

(


BitDepth
C

-
1

)



)

+

a

2


s
/
2



)

/
a


2

s






(
22
)








Table 4 shows the example of internal bit depth 10.









TABLE 4





Specification of lmDiv with the internal bit depth equal to 10































a2s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16





lmDiv
512
256
171
128
102
85
73
64
57
51
47
43
39
37
34
32


























a2s
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32





lmDiv
30
28
27
26
24
23
22
21
20
20
19
18
18
17
17
16





a2s
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48





lmDiv
16
15
15
14
14
13
13
13
12
12
12
12
11
11
11
11

























a2s
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63





lmDiv
10
10
10
10
10
9
9
9
9
9
9
9
8
8
8









Modifications are also made to Equation (19-3) and (19-8) as below:











k

1

=


Max

(

0
,


Log

2


(

abs

(

a

2

)

)


-
5


)

-

Max

(

0
,


Log

2


(

abs

(

a

1

)

)


-

(


BitDepth
C

-
2

)



)



,




(

23
-
1

)








and








k
=


BitDepth
C

-
1
-


Max

(

0
,


Log

2


(

abs

(
a
)

)


-
6


)

.






(

23
-
2

)







It is also proposed to reduce the entries from 63 to 32, and the bits for each entry from 16 to 10, as shown in Table 5. By doing this, almost 70% memory saving can be achieved. The corresponding changes for equation (19-6), equation (20) and equation (19-8) are as follows:










(

24
-
1

)










a

3

=


a

2

s

<


32

?

0

:

Clip

3


(


-

2

1

5



,


2

1

5


-
1

,




a

1

s



l



m

Div



+

(

1


<<

(


k

1

-
1

)



)


>>

k

1



)













l




m

Div

(

a

2

s

)


=



(


(

1


<<

(


BitDepth
C

+
4

)



)

+

a

2


s
/
2



)

/
a


2

s





(

24
-
2

)












k
=


BitDepth
C

+
4
-


Max

(

0
,


Log

2


(

abs

(
a
)

)


-
6


)

.






(

24
-
3

)














TABLE 5





Specification of lmDiv with the internal bit depth equal to 10































a2s
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47





lmDiv
512
496
482
468
455
443
431
420
410
400
390
381
372
364
356
349





a2s
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63





lmDiv
341
334
328
321
315
309
303
298
293
287
282
278
273
269
264
260









Multi-Model Linear Model Prediction

In ECM−1.0, Multi-model LM (MMLM) prediction mode is proposed, for which the chroma samples are predicted based on the reconstructed luma samples of the same CU by using two linear models as follows:









{






pred
C



(

i
,
j

)


=


α
1

·

rec
L








(

i
,
j

)

+

β
1





if



rec
L







(

i
,
j

)


Threshold








pred
C



(

i
,
j

)


=


α
2

·

rec
L








(

i
,
j

)

+

β
2





if



rec
L








(

i
,
j

)

>
Threshold









(
25
)








where predC(i,j) represents the predicted chroma samples in a CU and recL′(i, j) represents the down-sampled reconstructed luma samples of the same CU. Threshold is calculated as the average value of the neighboring reconstructed luma samples. FIG. 6 illustrates an example of classifying the neighboring samples into two groups based on the value Threshold. For each group, parameter α, and βi, with i equal to 1 and 2 respectively, are derived from the straight-line relationship between luma values and chroma values from two samples, which are minimum luma sample A (XA, YA) and maximum luma sample B (XB, YB) inside the group. Here XA, YA are the x-coordinate (i.e., luma value) and y-coordinate (i.e., chroma value) value for sample A, and XB, YB are the x-coordinate and y-coordinate value for sample B. The linear model parameters α and β are obtained according to the following equations.












α
=



γ
B

-

γ
A




x
B

-

x
A









β
=


y
A

-

α


x
A











(
26
)








Such a method is also called min-max method. The division in the equation above could be avoided and replaced by a multiplication and a shift.


For a coding block with a square shape, the above two equations are applied directly. For a non-square coding block, the neighboring samples of the longer boundary are first subsampled to have the same number of samples as for the shorter boundary.


Besides the scenario wherein the above template and the left template are used together to calculate the linear model coefficients, the two templates also can be used alternatively in the other two MMLM modes, called MMLM_A, and MMLM_L modes.


In MMLM_A mode, only pixel samples in the above template are used to calculate the linear model coefficients. To get more samples, the above template is extended to the size of (W+W). In MMLM_L mode, only pixel samples in the left template are used to calculate the linear model coefficients. To get more samples, the left template is extended to the size of (H+H).


Note that when the upper reference line is at the CTU boundary, only one luma row (which is stored in line buffer for intra prediction) is used to make the down-sampled luma samples.


For chroma intra mode coding, a total of 11 intra modes are allowed for chroma intra mode coding. Those modes include five traditional intra modes and six cross-component linear model modes (CCLM, LM_A, LM_L, MMLM, MMLM_A and MMLM_L). Chroma mode signaling and derivation process are shown in Table 6. Chroma mode coding directly depends on the intra prediction mode of the corresponding luma block. Since separate block partitioning structure for luma and chroma components is enabled in I slices, one chroma block may correspond to multiple luma blocks. Therefore, for Chroma DM mode, the intra prediction mode of the corresponding luma block covering the center position of the current chroma block is directly inherited.









TABLE 6







Derivation of chroma prediction mode


from luma mode when MMLM_is enabled








Chroma
Corresponding luma intra prediction mode












prediction mode
0
50
18
1
X (0 <= X <= 66)















0
66
0
0
0
0


1
50
66
50
50
50


2
18
18
66
18
18


3
1
1
1
66
1


4
81
81
81
81
81


5
82
82
82
82
82


6
83
83
83
83
83


7
84
84
84
84
84


8
85
85
85
85
85


9
86
86
86
86
86


10
0
50
18
1
X









MMLM and LM modes may also be used together in an adaptive manner. For MMLM, two linear models are as follows:









{






pred
C



(

i
,
j

)


=


α
1

·

rec
L








(

i
,
j

)

+

β
1





if



rec
L







(

i
,
j

)


Threshold








pred
C



(

i
,
j

)


=


α
2

·

rec
L








(

i
,
j

)

+

β
2





if



rec
L








(

i
,
j

)

>
Threshold









(
27
)








where predC(i,j) represents the predicted chroma samples in a CU and recL′(i, j) represents the downsampled reconstructed luma samples of the same CU. Threshold can be simply determined based on the luma and chroma average values together with their minimum and maximum values. FIG. 7 shows an example of classifying the neighboring samples into two groups based on the knee point, T, indicated by an arrow. Linear model parameter α1 and β1 are derived from the straight-line relationship between luma values and chroma values from two samples, which are minimum luma sample A (XA, YA) and the Threshold (XT, YT). Linear model parameter α2 and β2 are derived from the straight-line relationship between luma values and chroma values from two samples, which are maximum luma sample B (XB, YB) and the Threshold (XT, YT). Here XA, YA are the x-coordinate (i.e., luma value) and y-coordinate (i.e., chroma value) value for sample A, and XB, YB are the x-coordinate and y-coordinate value for sample B. The linear model parameters αi and βi for each group, with i equal to 1 and 2 respectively, are obtained according to the following equations.













α
1

=



Y
T

-

Y
A




X
T

-

X
A










β
1

=


Y
A

-


α
1



X
A










α
2

=



Y
B

-

Y
T




X
B

-

X
T










β
2

=


Y
T

-


α
2



X
T










(
28
)







For a coding block with a square shape, the above equations are applied directly. For a non-square coding block, the neighboring samples of the longer boundary are first subsampled to have the same number of samples as for the shorter boundary.


Besides the scenario wherein the above template and the left template are used together to determine the linear model coefficients, the two templates also can be used alternatively in the other two MMLM modes, called MMLM_A, and MMLM_L modes respectively.


In MMLM_A mode, only pixel samples in the above template are used to calculate the linear model coefficients. To get more samples, the above template is extended to the size of (W+W). In MMLM_L mode, only pixel samples in the left template are used to calculate the linear model coefficients. To get more samples, the left template is extended to the size of (H+H).


Note that when the upper reference line is at the CTU boundary, only one luma row (which is stored in line buffer for intra prediction) is used to make the down-sampled luma samples.


For chroma intra mode coding, there is a condition check used to select LM modes (CCLM, LM_A, and LM_L) or multi-model LM modes (MMLM, MMLM_A, and MMLM_L). The condition check is as follows:









{




LM








modes




if



(

(



(


Y
T

-

Y
A


)


d

||


(


Y
B

-

Y
T


)

















d
&



(


block


area



BlkSizeThres
LM


)


)






MMLM


modes




if



(



(


Y
T

-

Y
A


)

>
d

&&


(


Y
B

-

Y
T


)

>















d
)

&



(


block


area



BloSizeThres
MM


)


)









(
29
)








where BlkSizeThresLM represents the smallest block size of LM modes and BlkSizeThresMM represents the smallest block size of MMLM modes. The symbol d represents a pre-determined threshold value. In one example, d may take a value of 0. In another example, d may take a value of 8.


For chroma intra mode coding, a total of 8 intra modes are allowed for chroma intra mode coding. Those modes include five traditional intra modes and three cross-component linear model modes. Chroma mode signaling and derivation process are shown in Table 1. It is worth noting that for a given CU, if it is coded under linear model mode, whether it is a conventional single model LM mode or a MMLM mode is determined based on the condition check above. Unlike the case shown in Table 6, there are no separate MMLM modes to be signaled. Chroma mode coding directly depends on the intra prediction mode of the corresponding luma block. Since separate block partitioning structure for luma and chroma components is enabled in I slices, one chroma block may correspond to multiple luma blocks. Therefore, for Chroma DM mode, the intra prediction mode of the corresponding luma block covering the center position of the current chroma block is directly inherited.


During ECM development, scale (slope) adjustment for CCLM are proposed as further improvements, for example, as described in JVET-Y0055/Z0049.


As discussed above, CCLM uses a model with 2 parameters to map luma values to chroma values. The scale parameter “a” and the bias parameter “b” define the mapping as follows:









chromaVal
=


a
*
lumaVal

+
b





(
30
)







It is proposed to signal an adjustment “u” to the scale parameter to update the model to the following form:









chromaVal
=



a


*
lumaVal

+

b







(
31
)







where a′=a+u, and b′=b−u*yr.


With this selection, the mapping function is tilted or rotated around the point with luminance value yr. It is proposed to use the average of the reference luma samples used in the model creation as yr in order to provide a meaningful modification to the model. FIGS. 8A-8B illustrate the effect of the scale adjustment parameter “u”, wherein FIG. 8A illustrates the model created without the scale adjustment parameter “u”, and FIG. 8B illustrates the model created with the scale adjustment parameter “u”.


In one example, the scale adjustment parameter is provided as an integer between −4 and 4, inclusive, and signaled in the bitstream. The unit of the scale adjustment parameter is ⅛th of a chroma sample value per one luma sample value (for 10-bit content).


In one example, adjustment is available for the CCLM models that are using reference samples both above and left of the block (“LM_CHROMA_IDX” and “MMLM_CHROMA_IDX”), but not for the “single side” modes. This selection is based on coding efficiency vs. complexity tradeoff considerations.


When scale adjustment is applied for a multimode CCLM model, both models can be adjusted and thus up to two scale updates are signaled for a single chroma block.


To enable the scale adjustment at the encoder, the encoder may performs an SATD based search for the best value of the scale update for Cr and a similar SATD based search for Cb. If either one results as a non-zero scale adjustment parameter, the combined scale adjustment pair (SATD based update for Cr, SATD based update for Cb) is included in the list of RD checks for the TU.


Multiple reference line (MRL) intra prediction uses more reference lines for intra prediction. In FIG. 9, an example of 4 reference lines is depicted, where the samples of segments A and F are not fetched from reconstructed neighboring samples but padded with the closest samples from Segment B and E, respectively. HEVC intra-picture prediction uses the nearest reference line (i.e., reference line 0). In MRL, 2 additional lines (reference line 1 and reference line 3) are used.


The index of selected reference line (mrl_idx) is signaled and used to generate intra predictor. For reference line idx, which is greater than 0, only include additional reference line modes in MPM list and only signal mpm index without remaining mode. The reference line index is signaled before intra prediction modes, and Planar mode is excluded from intra prediction modes in case a nonzero reference line index is signaled.


MRL is disabled for the first line of blocks inside a CTU to prevent using extended reference samples outside the current CTU line. Also, PDPC is disabled when additional line is used. For MRL mode, the derivation of DC value in DC intra prediction mode for non-zero reference line indices is aligned with that of reference line index 0. MRL requires the storage of 3 neighboring luma reference lines with a CTU to generate predictions. The Cross-Component Linear Model (CCLM) tool also requires 3 neighboring luma reference lines for its down-sampling filters. The definition of MRL to use the same 3 lines is aligned as CCLM to reduce the storage requirements for decoders.


In the existing CCLM or MMLM design, the neighboring reconstructed luma-chroma sample pairs are classified into one or more sample groups based on the value Threshold, which only considers the luma DC values. That is, a luma-chroma sample pair is classified by only considering the intensity of the luma sample. However, luma component usually preserves abundant textures, and the current luma sample may be highly correlated with neighboring luma samples, such inter-sample correlation (AC correlation) may benefit the classification of luma-chroma sample pairs and can bring additional coding efficiency.


Edge-Classified Linear Model (ELM)

To improve the coding efficiency of luma and chroma components, classifiers considering luma edge or AC information is introduced, in contrast to the above implementations wherein only luma DC values are considered. Besides the existing band-classified MMLM, the present disclosure provides exemplary classifiers. The process of generating linear prediction models for different sample groups may be similar as CCLM or MMLM (e.g., via a least square method, or a simplified min-max method, etc.), but with different metrices for classification. Different classifiers may be used to classify the neighboring luma samples (e.g., of the neighboring luma-chroma sample pairs) and/or the luma samples corresponding to chroma samples to be predicted. The luma samples corresponding to the chroma samples may be obtained by a down-sampling operation to match the locations of the corresponding chroma samples for 4:2:0 video sequences. For example, a luma sample corresponding to a chroma sample may be obtained by performing a down-sampling operation on more than one (e.g., 4) reconstructed luma samples corresponding to the chroma sample (e.g., located around the chroma sample). Alternatively, the luma samples may obtained directly from the reconstructed luma samples in a case of 4:4:4 video sequences, for example. Alternatively, the luma samples may be obtained from respective ones of the reconstructed luma samples that are at respective collocated positions for the corresponding chroma samples. For example, a luma sample to be classified may be obtained from one of four reconstructed luma samples corresponding to the chroma sample that is at a left-top position of the four reconstructed luma samples, which may be considered as a collocated position for the chroma sample.


A first classifier may classify luma samples according to their edge strengths. For example, one direction (e.g., 0-degree, 45-degree, or 90-degree, etc.) may be selected to calculate the edge strength. A direction may be formed by a current sample and a neighboring sample along the direction (e.g., a neighboring sample located at the right-top of the current sample for 45-degree). An edge strength may be calculated by subtracting the neighbor sample from the current sample. The edge strength may be quantized into one of M segments by M−1 thresholds, and the first classifier may use M classes to classify the current sample. Alternatively or additionally, N directions may be formed by a current sample and N neighboring samples along the N directions. N edge strengths may be calculated by subtracting N neighboring samples from the current sample, respectively. Similarly, if each of the N edge strengths may be quantized into one of M segments by M−1 thresholds, then the first classifier may use MN classes to classify the current sample.


A second classifier may be used to classify according to a local pattern. For example, a current luma sample Y0 may be compared with its neighboring N luma samples Yi. A score may be added by one if the value of Y0 is greater than that of Yi, otherwise, the score may be reduced by one. The sore may be quantized to form K classes. The second classifier may classify a current sample into one of the K classes. For example, the neighboring luma samples may be obtained from four neighbors that are located above, left, right and below the current luma samples, i.e., without diagonal neighbors.


It may be contemplated that a plurality of the first classifier, the second classifier, or different instances of the first or second classifier or other classifiers described herein may be combined. For example, a first classifier may be combined with the existing MMLM threshold-based classifier. For another example, instance A of the first classifier may be combined with another instance B of the first classifier, where the instance A and B employ different directions (e.g., employing vertical and horizontal directions, respectively).


It will be appreciated by those skilled in the art that though the existing CCLM design in the VVC standard is used as the basic CCLM method in the description, the proposed cross-component method described in the disclosure can also be applied to other prediction coding tools with similar design spirits. For example, for the chroma from luma (CfL) in the AV1 standard, the proposed method can also be applied by dividing luma-chroma sample pairs into multiple sample groups.


It will be appreciated by those skilled that Y/Cb/Cr also can be denoted as Y/U/V in video coding area. If video data is of RGB format, the proposed method can also be applied by simply mapping YUV notation to GBR, for example.


Filter-Based Linear Model (FLM)

As shown in FIG. 10A, the CCLM assumes a given chroma sample only correlates to a corresponding luma sample (L0.5, which can be taken as the fractional luma sample position), and a simple linear regression (SLR) with ordinary least squares (OLS) estimation is used to predict the given chroma sample. However, as shown in FIG. 10B, in some video content, one chroma sample may simultaneously correlate to multiple luma samples (AC or DC correlation), so a multiple linear regression (MLR) model may further improve the prediction accuracy.


A filter-based linear model (FLM) which utilizes the MLR model is thus introduced as follows, to take into account the possibilities that one chroma sample may simultaneously correlate to multiple luma samples.


For a to-be-predicted chroma sample, the reconstructed collocated and neighboring luma samples can be used to predict the chroma sample, to capture the inter-sample correlation among the collocated luma sample, neighboring luma samples, and the chroma sample. The reconstructed luma samples are linear weighted and combined with one “offset” to generate the predicted chroma sample (C: predicted chroma sample, Li: i-th reconstructed collocated or neighboring luma samples, αi: filter coefficients, β: offset, N: filter taps). Note the linear weighted plus offset value directly forms the predicted chroma sample (can be low pass, high pass adaptively according to video content), and it is then added by the residual to form the reconstructed chroma sample.









C
=





i
=
0


N
-
1




α
i

·

L
i



+
β





(
30
)







For a given CU, the top and left reconstructed luma and chroma samples can be used to derive or train the FLM parameters (αi, β). Like CCLM, αi and β can be derived via OLS. The top and left training samples are collected, and one pseudo inverse matrix is calculated at both encoder and decoder sides to derive the parameters, which are then used to predict the chroma samples in the given CU. Let N denotes the number of filter taps applied on luma samples, M denotes the total top and left reconstructed luma-chroma sample pairs used for training parameters, Lji denotes luma sample with the i-th sample pair and the j-th filter tap, Ci denotes the chroma sample with the i-th sample pair, the following equations show the derivation of the pseudo inverse matrix A+, and also the parameters. FIG. 11 shows an example that N is 6 (6-tap), M is 8, top 2 rows and left 3 columns luma samples and top 1 row and left 1 column chroma samples are used to derive or train the parameters.










C
0

=



α
0

·

L
0
0


+


α
1

·

L
1
0


+

+


α

N
-
1


·

L

N
-
1

0


+
β





(
31
)










C
1

=



α
0

·

L
0
1


+


α
1

·

L
1
1


+

+


α

N
-
1


·

L

N
-
1

1


+
β













C

M
-
1


=



α
0

·

L
0

M
-
1



+


α
1

·

L
1

M
-
1



+

+


α

N
-
1


·

L

N
-
1


M
-
1



+
β








[




C
0






C
1
















C

M
-
1





]

=


[




L
0
0




L
1
0







L

N
-
1

0



1





L
0
1




L
1
1







L

N
-
1

1



1







































L
0

M
-
1





L
1

M
-
1








L

N
-
1


M
-
1




1



]

[




α
0






α
1











α

N
-
1






β



]







b
=
Ax






x
=




(


A
T


A

)


-
1




A
T


b

=


A
+


b






Please note that one can predict the chroma sample by only αi without the offset β, which may be a subset of the proposed method.


The proposed ELM/FLM/GLM (as discussed below) can be extended straightforwardly to the CfL design in the AV1 standard, which transmits model parameters (α, β) explicitly. For example, (1-tap case) deriving α and/or β at encoder at SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels, and signaled to decoder for the CfL mode.


To further improve the coding performance, additional designs may be used in the FLM prediction. As shown in FIG. 11 and discussed above, a 6-tap luma filter is used for the FLM prediction. However, though a multiple tap filter can fit well on training data (e.g., top and left neighboring reconstructed luma and chroma samples), in some cases that training data do not capture full characteristics of testing data, it may result in overfitting and may not predict well on testing data (i.e., the to-be-predicted chroma block samples). Also, different filter shapes may adapt well to different video block content, leading to more accurate prediction.


To address this issue, the filter shape and number of filter taps can be predefined or signaled or switched in Sequence Parameter Set (SPS), Adaptation Parameter Set (APS), Picture Parameter Set (PPS), Picture Header (PH), Slice Header (SH), Region, CTU, CU, Subblock, or Sample level. A set of filter shape candidates can be predefined, and a selection on the set of filter shape candidates may be signaled or switched in SPS, APS, PPS, PH, SH, Region, CTU, CU, Subblock, or Sample level. Different components (e.g., U and V) may have different filter switch control. For example, a set of filter shape candidates (e.g., indicated by index 0-5) may be predefined, and a filter shape (1, 2) may denote a 2-tap luma filter, a filter shape (1, 2, 4) may denote a 3-tap luma filter and the like, as shown in FIG. 11. The filter shape selection of U and V components can be switched in PH or in CU or CTU level. Note N-tap can represent N-tap with or without the offset β as described herein. One example is given as below in Table 7.









TABLE 7





Exemplary signaling and switching for different filter shapes



















predefined filter
# of
filter



shape candidates:
filter taps
shape
















idx
0
2
(1, 2)



idx
1
2
(1, 4)



idx
2
2
(1, 5)



idx
3
3
(1, 2, 4)



idx
4
4
(1, 2, 4, 5)



idx
5
6
(0, 1, 2, 3, 4, 5)















selected filter


POC
comp
shape idx













0
U
3
PH switch



V
0~5
CU switch


1
U
4
PH switch



V
0~2
CTU switch









Different chroma types and/or color formats can have different predefined filter shapes and/or taps. For example, a predefined filter shape (1, 2, 4, 5) may be used for 4:2:0 type-0, a predefined filter shape (0, 1, 2, 4, 7) may be used for 4:2:0 type-2, and a predefined filter shape (1, 4) may be used for 4:2:2, and a predefined filter shape (0, 1, 2, 3, 4, 5) may be used for 4:4:4, as shown in FIG. 12.


In another aspect of the present disclosure, unavailable luma and chroma samples for deriving the MLR model can be padded from available reconstructed samples. For example, if using a 6-tap (0, 1, 2, 3, 4, 5) filter as in FIG. 12, for a CU located at the left picture boundary, the left columns including samples (0, 3) are not available (out of picture boundary), so samples (0, 3) are repetitive padding from samples (1, 4) to apply the 6-tap filter. Note that the padding process may be applied in both training data (top and left neighboring reconstructed luma and chroma samples) and testing data (the luma and chroma samples in the CU(s)).


As mentioned above, an MLR model (linear equations) must be derived at both the encoder and the decoder. According to one or more aspects of the present disclosure, several methods are proposed to derive the pseudo inverse matrix A+, or to directly solve the linear equations. Other known methods like Newton's method, Cayley-Hamilton method, and Eigendecomposition as mentioned in https://en.wikipedia.org/wiki/Invertible_matrix can also be applied.


In the present disclosure, A+ can be denoted as A−1 for simplification. The linear equations may be solved as follows

    • 1. Solving A−1 by adjugate matrix (adjA), closed form, analytic solution:


      Below shows one nxn general form, one 2x2 and one 3x3 cases. If FLM uses 3x3, 2 scalers plus one offset need be solved.







b
=
Ax

,







x
=




(


A
T


A

)


-
1




A
T


b

=


A
+


b



,






denoted


as



A

-
1



b







A

-
1


=


1

det


A



adjA









(
adjA
)

ij

=


(

-
1

)


?

det


A

?


?









?

indicates text missing or illegible when filed




Aji: (n−1)×(n−1) submatrix by removing j-th row and i-th column







A

-
1


=



[



a


b




c


d



]


-
1


=



1

det


A


[




A


?

11






-
A



?

21








-
A



?

12





A


?

22





]

=



1

det


A


[



d



-
b






-
c



a



]


?











A

-
1


=



[




a
11




a
12




a
13






a
21




a
22




a
23






a
31




a
32




a
33




]


-
1


=


1

det


A


[






"\[LeftBracketingBar]"





a
22




a
23






a
32




a
33






"\[RightBracketingBar]"





-



"\[LeftBracketingBar]"





a
12




a
13






a
32




a
33






"\[RightBracketingBar]"








"\[LeftBracketingBar]"





a
12




a
13






a
22




a
23






"\[RightBracketingBar]"







-



"\[LeftBracketingBar]"





a
21




a
23






a
31




a
33






"\[RightBracketingBar]"








"\[LeftBracketingBar]"





a
11




a
13






a
31




a
33






"\[RightBracketingBar]"





-



"\[LeftBracketingBar]"





a
11




a
13






a
21




a
23






"\[RightBracketingBar]"










"\[LeftBracketingBar]"





a
21




a
22






a
31




a
32






"\[RightBracketingBar]"





-



"\[LeftBracketingBar]"





a
11




a
12






a
31




a
32






"\[RightBracketingBar]"








"\[LeftBracketingBar]"





a
11




a
12






a
21




a
22






"\[RightBracketingBar]"





]









?

indicates text missing or illegible when filed




2. Gauss-Jordan Elimination

The linear equations can be solved using Gauss-Jordan elimination, by an augmented matrix [A In] and a series of elementary row operation to obtain the reduced row echelon form [I | X]. Below shows 2x2 and 3x3 examples.










[




a


b




c


d







1


0




0


1




]




[




a


b




0



ad
-
bc








1


0





-
c



a




]











[




a


b




0


1







1


0






-
c


ad
-
bc





a

ad
-
bc






]












[




a


0




0


1








ad

ad
-
bc






-
ab


ad
-
bc








-
c


ad
-
bc





a

ad
-
bc






]











[




1


0




0


1








d

ad
-
bc






-
b


ad
-
bc








-
c


ad
-
bc





a

ad
-
bc






]














[




2


2


5





-
2



1


2




6


3


9







1


0


0




0


1


0




0


0


1




]




[




2


2


5




0


3


7




0



-
3




-
6








1


0


0




1


1


0





-
3



0


1




]











[




2


2


5




0


3


7




0


0


1







1


0


0




1


1


0





-
2



1


1




]












[




2


2


0




0


3


0




0


0


1







11



-
5




-
5





15



-
6




-
7






-
2



1


1




]












[




2


2


0




0


1


0




0


0


1







11



-
5




-
5





5



-
2




-

7
3







-
2



1


1




]












[




2


0


0




0


1


0




0


0


1







1



-
1




-

1
3






5



-
2




-

7
3







-
2



1


1




]











[




1


0


0




0


1


0




0


0


1








1
2




-

1
2





-

1
6






5



-
2




-

7
3







-
2



1


1




]








3. Cholesky Decomposition To solve Ax=b, A can be firstly decomposed by Cholesky-Crout algorithm, leading to one upper triangular and one lower triangular matrices, and one forward substitution plus one backward substitution can be applied in serial to obtain the solution. Below shows a 3x3 example.









A
=


[




a
11




a
12




a
13






a
21




a
22




a
23






a
31




a
32




a
33




]

=

GG
T








=


[




g
11



0


0





g
21




g
22



0





g
31




g
32




g
33




]

[




g
11




g
21




g
13





0



g
22




g
23





0


0



g
33




]







=

[




g
11
2





g
12



g
11






g
31



g
11








g
21



g
11






g
21
2

+

g
22
2







g
31



g
21


+


g
32



g
22









g
31



g
11







g
31



g
21


+


g
32



g
22







g
31
2

+

g
32
2

+

g
33
2





]











g
ij

=



a

?


-




k
=
1


j
-
1




g
jk
2












g
ij

=


1

g
ij




(


a

?


-




k
=
1


j
-
1





g
ik



g
jk




)



,







i
=

j
+

1

?

j

+
2


,

,

?








g
11

=


a
11









g
21

=


g
21


g
11









g
31

=


g
31


g
11









g
22

=



a
22

-

g
21
2










g
32

=


1

g
22




(


a
32

-


g
31



g
21



)









g
33

=




a
33

-

g
31
2

-

g
32
2



.








?

indicates text missing or illegible when filed




Apart from the above examples, some conditions need special handling. For example, if some conditions result in that the linear equations cannot be solved, default values can be used to fill the chroma prediction values. The default values can be predefined or signaled or switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels, for example, when predefined 1<<(bitDepth−1), meanC, meanL, or meanC-meanL (mean current chroma or other chroma, luma values from available, or subset of FLM reconstructed neighboring region).


The following examples represent situations when the matrix A cannot be solved, where default prediction values may be assigned to the whole current block:

    • 1. Solving by closed form (analytic, adjugate matrix), but A is singular, (i.e., detA=0);
    • 2. Solving by Cholesky decomposition, but A cannot be Cholesky decomposed, gjj<REG_SQR, where REG_SQR is one small value, can be predefined or signaled or switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels.



FIG. 11 shows a typical case that the FLM parameters are derived using top 2 and/or left 3 luma lines and top 1 and/or left 1 chroma lines. However, using different region for parameter derivation may bring coding benefit because of different block content and the reconstructive quality of different neighboring samples, as mentioned above. Several ways to choose the applied region for parameter derivation are proposed below:

    • 1. Similar to MDLM, the FLM derivation can only use top or left luma and/or chroma samples to derive the parameters. Whether to use FLM, FLM_L, or FLM_T can be predefined or signaled or switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels. Suppose that a current chroma block has a size of W×H, then W′ and H′ are obtained as follows:
      • W′=W, H′=H when FLM mode is applied;
      • W′=W+We when FLM_T mode is applied; where We denotes extended top luma/chroma samples;
      • H′=H+He when FLM_L mode is applied; where He denotes extended left luma/chroma samples.


The number of extended luma/chroma samples (We, He) can be predefined, or signaled or switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels.


For example, predefine (We, He)=(H, W) as the VVC CCLM, or (W, H) as the ECM CCLM. The unavailable (We, He) luma/chroma samples can be repetitive padded from the nearest (horizontal, vertical) luma/chroma samples.



FIG. 13 shows an illustration of FLM_L and FLM_T (e.g., under 4 tap). When FLM_L or FLM_T is applied, only H′ or W′ luma/chroma samples are used for parameter derivation, respectively.

    • 2. Similar to MRL, different line index can be predefined, or signaled or switched in SPS/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels, to indicate the selected luma-chroma sample pair line. This may benefit from different reconstructive quality of different line samples.



FIG. 14 shows that similar to MRL, FLM can use different lines for parameter derivation (e.g., under 4 tap). For example, FLM can use light blue/yellow luma and/or chroma samples in index 1.

    • 3. Extend CCLM region and take full top N and/or left M lines for parameter derivation. FIG. 14 shows all dark and light blue and yellow region can be used at one time. Training using larger region (data) may lead to a more robust MLR model.


Corresponding syntax may be defined as below in Table 8 for the FLM prediction. Wherein FLC represents fixed length code, TU represents truncated unary code, EGk represents exponential-golomb code with order k, where k can be fixed or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PW/SH/Region/CTU/CU/Subblock/Sample levels, SILK represents signed EG0, and UVLC represents unsigned EG0.









TABLE 8







An example of FLM syntax










Level
Syntax element
Binarization
Meaning





SPS
flm_enabled_flag
FLC
whether FLM is enabled in the





sequence, can be inferred off when





chromaFormat == CHROMA_400, or





CCLM is off


PH/SH
ph_flm_cb_flag
FLC
whether FLM is enabled in this



ph_flm_cr_flag

picture/slice for Cb/Cr, can be





inferred off when chromaFormat ==





CHROMA_400, or CCLM is off


PH/SH
ph_flm_cb_ctb_control_flag
FLC
whether to enable Cb/Cr on/off



ph_flm_cr_ctb_control_flag

control at CTB level


CTU
ctb_flm_cb_flag
CABAC
whether FLM is enabled for the



ctb_flm_cr_flag

current Cb or Cr CTB, can be





CABAC bypass coded or with N





contexts (2: up/left, or N neighboring





CTBs)


CU
cu_flm_cb_flag
CABAC, TU
whether FLM is enabled for the



cu_flm_cr_flag

current Cb or Cr CU, can be CABAC





bypass coded or with N contexts (2:





up/left, or N neighboring CUs)


CU
flm_cb_filter_idx
CABAC, TU
which filter shape idx (in the



flm_cr_filter_idx

predefined set) is used for the CU, can





be CABAC bypass coded or with N





contexts (2: up/left, or N neighboring





CUs)


CU
flm_cb_mdlm_idx
CABAC, TU
which MDLM idx (FLM, FLM_L,



flm_cr_mdlm_idx

FLM_T) is used for the CU, can be





CABAC bypass coded or with N





contexts (2: up/left, or N neighboring





CUs)


CU
flm_cb_mrl_idx
CABAC, TU
which FLM MRL idx (e.g., 0, 1) is



flm_cr_mrl_idx

used for the CU, can be CABAC





bypass coded or with N contexts (2:





up/left, or N neighboring CUs)





Note that the binarization of each syntax element can be changed.






A new method for cross-component prediction is proposed on the basis of the existing linear model designs, in order to further improve coding accuracy and efficiency. Main aspects of the proposed method are detailed as follows.


Though the above discussed FLM provides the best flexibility (leading to the best performance), it requires to solve many unknown parameters if the number of filter taps goes up. When the inverse matrix is larger than 3x3, the closed form derivation is not suitable (too many multipliers), and iterative methods like Cholesky are needed, which burden decoder processing cycles. In this section, pre-operations before applying the linear model are proposed, including utilizing the sample gradients to exploit the correlation between luma AC information and chroma intensities. With the help of gradients, the number of filter taps can be efficiently reduced.


Please note that methods/examples in this section can be combined/reused from any of the designs discussed above, including but not limited to classification, filter shape, matrix derivation (with special handling), applied region, syntax. Moreover, methods/examples listed in this section can also be applied in any of the designs discussed above, to have a better performance with certain complexity trade-off.


Please note that reference samples/training template/reconstructed neighbouring region as used herein usually refers to the luma samples used for deriving the MLR model parameters, which are then applied to the inner luma samples in one CU, to predict the chroma samples in the CU.


According to the proposed method, instead of directly using luma sample intensity values as the input of the linear model, pre-operations (e.g., pre linear weighted, sign, scale/abs, thresholding, ReLU) can be applied to downgrade the dimension of unknown parameters. In one example, the pre-operations may comprise calculating sample differences based on the luma sample values. As understood by one skilled in the art, the sample differences may be characterized as gradients, and thus this new method is also referred to as gradient linear model (GLM) in certain embodiments.


Please note that the following detailed description discuss scenarios wherein the proposed pre-operations may be reused for/combined with the SLR model (also referred to as 1-tap case), and reused for/combined with the MLR model (also referred to as multi-tap case, for example, 2-tap).


For example, instead of applying 2-tap on 2 luma samples, the 2 luma samples can be pre-operated, then a simpler 1-tap can be applied to reduce complexity. FIG. 15 shows some examples for 1-tap/2-tap (with offset) pre-operations, where 2-tap coefficients are denoted as (a, b). please note that each circle as illustrated in FIG. 15 represents a illustrative chroma position in the YUV 4:2:0 format. As discussed above, in the YUV 4:2:0 format, a luma sample corresponding to a chroma sample may be obtained by performing a down-sampling operation on more than one (e.g., 4) reconstructed luma samples corresponding to the chroma sample (e.g., located around the chroma sample). In other words, the chroma position may correspond to corresponding to one or more luma samples comprising a collocated luma sample. The different 1-tap patterns are designed for different gradient directions and using different “interpolated” luma samples (weighting to different luma location) for gradient calculation. For example, one typical filter [1, 0, −1; 1, 0, −1] is shown in FIG. 15, which represents the following operations:











Rec
L
′′



(

i
,
j

)


=

[






rec
L

(



2

i

-
1

,


2

j

-
1


)

-


rec
L

(



2

i

+
1

,


2

j

-
1


)

+








rec
L

(



2

i

-
1

,

2

j


)

-


rec
L

(



2

i

+
1

,

2

j


)





]





(
32
)







Wherein recL represents the reconstructed luma sample values and RecL″(i, j) represents the pre-operated luma sample values. Please also note that the 1-tap filters as shown in FIG. 15 may be understood as alternatives for the down-sampling filters as used in CCLM (please refer to equations (6)-(7)), with changed filter coefficients.


Pre-operations can be according to gradients, edge direction (detection), pixel intensity, pixel variation, pixel variance, Roberts/Prewitt/compass/Sobel/Laplacian operator, high-pass filter (by calculating gradients or other relevant operators), low-pass filter (by performing weighted-average operations) . . . etc. The edge direction detectors listed in the examples can be extended to different edge directions. For example, 1-tap (1, −1) or 2-tap (a, b) applied along different directions to detect different edge gradients. The filter shape/coeff can be symmetric with respect to the chroma position, as the FIG. 15 examples (420 type-0 case).


The pre-operation parameters (coefficients, sign, scale/abs, thresholding, ReLU) can be fixed or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels. Note in the examples, if multiple coefficients apply on one sample (e.g., −1, 4), then they can be merged (e.g., 3) to reduce operations.


In one example, the pre-operations may relates to calculating sample differences of the luma sample values. Alternatively, the pre-operations may comprise performing down-sampling by weighted-average operations. In certain cases, the pre-operations can be applied repeatedly. For example, one may apply one template filtering to template to remove outliers using the low-pass smoothing FIR filter [1, 2, 1]/4, or [1, 2, 1; 1, 2, 1]/8 (i.e., down-sampling) and then apply 1-tap GLM filter to calculate the sample differences to derive the linear model. It may be contemplated that one may also calculate the sample differences and then enabling down-sampling.


In one example, the pre-operation coefficients (finally applied (e.g., 3), or middle applied (e.g., −1, 4) to per luma sample) can be limited to power-of-2 values to save multipliers.


In one aspect of the present disclosure, the proposed new method may be reused for/combined with the above discussed CCLM, which utilizing a simple linear regression (SLR) model and using one corresponding luma sample value to predict the chroma sample value. This is also referred to as a 1-tap case. In this case, deriving the linear model further comprises deriving a scale parameter α and an offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values. Or, the linear model may be re-written as:









C
=


α
·
L

+
β





(
33
)







Wherein L here represents “pre-operated” luma samples. The parameter derivation of 1-tap GLM can reuse CCLM design, but taking directional gradient into consideration (may be with high-pass filter). In one example, the scale parameter α may be derived by utilizing a division look-up table, as detailed below, to enable simplification.


In one example, when combining GLM with the SLR model, the scale parameter α and the offset parameter β may be derived by utilizing the above-discussed min-max method. Specifically, the scale parameter α and the offset parameter β may be derived by: comparing the pre-operated neighboring luma sample values to determine a minimum luma sample value YA and a maximum luma sample value YB; determining corresponding chroma samples values XA and XB for the minimum luma sample value YA and the maximum luma sample value YB, respectively; and deriving the scale parameter α and the offset parameter β based on the minimum luma sample value YA, the maximum luma sample value YB, and the corresponding chroma samples values XA and XB according to the following equations:










α
=



Y
A

-

Y
B




X
A

-

X
B




;




(
34
)









β
=


Y
A

-

α



X
A

.







In one example, when combining GLM with the SLR model, the above discussed scale adjustment may be reused. In this case, the encoder may determine a scale adjustment value (for example, “u”) to be signaled in the bitstream and add the scale adjustment value to the derived scale parameter α. The decoder may determine the scale adjustment value (for example, “u”) from the bitstream and add the scale adjustment value to the derived scale parameter α. The added value are finally used to predict the internal chroma sample values.


In one aspect of the present disclosure, the proposed new method may be reused for/combined with FLM, which utilizing a multiple linear regression (MLR) model and using multiple luma sample values to predict the chroma sample value. This is also referred to as a multi-tap case, for example, 2-tap. In this case, the linear model may be re-written as:










C
0

=


α
·

L
0


+
β





(
35
)










C
1

=


α
·

L
1


+
β













C

M
-
1


=


α
·

L

M
-
1



+
β








[




C
0






C
1











C

M
-
1





]

=


[




L
0



1





L
1



1













L

M
-
1




1



]

[



α




β



]







b
=
Ax






x
=




(


A
T


A

)


-
1




A
T


b

=


A
+


b








α
=




n





x
k



y
k




-




x
k





y
k







n




x
k
2



-


(



x
k


)

2



=


A
1


A
2









β
=






y
k


-

α




x
k




n

=


y
¯

-

α


x
¯








In this case, multiple scale parameters α and an offset parameter β may be derived by using the pre-operated neighboring luma sample values and the neighboring chroma sample values. In one example, the offset parameter β is optional. In one example, at least one of the multiple scale parameters α may be derived by utilizing the sample differences. Moreover, another of the multiple scale parameters α may be derived by utilizing the down-sampled luma sample value. In one example, at least one of the multiple scale parameters α may be derived by utilizing horizontal or vertical sample differences calculated on the basis of downsampled neighboring luma sample values. In other words, the linear model may combine multiple scale parameters α associated with different pre-operations.


The proposed GLM can be combined with above discussed MMLM or ELM. When combined with classification, each group can share or have its own filter shape, with syntaxes indicating shape for each group. For example, as a exemplary classifier, horizontal gradients grad_hor may be classified into a first group, which correspond to a first linear model, and vertical gradients grad_ver may be classified into a second group, which correspond to a second linear model. In one example, the horizontal luma patterns may be generated only once.


Further possible classifiers are also provided as follows. With the classifiers, the neighboring and internal luma-chroma sample pairs of the current video block may be classified into multiple groups based on one or more thresholds. Please note that, as discussed above, each neighboring/internal chroma sample and its corresponding luma sample may be referred to as a luma-chroma sample pair. The one or more thresholds are associated with intensities of neighboring/internal luma samples. In this case, each of the multiple groups corresponds to a respective one of the plurality of linear models.


When combining with MMLM classifier, the following operations may be performed: classifying neighbouring reconstructed luma-chroma sample pairs of the current video block into 2 groups based on Threshold; deriving different linear models for different groups, wherein the deriving process may be GLM simplified, i.e., with the above pre-operations to reduce the number of taps; classifying luma-chroma sample pairs inside the CU (internal luma-chroma sample pairs, wherein each of the internal luma-chroma sample pairs comprises an internal chroma sample value to be predicted with the derived linear model) into 2 groups similarly based on Threshold; applying different linear models to the reconstructed luma samples in different groups; and predicting chroma samples in the CU based on different classified linear models. Wherein Threshold may be average value of the neighbouring reconstructed luma samples. Note the number of classes (2) can be extended to multiple classes by increasing the number of Threshold (e.g., equally divided based on min/max of neighbouring reconstructed (downsampled) luma samples, fixed or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels).


In one example, instead of MMLM luma DC intensity, the filtered values of FLM/GLM apply on neighbouring luma samples are used for classification. For example, if 1-tap (1, −1) GLM is applied, average AC values are used (physical meaning). The processing can be: classifying neighbouring reconstructed luma-chroma sample pairs into K groups based on one or more filter shapes, one or more filtered values, and K−1 Threshold Ti; deriving different MLR models for different groups, wherein the deriving process may be GLM simplified, i.e., with the above pre-operations to reduce the number of taps; classifying luma-chroma sample pairs inside the CU (internal luma-chroma sample pairs, wherein each of the internal luma-chroma sample pairs comprises an internal chroma sample value to be predicted with the derived linear model) into K groups similarly based on one or more filter shapes, one or more filtered values, and K−1 Threshold Ti; applying different linear models to the reconstructed luma samples in different groups; predicting chroma samples in the CU based on different classified linear models. Wherein Threshold can be predefined (e.g., 0, or can be a table) or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels). For example, Threshold can be the average AC value (filtered value) (2 groups), or equally divided based on min/max AC (K groups), of neighbouring reconstructed (can be downsampled) luma samples.


It is also proposed to combine GLM with ELM classifier. As shown in FIG. 15, one filter shape (e.g., 1-tap) may be selected to calculate edge strengths. The direction is formed by the current and N neighbouring samples along the direction (e.g. all 6). The processing may then comprise: calculating one edge strength by the filtered value (e.g., equivalent); quantizing the edge strength into M segments by M−1 thresholds Ti; using K classes to classify the current sample. (e.g., K==M); deriving different MLR models for different groups, wherein the deriving process may be GLM simplified, i.e., with the above pre-operations to reduce the number of taps; classifying luma-chroma sample pairs inside the CU into K groups; applying different MLR models to the reconstructed luma samples in different groups; and predicting chroma samples in the CU based on different classified MLR models. Please note that the filter shape used for classification can be the same or different with the filter shape used for MLR prediction. Both and the number of thresholds M−1, the thresholds values Ti, can be fixed or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels. Moreover, other classifiers/combined-classifiers as discussed in ELM can also be used for GLM.


If classified samples in one group are less than a number (e.g., predefined 4), default values mentioned when discussing the matrix derivation for the MLR model can be applied for the group parameters (αi, β). If the corresponding neighbouring reconstructed samples are not available with respect to the selected LM modes, default values can be applied. For example, when MMLM_L mode is selected but left samples are not valid.


Several methods relate to simplification for GLM are introduced as follows for further improving coding efficiency.


The matrix/parameter derivation in FLM requires floating-point operation (e.g., division in closed-form), which is expensive for decoder hardware, so a fixed-point design is required. For 1-tap GLM case, it can be taken as modified luma reconstructed sample generation of CCLM (e.g., horizontal gradient direction, from CCLM [1, 2, 1; 1, 2, 1]/8 to GLM [−1, 0, 1; −1, 0, 1]), the original CCLM process can be reused for GLM, including fixed-point operation, MDLM downsampling, division table, applied size restriction, min-max approximation, and scale adjustment. For all items, 1-tap GLM can have its own configurations or share the same design as CCLM. For example, using simplified min-max method to derive the parameters (instead of LMS), and combined with scale adjustment after GLM model is derived.


This section takes typical case reference samples (up 1 row and left 1 column) for example. Note as in FIG. 14, extended reconstructed region can also use the simplification with the same spirit, and may be with syntax indicating the specific region (like MDLM, MRL).


Please note that the following aspects can be combined and applied jointly. For example, combining reference sample down-sampling and division table to perform the division process.


When classification (MMLM/ELM) is applied, each group can apply the same or different simplification operation. For example, samples for each group are padded respectively to the target sample number before applying right shift, and then apply the same derivation process, same division table.


Fixed-Point Implementation

The 1-tap case can reuse the CCLM design, dividing by n may be implemented by right shift, dividing by A2 may be implemented by a LUT. The integerization parameters, including nα, nA1, nA2, rA1, rA2 ntable involved in the integerization design of LMS CCLM and intermediate parameters for deriving the linear model (equations (19)-(20)) can be the same as CCLM or have different values, to have more precision. The integerization parameters can be predefined or signaled/switched in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels, can be conditioned on sequence bitdepth. For example, ntable=bitdepth+4.


MDLM Down-Sample

When GLM is combined with MDLM, the existed total samples used for parameter derivation may not be power-of-2 values, and need padding to power-of-2 to replace division with right shift operation. For example, for an 8x4 chroma CU, MDLM needs W+H=12 samples, with MDLM_T only 8 samples are available (reconstructed), then downsampled 4 samples (0, 2, 4, 6) may be padded equally. Codes for implementing such operations are shown as follows:














int targetSampNum = 1 << ( floorLog2( existSampNum − 1 ) + 1 );


if (targetSampNum != existSampNum)//if existSampNum not a value of power of 2


{


 xPadMdlmTemplateSample;


}


int step = (int)(existSampNum / sampNumToBeAdd);


for (int i = 0; i < sampNumToBeAdd; i++)


{


 pTempSrc[i] = pSrc[i * step];


 pTempCur[i] = pCur[i * step];


}









Other padding method like repetitive/mirror padding with respect to last neighbouring samples (rightmost/lowermost) can also be applied.


The padding method for GLM can be the same or different with that of CCLM.


Note in ECM version, an 8x4 chroma CU MDLM_T/MDLM_L needs 2 T/2 L=16/8 samples respectively, in such case, same padding method can be applied to meet the target power-of-2 sample number.


Division LUT

Division LUT proposed for CCLM/LIC (Local Illumination Compensation) in known standard development like AVC/HEVC/AV1/VVC/AVS can be used for GLM division. For example, reusing the LUT in JCTVC-I0166 for bitdepth=10 case (Table 4). The division LUT can be different from CCLM. For example, CCLM uses min-max with DivTable as in equation 5, but GLM uses 32-entries LMS division LUT as in Table 5.


When GLM is combined with MMLM, the meanL values may not always be positive (e.g., using filtered/gradient values to classify groups), so sgn(meanL) needs to be extracted, and use abs(meanL) to look-up the division LUT. Note division LUT used for MMLM classification and parameter derivation can be different. For example, using lower precision LUT (as the LUT in min-max) for mean classification, and using higher precision LUT (as in the LMS) for parameter derivation.


Size Restriction and Latency Constraint

Similar to the CCLM design, some size restrictions can be applied for ELM/FLM/GLM. For example, same constraint for luma-chroma latency in dual tree may be applied.


The size restriction can be according to the CU area/width/height/depth. The threshold can be predefined or signaled in SPS/DPS/VPS/SEI/APS/PPS/PH/SH/Region/CTU/CU/Subblock/Sample levels. For example, the predefined threshold may be 128 for chroma CU area.


In one example, the at least one pre-operation is performed in response to determining that the video block meets an enabling threshold, wherein the enabling threshold is associated with area, width, height or partition depth of the video block. Specifically, the enabling threshold may define a minimum or maximum area, width, height or partition depth of the video block. As understood by one skilled in the art, the video block may comprise a current chroma block and its collocated luma block. It is also proposed to apply the above enabling threshold for the current chroma block and its collocated luma block jointly. For example, the at least one pre-operation is performed in response to determining the enabling threshold is met for both the current chroma block and its collocated luma block.


Line Buffer Reduction

Similar to the CCLM design, if the collocated luma area of the current chroma CU contains the 1st row inside one CTU, the top template samples generation can be limited to 1 row, to reduce CTU row line buffer storage. Note that only one luma line (general line buffer in intra prediction) is used to make the downsampled luma samples when the upper reference line is at the CTU boundary.


For example, in FIG. 13, if the collocated luma area of the current chroma CU contains the 1st row inside one CTU, top template can be limited to only use 1 row (but not 2) for parameter derivation (other CUs can still use 2 rows). This saves luma sample line buffer storage when processing CTU row by row at decoder hardware. Several methods can be used to achieve the line buffer reduction. Note the example of limited “1” row can be extended to N rows with similar operations. Similarly, 2-tap or multi-tap can also apply such operations. When applying multi-tap, chroma samples may also need to apply operations.


For example, take the 1-tap filter [1, 0, −1; 1, 0, −1] shown in FIG. 15 as an example for illustration. This filter can be reduced to [0, 0, 0; 1, 0, −1], i.e., only use below row coefficients. Alternatively, the limited upper row luma samples can be padded (repetitive, mirror, 0, meanL, meanC . . . etc.) from the bellow row luma samples.


Take an example where N=4, that is, the video block is at a top boundary of a current CTU, while top 4 rows of neighboring luma sample values and corresponding chroma sample values are used for deriving the linear model. Please note that, the corresponding chroma sample values may refer to corresponding top 4 rows of neighboring chroma sample values (for example, for the YUV 4:4:4 format). Alternatively, the corresponding chroma sample values may refer to corresponding top 2 rows of neighboring chroma sample values (for example, for the YUV 4:2:0 format). In this case, the top 4 rows of neighboring luma sample values and corresponding chroma sample values may be divided into two regions—a first region comprising valid sample values (for example, the one nearest row of luma sample values and corresponding chroma sample values) and a second region comprising invalid sample values (for example, the other three rows of luma sample values and corresponding chroma sample values). Then coefficients of the filter corresponding to sample positions not belonging to the first region may be set as zeros, such that only sample values from the first region are used for calculating the sample differences. For example, as discussed above, in this case the filter [1, 0, −1; 1, 0, −1] can be reduced to [0, 0, 0; 1, 0, −1]. Alternatively, the nearest sample values in the first region may be padded to the second region, such that the padded sample values may be used to calculate the sample differences.



FIG. 16 illustrates a workflow of a method 1600 for decoding video data according to one or more aspects of the present disclosure.


At step 1610, a video block (e.g., a CU comprising a luma block and/or a chroma block) may be obtained from a bitstream.


At step 1620, neighboring luma and chroma sample values of the video block may be obtained.


At step 1630, at least one pre-operation may be performed to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values.


At step 1640, a linear model may be derived by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


At step 1650, each of internal chroma sample values in the video block may be predicted by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value.


At step 1660, decoded video block may be obtained using the predicted internal chroma sample values.



FIG. 17 illustrates a workflow of a method 1700 for encoding video data according to one or more aspects of the present disclosure. Method 1700 may be similar to method 1600, and the processes or steps of method 1700 may correspond to that of method 1600.


At step 1710, a video block (e.g., a CU comprising a luma block and/or a chroma block) may be obtained from a video frame.


At step 1720, neighboring luma and chroma sample values of the video block may be obtained.


At step 1730, at least one pre-operation may be performed to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values.


At step 1740, a linear model may be derived by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


At step 1750, each of internal chroma sample values in the video block may be predicted by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value.


At step 1760, a bitstream comprising encoded video block may be generated using the predicted internal chroma sample values.



FIG. 18 illustrates an exemplary computing system 1800 according to one or more aspects of the present disclosure. The computing system 1800 may comprise at least one processor 1810. The computing system 1800 may further comprise at least one storage device 1820. The storage device 1820 may store computer-executable instructions that, when executed, cause the processor 1810 to perform the steps of methods described above. The processor 1810 may be a general-purpose processor, or may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. The storage device 1820 may store the input data, output data, data generated by processor 1810, and/or instructions executed by processor 1810.


It should be appreciated that the storage device 1820 may store computer-executable instructions that, when executed, cause the processor 1810 to perform any operations according to the embodiments of the present disclosure.


The embodiments of the present disclosure may be embodied in a computer-readable medium such as non-transitory computer-readable medium. The non-transitory computer-readable medium may comprise instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure. For example, the instructions, when executed, may cause one or more processors to receive a bitstream and perform the decoding operations as described above. For another example, the instructions, when executed, may cause one or more processors to perform the encoding operations and transmit a bitstream comprising the encoded video information associated with the predicted chroma sample as described above.


The following provides an overview of some aspects of the present disclosure.


Aspect 1: A method for decoding video data, comprising: obtaining a video block from a bitstream; obtaining neighboring luma and chroma sample values of the video block; performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values; deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values; predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; and obtaining decoded video block using the predicted internal chroma sample values.


Aspect 2. The method of aspect 1, wherein performing the at least one pre-operation further comprises performing down-sampling by weighted-average operations.


Aspect 3. The method of aspect 2, further comprising performing the at least one pre-operation iteratively.


Aspect 4. The method of aspect 1, wherein the linear model comprises a simple linear regression (SLR) model; and wherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using one corresponding pre-operated internal luma sample value based on the SLR model.


Aspect 5. The method of aspect 4, wherein deriving the linear model comprises: deriving a scale parameter α and an offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


Aspect 6. The method of aspect 5, wherein the scale parameter α is derived by utilizing a division look-up table.


Aspect 7. The method of aspect 5, wherein deriving the scale parameter α and the offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values comprises: comparing the pre-operated neighboring luma sample values to determine a minimum luma sample value YA and a maximum luma sample value YB; determining corresponding chroma samples values XA and XB for the minimum luma sample value YA and the maximum luma sample value YB, respectively; and deriving the scale parameter α and the offset parameter β based on the minimum luma sample value YA, the maximum luma sample value YB, and the corresponding chroma samples values XA and XB according to the following equations:







α
=



Y
A

-

Y
B




X
A

-

X
B




;






β
=


Y
A

-

α



X
A

.







Aspect 8. The method of aspect 5, wherein deriving the linear model further comprises: determining a scale adjustment value from the bitstream and adding the scale adjustment value to the derived scale parameter α.


Aspect 9. The method of aspect 1, wherein the linear model comprises a multiple linear regression (MLR) model; and wherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using multiple corresponding pre-operated internal luma sample values based on the MLR model.


Aspect 10. The method of aspect 9, wherein deriving the linear model comprises: deriving multiple scale parameters α and an optional offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


Aspect 11. The method of aspect 10, wherein at least one of the multiple scale parameters α is derived by utilizing the sample differences.


Aspect 12. The method of aspect 10, wherein at least one of the multiple scale parameters α is derived by utilizing horizontal or vertical sample differences calculated on the basis of downsampled neighboring luma sample values.


Aspect 13. The method of aspect 1, wherein neighboring and internal luma-chroma sample pairs of the video block are classified into multiple groups based on one or more thresholds, respectively, and the one or more thresholds are associated with intensities of neighboring and internal luma samples; and wherein the linear model is one of a plurality of linear models, and each of the multiple groups corresponds to a respective one of the plurality of linear models.


Aspect 14. The method of aspect 1, wherein performing the at least one pre-operation further comprises: calculating Roberts, Prewitt, compass, Sobel, or Laplacian operators on the basis of the neighboring and internal luma sample values.


Aspect 15. The method of aspect 1, wherein calculating sample differences based on the neighboring and internal luma sample values comprises applying a filter to the neighboring and internal luma sample values; and wherein the filter is fixed or switched for each coding unit (CU).


Aspect 16. The method of aspect 15, wherein coefficients of the filter are of power-of-2 values.


Aspect 17. The method of aspect 15, wherein the filter is symmetric with respect to a chroma position corresponding to one or more luma samples comprising a collocated luma sample.


Aspect 18. The method of aspect 15: wherein the video block is at atop boundary of a current Coding Tree Unit (CTU) and top N rows of neighboring luma sample values and corresponding chroma sample values are used for deriving the linear model; wherein the top N rows of neighboring luma sample values and corresponding chroma sample values are divided into a first region and a second region; and wherein calculating the sample differences further comprises: padding the nearest sample values in the first region to the second region, such that the padded sample values are used to calculate the sample differences; or setting coefficients of the filter corresponding to sample positions not belonging to the first region as zeros, such that only sample values from the first region are used for calculating the sample differences.


Aspect 19. The method of aspect 1, wherein the at least one pre-operation is performed in response to determining that the video block meets an enabling threshold; and wherein the enabling threshold is associated with a minimum or maximum area, width, height or partition depth of the video block and is predefined or determined from the bitstream.


Aspect 20. The method of aspect 19, wherein the video block comprises a current chroma block and its collocated luma block, and determining that the video block meets the enabling threshold comprises determining that the enabling threshold is met for both the current chroma block and its collocated luma block.


Aspect 21. The method of aspect 1, wherein the neighboring luma and chroma sample values of the video block are obtained by performing a padding operation with nearest available luma and chroma sample values for unavailable luma and chroma samples.


Aspect 22. A method for encoding video data, comprising: obtaining a video block from a video frame; obtaining neighboring luma and chroma sample values of the video block; performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values; deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values; predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; and generating a bitstream comprising encoded video block by using the predicted internal chroma sample values.


Aspect 23. The method of aspect 22, wherein performing the at least one pre-operation further comprises performing down-sampling by weighted-average operations.


Aspect 24. The method of aspect 23, further comprising performing the at least one pre-operation iteratively.


Aspect 25. The method of aspect 22, wherein the linear model comprises a simple linear regression (SLR) model; and wherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using one corresponding pre-operated internal luma sample value based on the SLR model.


Aspect 26. The method of aspect 25, wherein deriving the linear model comprises: deriving a scale parameter α and an offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


Aspect 27. The method of aspect 26, wherein the scale parameter α is derived by utilizing a division look-up table.


Aspect 28. The method of aspect 26, wherein deriving the scale parameter α and the offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values comprises: comparing the pre-operated neighboring luma sample values to determine a minimum luma sample value YA and a maximum luma sample value YB; determining corresponding chroma samples values XA and XB for the minimum luma sample value YA and the maximum luma sample value YB, respectively; and deriving the scale parameter α and the offset parameter β based on the minimum luma sample value YA, the maximum luma sample value YB, and the corresponding chroma samples values XA and XB according to the following equations: α=







α
=



Y
A

-

Y
B




X
A

-

X
B




;






β
=


Y
A

-

α



X
A

.







Aspect 29. The method of aspect 26, wherein deriving the linear model comprises: determining a scale adjustment value to be signaled in the bitstream and adding the scale adjustment value to the derived scale parameter α.


Aspect 30. The method of aspect 22, wherein the linear model comprises a multiple linear regression (MLR) model; and wherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using multiple corresponding pre-operated internal luma sample values based on the MLR model.


Aspect 31. The method of aspect 30, wherein deriving the linear model comprises: deriving multiple scale parameters α and an optional offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.


Aspect 32. The method of aspect 31, wherein at least one of the multiple scale parameters α is derived by utilizing the sample differences.


Aspect 33. The method of aspect 31, wherein at least one of the multiple scale parameters α is derived by utilizing horizontal or vertical sample differences calculated on the basis of downsampled neighboring luma sample values.


Aspect 34. The method of aspect 22, wherein neighboring and internal luma-chroma sample pairs of the video block are classified into multiple groups based on one or more thresholds, respectively, and the one or more thresholds are associated with intensities of neighboring and internal luma samples; and wherein the linear model is one of a plurality of linear models, and each of the multiple groups corresponds to a respective one of the plurality of linear models.


Aspect 35. The method of aspect 22, wherein performing the at least one pre-operation comprises: calculating Roberts, Prewitt, compass, Sobel, or Laplacian operators on the basis of the neighboring and internal luma sample values.


Aspect 36. The method of aspect 22, wherein calculating sample differences based on the neighboring and internal luma sample values comprises applying a filter to the neighboring and internal luma sample values; and wherein the filter is fixed or switched for each coding unit (CU).


Aspect 37. The method of aspect 36, wherein coefficients of the filter are of power-of-2 values.


Aspect 38. The method of aspect 36, wherein the filter is symmetric with respect to a chroma position corresponding to one or more luma samples comprising a collocated luma sample.


Aspect 39. The method of aspect 36: wherein the video block is at a top boundary of a current Coding Tree Unit (CTU) and top N rows of neighboring luma sample values and corresponding chroma sample values are used for deriving the linear model; wherein the top N rows of neighboring luma sample values and corresponding chroma sample values are divided into a first region and a second region; and wherein calculating the sample differences further comprises: padding the nearest sample values in the first region to the second region, such that the padded sample values are used to calculate the sample differences; or setting coefficients of the filter corresponding to sample positions not belonging to the first region as zeros, such that only sample values from the first region are used for calculating the sample differences.


Aspect 40. The method of aspect 22, wherein the at least one pre-operation is performed in response to determining that the video block meets an enabling threshold; and wherein the enabling threshold is associated with a minimum or maximum area, width, height or partition depth of the video block and is predefined or signaled in the bitstream.


Aspect 41. The method of aspect 40, wherein the video block comprises a current chroma block and its collocated luma block, and determining that the video block meets the enabling threshold comprises determining that the enabling threshold is met for both the current chroma block and its collocated luma block.


Aspect 42. The method of aspect 22, wherein the neighboring luma and chroma sample values of the video block are obtained by performing a padding operation with nearest available luma and chroma sample values for unavailable luma and chroma samples.


Aspect 43. A computer system, comprising: one or more processors; and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of any one of aspects 1-42.


Aspect 44. A computer program product, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of any one of aspects 1-42.


Aspect 45. A computer readable medium, storing computer-executable instructions that, when executed, cause one or more processors to receive a bitstream and perform the operations of the method of any one of aspects 1-21 based on the bitstream.


Aspect 46. A computer readable medium, storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of any one of aspects 22-42 and transmit a bitstream comprising encoded video information associated with the predicted chroma samples.


It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or sequence orders of these operations, and should cover all other equivalents under the same or similar concepts.


It should also be appreciated that all the modules in the methods described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.


The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims.

Claims
  • 1. A method for decoding video data, comprising: obtaining a video block from a bitstream;obtaining neighboring luma and chroma sample values of the video block;performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values;deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values;predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; andobtaining decoded video block using the predicted internal chroma sample values.
  • 2. The method of claim 1, wherein performing the at least one pre-operation further comprises performing down-sampling by weighted-average operations.
  • 3. The method of claim 2, further comprising performing the at least one pre-operation iteratively.
  • 4. The method of claim 1, wherein the linear model comprises a simple linear regression (SLR) model; andwherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using one corresponding pre-operated internal luma sample value based on the SLR model.
  • 5. The method of claim 4, wherein deriving the linear model comprises: deriving a scale parameter α and an offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.
  • 6. The method of claim 5, wherein the scale parameter α is derived by utilizing a division look-up table.
  • 7. The method of claim 5, wherein deriving the scale parameter α and the offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values comprises: comparing the pre-operated neighboring luma sample values to determine a minimum luma sample value YA and a maximum luma sample value YB;determining corresponding chroma samples values XA and XB for the minimum luma sample value YA and the maximum luma sample value YB, respectively; andderiving the scale parameter α and the offset parameter β based on the minimum luma sample value YA, the maximum luma sample value YB, and the corresponding chroma samples values XA and XB according to the following equations:
  • 8. The method of claim 5, wherein deriving the linear model further comprises: determining a scale adjustment value from the bitstream and adding the scale adjustment value to the derived scale parameter α.
  • 9. The method of claim 1, wherein the linear model comprises a multiple linear regression (MLR) model; andwherein predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value comprises: predicting that internal chroma sample value by using multiple corresponding pre-operated internal luma sample values based on the MLR model.
  • 10. The method of claim 9, wherein deriving the linear model comprises: deriving multiple scale parameters α and an optional offset parameter β by using the pre-operated neighboring luma sample values and the neighboring chroma sample values.
  • 11. The method of claim 10, wherein at least one of the multiple scale parameters α is derived by utilizing the sample differences, or wherein at least one of the multiple scale parameters α is derived by utilizing horizontal or vertical sample differences calculated on the basis of downsampled neighboring luma sample values.
  • 12. The method of claim 1, wherein neighboring and internal luma-chroma sample pairs of the video block are classified into multiple groups based on one or more thresholds, respectively, and the one or more thresholds are associated with intensities of neighboring and internal luma samples; andwherein the linear model is one of a plurality of linear models, and each of the multiple groups corresponds to a respective one of the plurality of linear models, orwherein performing the at least one pre-operation further comprises:calculating Roberts, Prewitt, compass, Sobel, or Laplacian operators on the basis of the neighboring and internal luma sample values.
  • 13. The method of claim 1, wherein calculating sample differences based on the neighboring and internal luma sample values comprises applying a filter to the neighboring and internal luma sample values; andwherein the filter is fixed or switched for each coding unit (CU).
  • 14. The method of claim 13, wherein coefficients of the filter are of power-of-2 values, or wherein the filter is symmetric with respect to a chroma position corresponding to one or more luma samples comprising a collocated luma sample.
  • 15. The method of claim 13: wherein the video block is at a top boundary of a current Coding Tree Unit (CTU) and top N rows of neighboring luma sample values and corresponding chroma sample values are used for deriving the linear model;wherein the top N rows of neighboring luma sample values and corresponding chroma sample values are divided into a first region and a second region; andwherein calculating the sample differences further comprises: padding the nearest sample values in the first region to the second region, such that the padded sample values are used to calculate the sample differences; orsetting coefficients of the filter corresponding to sample positions not belonging to the first region as zeros, such that only sample values from the first region are used for calculating the sample differences.
  • 16. The method of claim 1, wherein the at least one pre-operation is performed in response to determining that the video block meets an enabling threshold; andwherein the enabling threshold is associated with a minimum or maximum area, width, height or partition depth of the video block and is predefined or determined from the bitstream.
  • 17. The method of claim 16, wherein the video block comprises a current chroma block and its collocated luma block, and determining that the video block meets the enabling threshold comprises determining that the enabling threshold is met for both the current chroma block and its collocated luma block.
  • 18. The method of claim 1, wherein the neighboring luma and chroma sample values of the video block are obtained by performing a padding operation with nearest available luma and chroma sample values for unavailable luma and chroma samples.
  • 19. A computer system, comprising: one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to:obtain a video block from a bitstream;obtain neighboring luma and chroma sample values of the video block;perform at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values;derive a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values;predict each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; andobtain decoded video block using the predicted internal chroma sample values.
  • 20. A non-transitory computer readable storage medium, storing a bitstream that is to be decoded by performing the following steps: obtaining a video block from the bitstream;obtaining neighboring luma and chroma sample values of the video block;performing at least one pre-operation to the neighboring luma sample values and to internal luma sample values in the video block, to obtain pre-operated neighboring and internal luma sample values, wherein performing the at least one pre-operation comprises calculating sample differences based on the neighboring and internal luma sample values;deriving a linear model by using the pre-operated neighboring luma sample values and the neighboring chroma sample values;predicting each of internal chroma sample values in the video block by applying the linear model to one or more corresponding pre-operated internal luma sample values for that internal chroma sample value; andobtaining decoded video block using the predicted internal chroma sample values.
CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of PCT application No. PCT/US2023/016118 filed on Mar. 23, 2023, which is based upon and claims the benefit of U.S. Provisional Applications No. 63/323,010 filed on Mar. 23, 2022, No. 63/329,323 filed on Apr. 8, 2022, and No. 63/330,604 filed on Apr. 13, 2022. The entire contents thereof are incorporated herein by reference in their entireties.

Provisional Applications (3)
Number Date Country
63323010 Mar 2022 US
63329323 Apr 2022 US
63330604 Apr 2022 US
Continuations (1)
Number Date Country
Parent PCT/US2023/016118 Mar 2023 WO
Child 18893829 US