A method of video decoding in a decoder, comprising: decoding prediction information for a current block in a current picture that is a part of a coded video sequence, the prediction information indicating a cross-component linear model, CCLM, prediction mode for the current block; applying a downsampling filtering process to luma samples before using the luma samples for determining CCLM parameters, wherein a downsampling filter involves neighboring luma samples located in top, left and top-left areas of a coding unit, CU, and the luma samples comprise unavailable top-left neighboring luma samples, wherein: if the downsampling filtering process is first applied on top neighboring luma samples and then followed by left neighboring luma samples, then unavailable top-left neighboring luma samples (1201, 1202) are determined row-wise using nearest adjacent available top neighboring luma samples (1205, 1206), and unavailable top neighboring luma samples (1203, 1204) are determined using a nearest adjacent available top neighboring luma sample, and if the downsampling filtering process is first applied on left neighboring luma samples and then followed by the top neighboring luma samples, then unavailable top-left neighboring luma samples (1213, 1214) are determined column- wise using nearest adjacent available left neighboring luma samples (1211, 1212), and then in the downsampling filtering process on the top neighboring luma samples, unavailable top neighboring luma samples (1215, 1216) are determined using a nearest available top neighboring luma sample; calculating a parameter of the CCLM prediction mode based on a result of applying the downsampling filtering process to the unavailable neighboring luma samples; and reconstructing the current block based on the calculated parameter of the CCLM prediction mode; wherein applying the down-sample filter includes performing an N-tap filter on the at least one unavailable neighboring luma sample, N being determined based on an SPS chroma vertical collocated flag used to indicate whether the at least one unavailable neighboring luma sample and a corresponding chroma sample are vertical collocated, and if the SPS chroma vertical collocated flag is true, N assumes a value of 5, and if the SPS chroma vertical collocated flag is false, N assumes a value of 6. decoding prediction information for a current block in a current picture that is a part of a coded video sequence, the prediction information indicating a cross-component linear model, CCLM, prediction mode for the current block; applying a downsampling filtering process to luma samples before using the luma samples for determining CCLM parameters, wherein a downsampling filter involves neighboring luma samples located in top, left and top-left areas of a coding unit, CU, and the luma samples comprise unavailable top-left neighboring luma samples, wherein: if the downsampling filtering process is first applied on top neighboring luma samples and then followed by left neighboring luma samples, then unavailable top-left neighboring luma samples (1201, 1202) are determined row-wise using nearest adjacent available top neighboring luma samples (1205, 1206), and unavailable top neighboring luma samples (1203, 1204) are determined using a nearest adjacent available top neighboring luma sample, and if the downsampling filtering process is first applied on left neighboring luma samples and then followed by the top neighboring luma samples, then unavailable top-left neighboring luma samples (1213, 1214) are determined column- wise using nearest adjacent available left neighboring luma samples (1211, 1212), and then in the downsampling filtering process on the top neighboring luma samples, unavailable top neighboring luma samples (1215, 1216) are determined using a nearest available top neighboring luma sample; if the downsampling filtering process is first applied on top neighboring luma samples and then followed by left neighboring luma samples, then unavailable top-left neighboring luma samples (1201, 1202) are determined row-wise using nearest adjacent available top neighboring luma samples (1205, 1206), and unavailable top neighboring luma samples (1203, 1204) are determined using a nearest adjacent available top neighboring luma sample, and if the downsampling filtering process is first applied on left neighboring luma samples and then followed by the top neighboring luma samples, then unavailable top-left neighboring luma samples (1213, 1214) are determined column- wise using nearest adjacent available left neighboring luma samples (1211, 1212), and then in the downsampling filtering process on the top neighboring luma samples, unavailable top neighboring luma samples (1215, 1216) are determined using a nearest available top neighboring luma sample; calculating a parameter of the CCLM prediction mode based on a result of applying the downsampling filtering process to the unavailable neighboring luma samples; and reconstructing the current block based on the calculated parameter of the CCLM prediction mode; wherein applying the down-sample filter includes performing an N-tap filter on the at least one unavailable neighboring luma sample, N being determined based on an SPS chroma vertical collocated flag used to indicate whether the at least one unavailable neighboring luma sample and a corresponding chroma sample are vertical collocated, and if the SPS chroma vertical collocated flag is true, N assumes a value of 5, and if the SPS chroma vertical collocated flag is false, N assumes a value of 6.